Fix for running MM5 with NAM grids post-March 2017
by David Ovens, Dept. of Atmospheric Sciences, University of Washington
The Problem:
NCEP modified the NAM GRIB2 files in March 2017 such that the height
fields were not read properly by many older codes.
MM5 reads GRIB1 files, but, the NCEP cnvgrib code was not modified to
handle the new format.
MM5 programs PREGRID and REGRID seem to work with the files, but
INTERPF frequently crashes with an error like this:
NHPP vert gradient check 17 9 10.156250E-01-159302. 159302.
nhpp_did_not_converge
The Solution:
After some failed attempts to figure out where cnvgrib (NCEP code) or
pregrid (part of MM5's REGRID) needed to be modified to fix the
problem, I approached the problem in a different way. Since NCAR had
already fixed WRF's ungrib to work with the new NAM GRIB2 files, I
decided to use ungrid instead of pregrid and modify regridder to read
in the slightly different format of those files.
Here are the steps to fix the problem:
- Download the WRF's WPS version 3.9 (or later), or patch an earlier
version with the ungrib/src/ngl/g2/comunpack.f routine found at this
NCAR
MMM page.
- Replace regridder file
REGRID/regridder/src/proc_ingest_first_guess.F with this version.
- Optionally, you may also update REGRID/pregrid/util/plotfmt.F with
this version
- Recompile REGRID. In the top REGRID directory, type "make" or
"make intel", or whatever works for your system.
- Use WRF's link_grib.csh with NAM GRIB2 files
- Use this Vtable file which has been modified
for MM5's variable names (TT, UU, and VV renamed to T, U, V)
- run ungrib instead of pregrid
- run regridder
- run interpf and see that it now works!
- run the MM5