page header
 

Running 4D-VAR

Reference: Download the tutorial presentation

source code

Get the pre-compiled code, if you have not done so.

WRFDA/var/build/da_wrfvar_4dvar.exe (this is renamed from da_wrfvar.exe)
is the executable that will be used in the 4D-VAR 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.

We recommend you create /kumquat/users/${USER}/DA/4dvar and cd there to be your working directory for this session.

mkdir /kumquat/users/${USER}/DA/4dvar
cd /kumquat/users/${USER}/DA/4dvar (or other your choice of working directory)

Input data

For running 3D-VAR, the 3 major input files are observations (ob.ascii), background error statistics (be.dat) and first guess (fg). For 4D-VAR, the similar concept holds except that now the observations need to be processed into multiple time-slot files.

Test data for this 4D-VAR tutorial case are in /kumquat/wrfhelp/DATA/WRFDA/4dvar.

  • Observations

    /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071600/ob.ascii+
    /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071601/ob.ascii
    /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071602/ob.ascii
    /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071603/ob.ascii
    /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071604/ob.ascii
    /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071605/ob.ascii
    /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071606/ob.ascii-

  • First guess

    /kumquat/wrfhelp/DATA/WRFDA/4dvar/rc/2005071600/wrfinput_d01
    /kumquat/wrfhelp/DATA/WRFDA/4dvar/rc/2005071600/wrfbdy_d01

  • Background error statistics

    /kumquat/wrfhelp/DATA/WRFDA/4dvar/be/be.dat

Linking files

cd /kumquat/users/${USER}/DA/4dvar

A few additional contant files are needed for 4D-VAR runs.

ln -fs /kumquat/users/${USER}/DA/WRFDA/run/RRTM_DATA_DBL ./RRTM_DATA

ln -fs /kumquat/users/${USER}/DA/WRFDA/run/*.TBL .

link first guess and boundary files.

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/rc/2005071600/wrfinput_d01 ./fg

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/rc/2005071600/wrfavn_d01 ./fg02

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/rc/2005071600/wrfinput_d01 .

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/rc/2005071600/wrfbdy_d01 .

cp ./fg02 ./ana02

link observation files

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071600/ob.ascii+ ./ob01.ascii

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071601/ob.ascii ./ob02.ascii

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071602/ob.ascii ./ob03.ascii

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071603/ob.ascii ./ob04.ascii

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071604/ob.ascii ./ob05.ascii

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071605/ob.ascii ./ob06.ascii

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/ob/2005071606/ob.ascii ./ob07.ascii

link background error file

ln -fs /kumquat/wrfhelp/DATA/WRFDA/4dvar/be/be.dat .

Edit namelists

A very basic namelist.input for running the 4D-VAR tutorial case is available at /kumquat/wrfhelp/DATA/WRFDA/4dvar/namelist.input

cp /kumquat/wrfhelp/DATA/WRFDA/4dvar/namelist.input .

vi namelist.input

Pay special attention to the following namelist variables.

&wrfvar1
var4d=true,
var4d_lbc=true,
var4d_bin=3600,
/
&wrfvar6
ntmax=5 # for testing purpose only, reduce the maximum iterations, since 4D-VAR takes a lot longer to run than 3D-VAR
/
&wrfvar18
analysis_date='2005-07-16_00:00:00",
/
&wrfvar21
time_window_min="2005-07-16_00:00:00",
/
&wrfvar22
time_window_max="2005-07-16_06:00:00",
/
&time_control
run_hours=6,
start_year=2005,
start_month=07,
start_day=16,
start_hour=00,
end_year=2005,
end_month=07,
end_day=16,
end_hour=06,
interval_seconds=21600,
debug_level=-300,
/
&domains
time_step=600,
e_we=31,
e_sn=25,
e_vert=17,
dx=135000,
dy=135000,
smooth_option=0,
nproc_x=0,
/
&perturbation
trajectory_io=true,
enable_identity=false,
jcdfi_use=true,
jcdfi_diag=1,
jcdfi_penalty=1000.0,
/

Running 4D-VAR

mpirun -np 4 /kumquat/users/${USER}/DA/WRFDA/var/build/da_wrfvar_4dvar.exe >& var4d.log

 

Helpful tip!, after submitting an MPI job like this, you don't have to sit around without being able to see the progress of your run. After submitting the job, hit control+z on your keyboard to suspend the job, then type "bg" and enter to continue running the job in the background. Now, you can use the "tail" command to see the log files in real time!

tail -f rsl.out.0000

Press control+c at any time to quit "tail"

Advanced

Try setting up a different 4D-VAR run using CONUS60 case (/kumquat/wrfhelp/DATA/WRFDA/CONUS60) and compare the results with the 3D-VAR run. A sample namelist.input is provided in the WRFDA source tar file as WRFDA/var/test/4dvar/namelist.input for the CONUS60 case.

The CONUS60 case is not used as the default 4D-VAR practical case because of its relatively large domain dimensions for 4D-VAR tutorial purpose.

 


back to top
 
practical_page_header