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

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

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.

hnyc2020

New member
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/nccf/com/gfs/prod/gfs.20201202/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/04/error-grib2-file-or-date-problem.html does not help me.

I would appreciate your thoughts on this issue.

Thank You!
 

Attachments

  • namelist.wps
    1.3 KB · Views: 76
  • ungrib.log
    652 bytes · Views: 57
  • log.compile
    105.9 KB · Views: 49
  • configure.wps
    3.3 KB · Views: 56
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:
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!
 
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 (https://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=98&t=9818&p=19416#p19416)

I appreciate your thoughts on that.


Best,
 
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.
 
Top