Version 0.0 Monika KRYSTA NCAR/MMM 01-2009

Version 0.1 Yann MICHEL NCAR/MMM 02-2009

Version 0.2 Yann MICHEL NCAR/MMM 03-2009 – update of diagnostics


Stage 0 

gen_be_stage0_wrf.f90 build up "standard perturbation fields"


Purpose : To convert WRF output to "standard perturbation fields" required by the WRF-Var BE covariance generation utility "gen_be".

Input  : WRF forecasts for a specified date (NETCDF format). 

Output : Binary files for use in gen_be_stage1.


[1] Initialize information

[2] Setup up ancillary fields using 1st member values

[3] Convert WRF forecast fields to standard fields and output

[4] Compute perturbations and output [NMC or Ensemble]

Stage 1  

gen_be_stage1.f90 Produces temporal perturbations


Purpose : to remove the binned mean from the perturbation fields.

Input   : binary files: "pert.ccyymmddhh.e"ce for ENS or "pert.ccyymmddhh.e001" for NMC.

Output : binary files for use of the gen_be_stage2


 [1] Initialize namelist variables and other scalars.

[2] Read fields from standard files, and calculate mean fields'


Stage 2  

gen_be_stage2.f90 Computes regression coefficients: 'covar/var'


Input: Reads 'fullflds/yyymmddhh.fullflds.e+ce'

Reads 'bin.data'

Reads perturbation files 'varyyyymmddhh.var.e+ce'

Output: Write regression coefficients into 'gen_be_stage2.dat '


[1] Initialize namelist variables and other scalars.'

[2] Read fields, and calculate correlations

[3] Calculate eigenvectors, eigenvalues and inverse for psi/psi covariance

[4] Calculate regression coefficients

Stage 2a  

gen_be_stage2a.f90 Builds unbalanced fields: chi_u, T_u, ps_u


Purpose

Calculates (for every time instant and every member) unbalanced fields (as perturbed field- field explained by perturbed psi via a linear mapping): 

perturbed field - regcoeff*psi (summation over k performed in case of each field)

Input

Reads gen_be stage2.dat [have not checked the filtering yet]

Reads bin.data

Reads perturbation files var/yyyymmddhh.var.e

Output

[1] Initialize namelist variables and other scalars.

[2] Read regression coefficients and bin information

[3] Apply ', num_passes, ' pass recursive filter to regression coefficients  if ( num_passes > 0 )

[4] Read standard fields, and compute control variable fields

Writes var_u/yyymmddhh.var_u.e+ce (.01 for ps_u)


Stage 3  

gen_be_stage3.f90 Reorganise distribution in vertical direction


Input

Read read fullflds/yyyymmddhh.e+ce

Read var/yyyymmdd.var.e+ce (for all fields; take unbalanced if available; +.01 for ps)

Output

Write var/yyyymmddhh.var.e+ce.ck  

(var=psi,chi_u,t_u,ps_u,rh and ck is vertical level number)




[1] Initialize namelist variables and other scalars

 if ( .not. data_on_levels ) then

[2] Process fields for variables - loop over variables is in script (gen_be.ksh)

[3] Calculate vertical eigenvectors and eigenvalues for all variables

Map binned eigenvectors to x, y grid

Take sqrt of eigenvalues

end (not. data_on_levels)

[4] Transform perturbations (or not), and output.

Stage 4 Regional  

gen_be_stage4_regional.f90 Computes lengthscale for recursive filter


Input: Read rundir/varyyyymmddhh.var.e+ce.ck (ck is vertical level)

Output: Writes ck, coeff, 1/coeff in dir.varck/sl_print.var 


[1] Initialize namelist variables and other scalars.

[2] Input fields and calculate correlation as a function of distance between points.

[3] Compute fit of correlation to a straight line


Stage Diagnostics I  

gen_be_diags.f90 Gather data into file 'be.dat'


Input: 'bin.dat', 'gen_be_stage2.dat', gen_be_stage3.'+var+'.dat', var/'sl_print.'+var

Output: be.dat


[0] Initialize namelist variables and other scalars.

[1] Gather regression coefficients.'


[2] Gather vertical error eigenvectors, eigenvalues

[3] Gather horizontal scale length / horizontal error power spectra


Stage Diagnostics II  

gen_be_diags_read.f90 Read file 'be.dat' and print out diagnostics


Input: 'be.dat'

Output: Fortran units


[0] Initialize namelist variables and other scalars.

[1] Gather regression coefficients.

[2] Gather vertical error eigenvectors, eigenvalues.

[3] Gather horizontal scale length / horizontal error power spectra



Stage Diagnostics IIIa  

gen_be_cov3d.f90 Covariances between 3D balanced and unbalanced fields


Input: var1/yyyymmddhh.var1.e+ce,  var2/yyyymmddhh.var2.e+ce 

Output: Fortran units


[1] Initialize namelist variables and other scalars.

[2] Read fields, and calculate correlations

Stage Diagnostics IIIb

gen_be_cov2d.f90 Covariances between 2D balanced and unbalanced fields


Input: var1/yyyymmddhh.var1.e+ce,  var2/yyyymmddhh.var2.e+ce 

Output: Fortran units


[1] Initialize namelist variables and other scalars.

[2] Read fields, and calculate correlations