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

ungrib error for Grib1 and/or Grib2 files

acast

New member
Hi, forum
I am trying to ungrib ERA5 surface and pressure data downloaded from Copernicus Climate Data Store |. When I ungrib the data the PFILEs are created but then I get the following error.
*** 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
STOP gribsize in gribcode
STOP
I want to point out that I have successfully ungrib ERA5 data from the NCAR website but because I can only download global data from ERA5 using the NCAR website (maybe I am wrong?) I had to download a subset of the data from the Copernicus website. I plan to run really long WRF simulations (~10 yrs) so I had to subset the ERA5 data using the Copernicus website.
So my question is. Does anyone know how to check which files are GRIB1 or GRIB2 (I have a lot of files ~3000) or how to approach the aforementioned error? I am using a cray computer and I compiled WPS version 4.5 in parallel using a Cray computer. I attach my ungrib.log file.
Thanks a lot
Alma
 

Attachments

  • ungrib.txt
    159.2 KB · Views: 6
Hi Alma,
A few thoughts:

1) There are utilities available in WPS/util called g1print.exe and g2print.exe. If you run those on your GRIBFILE.XXX files, it will give an error if you use, for e.g., the g1print.exe utility on a grib2 formatted file.

2) Make sure you don't have older GRIBFILE.* files in your WPS/ directory that you're no longer using for this simulation. To be sure, just remove all of them and then issue the ./link_grib.csh script again.

3) Just to let you know, for Gaussian data, ungrib only supports the use of a full global dataset, so if your subsets are from a Gaussian grid, you'll get another error later. If the data originate from a global lat-lon projection, it should be okay.
 
Hi, forum
I am trying to ungrib ERA5 surface and pressure data downloaded from Copernicus Climate Data Store |. When I ungrib the data the PFILEs are created but then I get the following error.
*** 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
STOP gribsize in gribcode
STOP
I want to point out that I have successfully ungrib ERA5 data from the NCAR website but because I can only download global data from ERA5 using the NCAR website (maybe I am wrong?) I had to download a subset of the data from the Copernicus website. I plan to run really long WRF simulations (~10 yrs) so I had to subset the ERA5 data using the Copernicus website.
So my question is. Does anyone know how to check which files are GRIB1 or GRIB2 (I have a lot of files ~3000) or how to approach the aforementioned error? I am using a cray computer and I compiled WPS version 4.5 in parallel using a Cray computer. I attach my ungrib.log file.
Thanks a lot
Alma
Hi Alma,
I use ERA5 and IFS and i download separately surface data, which are grib1 and in different file i download 3D data, which is bigger and compressed grib2. This way you have to run ungrib twice. first time with vtable for grib1 data and the second time for grib2 data.
Its explained also here: ERA5 surface data not found in WPS
 
Last edited:
Top