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
Required Files WRFSI.TAR.gz Static Geographical Data TERRAIN_GLOBAL_30S.tar TERRAIN_GLOBAL_30S.tar LANDUSE_GLOBAL_10DEG_TILES.tar.gz LANDUSE_GLOBAL_10DEG_TILES.tar.gz GREENFRAC_GLOBAL_10DEG_TILES.tar.gz GREENFRAC_GLOBAL_10DEG_TILES.tar.gz SOILTEMP_GLOBAL_10DEG_TILES.tar.gz SOILTEMP_GLOBAL_10DEG_TILES.tar.gz SOILTYPEBOT_GLOBAL_10DEG_TILES.tar.gz SOILTYPEBOT_GLOBAL_10DEG_TILES.tar.gz SOILTYPETOP_GLOBAL_10DEG_TILES.tar.gz SOILTYPETOP_GLOBAL_10DEG_TILES.tar.gz Available for download (Officially released versions) (Officially released versions) ftp://ftp.fsl.noaa.gov/pub/frd-laps (Latest version, not necessarily officially released) ftp://ftp.fsl.noaa.gov/pub/frd-laps (Latest version, not necessarily officially released)
System Requirements Unix or Linux OS Routinely built on IBM AIX, Intel-Linux, Alpha-Linux at FSL Routinely built on IBM AIX, Intel-Linux, Alpha-Linux at FSL NCAR has built on Alpha-True64 and SGI-IRIX NCAR has built on Alpha-True64 and SGI-IRIX FORTRAN 90 Compiler C Compiler (gcc is preferred) netCDF Libaries Perl make Utility
System Requirements Disk Requirements Recommended Minimum Total Space: 10 GB Recommended Minimum Total Space: 10 GB Approx. 10 MB for source code and executables Approx. 10 MB for source code and executables Approx. 6 GB for global static fields Approx. 6 GB for global static fields 1-10 GB for each MOAD_DATAROOT 1-10 GB for each MOAD_DATAROOT Depends on domain size, run length, etc.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 conditionsNCAR 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 2-4 GB for "typical" EXT_DATAROOT 48 hours of AVN 1 deg and ETA 40 km grids with hourly output48 hours of AVN 1 deg and ETA 40 km grids with hourly output
Installing the Software Installation Overview Set up directories and environment variables Set up directories and environment variables Check compiler options for your system Check compiler options for your system Run the installation script Run the installation script Check for successful installation Check for successful installation
Installing the Software Set up directories and environment variables Source root Source root Typically set to top directory of extracted WRFSI.TAR fileTypically set to top directory of extracted WRFSI.TAR file Set the SRCROOT environment variableSet the SRCROOT environment variable Installation root Installation root Where executables will be installedWhere executables will be installed Can be same as SRCROOT if desiredCan be same as SRCROOT if desired Set INSTALLROOT environment variableSet INSTALLROOT environment variable Domain data root Domain data root Top level directory where domain specific data will be keptTop level directory where domain specific data will be kept Set MOAD_DATAROOT environment variableSet MOAD_DATAROOT environment variable netCDF Path (NETCDF environment variable) netCDF Path (NETCDF environment variable) Determine fully qualified Perl executable (e.g., /usr/bin/perl) Determine fully qualified Perl executable (e.g., /usr/bin/perl)
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 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 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 If one does not exist, copy one of the existing ones to a new name using your machine name and edit the compiler settings
Installing the Software Run the installation script $SRCROOT/install_wrfsi.pl $SRCROOT/install_wrfsi.pl Example: 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/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 fileMACH = 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.NOTE: In the latest version (not yet officially released), the arguments will be optional provided the environment variables are set correctly.
Installing the Software Create an EXTDATAROOT Location for grib_prep output (allow at least 2 GB) Location for grib_prep output (allow at least 2 GB) Path will be set in wrfsi.nl as well Path will be set in wrfsi.nl as well Contains various subdirectories that will get created the first time wrfsi.pl is run: Contains various subdirectories that will get created the first time wrfsi.pl is run: extprdextprd loglog workwork
Installing the Software Checking for successful installation Check $INSTALLROOT/bin for executables: Check $INSTALLROOT/bin for executables: grib_prep.exegrib_prep.exe gridgen_model.exegridgen_model.exe hinterp.exehinterp.exe vinterp.exevinterp.exe Check $INSTALLROOT/etc for scripts: Check $INSTALLROOT/etc for scripts: wrfsi.plwrfsi.pl grib_prep.plgrib_prep.pl interp.plinterp.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 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! PLEASE REPORT ANY PROBLEMS AND THEIR CORRECTIVE ACTIONS!
Configuring Domains Overview Create a MOAD_DATAROOT Create a MOAD_DATAROOT Edit the MOAD_DATAROOT/static/wrfsi.nl Edit the MOAD_DATAROOT/static/wrfsi.nl Configure various data pathsConfigure various data paths Horizontal domain specficationHorizontal domain specfication Edit the MOAD_DATAROOT/cdl/wrfsi.cdl file Edit the MOAD_DATAROOT/cdl/wrfsi.cdl file Run gridgen_model.exe Run gridgen_model.exe Checking for a successful localization Checking for a successful localization New method using templates and localization script New method using templates and localization script
Configuring Domains Create a MOAD_DATAROOT One required for each domain to be processed One required for each domain to be processed Copy $SRCROOT/data directory to a new location: Copy $SRCROOT/data directory to a new location: cp -r $SRCROOT/data /my/moad_datarootcp -r $SRCROOT/data /my/moad_dataroot Ensure MOAD_DATAROOT environment variable is set Ensure MOAD_DATAROOT environment variable is set Check contents of MOAD_DATAROOT: Check contents of MOAD_DATAROOT: $MOAD_DATAROOT/static directory containing wrfsi.nl file$MOAD_DATAROOT/static directory containing wrfsi.nl file $MOAD_DATAROOT/cdl directory containing wrfsi.cdl file$MOAD_DATAROOT/cdl directory containing wrfsi.cdl file $MOAD_DATAROOT/siprd directory (empty)$MOAD_DATAROOT/siprd directory (empty) $MOAD_DATAROOT/silog 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. NOTE: In the latest version, soon to be released, the MOAD_DATAROOT directory and subdirectories will be created automatically when running the localization scripts.
Configuring Domains Edit $MOAD_DATAROOT/static/wrfsi.nl project_id section (simulation_name and user_desc) project_id section (simulation_name and user_desc) hgridspec section (sets up horizontal domain) hgridspec section (sets up horizontal domain) xdim = dimension in E-W directionxdim = dimension in E-W direction ydim = dimension in N-S directionydim = dimension in N-S direction map_proj_name = 'lambert', 'mercator', or 'polar'map_proj_name = 'lambert', 'mercator', or 'polar' moad_known_lat = center latitude (+ N)moad_known_lat = center latitude (+ N) moad_known_lon = center longitude (+ E)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_lats = true latitude1 (lambert and polar), true latitude for lambert (set to +/- 90 for polar) moad_stand_lon = orientation longitudemoad_stand_lon = orientation longitude moad_delta_x = grid spacing in meters in x-directionmoad_delta_x = grid spacing in meters in x-direction moad_delta_y = grid spacing in meters in y-directionmoad_delta_y = grid spacing in meters in y-direction Recommend leaving all other settings at their default valuesRecommend leaving all other settings at their default values sfcpaths section (paths to geographical tile data sets) sfcpaths section (paths to geographical tile data sets)
Configuring Domains Edit $MOAD_DATAROOT/cdl/wrfsi.cdl Set nx = x dimension specified in wrfsi.nl Set nx = x dimension specified in wrfsi.nl Set ny = y dimension specified in wrfs.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 NOTE: This will be done automatically in the latest version of the WRFSI system when running the localization scripts
Configuring Domains Run gridgen_model.exe Ensure MOAD_DATAROOT environment variable is set Ensure MOAD_DATAROOT environment variable is set Executable located in $INSTALLROOT/bin Executable located in $INSTALLROOT/bin Send results to a log file Send results to a log file Example: Example: cd $INSTALLROOT/bincd $INSTALLROOT/bin gridgen_model.exe > $MOAD_DATAROOT/silog/localization.loggridgen_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 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 Note that in the latest version, gridgen_model will be executed automatically as part of the localization process
Configuring Domains Checking for success Check the standard output from gridgen_model Check the standard output from gridgen_model Last message should indicate successful completionLast message should indicate successful completion Check for existence of static file: Check for existence of static file: $MOAD_DATAROOT/static/static.wrfsi$MOAD_DATAROOT/static/static.wrfsi netCDF file that can be viewed with ncdump utilitynetCDF file that can be viewed with ncdump utility Typical problems: Typical problems: Incorrect paths to static data or missing tilesIncorrect paths to static data or missing tiles Mismatch between dimensions in wrfsi.cdl vs. wrfsi.nlMismatch between dimensions in wrfsi.cdl vs. wrfsi.nl
Configuring Interpolation Overview hinterp options hinterp options vinterp options vinterp options Paths to GRIB data and EXTDATAROOT Paths to GRIB data and EXTDATAROOT
Configuring Interpolation Grib_prep Options Set in $MOAD_DATAROOT/static/wrfsi.nl Set in $MOAD_DATAROOT/static/wrfsi.nl si_controls si_controls Set frequency of AVN and ETA grid receipt and typical delay after cycle timeSet frequency of AVN and ETA grid receipt and typical delay after cycle time si_paths si_paths Set EXTDATAROOTSet EXTDATAROOT Set PATH_TO_AVN, PATH_TO_ETA grib file locationsSet 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.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.
Configuring Interpolation Grib_prep Options filetimespec filetimespec Set start and stop timesSet start and stop times NOTE: This will be edited automatically if using the wrfsi.pl script to run the system.NOTE: This will be edited automatically if using the wrfsi.pl script to run the system. Variable selection from GRIB files via Vtables Variable selection from GRIB files via Vtables $MOAD_DATAROOT/static/Vtable.{SOURCE}$MOAD_DATAROOT/static/Vtable.{SOURCE} {SOURCE} must match PATH_TO_{SOURCE}{SOURCE} must match PATH_TO_{SOURCE} Contols selection of variables and levels based on GRIB codesContols selection of variables and levels based on GRIB codes Allows specification of name to use for each variable in outputAllows specification of name to use for each variable in output Vtable.AVN and Vtable.ETA provided in distributionVtable.AVN and Vtable.ETA provided in distribution
Configuring Interpolation Hinterp Options Set in $MOAD_DATAROOT/static/wrfsi.nl Set in $MOAD_DATAROOT/static/wrfsi.nl hinterp_control hinterp_control PTOP_IN_PA: Top pressure level to consider from input dataPTOP_IN_PA: Top pressure level to consider from input data INTERP_METHODINTERP_METHOD 0 = nearest neighbor (not recommended)0 = nearest neighbor (not recommended) 1 = 4-point linear1 = 4-point linear 2 = 16-point quadratic2 = 16-point quadratic INPUT_ROOT: Prefix of files in EXTDATAROOT/extprd to use for dynamic data (set automatically when running wrfsi.pl)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 runCONSTANTS_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 loggingVERBOSE: Set to true for more extensive logging Recommend leaving all other options as they comeRecommend leaving all other options as they come
Configuring Interpolation Vinterp Options Set in $MOAD_DATAROOT/static/wrfsi.nl Set in $MOAD_DATAROOT/static/wrfsi.nl vinterp_control vinterp_control Recommended method:Recommended method: Set USE_SPECIFIED_LEVEL =.true.Set USE_SPECIFIED_LEVEL =.true. Specify the vertical zeta levels (full levels) to useSpecify the vertical zeta levels (full levels) to use Begin with 0 and increase in value up to top valueBegin with 0 and increase in value up to top value Leave all other settings as they areLeave all other settings as they are
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: GRIB filenaming conventions recognized: FSL: yyjjjhhmmffffFSL: yyjjjhhmmffff NCEP: ???.ThhZ.??????ff.????NCEP: ???.ThhZ.??????ff.???? NCEP: ???_yymmdd_hh_ffNCEP: ???_yymmdd_hh_ff If your files do not conform to these naming conventions, the grib_prep script will assume every file is a possible matchIf 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
Running Run the main driver script with 4 arguments: YYYYMMDDHH: Year, month, day, and hour UTC of model start time YYYYMMDDHH: Year, month, day, and hour UTC of model start time FF: Length of forecast to be produce in hours FF: Length of forecast to be produce in hours Source: AVN or ETA Source: AVN or ETA Window Name: A name for this run Window Name: A name for this run Example: Example: cd $INSTALLROOT/etccd $INSTALLROOT/etc wrfsi.pl ETA myrunwrfsi.pl ETA myrun You can optionally provide the dataroot and installroot using command line options -d and -i. You can optionally provide the dataroot and installroot using command line options -d and -i. wrfsi.pl -d /my/dataroot -i /my/installroot ETA myrunwrfsi.pl -d /my/dataroot -i /my/installroot ETA myrun
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. 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 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 grib_prep.pl to run grib_prep.exe The script calls interp.pl to run hinterp.exe and vinterp.exe The script calls interp.pl to run hinterp.exe and vinterp.exe Output ends up in $MOAD_DATAROOT/siprd 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 EXTDATAROOT/log for the grib_prep run A log file ends up in $MOAD_DATAROOT/silog for the hinterp/vinterp runs. A log file ends up in $MOAD_DATAROOT/silog for the hinterp/vinterp runs.
Running Did it run properly? Check for output in $MOAD_DATAROOT/siprd Check for output in $MOAD_DATAROOT/siprd From previous run example, we should have:From previous run example, we should have: wrf_input.global.metadatawrf_input.global.metadata wrf_input.d _12:00:00wrf_input.d _12:00:00 wrf_input.d :00:00wrf_input.d :00:00 wrf_input.d :00:00wrf_input.d :00: wrf_input.d :00:00wrf_input.d :00:00 Frequency of output files is set in filetimespec portion of wrfsi.nlFrequency 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. If correct files are not present, check the log files to determine what went wrong.
Running Checking the output Use the IDL routines in the SRCROOT/util directory to read the hinterp/vinterp output files. 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) Use the INSTALLROOT/bin/siscan program to dump a summary of file contents (avaialble in latest version, not yet released) siscan {file}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 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 The interp.pl and gribprep.pl scripts can also be run directly without the use of wrfsi.pl
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. 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.
Summary Setting up and running the WRFSI is most easily done by: Building the software Building the software Configuring your domain Configuring your domain Running the wrfsi.pl script 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 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 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 More enhancements are planned and will be done as resources permit We welcome feedback, bug reports, etc.!