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

GRIB2 error when running ungrib

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.


New member
Hi all, and thank you for helping
I recently installed WRF/WPS on a new machine (using the standard instruction,
I installed the libraries, did all the tests and everything seemed to be working fine, yet I am getting the following error massage on ungrib:

*** Starting program ungrib.exe ***
Start_date = 2015-06-01_00:00:00 , End_date = 2015-06-01_18:00:00
output format is WPS
Path to intermediate files is ./
ERROR: Grib2 file or date problem, stopping in edition_num.

Additional info:

I am using the standard ds084 dataset I downloaded using - wget -N --load-cookies auth.rda_ucar_edu

I compiled WPS with option - 1 (gfortran serial including GRIB2)

I attach my WPS namelist, WPS compilation log and a screenshot of the WPS folder when running ungrib

I am grateful for any hint :D


  • template_namelist.wps
    985 bytes · Views: 58
  • log.compile
    96.8 KB · Views: 55
    61.8 KB · Views: 1,028
after some major headache, I solved this using this post
apparently, the linking did not work correctly
i have the same problem (see below) trying to run ungrib.exe. Specifically trying to run SST data from operational Sea Surface Temperature and Ice analysis (OSTIA). First i runed ungrib using data from ERA interim which worked fine, but in the second execution of ungrib.exe (following the online tutorial i got the problem before mentioned.

*** Starting program ungrib.exe ***
Start_date = 2013-07-31_00:00:00 , End_date = 2013-08-11_18:00:00
output format is WPS
Path to intermediate files is ./
ERROR: Grib2 file or date problem, stopping in edition_num.

I used the following lines to convert the file into intermediate files:
ln -sf /Path1/Variable_tables/Vtable.SST Vtable
csh link_grib.csh Path2/OSTIA/Agosto/1/SST*

-The Grib files (e.g. GRIBFILE.AAA) appear after run the lines
-This is an example of name of my files: SST:2013-08-02_00
-I used Vtable.SST

I modified the ungrib section of the namelist.wps as follow (just in "prefix"):
out_format = 'WPS',
prefix = 'SST',
I need help to solve this problem. I will be attentive to any comment. Thank you for advance.
Can you issue the following command?
ls -ls GRIBFILE* >& gribfile.txt

and please send the following files:

I have attached the files. Thanks for the support!


  • gribfile.txt
    5.2 KB · Views: 42
  • namelist.wps
    939 bytes · Views: 40
  • ungrib.log
    651 bytes · Views: 38
I apologize for the delay. We are preparing for our upcoming tutorial and it's quite a busy time!

Can you try to use the g2print utility to make sure the files can be read as GRIB-formatted files?
./util/g2print.exe >& g1print.txt
and send me that g2print.txt file?

Can you also attach the Vtable you're using, as well as one of the GRIB files (just a single time period)? Thanks!
Your g1print.txt file shows the following error:
./g2print.exe: error while loading shared libraries: cannot open shared object file: No such file or directory
Check your environment variables to see if you have LD_LIBRARY_PATH set to the directory where all of your jasper libs are. You may also need to check the settings for these variables:

setenv JASPERLIB /path-to-libs/grib2/lib
setenv JASPERINC /path-to-includes/grib2/include
setenv LDFLAGS -L/path-to-libs/grib2/lib
setenv CPPFLAGS -I/path-to-includes/grib2/include

Once you correct that, try to run ungrib again. If you are getting the same issue, do the g2print command again and send me the new output file (g2print.txt). Thanks!