User’s Guide for Advanced Research WRF (ARW) Modeling System Version 2

 

Appendix A: WRF Standard Initialization - Preparing Input Data

Table of Contents

Introduction

The WRFSI has been replaced by the WRF Preprocessor System (WPS). Documentation of the new WPS is available in chapter 3 of this document.

The WRF Standard Initialization (WRFSI) is the first step to set up the model for real-data simulations. The software is a collection of four programs that together provides the input data required by the WRF model to start a real-data simulation. The following figure illustrates the program components and data flow in WRFSI:

The WRFSI program takes a user's definition of a domain (or domains for a nested run), together with various terrestrial datasets for terrain, landuse, soil type, annual deep soil temperature, monthly vegetation fraction, maximum snow albedo, monthly albedo, slope data, and meteorological data from another model (in GriB format) to create mesoscale domain, and interpolate the above data to this domain. The output from WRFSI is in netCDF format and it is conforming to WRF I/O API.

The WRFSI program has been successfully ported to a number of Unix-based machines. These include Compaq Alpha, IBM, Linux (using both PGI and Intel compiler), SGI Altix, AMD Opteron (PGI compiler only). Makefiles are also available for Sun and SGI, but limited tests have been performed.

The WRFSI code runs on single processor machines only. The code is memory efficient.

Function of Each SI Program

The WRFSI program consists of four major independent programs: grib_prep, gridgen_model, hinterp and vinterp. It also has a few utility programs, siscan, staticpost, and plotfmt.

 

 

Program gridgen_model

The function of the program gridgen_model is to define a simulation domain, and read and interpolate various terrestrial datasets from latitude/longitude grid to the projection grid. The simulation domain is defined based on information specified by the user in SI's namelist file, section 'hgridspec' in wrfsi.nl. The terrestrial inputs that gridgen_model uses include terrain, landuse, soil type, annual deep soil temperature, monthly vegetation fraction, maximum snow albedo, monthly albedo, and slope data. These data are provided from WRF Users' Web site: http://www2.mmm.ucar.edu/wrf/users/. WRFSI supports three projection types: Lambert-Conformal, Polar stereographic, and Mercator.

Program grib_prep

The function of the program grib_prep is to read GriB files, degrib the data, and write the data out in a simple format, which is referred to as the intermediate format. The GriB files contain time-varying meteorological fields and are typically from another regional, or global model, such as NCEP's NAM (or Eta), and GFS models. SI supports the GriB format Edition 1 on many platforms, but only supports GriB 2 on 32-bit Linux at this time.

Each GriB dataset may contain data more than we need to initialize WRF model. To limit the data we require from the GriB files, Vtables are employed by which GriB code, and level codes are used to identify a particular field. Different GriB files may have different codes for the same variable, hence different Vtables are prepared for commonly available GriB files.

The provided Vtables are available for NAM/Eta 104, 212 grids, NAM/Eta data in AWIP format, GFS (or AVN), NCEP/NCAR Reanalysis archived at NCAR, RUC (pressure level data and hybrid coordinate data), and AFWA's AGRMET land surface model output.

If you have a GriB dataset that you would like to use to start the model, follow the Vtable examples given in the SI tar file under directory extdata/static/ and create one for your dataset.

You can also take advantage of the intermediate format to ingest any data you may have as long as they are on pressure levels (data on other coordinate will require code modifications). A description of the intermediate format can be found on http://wrfsi.noaa.gov/, or README file in the SI program tar file (section 3.2.1).

Program hinterp

The function of the program hinterp is to horizontally interpolate meteorological data degribbed by the grib_prep program onto the simulation domain created by gridgen_model. The methods of horizontal interpolation may be controlled by namelist variables

Program vinterp

The function of the program vinterp is to vertically interpolate meteorological data from pressure (or hybrid data in the case of RUC) levels to WRF's eta coordinate, which is defined by the user in the SI's namelist section 'interp_control' in wrfsi.nl.

Utility Program siscan

Program siscan is a utility program which may be used to read hinterp output (file name begins with hinterp.d01.*).

 
     siscan hinterp.d01.2000-01-24_12:00:00
 
 Scanning hinterp.d01.2000-01-24_12:00:00
 Domain Metadata Information
 -----------------------------------------------------
Domain Number .........  1
Parent ID ............. -1
Dynamic Init. Source .. SI
Static Init. Source ... SI
Valid Date (YYYDDD) ... 2000024
Valid Time (sec UTC) .. 43200.0
Origin X in Parent ....    -1
Origin Y in Parent ....    -1
Nest Ratio to Parent ..    -1
Delta X ............... 30000.0
Delta Y ............... 30000.0
Top Level .............   5000.0
Origin Z in Parent ....    -1
X dimension ...........    74
Y dimension ...........    61
Z dimension ...........    27
  ---------------------------------------------------  
 Variables found:
 NAME    S D   NX   NY   NZ     UNITS     DESCRIPTION       MINVAL   MAXVAL   AVGVAL
 ------- - - ----- ----- --- ------------ ---------------- -------- -------- --------
PRESSURE 0 1    27     0   0     Pa       Pressure levels     5000.  200100.   59078.
T        4 3    74    61  27     K        Temperature       204.627  296.902  249.544
U        4 3    74    61  27     m s-1    U                -11.2302  57.4033  14.6849
V        4 3    74    61  27     m s-1    V                -52.7882  66.4211   5.9056
RH       4 3    74    61  27     %        Relative Humidit    1.000  117.639   52.779
SPECHUMD 4 3    74    61  27     kg kg-1  Specific Humidit 0.000000 0.016359 0.002082
HGT      4 3    74    61  27     m        Height                 0.   20601.    6206.
PMSL     4 2    74    61   0     Pa       Sea-level Pressu  100689.  102797.  101645.
PSFC     4 2    74    61   0     Pa       Surface Pressure   89520.  102235.  100210.
SNOW     1 2    74    61   0     kg m-2   Water Equivalent    0.000  184.144    5.537
SKINTEMP 1 2    74    61   0     K        Sea-Surface Temp  243.144  297.855  279.444
ST000010 1 2    74    61   0     K        T of 0-10 cm gro    0.000  291.070  143.554
ST010040 1 2    74    61   0     K        T of 10-40 cm gr    0.000  291.646  145.186
ST040100 1 2    74    61   0     K        T of 40-100 cm g    0.000  292.658  146.741
ST100200 1 2    74    61   0     K        T of 100-200 cm     0.000  294.566  148.923
SM000010 1 2    74    61   0              Soil Moisture of 0.000000 0.788069 0.162016
SM010040 1 2    74    61   0              Soil Moisture of 0.000000 0.787242 0.160085
SM040100 1 2    74    61   0              Soil Moisture of 0.000000 0.785682 0.156359
SM100200 1 2    74    61   0              Soil Moisture of 0.000000 0.782386 0.153110
SEAICE   1 2    74    61   0              Ice flag         0.000000 0.350000 0.000902
CANWAT   1 2    74    61   0     kg m-2   Plant Canopy Sur 0.000000 0.500000 0.194222
SOILHGT  1 2    74    61   1     m        Terrain height o -9999.00  1035.11 -4621.44
 End of file reached.

Utility Program staticpost

Utility program staticpost turns static.wrfsi.d0X files to WRF I/O API-conforming netCDF files, wrfstatic_d0X. This program is executed when running perl script window_domain_rt.pl (which also executes program gridgen_model). The wrfstatic_d0X files are not yet used by WRF model, but they will be used later for a simpler way to run two-way and one-way nesting.

Utility Program plotfmt

Utility program plotfmt can be used to make simple graphics from the intermediate files. It plots every field in the intermediate formatted data file. This utility is not automatically built when SI is installed. To compile this program, cd to src/grib_prep/util directory and type:

 
    make plotfmt.exe

To run it, type

 
    plotfmt intermediate-file-name

 

How to Install WRFSI?

The WRFSI program may be downloaded from http://wrfsi.noaa.gov/ page. There is a 'Installation README' file posted on the site. In this section, a summary of the installation procedure is provided.

Required Compilers, Scripting Language and Libraries

WRFSI code is written mostly in Fortran 77 and Fortran 90. A few utility programs are written in c. Hence, a Fortran 90 compiler, and C compiler (gcc is recommended) are required. These are the same requirement for WRF model. Perl scripts are used to run the SI program, and perl/Tk is required to run the GUI. WRFSI writes output in both binary (from grib_prep and hinterp) and netCDF (from gridgen_model and vinterp). A pre-installed netCDF library is required (again this is the same requirement as for WRF model).

Hint: Using PGI or Intel compiler on a Linux computer requires that the netCDF library is also installed using the same compiler.

 

 

Installation Steps

  • Download the program tar file, type 'gunzip wrfsi_v2.1.tar.gz' to unzip the file, and 'tar -xf wrfsi_v2.1.tar' to untar the file. This will create a directory called wrfsi/.This will be the SOURCE_ROOT directory. If you do a 'ls -l' in this directory, you will see

CHANGES: description of changes
HOW_TO_RUN.txt:
useful if you run SI not using the GUI
INSTALL:
instructions on how to install SI
README:
documentation of SI
README.wrfsi.nl:
description of namelist variables
Makefile:
top-level makefile
extdata/:
where you might want to place the degribbed data files
data/:
where the default directory and namelist file reside
src/:
the source code directory
graphics/:
directory where NCL scripts reside - may be use to make plots of gridgen_model output (static.wrfsi.d0X file)
gui/:
source directory for the GUI
util/:

  • Decide where you would like to place the executables and perl scripts that run various SI programs. This directory will be the INSTALLROOT. Also decide
    • where you would like to place the terrestrial datasets (terrain, landuse, etc.): GEOG_DATAROOT. Download the data from http://www2.mmm.ucar.edu/wrf/users/download/get_source.html into this directory.
    • where you would place the intermediate formatted data files: EXT_DATAROOT
    • where you would like to run your case: DATAROOT and MOAD_DATAROOT. DATAROOT can be the top directory which contains multiple subdirectories, each of which is a MOAD_DATAROOT directory. If there is only one MOAD_DATAROOT, then MOAD_DATAROOT can also be the same as the DATAROOT directory.
    • where you would like the template directory to be. This directory will contain the SI namelist file that you would want to modify to create you own case. This is only relevant if you run SI not using the GUI.

·                Once you have decided these, set the following environment variables:

setenv SOURCE_ROOT the-source-root-directory
setenv INSATLLROOT the-install-root-directory
setenv GEOG_DATAROOT where-terrestrial-data-are
setenv EXT_DATAROOT where-degribbed-files-are
setenv DATAROOT where-all-case-directory-is
setenv MOAD_DATAROOT where-one-case-directory-is
setenv TEMPLATES where-the-template-directory-is

Settng the environment variables can help one understand where things are. Note that the directory where the input GriB files reside are not defined through the environment variable. It is defined in the namelist file that grib_prep program uses. If you don't set these environment variables, the default environment variables are:

setenv SOURCE_ROOT /user-path/wrfsi
setenv INSTALLROOT /user-path/wrfsi
setenv GEOG_DATAROOT $INSTALLROOT/extdata
setenv EXT_DATAROOT $INSTALLROOT/extdata
setenv DATAROOT $INSTALLROOT/domains
setenv TEMPLATES $INSTALLROOT/templates

Whether you define these environment variables or use the default, you can find them in file, config_paths, in the $INSTALLROOT for later reference.

Hint: Do not use wrfsi/data/ directory for $DATAROOT.

Hint: Setting these environment variables correctly is critical every time you run the SI program. The run scripts and source code key on these environment variables to access data.

  • The other environment variable to set is the location of the netCDF library:

setenv NETCDF /usr/local/netcdf

Once these environment variables are set, you are ready to run the install script: install_wrfsi.pl which resides in the top-directory of wrfsi. Type

perl install_wrfsi.pl

One will be prompted to answer whether you would like to install the GUI.

One may use command line options to specify netCDF path, machine type, whether to install gui, etc.. A typical command would look like:

               Perl install_wrfsi.pl --path_to_netcdf --machine_type=pcintel \
                              --install_ui=n

where machine_type corresponds to the string in the provided makefiles in src/include/makefile_{machine_type}.inc.in. One may use this mechanism to build a makefile for a computer that is not yet supported.

If all the system utilities are in the right place and in your path (defined in your system resource file), the compiler, cpp, and so on, this should be an easy process. If not, cd to src/include directory, find the makefile_machine-type.inc.in that is closest to the machine you have, and start editing.

If all goes well, you should see the following executables built in the $INSTALLROOT/bin directory:

gridgen_model.exe
grib_prep.exe
hinterp.exe
vinterp.exe
siscan
staticpost.exe

All of the perl scripts for running the SI job are in $INSTALLROOT/etc:

window_domain_rt.pl
grib_prep.pl
wrfprep.pl

The install script also builds the EXT_DATAROOT, and DATAROOT directories depending on the environment variables set. Under EXT_DATAROOT, five subdirectories are created: extprd, static, work, log and GEOG (can ignored if GEOG_DATAROOT is defined). It will create DATAROOT directory.

When one is ready to run a different case, one will not need to reinstall SI. Instead, reset this environment variable:

setenv MOAD_DATAROOT your-new-case-directory

If you have chosen to build the GUI, the executable will be $INSTALLROOT/wrf_tools.

How to Run WRFSI?

The GUI is recommended to run the WRFSI program. For a detailed instruction on how to use the GUI, visit http://wrfsi.noaa.gov/. One of the advantages of using the GUI is that it has graphics to help you locate a domain. However, going through the following process may be helpful to understand how the various programs/scripts do and what they may produce. It may also be helpful in case you need to find out why something didn't quite work.

Here instructions are provided if you would like to run WRFSI manually.

Step 1: Localize the simulation domain and create static fields - window_domain_rt.pl

Set the environment variable for MOAD_DATAROOT, if it is different from the one you set when you install SI.

cd to $TEMPLATES/ directory, make a copy of the default/ to your case directory:

cp -r default my-case

Then you need to remove file/directory protection for the directory and files in it:

chmod -R u+w my-case

cd to my-case/, and edit wrfsi.nl. If you have set GEOG_DATAROOT, EXT_DATAROOT, you'd find that these are incorporated in the wrfsi.nl file. The important namelist variables to edit at this time are those in 'hgridspec' section as shown below:

&hgridspec
NUM_DOMAINS = 1
XDIM = 74
YDIM = 61
PARENT_ID = 1,
RATIO_TO_PARENT = 1,
DOMAIN_ORIGIN_LLI = 1,
DOMAIN_ORIGIN_LLJ = 1,
DOMAIN_ORIGIN_URI = 1,
DOMAIN_ORIGIN_URJ = 1,
MAP_PROJ_NAME = 'lambert',
MOAD_KNOWN_LAT = 34.726,
MOAD_KNOWN_LON = -81.226,
MOAD_STAND_LATS = 30.0, 60.0,
MOAD_STAND_LONS = -98.0
MOAD_DELTA_X = 30000.
MOAD_DELTA_Y = 30000.
SILAVWT_PARM_WRF = 0.
TOPTWVL_PARM_WRF = 2.

Once you have edited this portion of the namelist, you are ready to run. A typical run command looks like this:

setenv MOAD_DATAROOT $DATAROOT/my_case

$INSTALLROOT/etc/window_domain_rt.pl -w wrfsi -t $TEMPLATES/my-case

Other options are available for this perl script. Type the following to see them all:

$INSTALLROOT/etc/window_domain_rt.pl -h

The perl script makes use of the wrfsi.nl file you edited in the $TEMPLATES/my-case/ directory to create netCDF control file and a working wrfsi.nl in $MOAD_DATAROOT/static/ directory, and executes gridgen_model.exe. The perl script also creates directory siprd under MOAD_DATAROOT for running wrfprep.pl (see Step 3).

If it is successful, you should find a few directories created under $MOAD_DATAROOT: static/, cdl/ and siprd/ and log/. Check the static/ directory and see if a file named 'static.wrfsi.d01' is created. If so, you are done here. If not, check the localization_domain.log.date file in the log/ directory, and try to identify errors. The files in cdl/ directory are the control files for netCDF output. The directory siprd/ will be used to store SI output. Another file created by running this script is wrfstatic_d01, which is similar to the file 'static.wrfsi.d01', but it conforms to WRF I/O API, and will be used when static-file-input option becomes available in WRF model for two-way and one-way nesting.

If you need to start over again, add option '-c' at the end of the above run command. It cleans the MOAD_DATAROOT directory:

$INSTALLROOT/etc/window_domain_rt.pl -w wrfsi -t $TEMPLATES/my-case -c

Step 2: Degrib GriB files - grib_prep.pl

It will be user's responsibility to find meteorological dataset to run WRF simulations. Once you have those files, place them in a unique directory for each case you work on. There are a number of sites you may be able to find data. See, for example, http://www2.mmm.ucar.edu/wrf/users/downloads.html.

cd to $EXT_DATAROOT/static/ directory, and edit grib_prep.nl. This is the namelist file for running grib_prep.exe. The critical ones to modify are the first rows of SRCNAME and SRCVTAB, and first line of SRCPATH:

SRCNAME = 'AWIP',
SRCVTAB = 'AWIP',
SRCPATH = '/public/data/40km_eta212_isobaric',

where SRCPATH is the directory name where your input GriB files are. A typical run command looks like this:

$INSTALLROOT/etc/grib_prep.pl -s 2000012412 -l 12 -t 6 AWIP

This run starts 2000012412, processes data for a 12 h forecast at 6 hour interval, and the data is from NAM/Eta in AWIP format which corresponds to Vtable.AWIP. As shown, the time information can be provided via the command line. If not, the values in the namelist will be used.

Hint: use the time interval between the available data only - there is practically no advantage to interpolate data to a time interval that is smaller than they are provided.

Other options on the command line are available. Type the following to see them all:

grib_prep.pl -h

The perl script makes use of the namelist options in grib_prep.nl, and options on the command line to execute grib_prep.exe. The output from running this script should reside in $EXT_DATAROOT/extprd/ directory, with file names beginning with AWIP:

AWIP:2004-06-30_00
AWIP:2004-06-30_06
AWIP:2004-06-30_12

If these files are not created, check $EXT_DATAROOT/log/gp_AWIP.2004063000.log to find clues.

Hint: grib_prep.exe runs the best when only the files relevant to this particular run are placed in one directory, defined in SRCPATH.

 

Step 3: Interpolating meteorological data - wrfprep.pl

After you have successfully executed above two programs, you should be ready to do the final step in WRFSI: interpolating meteorological data to WRF grid. The wrfprep.pl script executes both hinterp and vinterp executables.

First, take another look at the namelist file, wrfsi.nl, and make sure everything is correctly specified in section 'interp_control':

&interp_control
NUM_ACTIVE_SUBNESTS = 0,
ACTIVE_SUBNESTS = 2,3,4,
PTOP_PA = 5000,
HINTERP_METHOD = 1,
LSM_HINTERP_METHOD = 1,
NUM_INIT_TIMES = 1,
INIT_ROOT = 'AWIP',
LBC_ROOT = 'AWIP',
LSM_ROOT = '',
CONSTANTS_FULL_NAME = '',
VERBOSE_LOG = .false.,
OUTPUT_COORD = 'ETAP',
LEVELS = 1.000 , 0.990 , 0.978 , 0.964 , 0.946 , 0.922 ,
0.894 , 0.860 , 0.817 , 0.766 , 0.707 , 0.644 ,
0.576 , 0.507 , 0.444 , 0.380 , 0.324 , 0.273 ,
0.228 , 0.188 , 0.152 , 0.121 , 0.093 , 0.069 ,
0.048 , 0.029 , 0.014 , 0.000

Make sure your INIT_ROOT, LBC_ROOT and/or LSM_ROOT are set to the correct data types you specified while running grib_prep.pl. These different root names allow one to use data from different sources.

To run the interpolation script, type the following:

$INSTALLROOT/etc/wrfprep.pl -s 2004063000 -f 12

Note the time information is provided at the command line. Again other options may be found by typing:

$INSTALLROOT/etc/wrfprep.pl -h

If successful, you should find the following files in $MOAD_DATAROOT/siprd/ directory:

hinterp.d01.2004-06-30_00:00:00
hinterp.d01.2004-06-30_06:00:00
hinterp.d01.2004-06-30_12:00:00
hinterp.global.metadata
wrf_real_input_em.d01.2004-06-30_00:00:00
wrf_real_input_em.d01.2004-06-30_06:00:00
wrf_real_input_em.d01.2004-06-30_12:00:00


The wrf_real_input_em.d0.* files are the ones to be used by WRF/real program, and these files are in netCDF format.

If you get here, your single domain WRFSI job should be successfully completed. If some files are not created, please check $MOAD_DATAROOT/log/2004063000.wrfprep, 2004063000.hinterp, and 2004063000.vinterp files for possible errors.

WRFSI GUI

For a detailed description and instruction on how to use it, please visit http://wrfsi.noaa.gov/.

If you have successfully installed the GUI, type the following to start it:

$INSTALLROOT/wrf_tools

Using WRFSI for Nesting

Running WRFSI for nesting option (data for more than one domain are created) is similar to running the program for a single domain. The key program for the nesting option is the gridgen_model program which, upon completion, will provide multiple static files, one for each domain specified. The static files are created for each domain independently. There is no consistency check between domains at this time, and it is up to the WRF model to make appropriate adjustment between the static fields when nesting is used.

There are a number of namelists that are key to set up a nested run. These are:

&hgridspec
NUM_DOMAINS = 2
XDIM = 74,
YDIM = 61,
PARENT_ID = 1, 1
RATIO_TO_PARENT = 1, 3
DOMAIN_ORIGIN_LLI = 1, 31
DOMAIN_ORIGIN_LLJ = 1, 17
DOMAIN_ORIGIN_URI = 74, 68
DOMAIN_ORIGIN_URJ = 61, 49

and

&interp_control
NUM_ACTIVE_SUBNESTS = 1,
ACTIVE_SUBNESTS = 2,

where, the ones under &hgridspec are used to create multiple static.wrfsi.d0X files; while the ones under &interp_control are used to create multiple SI output files for WRF model: wrf_real_input_em.d01.*, wrf_real_input_em.d02.*. The size of domain 2 in this case is (68 - 31) * 3 + 1 = 112, and (49 - 17) * 3 + 1 = 97.

NUM_DOMAINS: the number of domains one would like to create
XDIM, YDIM: here only the coarse domain dimensions are needed
PARENT_ID: a number identifying the domain
RATIO_TO_PARENT: integer, the ratio of coarse to fine domain grid distances
DOMAIN_ORIGIN_LLI: the starting nest location in terms of its parent domain index I
DOMAIN_ORIGIN_LLJ: the starting nest location in terms of its parent domain index J
DOMAIN_ORIGIN_URI: the ending nest location in terms of its parent domain index I
DOMAIN_ORIGIN_URJ: the ending nest location in terms of its parent domain index J (see figure below)

NUM_ACTIVE_SUBNESTS: the number of nests (excluding the parent domain)
ACTIVE_SUBNESTS: a list of the nests one would create SI output for

With these namelists set properly, a single run using window_domain_rt.pl, and wrfprep.pl will create all data required for a nested WRF run.

Similarly, for a two-nests, three domain total run, the above parameters should look like:

&hgridspec
NUM_DOMAINS = 3
XDIM = 74,
YDIM = 61,
PARENT_ID = 1, 1, 2
RATIO_TO_PARENT = 1, 3, 3
DOMAIN_ORIGIN_LLI = 1, 31, 41,
DOMAIN_ORIGIN_LLJ = 1, 17, 30,
DOMAIN_ORIGIN_URI = 74, 68, 72,
DOMAIN_ORIGIN_URJ = 61, 49, 60,

and

&interp_control
NUM_ACTIVE_SUBNESTS = 2,
ACTIVE_SUBNESTS = 2,3,

Again the GUI is recommended here. The design of the nest domains can be greatly simplified with the GUI.

Using Multiple Data Sources

Sometimes one would like to use combined data sources. For example, one may like to use sea-surface temperature (SST) from a different data source than the other meteorological fields, or one may like to use fields for land-surface model from a different data source. SI does support this function. To do so, one needs to run grib_prep.pl twice: Once for the special fields (such as SST, or LSM fields), and a second time for the rest of fields. Since these special fields are typically only needed for the model initial time, one needs only to process it for one time period. Hence the command is:

$INSTALLROOT/etc/grib_prep.pl -s 2004063000 -l 0 SST

Here the source for SST data is generically declared as SST, which would require the presence of Vtable.SST. Similarly, if the LSM fields come from another source, such as AGRMET, one would issue this command:

$INSTALLROOT/etc/grib_prep.pl -s 2004063000 -l 0 AGRMET

When one uses a different source to get the LSM fields, it is probably a good idea to remove these fields from the Vtable one uses to obtain all other one. After obtaining the degribbed files (these files would be named SST:[date_string], and AGRMET:[date_string]), one needs to edit wrfsi.nl so the wrfprep.pl knows how to use these multiple sourced input.

There are two ways different source data are used. One way is through the use of namelist variable 'CONSTANT_FULL_NAME'. This usually works with a single field like SST. In this case, edit wrfsi.nl so that 'CONSTANT_FULL_NAME' is set to:

CONSTANT_FULL_NAME = 'SSTDATA',

The perl script will link the SST file you produced to SSTDATA.

If you would like to use a different data source for LSM, then edit wrfsi.nl so that these variables are set to the following:

INIT_ROOT = 'GFS',
LBC_ROOT = 'GFS',
LSM_ROOT = 'AGRMET',

A special example to use multiple data source is the NCEP/NCAR Reanalysis Project (NNRP) data. Even though the data source is one, but because of the way data are archived, the upper-air and surface data have different data dimensions. In order to use both surface and upperair data, one needs to run grib_prep.pl twice: once for the surface data using Vtable.NNRPSFC, and once for the upper-air data using Vtable.NNRP (both provided). After that set the following in wrfsi.nl:

INIT_ROOT = 'NNRP',
LBC_ROOT = 'NNRP',
LSM_ROOT = 'NNRPSFC',

The latest year of NNRP data can be downloaded from WRF Users' page under the link DOWNLOAD.

Checking WRFSI Output

There are several ways you may check the output from SI. If you can find all the files that are supposed be created, then chances are good that everything has gone well. However if you need some sanity check, here are a few ways to go about it. These includes graphics tools, and simply print outs.

Checking output from grib_prep

Use the utility program, plotfmt.exe, described above to make plots of the degribbed files. This will be useful especially if you are ingesting data from a source other than those supported by the program.

Checking output from gridgen_model

There are three ways you may check the static fields created by gridgen_model. The first way is to use the netCDF utility, ncdump, to check the output. You may type

ncdump -h static.wrfsi.d01

to get an idea (or header information) on what fields are in this file. You may also type

ncdump -v variable-name static.wrfsi.d01

to see the actual values for the variable you are interested.

The second way to check the output is to use the read_wrf_nc.f (see Chapter 8 for more information). Options provided by this program will allow you to check the data in various ways.

The third way to check the gridgen_model output is to use the NCL script provided by the WRFSI tar file. If you have used the GUI, you may be able to view the plots already. But if you want to create the plots outside the GUI, you can too. This can be done by cd graphics/ncl directory, link the static.wrfsi.d01 file to static.cdf file, and run any of the ncl scripts residing in the directory. For example, if you would like to see a plot of terrain, use avc.ncl (and type 'ncl < avc.ncl', or ‘ncl avc.nl’ in the latest NCL).

Checking output from hinterp

The utility program to use here is the siscan program described above.

Checking output from vinterp

By this stage, the output files are in WRF I/O API-conforming netCDF format, so various supported post-processing tools may be used. See again Chapter 8 for more information. The program read_wrf_nc.f can also be used.

Description of the Namelist Variables

A. PROJECT_ID Section

This section is used to fill in metadata entries that document the run. The settings in this section will not affect the WRFSI run, but are provided for convenience to allow the user to document their run in the output metadata.

1. SIMULATION_NAME
Set this to a string describing the experiment or run.

2. USER_DESC
Set this to a string describing who is running the configuration.

B. FILETIMESEPC Section

This section provides the start and stop times that bound the period for which you want SI to produce data. Times are in UTC.

1. START_YEAR: 4-digit UTC year for start time.
2. START_MONTH: 2-digit UTC month for start time.
3. START_DAY: 2-digit UTC day of month for start time.
4. START_MINUTE: 2-digit UTC minute of month for start time.
5. START_SECOND: 2-digit UTC second of month for start time.
6. END_YEAR-END_SECOND: Same as 1-5, but for ending time.
7. INTERVAL: Interval in seconds between output times. No need to specify data interval to be finer than the available data times.

Note, the starting and ending times, and data interval may be overwritten on the command line when running wrfprep.pl.

C. HGRIDSPEC section

This is the section used to define your horizontal WRF grid.

1. NUM_DOMAINS: Integer number of nests, including the parent domain. If you are setting up for a single domain run, set to 1.

2. XDIM/YDIM: Integer number of points in the west-east and south-north directions, respectively. There are NUM_DOMAINS entries required. The first entry refers to the main grid (Mother Of All Domains or MOAD). Until nesting is supported, only the first will be used.

NOTE: The WRFSI defines the map to be what we refer to as the "non-staggered" grid. This implementation of the Arakawa-C stagger assumes all 3 component grids (U, V, and mass) are staggered with respect to these points. The U grid is staggered 0.5 gridpoints up w.r.t. the defined non-staggered points, the V grid is staggered 0.5 gridpoints to the right of the non-staggered points, and the mass grid is staggered 0.5 grid points up and 0.5 grid points to the right. To illustrate, here is an example for a case where (XDIM,YDIM) = (4,4):

+ V + V + V +
U T U T U T U
+ V + V + V +
U T U T U T U
+ V + V + V +
U T U T U T U
+ V + V + V +

The (+) points are the points exactly defined by the parameters in this namelist. The (T) points are the points on which the mass variables will be provided to and output by the WRF forecast model. The (U) points are the points on which the U momentum variables will be provided to and output by the WRF model. The (V) points are the points on which the V momentum variables will be provided to and output by the WRF model. Thus, if your WRFSI configuration uses dimensions (XDIM, YDIM), the model will output the following:

Mass variables with dimensions (XDIM-1,YDIM-1)
U-momentum with dimensions (XDIM,YDIM-1)
V-momentum with dimensions (XDIM-1,YDIM)

3. PARENT_ID: Integer that represents the number of this nests parent nest. Note that the MOAD has no parent, and thus the first entry of PARENT_ID is always set to 1.

4. RATIO_TO_PARENT: Integer specifying the nest ratio of each nest to its parent in terms of grid spacing.

5. DOMAIN_ORIGIN_LLI/DOMAIN_ORIGIN_LLJ: This parameter specifies the (i,j) location of the nest grid's origin in its parent.

6. DOMAIN_ORIGIN_URI/DOMAIN_ORIGIN_URJ: This parameter specifies the (i,j) location of the nest grid's ending points in its parent.

7. MAP_PROJ_NAME: Character string specifying type of map projection. Valid entries are:

"polar" -> Polar stereographic
"lambert" -> Lambert conformal (secant and tangent)
"mercator" -> Mercator

8. MOAD_KNOWN_LAT/MOAD_KNOWN_LON: Real latitude and longitude of the center point in the grid. Values are in degrees, with positive latitude for the northern hemisphere and negative latitude for western hemisphere. Latitude must be between -90 and 90, and longitude between -180 and 180.

9. MOAD_STAND_LATS: 2 real values for the "true" latitudes (where grid spacing is exact). Must be between -90 and 90, and the values selected depend on projection:

Polar-stereographic: First value must be the latitude at which the grid spacing is true. Most users will set this equal to their center latitude. Second value must be +/-90. for NH/SH grids.

Lambert Conformal: Both values should have the same sign as the center latitude. For a tangential lambert conformal, set both to the same value (often equal to the center latitude). For a secant Lambert Conformal, they may be set to different values.

Mercator: The first value should be set to the latitude you wish your grid spacing to be true (often your center latitude). Second value is not used.

10. MOAD_STAND_LONS: This is one entry specifying the longitude in degrees East (-180->180) that is parallel to the y-axis of your grid, (sometimes referred to as the orientation of the grid). This should be set equal to the center longitude in most cases.

11. MOAD_DELTA_X/MOAD_DELTA_Y: Floating point values specifying grid spacing in meters in the west-east and north-south directions, respectively. For now, these two values must be the same.

12. SILAVWT_PARM_WRF: valid values are 1, 2 and 3, which give varying smoothness of the terrain field. The value of 3 gives the steepest terrain representation.

13. TOPTWVL_PARM_WRF: also controls smoothness of the terrain. The smaller the number, the rougher the terrain is.

D. SFCFILES Section

This section is used to specify the paths to the tiled global geographical data sets, which are obtained from ftp://aftp.fsl.noaa.gov/divisions/frd-laps/WRFSI/Geog_Data
IT IS NECESSARY THAT EACH DATA SET BE IN ITS OWN SUBDIRECTORY!

1. TOPO_30S: Path to the USGS-derived 30-second topographical height data.

2. LANDUSE_30S: Path to the tiled 24-category USGS 30-second land usage categorical data.

3. SOILTYPE_TOP_30S: Path to the FAO top-layer 16-category soil-type data.

4. SOILTYPE_BOT_30S: Same as (4) but for bottom layer.

5. GREENFRAC: Path to the greenness fraction data. Resolution: 0.15 degree.

6. SOILTEMP_1DEG: Path to the annual mean deep-layer temperature data. Resolution: 1 degree.

7. ALBEDO_NCEP: Path to the monthly climatological albedo data set (normalized to local zenith ). Resolution: 0.15 degree.

8. MAXSNOWALB: Path to climatological maximum snow albedo data. Resolution: 0.15 degree.

9. ISLOPE: slope data. (Not yet used by WRF). Resolution: 1 degree.

E. INTERP_CONTROL section

This section controls the horizontal and vertical interpolation of the input gridded data sets.

1. NUM_ACTIVE_SUBNESTS: integer number of nests, excluding the parent domain.

2. ACTIVE_SUBNESTS: a list of the nests to create SI output for. For example, if you have set to configure 4 domains, then set this namelist to 2, 3, 4.

3. PTOP_PA: Specifies model top in Pascals. Default is 5000 Pa.

4. HINTERP_METHOD: Integer specifying method of interpolation for atmospheric variables. Codes:

0: Nearest neighbor (not recommended)
1: 4-pt bilinear (use if input data has similar resolution as output)
2: 16-point

5. LSM_HINTERP_METHOD: Integer specifying the method of interpolation used for the land-masked fields. Codes are same as above. Recommended default is 0 or 1. NOTE: FOR USERS WISHING TO USE THE BACKGROUND DATA'S LANDUSE AND SOIL TYPE CATEGORIES, THIS MUST BE SET TO 0 AND YOU MUST OBTAIN "VEGCAT" AND "SOILCAT" FROM YOUR INPUT DATA SET, WHERE VEGCAT IS A 2D ARRAY OF DOMINANT LANDUSE CATEGORY (USGS 24-CAT) AND SOILCAT IS THE 2D ARRAY OF FAO DOMINANT SOIL CATEGORY.

6. NUM_INIT_TIMES: Integer, currently set to 1. This controls the number of output times to use the prefix specified by "INIT_ROOT" and "LSM_ROOT". The idea is for future support of analysis "nudging". The code will use the data specified by the INIT_ROOT/LSM_ROOT for time periods 1:NUM_INIT_TIMES, then switch to "LBC_ROOT" for the remaining time periods. If set to 0, all data comes from LBC_ROOT and CONSTANTS_FULL_NAME. Most users will set this to 0. However, setting it to 1 allows the model to be initialize with a different source of data for the initial conditions and land surface than what is used for lateral boundary conditions.

7. INIT_ROOT: Prefix of data to use for 1:NUM_INIT_TIMES. The wrfprep.pl script will look in ANALPATH (see SI_PATHS section) for files with this prefix and a time string suffix valid for the desired time. This entry is only used if NUM_INIT_TIMES > 0.

8. LBC_ROOT: Prefix of data files to use for lateral boundary condition times. The wrfprep.pl script will link in all files in "LBCPATH" that have this prefix and a valid time suffix in the correct range.

9. LSM_ROOT: For each NUM_INIT_TIME (when NUM_INIT_TIMES >0), the wrfprep.pl script will link in a file with this prefix found in LSMPATH that matches in time. This is designed to support data for the NOAH LSM coming from a source other than the INIT_ROOT.

10. CONSTANTS_FULL_NAME: Specifies a list of file names to look for in "CONSTANTS_PATH". Data contained in any of these files actually found will be used at every output time, and will take precedence over duplicate data found in LSM_ROOT/INIT_ROOT/LBC_ROOT files.

11. VERBOSE_LOG: Logical. Setting to true provides a lot of logging for troubleshooting purposes.

12. LEVELS: List of levels to use in the WRF model in ascending (atmospherically) order. These values range from 1.0 to 0.0.

F. SI_PATHS Section

Specify path to deGRIBed (grib_prep output) data files. In most cases all of these will be the same path ($EXT_DATAROOT/extprd).

1. ANALPATH: Path to search for files with INIT_ROOT prefix when NUM_INIT_TIMES > 0.

2. LBCPATH: Path to search for files with LBC_ROOT prefix for all time periods > NUM_INIT_TIMES.

3. LSMPATH: Path to search for files with LSM_ROOT prefix for all time periods 0:NUM_INIT_TIMES.

4. CONSTANTS_PATH: Path to search for files with CONSTANTS_FULL_NAME for every time period.

List of Fields in WRFSI Output

A List of Fields

  float ZNW(Time, bottom_top_stag) ;
  float MU0(Time, south_north, west_east) ;
  float T(Time, bottom_top, south_north, west_east) ;
  float QVAPOR(Time, bottom_top, south_north, west_east) ;
  float U(Time, bottom_top, south_north, west_east_stag) ;
  float V(Time, bottom_top, south_north_stag, west_east) ;
  float SPECHUMD(Time, bottom_top, south_north, west_east) ;
  float PMSL(Time, south_north, west_east) ;
  float SNOW(Time, south_north, west_east) ;
  float TSK(Time, south_north, west_east) ;
  float ST000010(Time, south_north, west_east) ;
  float ST010040(Time, south_north, west_east) ;
  float ST040100(Time, south_north, west_east) ;
  float ST100200(Time, south_north, west_east) ;
  float SM000010(Time, south_north, west_east) ;
  float SM010040(Time, south_north, west_east) ;
  float SM040100(Time, south_north, west_east) ;
  float SM100200(Time, south_north, west_east) ;
  float XICE(Time, south_north, west_east) ;
  float CANWAT(Time, south_north, west_east) ;
  float SOILHGT(Time, south_north, west_east) ;
  float XLAT(Time, south_north, west_east) ;
  float XLONG(Time, south_north, west_east) ;
  float LANDMASK(Time, south_north, west_east) ;
  float HGT(Time, south_north, west_east) ;
  float TOPOSTDV(Time, south_north, west_east) ;
  float TOPOSLPX(Time, south_north, west_east) ;
  float TOPOSLPY(Time, south_north, west_east) ;
  float COSALPHA(Time, south_north, west_east) ;
  float SINALPHA(Time, south_north, west_east) ;
  float F(Time, south_north, west_east) ;
  float E(Time, south_north, west_east) ;
  float MAPFAC_M(Time, south_north, west_east) ;
  float MAPFAC_U(Time, south_north, west_east_stag) ;
  float MAPFAC_V(Time, south_north_stag, west_east) ;
  float VEGFRA(Time, south_north, west_east) ;
  float SHDMAX(Time, south_north, west_east) ;
  float SHDMIN(Time, south_north, west_east) ;
  float ALBBCK(Time, south_north, west_east) ;
  float SNOALB(Time, south_north, west_east) ;
  float TMN(Time, south_north, west_east) ;
  float SLOPECAT(Time, south_north, west_east) ;
  float LANDUSEF(Time, land_cat, south_north, west_east) ;
  float SOILCTOP(Time, soil_cat, south_north, west_east) ;
  float SOILCBOT(Time, soil_cat, south_north, west_east) ;
  

Global Attributes in WRFSI Output File

 
        :corner_lats = 28.04805f, 44.23701f, 39.55859f, 24.53824f, 28.05492f, 44.24625f, 39.50478f, 24.49756f, 27.91458f, 44.37634f, 39.68672f, 24.41348f, 27.92145f, 44.38561f, 39.63279f, 24.37289f ;
        :corner_lons = -93.80435f, -92.59967f, -66.23782f, -72.82159f, -93.95563f, -92.79419f, -66.07178f, -72.68448f, -93.81226f, -92.58652f, -66.16806f, -72.86612f, -93.96326f, -92.78149f, -66.00174f, -72.72925f ;
        :WEST-EAST_GRID_DIMENSION = 74 ;
        :SOUTH-NORTH_GRID_DIMENSION = 61 ;
        :BOTTOM-TOP_GRID_DIMENSION = 28 ;
        :DX = 30000.f ;
        :DY = 30000.f ;
        :P_TOP = 5000.f ;
        :CEN_LAT = 34.83158f ;
        :CEN_LON = -81.02756f ;
        :FLAG_ST000010 = 1 ;
        :FLAG_ST010040 = 1 ;
        :FLAG_ST040100 = 1 ;
        :FLAG_ST100200 = 1 ;
        :FLAG_SM000010 = 1 ;
        :FLAG_SM010040 = 1 ;
        :FLAG_SM040100 = 1 ;
        :FLAG_SM100200 = 1 ;
        :FLAG_TOPOSOIL = 1 ;
        :simulation_name = "WRF Model Simulation" ;
        :user_desc = "NCAR/MMM Test Case" ;
        :si_version = 2 ;
        :map_projection = "LAMBERT CONFORMAL" ;
        :TITLE = "OUTPUT FROM WRF SI V02 PREPROCESSOR" ;
        :START_DATE = "2000-01-24_12:00:00.0000" ;
        :MOAD_CEN_LAT = 34.83158f ;
        :STAND_LON = -98.f ;
        :TRUELAT1 = 30.f ;
        :TRUELAT2 = 60.f ;
        :MAP_PROJ = 1 ;
        :DYN_OPT = 2 ;
        :ISWATER = 16 ;
        :ISICE = 24 ;
        :MMINLU = "USGS" ;