Skip Navigation Links www.nws.noaa.gov
NOAA logo - Click to go to the NOAA homepage National Weather Service NWS logo - Click to go to the NWS homepage
EMC Logo
Navigation Bar Left Cap Home News Organization
Navigation Bar End Cap

         MISSION / VISION    |    About EMC

EMC > NEMS > GFS POST
NOAA Environmental Modeling System

NEMS Post for GFS



GFS Output from NEMS

This page will provide the information you need to successfully process NEMS GFS output into Grib and GrADS readable files. Currently, there are two ways this can be done, via an external NEMS Post script or by running NEMS Post on the quilt. Instructions for both methods are provided below.

How to Run NEMS Post via external script on CCS machines (Cirrus/Stratus)


On CCS machines, these directions assume the NEMS GFS has already been run and output has been placed in /ptmp/userid/RT_*/*.

1. Copy /gpfs/t3/global/save/wx20njm/utils/run_nemspost to your own working directory. This is the script to process NEMS GFS output into GRIB format.

2. Besides making changes to the PBS commands in run_nemspost to have it run with your own account, make the following changes so it will run properly with your own directories:

Line #

Variable/Command

Changes To Make

What Does It Do?

26export startdate=Change to the date used in your GFS run with format 'yyyymmddhh'.* Current default for regression tests is 2012010100.Sets the start date of your output.
29mkdir -p /ptmp/wx20njm/post_gfs_nemsio...Change'wx20njm' to your user id.Creates a directory where your Grib output will be placed.**
30cd /ptmp/wx20njm/post_gfs_nemsio...Change 'wx20njm' to your user id.Moves to the directory specified in line 29.
34export allfhr=Specify the forecast hour(s) with format 'hh'. Use line 33 as an example for multiple forecast hours.Processes the selected forecast hour(s).
50/ptmp/wx20njm/RT_*/GFS_32/sigf${fhr}Change'wx20njm' to your user id and change 'RT_*/GFS_32' to your own output directory.***
54/ptmp/wx20njm/RT_*/GFS_32/flxf${fhr}Use the same directions as for line 50.
* To set the date for GFS output, make sure you have the proper input files for your date and change CDATE in your trunk/job/regression_tests/gfs_fcst_run.IN.
** You may wish to change the overall location and name of the directory to be created.
*** You may wish to change the name of your output directory, then input the correct directory location on lines 50 and 54.


3. Submit run_nemspost to LoadLeveler after making the necessary changes as specified in the previous table using the command:

'llsubmit run_nemspost'

Output will be in GRIB format (e.g. GFSPRS.GrbF06), located in the directory you specified on line 29 in run_nemspost.

4. Convert GRIB files to GrADS readable files:

Cd to the directory in which your new GRIB files are located.
Submit the following command to convert your GRIB file to a GrADS index file (*.idx) and a GrADS readable file (*.ctl).:

'~wx20mi/bin/grbctl your.grib.file newfile.ctl'

Where your.grib.file = GFSPRS.GrbF06 (or something similar) and newfile.ctl = your new GrADS readable filename.

You should now be able to view your NEMS GFS output in GrADS. For more information about the output fields, please reference the 'Output' section.

How to Run NEMS Post on quilt on CCS (Cirrus/Stratus)


NEMS has the capability to run POST on quilt processers (PEs). In this setting, NEMS will set up two sets of processors; the set of forecast PEs will be used for model integration and the other set is IO PEs (sometimes called quilt servers or quilt PEs) which will handle output data. The forecast PEs pass the output data to IO PEs and continue on model computation. The IO PEs will take the output data to do POST and/or to write to output files. To run it, the NEMS code has to be compiled with POST related libraries.

1. Compiling NEMS code for Post:

Before compiling NEMS code, a Post library (post.a) that contains all the computation subroutines and writing output subroutines from post code is needed. To create post.a, check out the Post repository code and compile with 'make -f makefile.nems'. Currently, there is a copy of the compiled post lib from the Post trunk from some time ago, located at /climate/save/wx20wa/unipost/trunk.

With post.a, a NEMS executable can be generated by compiling NEMS with the appropriate option. For example:

'gmake gfs_post' OR 'gmake nmm_post' OR 'gmake nmm_gfs_gen_post'

The compiling option will link the NEMS executable with post related libraries. These libraries include post.a, g2lib, g2tmpl, crtm, etc. The libraries are defined in the NEMS configure file, src/conf/configure.nems. In the configure file, the following variables have to be defined to specify the location of the libraries:

  • POSTDIR=xxx
  • POSTMOD=${POSTDIR}/incmod/post_4
  • POSTLIB=${POSTDIR}
  • EXTLIBS_POST=-L/climate/save/wx20wa/gfsio/lib/nemsio -lnemsio -L/climate/save/wx20wa/lib -lw3_v2.2.3_4 -lxmlparse -lg2tmpl -L${POSTLIB} -lnceppost $(ESMF_LIBS) /nco/sib/gribdev/lib/libg2_4.a -L/usrx/local/64bit/lib -ljasper -lpng -lz -L/nwprod/lib -lbacio_4 -lsigio_4 -lsfcio_4 -lsp_d -lessl_r -lmass -lmassvp6 -lcrtm_2.0.2
2. Running Post on the quilt:

After compiling the code, a NEMS executable Is generated. To run Post on quilt with forecast for NEMS code, the following variables in the run script, gfs_fcst_run.IN, nmm_reg_run.IN, or nmm_reg_conf.IN under job/regression_tests need to be set:
  • export WRITE_DOPOST=.true.
  • export POST_GRIBVERSION='"grib1"' (or '"grib2"')
  • export GOCART_AER2POST=.false. (not reading in aerosol fields)
Then run the regression test for post by entering the following command on the command line:

'$RT.sh post'

The above script in job/regression_tests will run a NEMS GFS test with Post and a NMM-B regional test with Post.

Questions or comments about GFS post? Please contact Hui-ya Chuang.