User's Guide for the NMM Core of the

Weather Research and Forecast (WRF)

Modeling System Version 2.2

 

Appendix A: WRF-NMM Standard Initialization

(WRF-NMM SI)

Preparing Input Data

Table of Contents

o       Configuring Nested Domains

·        Using Multiple Data Sources

Introduction

The WRF-NMM Standard Initialization (SI) is the first step in the process of producing a WRF-NMM real-data simulation or forecast. The software is a collection of four programs that together provide the input data required by the WRF-NMM model.  Although the ARW and NMM dynamic cores within the WRF framework currently have separate SI packages, both packages have the same basic components that perform the same functions.  The following figure illustrates the program components and data flow for both SI packages:

(static file(s) for nested runs using WRF-NMM)

 

 

The SI package provides the tools for defining a mesoscale domain. It ingests data from various terrestrial datasets for terrain, land use, 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). It interpolates the data to the user defined domain. The output from SI is in netCDF format and conforms to WRF I/O API.

The WRF-NMM SI has been successfully ported to UNIX based machines (IBM) and LINUX (using PGI compiler).

The WRF-NMM SI code only runs on a single processor. The code is memory efficient.

Function of WRF-NMM SI Program

The SI package consists of four major independent programs: gridgen_model, grib_prep, hinterp and vinterp. The package also includes two utility programs, siscan 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 the 'hgridspec' section of the namelist file, wrfsi.nl. The terrestrial inputs that gridgen_model uses include terrain, land use, soil type, annual deep soil temperature, monthly vegetation fraction, maximum snow albedo, monthly albedo, and slope data. These data are provided at: http://wrfsi.noaa.gov/release/

Note: The WRF-NMM SI only supports the “Rotated Latitude Longitude” projection.

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 (formerly Eta) and GFS models. WRF-NMM SI supports the GriB format Edition 1.

Each GriB dataset may contain more data than is needed to initialize WRF-NMM. To limit the data ingested from the GriB files, Vtables are employed by which GriB 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.

Vtables are provided for the NAM/Eta 221 and 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), GFDL, GFS, NNRP and AFWA's AGRMET land surface model output.

To use a GriB dataset for which a Vtable is not provided, follow the Vtable examples in the WRF-NMM SI tar file under the directory extdata/static/ to create a Vtable for this dataset.

The intermediate format can also be used to ingest any dataset as long as the data are on pressure levels (data on other coordinates will require code modifications).  A description of the intermediate format can be found at http://wrfsi.noaa.gov/, or in the README file in the WRF-NMM SI tar file.

Program hinterp:

The function of the program hinterp is to horizontally interpolate meteorological data degribbed by grib_prep onto the simulation domain created by gridgen_model. The methods of horizontal interpolation are controlled by variables in the 'interp_control' section of wrfsi.nl.

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 the WRF-NMM vertical coordinate defined by the user in the 'interp_control' section of wrfsi.nl.

Utility Program siscan

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

 

     siscan hinterp.d01.2005-04-27_00:00:00

 
Scanning hinterp.d01.2005-04-27_00:00:00
 
Domain Metadata Information
 -----------------------------------------------------
Domain Number .........  1
Parent ID .............  0
Dynamic Init. Source .. SI
Static Init. Source ... SI
Valid Date (YYYDDD) ... 2005117
Valid Time (sec UTC) ..     0.0
Origin X in Parent ....     1
Origin Y in Parent ....     1
Nest Ratio to Parent ..     1
Delta X ...............  8341.6
Delta Y ...............  8341.6
Top Level .............   5000.0
Origin Z in Parent ....     1
X dimension ...........   123
Y dimension ...........   201
Z dimension ...........    40
  ---------------------------------------------------
Variables found:
   NAME    STAG DIM   NX    NY    NZ        UNITS        DESCRIPTION
 -------- ----- --- ----- ----- ----- ---------------- --------------------------------
PRESSURE     0   1    40     0     0 Pa               Pressure levels used for vertica
T            4   3   123   201    40 K                Temperature                     
U            4   3   123   201    40 m s{-1}          U                               
V            4   3   123   201    40 m s{-1}          V                               
RH           4   3   123   201    40 %                Relative Humidity               
HGT          4   3   123   201    40 m                Height                          
PMSL         4   2   123   201     0 Pa               Sea-level Pressure              
PSFC         4   2   123   201     0 Pa               Surface Pressure                
WEASD        1   2   123   201     0 kg m{-2}         Water Equivalent of Accum Snow D
SKINTEMP     1   2   123   201     0 K                Sea-Surface Temperature         
ST000010     1   2   123   201     0 K                T of 0-10 cm ground layer       
ST010040     1   2   123   201     0 K                T of 10-40 cm ground layer      
ST040100     1   2   123   201     0 K                T of 40-100 cm ground layer     
ST100200     1   2   123   201     0 K                T of 100-200 cm ground layer    
TGROUND      4   2   123   201     0 K                T at 300 cm deep in ground      
SM000010     1   2   123   201     0 fraction         Soil Moisture of 0-10 cm ground 
SM010040     1   2   123   201     0 fraction         Soil Moisture of 10-40 cm ground
SM040100     1   2   123   201     0 fraction         Soil Moisture of 40-100 cm groun
SM100200     1   2   123   201     0 fraction         Soil Moisture of 100-200 cm grou
SEAICE       1   2   123   201     0 0/1 Flag         Ice flag                        
SST          1   2   123   201     0 K                Sea Surface Temperature         
CANWAT       1   2   123   201     0 kg m{-2}         Plant Canopy Surface Water      
SPECHUMD     4   2   123   201     0 kg kg{-1}        Specific Humidity               
SOILHGT      0   2   123   201     1 m                Terrain height of source data 
End of file reached.
 

Utility Program plotfmt

Utility program plotfmt can be used to make simple graphics from the intermediate files. This program 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 the src/grib_prep/util directory and type:

               make plotfmt.exe

To run this utility program, type

plotfmt intermediate-file-name

 

Description of the Namelist Variables

The WRF-NMM SI uses a namelist file, wrfsi.nl, to specify the configuration of the SI to be used for a particular simulation or forecast.  A sample namelist file can be found in the $TEMPLATES/default directory.  The variables specified in the namelist are divided into six sections.

A. project_id

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

1. SIMULATION_NAME: String describing the experiment or run.

2. USER_DESC: String describing who is running the configuration.

B. filetimespec

This section provides the start and stop times that bound the period for which the SI will process data. Times are in UTC

START_YEAR: 4-digit UTC year for start time.

START_MONTH: 2-digit UTC month for start time.

START_DAY: 2-digit UTC day of month for start time

START_HOUR: 2-digit UTC hour for start time

START_MINUTE: 2-digit UTC minute for start time.

START_SECOND: 2-digit UTC second for start time.

END_YEAR to END_SECOND: Same as 1-6, but for ending time.

INTERVAL: Interval in seconds between output times. The output interval cannot be finer than the available data interval.

Note: When using the perl script wrfprep.pl to run hinterp.exe and vinterp.exe, the user must use command line options, instead of parameters in the filetimespec section of wrfsi.nl, to communicate non-real-time timing parameters to these programs (See discussion below.)

C. hgrdspec

This section is used to define the horizontal WRF-NMM grid.

NUM_DOMAINS:  Not relevant to WRF-NMM.  Set to 1.

XDIM: Number of mass points in the X direction for an odd-numbered row (see discussion and diagram below).

YDIM:  Number of rows in the Y direction (Note: Must be odd!)

 

Schematic of how XDIM and YDIM apply on the WRF-NMM's E-grid:

 

H V H V H V H (V)

V H V H V H V (H)

H V H V H V H (V)

V H V H V H V (H)

H V H V H V H (V)

In this example, H represents mass variables (e.g., temperature, pressure, moisture), while V represents vector wind quantities.  The (H) and (V) at the end of the row are a so-called phantom column that is used so arrays will be completely filled (XDIM, YDIM) for both mass and wind quantities, but the phantom column does not impact the integration. In this example, XDIM=4 and YDIM=5.

PARENT_ID:  Not relevant to WRF-NMM.  Set to 1.

RATIO_TO_PARENT:  Not relevant to WRF-NMM.  Set to 1.

DOMAIN_ORIGIN_X/DOMAIN_ORIGIN_Y:  Not relevant to WRF-NMM.  Set to 1.

MAP_PROJ_NAME: Character string specifying type of map projection. The only valid entry for the WRF-NMM is:

"rotlat" -> Rotated Latitude and Longitude

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

MOAD_KNOWN_LOC: String specifying the location of the known latitude and longitude.  The WRF-NMM grid is always defined based on a center latitude/longitude value. Hence MOAD_KNOWN_LOC = ‘center’ should always be used for WRF-NMM.

 

MOAD_STAND_LATS: For the WRF-NMM, this parameter is equal to MOAD_KNOWN_LAT. It must be between -90 and 90.

 

MOAD_STAND_LONS: For the WRF-NMM, this parameter is equal to

MOAD_KNOWN_LON. It must be between -180 and180.

 

MOAD_DELTA_X: Floating point value specifying the grid spacing in the west-east direction in degrees. The spacing is in terms of the distance between a mass (H) point and its neighbor wind (V) point on the same row.

 

MOAD_DELTA_Y: Floating point value specifying the grid spacing in the north-south direction in degrees. The spacing is in terms of the distance between a mass (H) point and its neighbor wind (V) point within the same column.

 

For the rotated latitude-longitude grid, the grid center is the equator.  MOAD_DELTA_X and MOAD_DELTA_Y are constant within this rotated grid framework.  However, in a true Earth sense, the grid spacing varies in kilometers slightly between the center latitude and the northern and southern edges due to convergence of meridians away from the equator.  This behavior is more notable for domains covering a wide range of latitudes.  Typically, MOAD_DELTA_X is set to be slightly larger than MOAD_DELTA_Y to counter the effect of meridional convergence, and keep the unrotated, "true earth" grid spacing more uniform over the entire grid.

The relationship between the fraction of a degree specification for the E-grid and the more typical grid spacing specified in kilometers for other grids can be approximated by considering the following schematic:

V -dx- H

 |         / |

dy dX dy

 | /         |

H - dx- V

The horizontal grid resolution is taken to be the shortest distance between two mass (H) points (diagonal – dX), while MOAD_DELTA_X (dx) and MOAD_DELTA_Y (dy) definitions refer to distances between adjacent H and V points.  The distance between the H points in the diagram above is the hypotenuse of the triangle with legs dx and dy. Assuming 111 km/degree (a reasonable assumption for the rotated latitude-longitude grid) the grid spacing in km is approximately equal to: 111.0 * (SQRT (dx**2 + dy**2)).

 

SILAVWT_PARM_WRF - TOPTWVL_PARM_WRF: Settings for terrain smoothing within the ARW version of WRF SI. Do not apply to WRF-NMM SI.

 

Topography smoothing for WRF-NMM SI:

 

The WRF-NMM SI package currently allows a limited amount of topography smoothing. This smoothing is controlled within the code, rather then by a namelist option. The primary purpose of the subroutine smdhl, found in src/grid/gridgen_model.f, is to smooth topography along the model boundaries.  An additional, experimental option found in this routine smoothes localized peaks.  As coded now, a five-point smoother is applied  to a given point if it is higher than each of the four surrounding points,  This smoothing acts to shave off the mountain tops, but does not smooth valleys out of existence.  This option can be turned off by setting the parameter "hthresh", which is currently set to zero, to a large value, so a given point will never be "hthresh" higher than the four surrounding points

 

D. sfcfiles Section

This section is used to specify the paths to tiled global geographical data sets, which can be obtained from ftp://aftp.fsl.noaa.gov/divisions/frd-laps/WRFSI/Geog_Data

Note: Each dataset must be in its own subdirectory.

Note:  These paths defined in the template wrfsi.nl were set according to the GEOG_DATAROOT environment variable setting at the time of installation and do not need to be changed unless the user decides to change the location of these data sets

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

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

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

SOILTYPE_BOT_30S: Same as SOILTYPE_TOP_30S but for bottom layer.

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

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

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

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

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

E. interp_control

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

NUM_DOMAINS: Not relevant to WRF-NMM.  Set to 1.

DOMAIN_ID_LIST: Not relevant to WRF-NMM.  Set to 1.

PTOP_PA: Specifies model top in Pascals. Default is 5000 Pa. The horizontal interpolation code expects to find this topmost level within the input GRIB file, and will stop if it does not find it. The hinterp code is revised for WRF-NMM to avoid this difficulty, but setting the model top to 5000 Pa is probably fine for most users.

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

LSM_HINTERP_METHOD: Integer specifying the method of interpolation used for the land-masked fields. Codes are the same as above. Recommended options are: 0 or 1.

Note: For users wishing to use the background data's landuse and soil type categories, this parameter must be set to 0 and  "vegcat" and "soilcat" must be obtained from the 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.

NUM_INIT_TIMES: Integer currently set to 1. This parameter 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, and then switch to "LBC_ROOT" for the remaining time periods. Most users will set this parameter to 0, in which case all data will come from LBC_ROOT and CONSTANTS_FULL_NAME. Setting this parameter to 1 allows the model to be initialized with a different source of data for the initial conditions and land surface than what is used for the lateral boundary conditions

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.

Note:  This entry is only used if NUM_INIT_TIMES > 0.

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.

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 option is designed to support data for the Noah LSM coming from a source other than the INIT_ROOT.

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.

VERBOSE_LOG: Logical. Setting to true provides logging for troubleshooting purposes.

OUTPUT_COORD: String used to communicate to the vertical interpolation code that it is interpolating to the WRF-NMM's hybrid vertical coordinate. NMMH should NOT be changed.

LEVELS: List of levels to use in the WRF modeling system in ascending order. These values range from 1.0 to 0.0. The number of levels in the list specifies the number of vertical layer interfaces.  The specified values determine the distribution of the vertical layers.

OUTPUT_VARS: Controls which variables are output. Note: This must be set to '2' because WRF-NMM SI code expects this option.

 

OUTPUT_FILE_TYPE: The default is WRF. This option generates netCDF output files from WRF-NMM SI, which is consistent with the real_nmm.f code provided with WRFV2.2.

 

F. si_paths

This section specifies the paths to the degribbed data (grib_prep output) files. In most cases, all of these parameters will be the same path ($EXT_DATAROOT/extprd)

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

 

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

 

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

 

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

 

 

 

WRF-NMM SI Software Requirements

WRF-NMM SI code is written mostly in FORTRAN 77 and FORTRAN 90. A few utility programs are written in C (gcc compiler is recommended) Perl scripts are used to run the SI programs, and perl/Tk is required to run the GUI. WRF-NMM SI writes output in both binary (from grib_prep and hinterp) and netCDF (from gridgen_model and vinterp).

 

How to Install the WRF-NMM SI

The simplest build for WRF-NMM SI code is to use all the default directories.  Several configure files are provided in src/include/ directory for various computers. 

The WRF-NMM SI program may be downloaded from the http://wrfsi.noaa.gov/release page.

Once the tar file is obtained, gunzip and untar the file.

tar –zxvf wrfnmm_si_v2.2.tar.gz

These steps will create a directory called wrfsi_nmm/, which will be referred to as the SOURCE_ROOT directory.  This directory contains:

o      HOW_TO_RUN.txt: instructions how to run WRF-NMM SI without using the GUI

o      HOW_TO_INSTALL: instructions on how to install WRF-NMM SI