# Static Background Error Covariance¶

## General B Design¶

The multivariate background error covariance \(\mathbf{B}\) is designed primarily to follow that of the Weather Research and Forecasting (WRF) model Data Assimilation system (WRFDA) and the Gridpoint Statistical Interpolation (GSI). It uses both a generic component from the SABER repository and a model-specific compoment from the MPAS-JEDI repository. It is implemented as a set of linear variable changes to a block-diagonal correlation matrix \(\mathbf{C}\).

The set of linear variable changes includes: (1) a linear variable change \(\mathbf{K}_{1}\),
`control2analysis`

in the MPAS-JEDI repository, (2) a linear variable change \(\mathbf{K}_{2}\),
BUMP Vertical BALance (VBAL) in the SABER repository, and (3) a linear variable change \(\mathbf{\Sigma}\),
BUMP VARiance (VAR) in the SABER repository.

\(\mathbf{K}_{1}\) transforms `stream_function`

and `velocity_potential`

to
`uReconstructZonal`

and `uReconstructMeridional`

. If users choose the pseudo relative humidity, `relhum`

,
as the moisture control variable, \(\mathbf{K}_{1}\) will also transform `relhum`

to `spechum`

.
Please refer to Control2Analysis for explanation of `control2analysis`

.

\(\mathbf{K}_{2}\) and \(\mathbf{\Sigma}\) depend on a decomposition of `velocity_potential`

, `temperature`

,
and `surface_pressure`

into a “balanced” component that is predictable from `stream_function`

and a residual, “unbalanced” component that is independent of `streamfunction`

.

\(\mathbf{K}_{2}\) calculates the the balanced parts of `velocity_potential`

, `temperature`

, and `surface_pressure`

from `stream_function`

, and returns the full code:velocity_potential, `temperature`

, and `surface_pressure`

,
that is, the sum of the balanced and unbalanced parts for each variable.
The balanced parts are calculated via linear regression with pre-diagnosed coefficients.
No balance is applied to `spechum`

or `relhum`

with other variables.

\(\mathbf{\Sigma}\) is a diagonal matrix with pre-diagnosed error standard deviations for
`stream_function`

, `spechum`

(or `relhum`

), and the unbalanced parts of `[velocity_potential, temperature, surface_pressure]`

.

The block-diagonal correlation matrix \(\mathbf{C}\) consists of univariate correlation matrices that define
the spatial autocorrelations of `stream_function`

, `spechum`

(or `relhum`

),
and the unbalanced parts of `[velocity_potential, temperature, surface_pressure]`

.
The application of these univariate correlation matrices is implemented using BUMP Normalized Interpolated Convolution from an Adaptive Subgrid
(NICAS) with pre-diagnosed horizontal and vertical correlation length scales.

## B Estimation¶

Please see SABER’s BUMP SABER blocks to generate various BUMP statistics in general.

One missing operation in MPAS-JEDI is an inverse operation of `control2analysis`

(i.e., from zonal and meridional winds to stream_function and velocity_potential) because solving the
Poisson’s equation on the unstructured grid efficiently is not straightforward. Thus a
spherical harmonics-based NCL (NCAR Command Language) function is used on an intermediate
lat/lon grid, then the `stream_function`

and `velocity_potential`

fields on
the lat/lon grids are interpolated back to the MPAS native mesh.

With the samples of
`[stream_function, velocity_potential, temperature, spechum or relhum, surface_pressure]`

,
we diagnose the following B statistics: the regression coefficients defining the balanced components by using the BUMP VBAL driver,
the error standard deviations by using BUMP VAR driver, and the horizontal and vertical correlation length scales
by using the BUMP Hybrid DIAGnostics driver. Finally, given the diagnosed length scales,
various quantities used in the BUMP NICAS operations can be pre-calculated.
When we run the variational applications, we need to specify the location of saved netcdf output files
from BUMP VBAL, BUMP VAR, and BUMP NICAS.

If users want to diagnose the B statistics for hydrometeors, the variables names
`[qc, qi, qr, qs, qg]`

need to be added to `input variables`

yaml key in the parameter
estimation application together with `[stream_function, velocity_potential, temperature, spechum or relhum, surface_pressure]`

.