pythongribgfs

Why is Categorial parameter empty in GFS


I downloaded GRIB file from https://nomads.ncep.noaa.gov/gribfilter.php?ds=gfs_0p25_1hr

using this url basically (https://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25_1hr.pl?dir=%2Fgfs.20250602%2F18%2Fatmos&file=gfs.t18z.pgrb2.0p25.f005&var_CAPE=on&lev_180-0_mb_above_ground=on&lev_255-0_mb_above_ground=on&lev_90-0_mb_above_ground=on&lev_surface=on)

But when I open the file in python it gets no data but when I select some other weather parameter like Temperature (TMP) there is data (https://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25_1hr.pl?dir=%2Fgfs.20250602%2F18%2Fatmos&file=gfs.t18z.pgrb2.0p25.f005&var_TMP=on&lev_2_m_above_ground=on)

CAPE is Convective Available Potential Energy btw

import xarray as xr

ds = xr.open_dataset(file, engine='gribberish')

Solution

  • Maybe it is the grib engine problem? When I open like this, it has data

    ds = xr.open_dataset('gfs.t18z.pgrb2.0p25.f005', engine='cfgrib', filter_by_keys={'typeOfLevel': 'surface'})