Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

error with the output of the field in grib2 format after UPP work

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

Alexander Fil

New member

I have a problem with the output of WRFPOST files.

I am running unipost version UPPv.3.1.1 for NMM core for synthetic test.
INFORMAT: netcdf
STARTDATE: 2012102612
FHR: 00
DOMAIN_LIST: d01 d02 d03
RUN_COMMAND: /opt/sgi/mpt/mpt-2.12/bin/mpiexec -np 1 ./unipost.exe

the program works, errors are not written in the log files.

WRFPOST files over 3 grids are generated. But when the wgrib2 program checks any field in the resulting output files, the following error is written:

/src/wrf/HWRF-4.0a-OPER/WRF/tests/nmm_tropical_cyclone/postprd_grb2> ./wgrib2.exe -V -d 14 WRFPRS_d01.06
BAD GDS:lon1=4294.863015 lon2=4294.894296 should be 0..360
14:2659973:vt=2012102618:2 hybrid level:6 hour fcst:pRES Pressure [Pa]:
Rotated Lat/Lon (Arakawa Staggered E-grid)(287 x 575) units 1e-06 input WE:SN output WE:SN res 0
lat0 -0.021462 lat-center 0.020864 dlat 0.000000
lon0 4294.863015 lon-center 4294.894296 dlon 0.000000 #points=165025

The error lies in the incorrect creation of the final latitude-longitude grid.

And so on for each field in the files.

I tried to run unipost for grib1 format, fields are created correctly.

Below is an example after running a unipost with grib1 format:
/src/wrf/HWRF-4.0a-OPER/WRF/tests/nmm_tropical_cyclone/postprd_grb1> ./wgrib.exe -V -d 14 WRFPRS_d01.06
rec 14:3549134:date 2012102612 SPFH kpds5=51 kpds6=109 kpds7=2 levels=(0,2) grid=255 hybrid lev 2 6hr fcst:
SPFH=Specific humidity [kg/kg]
timerange 0 P1 6 P2 0 TimeU 1 nx 287 ny 575 GDS grid 203 num_in_ave 0 missing 0
center 7 subcenter 0 process 125 Table 2 scan: WE:SN winds(grid)
Semi-staggered Arakawa E-Grid (2D): lat0 -21.462000 lon0 -104.281000 nxny 165025
dLat 0.135000 dLon 0.135000 (tlm0d -73.000000 tph0d 20.864000) scan 64 mode 136
min/max data 0.0136563 0.0185963 num bits 9 BDS_Ref 1365.63 DecScale 5 BinScale 0

Please tell me how I can fix this error with the output in grib2 format.
This was a known issue for the V3.1 release of UPP:

Problem: The initialization routine for NMM has not been updated to output
correct grid projection values.
Solution: A new INITPOST_NMM.f file with valid grib2 grid description will
be provided when available.

And unfortunately it was never fixed before NMM support was discontinued with the V3.2 release:

The UPP User Release Version 3.2 was released on December 13, 2017.

This release supports use of WRF-ARW model input. The DTC no longer
provides UPP support for NMM or NMM-b modeling cores due to lack of
support for those modeling cores.

I do apologize for any inconvenience, but we do not have the resources available to provide a fix for the issue, since we no longer provide support for NMM.