setting up and running the wrf standard initialization brent shaw noaa / forecast systems laboratory

29
Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Upload: kelley-webb

Post on 12-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Setting Up and Running the WRF Standard Initialization

Brent Shaw

NOAA / Forecast Systems Laboratory

Page 2: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Overview

• Required Files• System Requirements• Installing the Software• Configuring Domains• Configuring Interpolation• Running• Initializing the WRF Model• Summary

Page 3: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Required Files

• WRFSI.TAR.gz• Static Geographical Data

– TERRAIN_GLOBAL_30S.tar– LANDUSE_GLOBAL_10DEG_TILES.tar.gz– GREENFRAC_GLOBAL_10DEG_TILES.tar.gz– SOILTEMP_GLOBAL_10DEG_TILES.tar.gz– SOILTYPEBOT_GLOBAL_10DEG_TILES.tar.gz– SOILTYPETOP_GLOBAL_10DEG_TILES.tar.gz

• Available for download– http://www.wrf-model.org (Officially released versions)– ftp://ftp.fsl.noaa.gov/pub/frd-laps (Latest version, not necessarily

officially released)

Page 4: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

System Requirements

• Unix or Linux OS– Routinely built on IBM AIX, Intel-Linux, Alpha-

Linux at FSL– NCAR has built on Alpha-True64 and SGI-IRIX

• FORTRAN 90 Compiler• C Compiler (gcc is preferred)• netCDF Libaries• Perl• make Utility

Page 5: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

System Requirements

• Disk Requirements– Recommended Minimum Total Space: 10 GB– Approx. 10 MB for source code and executables– Approx. 6 GB for global static fields– 1-10 GB for each MOAD_DATAROOT

• Depends on domain size, run length, etc.• NCAR 30km national domain requires approx. 1 GB to contain

necessary files for a 48-hour forecast period with 3-hourly boundary conditions

– 2-4 GB for "typical" EXT_DATAROOT• 48 hours of AVN 1 deg and ETA 40 km grids with hourly output

Page 6: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Installing the Software

• Installation Overview– Set up directories and environment variables– Check compiler options for your system– Run the installation script– Check for successful installation

Page 7: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Installing the Software

• Set up directories and environment variables– Source root

• Typically set to top directory of extracted WRFSI.TAR file• Set the SRCROOT environment variable

– Installation root• Where executables will be installed• Can be same as SRCROOT if desired• Set INSTALLROOT environment variable

– Domain data root• Top level directory where domain specific data will be kept• Set MOAD_DATAROOT environment variable

– netCDF Path (NETCDF environment variable)– Determine fully qualified Perl executable (e.g., /usr/bin/perl)

Page 8: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Installing the Software

• Check Compiler Settings– Check $SRCROOT/src/include directory for the

existence of a file named "makefile_{MACH}.inc.in where {MACH} is the type of machine on which you are building

– If one exists, check the various compiler options and flag settings

– If one does not exist, copy one of the existing ones to a new name using your machine name and edit the compiler settings

Page 9: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Installing the Software

• Run the installation script– $SRCROOT/install_wrfsi.pl– Example:

• /usr/bin/perl install_wrfsi.pl --installroot=$INSTALLROOT -- srcroot=$SRCROOT --dataroot=$DATAROOT --path_to_netcdf=$NETCDF --machine=MACH -- path_to_perl=/usr/bin/perl

• MACH = the machine type corresponding to the makefile_{MACH}.inc.in file

• NOTE: In the latest version (not yet officially released), the arguments will be optional provided the environment variables are set correctly.

Page 10: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Installing the Software

• Create an EXTDATAROOT– Location for grib_prep output (allow at least 2

GB)– Path will be set in wrfsi.nl as well– Contains various subdirectories that will get

created the first time wrfsi.pl is run:• extprd• log• work

Page 11: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Installing the Software

• Checking for successful installation– Check $INSTALLROOT/bin for executables:

• grib_prep.exe• gridgen_model.exe• hinterp.exe• vinterp.exe

– Check $INSTALLROOT/etc for scripts:• wrfsi.pl• grib_prep.pl• interp.pl

– If any executables are missing, you can go to $SRCROOT/src and find subdirectories for each executable. From there you can try to make each one manually and observe the errors

– PLEASE REPORT ANY PROBLEMS AND THEIR CORRECTIVE ACTIONS!

Page 12: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Configuring Domains

• Overview– Create a MOAD_DATAROOT – Edit the MOAD_DATAROOT/static/wrfsi.nl

• Configure various data paths• Horizontal domain specfication

– Edit the MOAD_DATAROOT/cdl/wrfsi.cdl file– Run gridgen_model.exe– Checking for a successful localization– New method using templates and localization

script

Page 13: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Configuring Domains

• Create a MOAD_DATAROOT– One required for each domain to be processed– Copy $SRCROOT/data directory to a new location:

• cp -r $SRCROOT/data /my/moad_dataroot• Ensure MOAD_DATAROOT environment variable is set• Check contents of MOAD_DATAROOT:

• $MOAD_DATAROOT/static directory containing wrfsi.nl file• $MOAD_DATAROOT/cdl directory containing wrfsi.cdl file• $MOAD_DATAROOT/siprd directory (empty)• $MOAD_DATAROOT/silog directory (empty)

• NOTE: In the latest version, soon to be released, the MOAD_DATAROOT directory and subdirectories will be created automatically when running the localization scripts.

Page 14: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Configuring Domains• Edit $MOAD_DATAROOT/static/wrfsi.nl

– project_id section (simulation_name and user_desc)– hgridspec section (sets up horizontal domain)

• xdim = dimension in E-W direction• ydim = dimension in N-S direction• map_proj_name = 'lambert', 'mercator', or 'polar'• moad_known_lat = center latitude (+ N)• moad_known_lon = center longitude (+ E)• moad_stand_lats = true latitude1 (lambert and polar), true latitude for

lambert (set to +/- 90 for polar)• moad_stand_lon = orientation longitude• moad_delta_x = grid spacing in meters in x-direction• moad_delta_y = grid spacing in meters in y-direction• Recommend leaving all other settings at their default values

– sfcpaths section (paths to geographical tile data sets)

Page 15: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Configuring Domains

• Edit $MOAD_DATAROOT/cdl/wrfsi.cdl– Set nx = x dimension specified in wrfsi.nl– Set ny = y dimension specified in wrfs.nl– NOTE: This will be done automatically in the

latest version of the WRFSI system when running the localization scripts

Page 16: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Configuring Domains

• Run gridgen_model.exe– Ensure MOAD_DATAROOT environment variable is set– Executable located in $INSTALLROOT/bin– Send results to a log file– Example:

• cd $INSTALLROOT/bin• gridgen_model.exe > $MOAD_DATAROOT/silog/localization.log

– Note that the execution of gridgen_model can be performed when running wrfsi.pl as well.

– Note that in the latest version, gridgen_model will be executed automatically as part of the localization process

Page 17: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Configuring Domains

• Checking for success– Check the standard output from gridgen_model

• Last message should indicate successful completion

– Check for existence of static file:• $MOAD_DATAROOT/static/static.wrfsi• netCDF file that can be viewed with ncdump utility

– Typical problems:• Incorrect paths to static data or missing tiles• Mismatch between dimensions in wrfsi.cdl vs.

wrfsi.nl

Page 18: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Configuring Interpolation

• Overview– hinterp options– vinterp options– Paths to GRIB data and EXTDATAROOT

Page 19: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Configuring Interpolation

• Grib_prep Options– Set in $MOAD_DATAROOT/static/wrfsi.nl– si_controls

• Set frequency of AVN and ETA grid receipt and typical delay after cycle time

– si_paths• Set EXTDATAROOT• Set PATH_TO_AVN, PATH_TO_ETA grib file

locations• NOTE: Other sources can be used if you simply call

the other source AVN or ETA. We will be making this more flexible in the future.

Page 20: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Configuring Interpolation

• Grib_prep Options– filetimespec

• Set start and stop times• NOTE: This will be edited automatically if using the

wrfsi.pl script to run the system.

– Variable selection from GRIB files via Vtables• $MOAD_DATAROOT/static/Vtable.{SOURCE}• {SOURCE} must match PATH_TO_{SOURCE}• Contols selection of variables and levels based on GRIB

codes• Allows specification of name to use for each variable in

output• Vtable.AVN and Vtable.ETA provided in distribution

Page 21: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Configuring Interpolation

• Hinterp Options– Set in $MOAD_DATAROOT/static/wrfsi.nl– hinterp_control

• PTOP_IN_PA: Top pressure level to consider from input data• INTERP_METHOD

– 0 = nearest neighbor (not recommended)– 1 = 4-point linear– 2 = 16-point quadratic

• INPUT_ROOT: Prefix of files in EXTDATAROOT/extprd to use for dynamic data (set automatically when running wrfsi.pl)

• CONSTANTS_FULL_NAME: Full file names of data located in EXTDATAROOT/extprd that contain values to be held constant for entire run

• VERBOSE: Set to true for more extensive logging• Recommend leaving all other options as they come

Page 22: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Configuring Interpolation

• Vinterp Options– Set in $MOAD_DATAROOT/static/wrfsi.nl– vinterp_control

• Recommended method:– Set USE_SPECIFIED_LEVEL = .true.– Specify the vertical zeta levels (full levels) to use

» Begin with 0 and increase in value up to top value– Leave all other settings as they are

Page 23: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Running

• Set MOAD_DATAROOT and INSTALLROOT• Ensure wrfsi.nl has correct extdataroot• Ensure you have AVN or ETA data for the correct times

available in the correct paths– GRIB filenaming conventions recognized:

• FSL: yyjjjhhmmffff• NCEP: ???.ThhZ.??????ff.????• NCEP: ???_yymmdd_hh_ff• If your files do not conform to these naming conventions, the

grib_prep script will assume every file is a possible match

• Ensure all previous domain configuration steps have been successfully completed

Page 24: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Running

• Run the main driver script with 4 arguments:– YYYYMMDDHH: Year, month, day, and hour UTC of model

start time– FF: Length of forecast to be produce in hours– Source: AVN or ETA– Window Name: A name for this run– Example:

• cd $INSTALLROOT/etc• wrfsi.pl 2001081612 24 ETA myrun

– You can optionally provide the dataroot and installroot using command line options -d and -i.

• wrfsi.pl -d /my/dataroot -i /my/installroot 2001081612 24 ETA myrun

Page 25: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Running

• What happens when wrfsi.pl runs?• You will be prompted as to whether or not gridgen_model should be run.

Typically, you answer "no" unless you changed something about the grid specification.

• The script edits $MOAD_DATAROOT/static/wrfsi.nl for run time and source of initialization

• The script calls grib_prep.pl to run grib_prep.exe• The script calls interp.pl to run hinterp.exe and vinterp.exe• Output ends up in $MOAD_DATAROOT/siprd• A log file ends up in EXTDATAROOT/log for the grib_prep run• A log file ends up in $MOAD_DATAROOT/silog for the hinterp/vinterp

runs.

Page 26: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Running

• Did it run properly?• Check for output in $MOAD_DATAROOT/siprd

• From previous run example, we should have:– wrf_input.global.metadata– wrf_input.d01.2001-08-16_12:00:00– wrf_input.d01.2001-08-16-15:00:00– wrf_input.d01.2001-08-16-18:00:00– ...– wrf_input.d01.2001-08-17-12:00:00

• Frequency of output files is set in filetimespec portion of wrfsi.nl

• If correct files are not present, check the log files to determine what went wrong.

Page 27: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Running

Checking the output• Use the IDL routines in the SRCROOT/util directory to read the

hinterp/vinterp output files.• Use the INSTALLROOT/bin/siscan program to dump a summary of file

contents (avaialble in latest version, not yet released)

• siscan {file} Other Notes of Interest

• Each executable can be run directly without the use of any scripts by simply setting the MOAD_DATAROOT environment variable and ensuring the namelist is correct

• The interp.pl and gribprep.pl scripts can also be run directly without the use of wrfsi.pl

Page 28: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Initializing the WRF Model

Edit the WRF namelist.input file to make it consistent with the WRFSI domain configuration

• ztop, dx, dy, io_form, etc. Run the WRF real.exe routine using the WRFSI output files (wrf_input.*) as

input You can then run the model! See Dave Gill's presentation for more details.

Page 29: Setting Up and Running the WRF Standard Initialization Brent Shaw NOAA / Forecast Systems Laboratory

Summary

Setting up and running the WRFSI is most easily done by:• Building the software• Configuring your domain• Running the wrfsi.pl script

The system is flexible enough to run each component individually The WRFSI continues to be a work in progress

• New version will be released soon to support WRF LSM• Domain configuration will be much easier with the use of templates and

localization scripts in latest version• More enhancements are planned and will be done as resources permit

We welcome feedback, bug reports, etc.!