Please read through this README to get some basic ideas on how to run WRF-Var.

1) To run WRF-Var, first create a working directory, 
   for example, WRFDA/var/test, then follow the steps below:

cd WRFDA/var/test (go to the working directory)

ln -sf WRFDA/run/LANDUSE.TBL ./LANDUSE.TBL
ln -sf $DAT_DIR/rc/2007010200/wrfinput_d01 ./fg (link first guess file as fg)
ln -sf WRFDA/var/obsproc/obs_gts_2007-01-02_00:00:00.3DVAR ./ob.ascii (link OBSPROC processed 
                                                                       observation file as ob.ascii)
ln -sf $DAT_DIR/be/be.dat ./be.dat (link background error statistics as be.dat)
ln -sf WRFDA/var/da/da_wrfvar.exe ./da_wrfvar.exe (link executable)
mkdir trace (if &wrfvar9 trace_use=true)

vi namelist.input (a very basic namelist.input for running the tutorial test case is shown below. 
                   Only time and domain settings need to be specified for a certain case if 
                   using default settings provided in WRFDA/Registry/Registry.wrfvar. However,
                   it is VERY IMPORTANT to make sure the settings in &physics record are consistent
                   with those in your WRF settings.)
&wrfvar1
/
&wrfvar2
/
&wrfvar3
/
&wrfvar4
/
&wrfvar5
/
&wrfvar6
/
&wrfvar7
/
&wrfvar8
/
&wrfvar9
trace_use=false,  (Note: if not specified, default trace_use=true is applied. 
                   A subdirectory trace has to be created in your working directory 
                   before running da_wrfvar.exe)
/
&wrfvar10
/
&wrfvar11
/
&wrfvar12
/
&wrfvar13
/
&wrfvar14
/
&wrfvar15
/
&wrfvar16
/
&wrfvar17
/
&wrfvar18
analysis_date="2007-01-02_00:00:00.0000",
/
&wrfvar19
/
&wrfvar20
/
&wrfvar21
time_window_min="2007-01-01_21:00:00.0000", (this variable is actually not used in WRF-Var 
                                             for conventional data assimilation. The actual
                                             obs time window is deciced in obsproc. Set it
                                             to be the same as time_window_min in obsproc
                                             namelist.3dvar_obs for your own reference.)
/
&wrfvar22
time_window_max="2007-01-02_03:00:00.0000", (this variable is actually not used in WRF-Var 
                                             for conventional data assimilation. The actual
                                             obs time window is deciced in obsproc. Set it
                                             to be the same as time_window_max in obsproc
                                             namelist.3dvar_obs for your own reference.)
/
&wrfvar23
/
&time_control
start_year=2007,
start_month=01,
start_day=02,
start_hour=00,
end_year=2007,
end_month=01,
end_day=02,
end_hour=00,
/
&dfi_control
/
&domains
e_we=45,
e_sn=45,
e_vert=28,
dx=200000,
dy=200000,
/
&physics (VERY IMPORTANT: it is essential to make sure the settings here are consistent 
          with those in your WRF settings)
mp_physics=3,
sf_sfclay_physics=1,
sf_surface_physics=1,
num_soil_layers=5
/
&fdda
/
&dynamics
/
&bdy_control
/
&grib2
/
&namelist_quilt
/

da_wrfvar.exe >&! wrfda.log

2) To run da_update_bc.exe, follow the steps below:

cd WRFDA/var/test  (the directory where you ran WRF-Var)
cp -p  $DAT_DIR/rc/2007010200/wrfbdy_d01 ./wrfbdy_d01 (IMPORTANT: make a copy of wrfbdy_d01
                                                       as the wrf_bdy_file will be 
                                                       overwritten by da_update_bc.exe)
vi parame.in
&control_param
 wrfvar_output_file = './wrfvar_output'
 wrf_bdy_file       = './wrfbdy_d01'
 wrf_input          = '$DAT_DIR/rc/2007010200/wrfinput_d01'
 cycling = .false. (set to .true. if WRF-Var first guess comes from a previous WRF forecast.)
 debug   = .true.
 low_bdy_only = .false.             
 update_lsm = .false. 
/
ln -sf WRFDA/var/da/da_update_bc.exe ./da_update_bc.exe
./da_updatebc.exe

