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) ERA5 var129 (geopotential) grib2 - how to 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
Dear all,

I have downloaded ERA5 data in model levels (grib2) from CDS. Ungrib for all variables works fine except for var129, the geopotential.

g2print.exe provides the following information (after transforming it with 'cdo sp2gp' from spectral to gaussian coordinates):
 ungrib - grib edition num           2
 reading from grib file =

  rec Prod Cat Param  Lvl    Lvl      Lvl     Prod    Name            Time
  num Disc     num    code   one      two     Templ
 Gaussian Grid: Dx,Dy,lat,lon  0.1875000       480.0000       89.85654
   1   0    3   4     105       1       0       0     GP       2006-07-07_00:00:00   00

   Successful completion of g2print

per definition of grib2 code it is geopotential on hybrid levels (it's only the lowest hybrid level).
When I run ungrib with a Vtable according to, I find all other variables in the intermediate files but not the geopotential (as I can see from the 'ungrib.log', it was read successfully).

How can I solve this problem ?

Many thanks in advance !

Hi Klemens,

You mention converting this to a gaussian grid. Are these data global, or a subset?
Hi kwerner,

Thanks for your request !
I figured out the problem. I should have read the WRF User guide more properly, as there is written:

The "metgrid Units" and "metgrid Description" fields specify the units and a short description for the field, respectively; here, it is important to note that if no description is given for a field, then ungrib will not write that field out to the intermediate files.

-> the metgrid Description was missing and so there was no output to the intermediate files.

Best regards,

That's great that you were able to solve it! Thank you for letting me know.