midas_diagBmatrix¶
Dependency Diagrams:
- program midas_diagbmatrix¶
- Purpose
Program for computing diagnostics of the background-error covariances (B) and localization (L) matrices
—
- Algorithm
The
diagBmatrix
program performs two different types of diagnostics based on the namelist options.
Columns of B and L: Allow to extract columns of B (the background-error covariances matrix) which is a useful way to simulate single-observation (a.k.a pseudo-obs) experiments without using real observations. See e.g. Figs 5 and 6 in <https://doi.org/10.1175/MWR-D-18-0248.1>. If localization is used, the corresponding columns of the localization matrix (L) will be outputed.
Implied variances: Compute the variances resulting from an ensemble of random perturbations generated from the provided B matrix, including hybrid covariances. This allow to evaluate the impact of various choices in the design of B on the modification to the variances of the ensemble of background-error estimates used to derivate B, i.e. the “measured” variances.
—
Input and Output Files
Description of file
flnml
In - Main namelist file with parameters user may modify
ensemble/$YYYYMMDDHH_$HHH_$NNNN
In - Background ensemble member files
bgcov
In - B nmc matrix for the random perturbations
analysis_grid
- In - Horizontal grid file on which the random perturbations
are generated
trlm_$NN
(e.g.trlm_01
)
- In - Background state (a.k.a. trial) files for each timestep
Only needed if a LQ-HU transform is used in B
columnB_$VAR_$YYYYMMDDHH.fst
Out - Column of B
columnBnorm_$VAR_$YYYYMMDDHH.fst
Out - Column of B normalize by the value at the pseudo-obs location
columnL_$YYYYMMDDHH.fst
Out - Column of L (only when ensemble-derived B is use)
stddev_$YYYYMMDDHH.fst
Out - Implied variances
–
- Synopsis
Below is a summary of the
diagBmatrix
program calling sequence:
Initial setups:
Read the NAMDIAG namelist and check/modify some values.
Setup horizontal and vertical grid objects from the provided template file (./analysisgrid)
Various modules are setup:
gridStateVector_mod
,timeCoord_mod
andbmatrix_mod
Columns of B and L:
Attribute time bin of the pseudo-obs based on the namelist option.
- For each variables and prescribed pseudo-obs positions:
create a Dirac delta distribution (zero everywhere except at obs location). This is equivalent to impose (O-F / sigma_obs) = 1 at one location.
apply B ^(1/2)^T B ^1/2 and output the results into a file
normalize the results by the value at the pseudo-obs position and output to a file
- If bMatrixEnsemble_mod is activated, for each prescribed pseudo-obs positions:
create a Dirac delta distribution
apply L ^(1/2)^T L ^1/2 and output the results into a file
Implied variances:
- For each member of the chosen random ensemble size:
create a random control vector
apply B ^1/2
store the resulting 3D state in randomEns
Compute and remove the ensemble mean
Compute the ensemble standard deviations at each grid point and output to a file
Compute the zonal and domain mean standard deviations and output to the same file
Needed modules
version_mod
: MODULE version_mod (prefix=’ver’ category=’8. Low-level utilities and constants’)
midasmpi_mod
: MODULE midasMpi_mod (prefix=’mmpi’ category=’8. Low-level utilities and constants’)
controlvector_mod
: MODULE controlVector_mod (prefix=’cvm’ category=’6. High-level data objects’)
gridvariabletransforms_mod
: MODULE gridVariableTransforms_mod (prefix=’gvt’ category=’4. Data Object transformations’)
varnamelist_mod
: MODULE varNameList_mod (prefix=’vnl’ category=’7. Low-level data objects’)
gridstatevector_mod
: MODULE gridStateVector_mod (prefix=’gsv’ category=’6. High-level data objects’)
gridstatevectorfileio_mod
: MODULE gridStateVectorFileIO_mod (prefix=’gio’ category=’4. Data Object transformations’)
ensemblestatevector_mod
: MODULE ensembleStateVector_mod (prefix=’ens’ category=’6. High-level data objects’)
bmatrix_mod
: MODULE bMatrix_mod (prefix=’bmat’ category=’2. B and R matrices’)
bmatrixensemble_mod
: MODULE bMatrixEnsemble_mod (prefix=’ben’ category=’2. B and R matrices’)
localization_mod
: MODULE localization_mod (prefix=’loc’ category=’2. B and R matrices’)
horizontalcoord_mod
: MODULE horizontalCoord_mod (prefix=’hco’ category=’7. Low-level data objects’)
advection_mod
: MODULE advection_mod (prefix=’adv’ category=’4. Data Object transformations’)
verticalcoord_mod
: MODULE verticalCoord_mod (prefix=’vco’ category=’7. Low-level data objects’)
timecoord_mod
: MODULE timeCoord_mod (prefix=’tim’ category=’7. Low-level data objects’)
randomnumber_mod
: MODULE randomNumber_mod (prefix=’rng’ category=’8. Low-level utilities and constants’)
utilities_mod
: MODULE utilities_mod (prefix=’utl’ category=’8. Low-level utilities and constants’)
ramdisk_mod
: MODULE ramDisk_mod (prefix=’ram’ category=’8. Low-level utilities and constants’)Routines called
ver_printnameandversion()
,mmpi_initialize()
,utl_tmg_start()
,utl_abort()
,ram_setup()
,tim_setup()
,tim_getdatestamp()
,gsv_setup()
,hco_setupfromfile()
,vco_setupfromfile()
,gsv_allocate()
,gsv_zero()
,bmat_setup()
,gvt_setup()
,gvt_setupreffromtrialfiles()
,gsv_varexist()
,vnl_varlevelfromvarname()
,bmat_sqrtbt()
,bmat_sqrtb()
,gio_writetofile()
,gsv_scale()
,ben_writeamplitude()
,ben_getnumloc()
,ben_getnuminstance()
,ben_getnumstepamplitudeassimwindow()
,ben_getamp3dstepindexassimwindow()
,tim_getstamplist()
,ben_getnens()
,ben_getamplitudeassimwindow()
,ben_getloc()
,mmpi_setup_latbands()
,mmpi_setup_lonbands()
,ens_allocate()
,ens_zero()
,ens_getonelev_r8()
,adv_ensemble_ad()
,loc_lsqrtad()
,loc_lsqrt()
,adv_ensemble_tl()
,ens_copymember()
,ens_deallocate()
,gsv_deallocate()
,rng_setup()
,rng_gaussian()
,bmat_reducetompilocal()
,gsv_getnumlevfromvarname()
,utl_tmg_stop()