Abstract : As the background error covariance matrix is a key component of any assimilation system, its modelling is an important step. Usually, this matrix is decomposed into correlations and variance matrices. An interesting method for modelling the correlation matrix of the background error for complex geometry, like ocean grid, consists in computing correlation functions using a diffusion operator. The background error correlation functions can be estimated for example from an ensemble of perturbed forecasts. The diffusion operator is able to represent heterogeneous correlation functions at a reasonable numerical cost. But a first challenge resides in the determination of the local diffusion tensor corresponding to the local correlation function. Then the second challenge resides in the determination of the normalization to make sure that the matrix modelled through the diffusion operator is a correlation matrix. In this article, we propose to build a background error correlation matrix using a diffusion operator based on a local diffusion tensor. The estimation of this local tensor is performed using an ensemble of perturbed forecasts. A validation within a randomization method illustrates the feasibility and the accuracy of the proposed method. In particular, it is shown that the local geographical variations of diagnosed correlation functions (through an ensemble of perturbed forecast) are well represented.