(RESOLVED) ungrib treats grib2 data as grib1

Topics related to running the ungrib.exe program
Post Reply
chenhua
Posts: 3
Joined: Tue Aug 04, 2020 11:55 pm

(RESOLVED) ungrib treats grib2 data as grib1

Post by chenhua » Wed Aug 05, 2020 12:26 am

I download WPS4.2 and compiled WPS using option 17 "Linux x86_64, Intel compiler (serial)". I use 2019 grib2 GFS data. The corresponding Vtable I used is Vtable.GFS provided in ungrib/Variable_Tables. When I run ungrib, I got the error message (see below the asterisk line). It seems like ungrib.exe identifies my grib2 files as grib1 files. I used g2print.exe to check the files and everything looks fine.
******************************************************************
*** stopping in gribcode ***\n
\tI was expecting a Grib1 file, but this is a Grib2 file.
\tIt is possible this is because your GRIBFILE.XXX files
\tare not all of the same type.
\tWPS can handle both file types, but a separate ungrib
\tjob must be run for each Grib type.\n
gribsize in gribcode

Ming Chen
Posts: 1101
Joined: Mon Apr 23, 2018 9:42 pm

Re: ungrib treats grib2 data as grib1

Post by Ming Chen » Wed Aug 05, 2020 10:26 pm

Where did you download GFS 2019 data? I would suggest you get data from NCAR CISL:
https://rda.ucar.edu/datasets/ds084.1/

These archived datasets are open to public. We can successfully ungrib these data using WPS.

Please try and let me know if you have any problem.
WRF Help Desk

chenhua
Posts: 3
Joined: Tue Aug 04, 2020 11:55 pm

Re: ungrib treats grib2 data as grib1

Post by chenhua » Thu Aug 06, 2020 2:41 am

Thanks for your help. I use 0.25deg GFS data and run the model on jet (GFS data are also available on NOAA's jet). I removed the line "ec_rec_len = 26214508," from the namelist.wps and ungrib can identify the grib2 file. But after the first pass it run into segmentation fault. I switched to another computer, all three steps of WPS finished successfully.

Ming Chen
Posts: 1101
Joined: Mon Apr 23, 2018 9:42 pm

Re: ungrib treats grib2 data as grib1

Post by Ming Chen » Thu Aug 06, 2020 10:31 pm

Thanks for letting me know. Only one issue I would like to raise, the option ec_rec_len is specified for high-resolution ECMWF data. It shouldn't be set for GFS data.
WRF Help Desk

Post Reply

Return to “ungrib”