page header
 

Running WRF-Var - real data case

Reference

2010 summer tutorial

The goal of this session is to generate a data-assimilated updated WRF analysis and boundary conditions.

Souce code

Get the pre-compiled code, if you want to.

/scratch01/tutuser00/2011WRF_tutorial/WRFDAV3/var/build/da_wrfvar.exe and /scratch01/tutuser00/2011WRF_tutorial/WRFDAV3/var/build/da_update_bc.exe are the 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.

We recommend you create ~tutuser##/3dvar and cd there to be your working directory for this session.

> mkdir ~/3dvar
> cd ~/3dvar
(or other your choice of working directory)

Input data

In addition to namlist.input and LANDUSE.TBL,

> ln -fs /scratch01/tutuser00/2011WRF_tutorial/WRFDAV3/run/LANDUSE.TBL LANDUSE.TBL

the other three major input files to WRF-Var are observations (ob.ascii), background error statistics (be.dat), and first guess (fg).

  • ob.ascii is in plain-text format and is the output from obsproc.
  • > ln -fs ~/obsproc/obs_gts_2007-09-15_00:00:00.3DVAR ./ob.ascii

  • be.dat is in binary format and is the output from gen_be utility. (generating your own be.dat will be discussed later. right now, just use the pre-supplied be.dat)

    > ln -fs /scratch01/tutuser00/DA_Input_Data/nari/be/be.dat.cv5 ./be.dat

  • fg is in netCDF format and can be either from WPS/real or from wrf forecast.

    > ln -fs /scratch01/tutuser00/DA_Input_Data/nari/rc/2007091500/wrfinput_d01 ./fg

Edit namelist.input

A very basic namelist.input for running the tutorial case is available at WRFDA/var/test/tutorial/namelist.input

> cp /scratch01/tutuser00/2011WRF_tutorial/WRFDAV3/var/test/tutorial/namelist.input namelist.input

Edit namelist.input

The following namelist variables should be consistent with the time and domain of your analysis target.

&wrfvar18
analysis_date='2007-09-15_00:00:00",
/
&wrfvar21
time_window_min="2007-09-14_22:30:00",
/
&wrfvar22

time_window_max="2007-09-15_01:30:00",
/
&time_control
start_year=2007,
start_month=09,
start_day=15,
start_hour=00,
end_year=2007,
end_month=09,
end_day=15,
end_hour=00,
/
&domain
e_we=75,
e_sn=70,
e_vert=28,
dx=35000,
dy=35000,
/
&physics
(Make sure the physics options are matched with those in fg file, use "ncdump -h fg" to check the physical options used)
... ...
sf_surface_physics=3,
... ...
/

Run WRF-Var (da_wrfvar.exe)

> ln -fs /scratch01/tutuser00/2011WRF_tutorial/WRFDAV3/var/build/da_wrfvar.exe

> /scratch01/tutuser00/2011WRF_tutorial/WRFDAV3/var/build/da_wrfvar.exe

Don't know if you are successful ? see the reference log file

Check output

wrfvar_output is the data-assimilated analysis output. It is in wrfinput format.

The analysis increments can be obtained by using NCO commands ncdiff. The fields can be quickly viewed using ncview, or other WRF NCL graphic tools, or .

>cp /scratch01/tutuser00/2011WRF_tutorial/WRFDAV3/var/graphics/ncl/WRF-Var_plot.ncl WRF-Var_plot.ncl
>cp /scratch01/tutuser00/2011WRF_tutorial/WRFDAV3/var/graphics/ncl/WRF_contributed.ncl.test WRF_contributed.ncl.test

Edit WRF-Var_plot.ncl, changes are :

... ...
first_guess = addfile("fg"+".nc", "r")
analysis = addfile("wrfvar_output"+".nc", "r")
... ...
fg = first_guess->U ;Theta-T0
an = analysis->U ;Theta-T0
plot_data = an - fg
; plot_data = an

> ncl WRF-Var_plot.ncl

WRF-VAR_U_level_18.pdf will be generated, which is the increments of the DA. you can use command below to view it:

> evince WRF-VAR_U_level_18.pdf

wrfda.log (or your_choice_of_log name, or rsl.out.0000) and statistics are the two most important diagnostic files that should be checked after each WRF-Var run to make sure that the task was done correctly and successfully.

Take a look at namelist.output to see the full list of namelist options.

Update WRF boundary conditions

After creating an analysis, we have changed the initial conditions for the model, the tendencies in the wrfbdy should be adjusted based on the updated initial conditions.

Important: make a copy of wrfbdy_d01 from WPS/real as the wrfbdy_d01 will be overwritten by the da_update_bc.exe.

> cp /scratch01/tutuser00/DA_Input_Data/nari/rc/2007091500/wrfbdy_d01 ./wrfbdy_d01

A sample parame.in for update_bc is provided in the WRFDA package WRFDA/var/test/update_bc/parame.in

> cp /scratch01/tutuser00/2011WRF_tutorial/WRFDAV3/var/test/update_bc/parame.in parame.in

Edit parame.in

&control_param
wrfvar_output_file = './wrfvar_output'
wrf_bdy_file = './wrfbdy_d01'
wrf_input = './fg'
domain_id = 1
cycling = .false.
debug = .true.
low_bdy_only = .false.
update_lsm = .false.
/

Run da_update_bc.exe

> ln -fs /scratch01/tutuser00/2011WRF_tutorial/WRFDAV3/var/build/da_update_bc.exe
>.
/da_update_bc.exe

Check output

Use WRFDA/var/build/diffwrf, or ncdiff, or ncview, or other WRF NCL graphic tools to check what fields have been updated.

Come back here later (or during Advanced Practice Session) for other advanced practices on running WRF-Var with real data.

Advanced

  • Try modifying some of the namelist variables listed above (for example, setting a different analysis_date, setting a different e_we) and see what log messages you will get.

  • Try changing the time_window_min to be "2007-09-15_00:00:00" and compare the results with previous runs (Remember to check log and diagnostic files first).

  • Try running WRFDA using NCEP Pprepbufr data (/scratch01/tutuser00/DA_Input_Data/nari/rc/2007091500/ob.bufr) as the observation input.
    • NCEP Prepbufr format data needed to be converted on non-IBM machines.

    > cp /scratch01/tutuser00/DA_Input_Data/nari/ob/2007091500/ssrc.c .
    > pgcc -o ssrc.exe ssrc.c
    > ssrc.exe < /scratch01/tutuser00/DA_Input_Data/nari/ob/2007091500/gdas1.t00z.prepbufr.nr > ob.bufr

    Edit namelist.input

    &wrfvar3
    ob_format = 1,
    /

  • Try running WRF-Var with a different BE option (cv_options=3) using a pre-supplied be.dat available in the WRFDA package WRFDA/var/run/be.dat.cv3. Compare the results with previous cv_options=5 runs.

  • ln -fs/scratch01/tutuser00/2011WRF_tutorial/WRFDAV3/var/run/be.dat.cv3 ./be.dat

    Edit namelist.input

    &wrfvar7
    cv_options = 3,
    /


 
practical_page_header