Reference: Download the tutorial presentation
Source code
Get the pre-compiled code, if you have not done so.
WRFDA/var/build/gen_be_ensmean.exe
WRFDA/var/build/gen_be_ep2.exe
WRFDA/var/build/da_wrfvar_3dvar.exe
are the three executables that will be used in this session.
Choice of your working directory
We recommend running each session in a separate directory, so that it will be easier to check for the necessary input files and look for what output files are created after a successful run.
mkdir /kumquat/users/${USER}/DA/hybrid
cd /kumquat/users/${USER}/DA/hybrid
Input data
The hybrid case is different from other practical cases.
The procedure is the same as Running WRFDA-3DVAR except for some more extra input files and namelist.input settings.
In addition to the basic input files (LANDUSE.TBL, ob.ascii, be.dat) that you should have been familiar with by now, an ensemble mean (which will be the fg for the hybrid application) and ensemble perturbations are the extra required input files.
- ensemble mean
Usually, the first step of hybrid data assimilation is to prepare a set of ensembles.
For this practice, a set of 10-member ensemble forecasts is provided under /kumquat/wrfhelp/DATA/WRFDA/Hybrid/fc directory.
Hybrid/fc/2006102712/
-rw-r--r-- 1 wrfhelp cbet 30091104 Oct 14 2008 wrfout_d01_2006-10-28_00:00:00.e001
-rw-r--r-- 1 wrfhelp cbet 36580804 Oct 14 2008 wrfout_d01_2006-10-28_00:00:00.e002
-rw-r--r-- 1 wrfhelp cbet 29932828 Oct 14 2008 wrfout_d01_2006-10-28_00:00:00.e003
-rw-r--r-- 1 wrfhelp cbet 36422528 Oct 14 2008 wrfout_d01_2006-10-28_00:00:00.e004
-rw-r--r-- 1 wrfhelp cbet 34259292 Oct 14 2008 wrfout_d01_2006-10-28_00:00:00.e005
-rw-r--r-- 1 wrfhelp cbet 34259292 Oct 14 2008 wrfout_d01_2006-10-28_00:00:00.e006
-rw-r--r-- 1 wrfhelp cbet 36739080 Oct 14 2008 wrfout_d01_2006-10-28_00:00:00.e007
-rw-r--r-- 1 wrfhelp cbet 38902324 Oct 14 2008 wrfout_d01_2006-10-28_00:00:00.e008
-rw-r--r-- 1 wrfhelp cbet 38902324 Oct 14 2008 wrfout_d01_2006-10-28_00:00:00.e009
-rw-r--r-- 1 wrfhelp cbet 38902320 Oct 14 2008 wrfout_d01_2006-10-28_00:00:00.e010
-rw-r--r-- 1 wrfhelp cbet 30091104 Jan 20 2009 wrfout_d01_2006-10-28_00:00:00.mean
-rw-r--r-- 1 wrfhelp cbet 30091104 Jan 20 2009 wrfout_d01_2006-10-28_00:00:00.vari
2006102712/wrfout_d01_2006-10-28_00:00:00.e* are ensemble forecasts valid at 2006102800 initialized at 2006102712.
wrfout_d01_2006-10-28_00:00:00.mean and wrfout_d01_2006-10-28_00:00:00.vari are two template files that will be overwritten by a program that calculates ensemble mean from ensemble forecasts.
- Copy ensemble forecasts and template files to your working directory.
cp -r /kumquat/wrfhelp/DATA/WRFDA/Hybrid/fc/2006102712 .
- Edit gen_be_ensmean_nl.nl (or copy it from /kumquat/wrfhelp/DATA/WRFDA/Hybrid/gen_be_ensmean_nl.nl)
vi gen_be_ensmean_nl.nl
&gen_be_ensmean_nl
directory = './2006102712'
filename = 'wrfout_d01_2006-10-28_00:00:00'
num_members = 10
nv = 7
cv = 'U', 'V', 'W', 'PH', 'T', 'MU', 'QVAPOR'
/
/kumquat/users/${USER}/DA/WRFDA/var/build/gen_be_ensmean.exe
2006102712/wrfout_d01_2006-10-28_00:00:00.mean is the ensemble mean
2006102712/wrfout_d01_2006-10-28_00:00:00.vari is the ensemble variance
You may use the NCL script /kumquat/wrfhelp/DATA/WRFDA/Hybrid/ncl/ens_mean_std_dev.ncl to make some plots.
cp /kumquat/wrfhelp/DATA/WRFDA/Hybrid/ncl/ens_mean_std_dev.ncl .
cp
/kumquat/wrfhelp/DATA/WRFDA/Hybrid/ncl/WRF_contributed.ncl.test .
Edit ens_mean_std_dev.ncl to set the proper date and path path
......
dir = "/kumquat/users/$USER/DA/hybrid/" + date + "/"
......
ncl ens_mean_std_dev.ncl
display mean_std_dev.pdf
gen_be_ep2.exe requires 4 command arguments (DATE, NUM_MEMBER, DIRECTORY, FILENAME) as defined below:
/kumquat/users/${USER}/DA/WRFDA/var/build/gen_be_ep2.exe 2006102800 10 ../../2006102712 wrfout_d01_2006-10-28_00:00:00
- Check the output files generated by gen_be_ep2.exe
A list of binary files will be created under 2006102800/ep directory. Among them, tmp.e* are temporary scratch files that can be removed.
You may use the NCL script /kumquat/wrfhelp/DATA/WRFDA/Hybrid/ncl/ens_perturbations.ncl to make some plots.
cp /kumquat/wrfhelp/DATA/WRFDA/Hybrid/ncl/ens_perturbations.ncl .
cp /kumquat/wrfhelp/DATA/WRFDA/Hybrid/ncl/WRF_contributed.ncl.test .
Edit
ens_perturbations.ncl to set the proper date and path.
......
directory = "/kumquat/users/$USER/DA/hybrid/" + date
......
ncl
ens_perturbations.ncl
display ens_perturbations.pdf
Run WRFDA in hybrid mode
cd /kumquat/users/${USER}/DA/hybrid
ln -fs 2006102800/ep ./ep # ensemble perturbation files should be under the ep subdirectory
ln -fs 2006102712/wrfout_d01_2006-10-28_00:00:00.mean ./fg # first guess is an ensemble forecast mean
ln -fs /kumquat/users/${USER}/DA/WRFDA/run/LANDUSE.TBL .
ln -fs /kumquat/wrfhelp/DATA/WRFDA/Hybrid/ob/2006102800/ob.ascii ./ob.ascii
ln -fs /kumquat/wrfhelp/DATA/WRFDA/Hybrid/be/be.dat ./be.dat
Edit namelist.input (a sample file is provided as /kumquat/wrfhelp/DATA/WRFDA/Hybrid/namelist.input)
cp /kumquat/wrfhelp/DATA/WRFDA/Hybrid/namelist.input
vi namelist.input
Pay special attention to the following hybrid-related settings:
&wrfvar7
je_factor = 2.0
/
&wrfvar16
ensdim_alpha = 10 # hybrid mode is activated when ensdim_alpha is larger than zero.
alphacv_method = 2
alpha_corr_scale = 1500.0
/
mpirun -np 4 /kumquat/users/${USER}/DA/WRFDA/var/build/da_wrfvar_3dvar.exe
Other practice
Try different settings to see the impact:
Ensemble covariance weighting factor (je): try
je_factor = 10.0 (note that jb = je_factor/(je_factor - 1), and hence jb = 1.11)
je_factor = 1.25 (jb = 5)
je_factor = 1.1 (jb = 11)
Hybrid covariance localization scale (alpha_corr_scale): try
alpha_corr_scale = 500.0
alpha_corr_scale = 250.0
Try setting ensdim_alpha = 0, and compare the results.