(RESOLVED) ERROR: Grib2 file or date problem, stopping in edition_num.

Topics related to running the ungrib.exe program
Post Reply
hnyc2020
Posts: 4
Joined: Wed Dec 02, 2020 12:37 am

(RESOLVED) ERROR: Grib2 file or date problem, stopping in edition_num.

Post by hnyc2020 » Thu Dec 03, 2020 7:02 pm

Hello,

I am following a YouTube video and got stuck for a day and that's why I am writing my question here and would appreciate if someone could help me.

The problem is

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

I use a script to read three files from the following directory (gfs.t00z.pgrb2.0p50.f000, gfs.t00z.pgrb2.0p50.f003, gfs.t00z.pgrb2.0p50.f006)

https://nomads.ncep.noaa.gov/pub/data/n ... 201202/00/


Here is the script (download_gfs.sh) that I have
---------------------------------------------------------------------------------------------------------

#!/bin/bash


inputdir=/home/hooman/Desktop/Build_WRF/GFS
rm -rf $inputdir
mkdir $inputdir



year=2020
month=12
day=02
cycle=00

for ((i=000; i<=006; i+=3))
do

ftime=`printf "%03d\n" "${i}"`

server=https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod
directory=gfs.${year}${month}${day}/${cycle}
file=gfs.t${cycle}z.pgrb2.0p50.f${ftime}


url=${server}/${directory}/${file}

echo $url

wget -o ${inputdir}/${file} ${url}

done
-----------------------------------------------------------------------
I have a directory/folder called /local/Desktop/Build_WRF and then have several sub-directory/folders like WRF, WPS, GFS, scripts, WPS_GEOG and LIBRARIES in Build_WRF folder. I saved the above script in the "scripts" folder and when I type "./download_gfs.sh", in terminal, it adds three files in the "scripts" folder and "GPS" folder. Is it ok that I have files in both folders? ...note that scripts and GFS folders are separated.


Assuming that it is ok, I face the issue when I ./ungrib.exe in terminal

( *** Starting program ungrib.exe ***
Start_date = 2020-12-02_00:00:00 , End_date = 2020-12-02_06:00:00
output format is WPS
Path to intermediate files is ./
ERROR: Grib2 file or date problem, stopping in edition_num.
)


I have attached the log compile, ungrib.log and namelist.wps for your review.
I use Ubuntu 20 and NetCDF 4.1.2, Jasper 1.900.1, mpich 3.3.2, libpng 1.6.37, Zlib 1.2.11, WRF 4.1.5 and WPS 4.1


I tried to add ec_rec_len = 26214508 under &ungrib in namelist.wps...it did not work or at least II could not manage to use it.

I also read this webpage :http://sergioibarra.blogspot.com/2018/0 ... oblem.html does not help me.

I would appreciate your thoughts on this issue.

Thank You!
Attachments
configure.wps
(3.33 KiB) Downloaded 12 times
log.compile
(105.86 KiB) Downloaded 11 times
ungrib.log
(652 Bytes) Downloaded 13 times
namelist.wps
(1.27 KiB) Downloaded 12 times
Last edited by hnyc2020 on Sat Dec 05, 2020 6:26 pm, edited 1 time in total.

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: ERROR: Grib2 file or date problem, stopping in edition_num.

Post by kwerner » Fri Dec 04, 2020 6:25 pm

Hi,
1) Are you running .ungrib.exe from within the WPS/ directory?
2) Before running ungrib, are you linking the data input files to your running directory (using the ./link_grib.csh command)?
3) If yes to both the above questions, do you have files named GRIBFILE.* in your running directory? These are the files the ungrib program is looking for. If you have those files, make sure that each GRIBFILE.* is linked to an individual data file, and not a directory.

If all looks okay, then please issue this command in your wps directory:

Code: Select all

ls -ls >& ls.txt
and attach that ls.txt file so that I can take a look, and please let me know which version of wps you are using. Thanks!
NCAR/MMM

hnyc2020
Posts: 4
Joined: Wed Dec 02, 2020 12:37 am

Re: ERROR: Grib2 file or date problem, stopping in edition_num.

Post by hnyc2020 » Sat Dec 05, 2020 6:25 pm

Hello,

Thank you for your answer.

I fixed it.

The issue went back to the GFS files. For some reasons (that I do not know yet), the files were not downloaded correctly (meaning I had three files with the right names but the file size was not correct; I noticed that with delay :/)... while the file should have been around 90 MB, each was 150 Kb!!!

I manually downloaded the files and it worked!


So, any idea why that script downloaded the files incompletely?

Also, I face a new issue with UPP compiling. I posted this issue here (viewtopic.php?f=98&t=9818&p=19416#p19416)

I appreciate your thoughts on that.


Best,

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: ERROR: Grib2 file or date problem, stopping in edition_num.

Post by kwerner » Mon Dec 07, 2020 6:31 pm

Hi,
I am glad that you were able to resolve the problem, and thanks for updating the post. I am not sure why the script didn't work to download the files completely. As for the UPP question, unfortunately those questions are handled by a different group than ours at NCAR. Someone from that group will need to respond, as I'm not familiar with the program.
NCAR/MMM

Post Reply

Return to “ungrib”