question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cfgrib misses some variables in GFS grib data

See original GitHub issue

Dear all, I am working with some historical GFS grib files. Not all Variables that are in the file (checked with wgrib2 -v) could be read.

1:0:d=2017020212:TMP Temperature [K]:850 mb:324 hour fcst:
2:2188:d=2017020212:RH Relative Humidity [%]:850 mb:324 hour fcst:
3:4879:d=2017020212:TMP Temperature [K]:1000 mb:324 hour fcst:
4:7067:d=2017020212:RH Relative Humidity [%]:1000 mb:324 hour fcst:
5:9507:d=2017020212:PRES Pressure [Pa]:surface:324 hour fcst:
6:13453:d=2017020212:TMP Temperature [K]:surface:324 hour fcst:
7:15893:d=2017020212:SNOD Snow Depth [m]:surface:324 hour fcst:
8:17771:d=2017020212:TMP Temperature [K]:2 m above ground:324 hour fcst:
9:20964:d=2017020212:DPT Dew Point Temperature [K]:2 m above ground:324 hour fcst:
10:23404:d=2017020212:RH Relative Humidity [%]:2 m above ground:324 hour fcst:
11:25592:d=2017020212:SUNSD Sunshine Duration [s]:surface:324 hour fcst:
12:29287:d=2017020212:DSWRF Downward Short-Wave Radiation Flux [W/m^2]:surface:312-324 hour ave fcst:
13:31248:d=2017020212:DLWRF Downward Long-Wave Rad. Flux [W/m^2]:surface:312-324 hour ave fcst:
14:33209:d=2017020212:USWRF Upward Short-Wave Radiation Flux [W/m^2]:surface:312-324 hour ave fcst:
15:34919:d=2017020212:ULWRF Upward Long-Wave Rad. Flux [W/m^2]:surface:312-324 hour ave fcst:

Only the

SNOD
SUNSD
RH
TMP
PRES

variables and one of the radiation could be detected by cfgrib xarray_store.open_dataset()

gfs.0p25.2017020212.f324.grib2.spasub.zip

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
meteoDanielcommented, Feb 24, 2019

Works fine for me ! Great support. I like cfgrib and recommend it to all i am talking about grib data.

1reaction
alexamicicommented, Feb 24, 2019

@meteoDaniel both issues should be fixed in master, please let me know is it works for you by installing temporarily with:

$ pip install git+https://github.com/ecmwf/cfgrib

That single file uncovered not one, but three subtle and damaging bugs, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

cfgrib · PyPI
Python interface to map GRIB files to the NetCDF Common Data Model following the CF ... relies on ecCodes for the CF attributes...
Read more >
Python3.8: MetPy issue: declarative plotting of grib2 file ...
I've got the compressed code below, along with a few print outs of the data examination to show that the data seems ok....
Read more >
Tricks for wgrib2
This script only works on "simple" grib files. Some files have variables that require extended variable names. Some extended variable names use ...
Read more >
Using grib2 files with `open_mfdataset`: is there a better ...
grib2 file (it's actually zipped so I unzip it), (2) read it in to xarray using xr.open_dataarray(grib2_fname, engine="cfgrib") , (3) do some subsetting,...
Read more >
How to get started with GRIB2 weather data and Python
Overview · Load global weather forecast files containing GRIB2 messages into a Python program · Inspect the GRIB2 data to understand which weather...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found