GFS: Missing levels for sigmaLayer and depthBelowLandLayer
See original GitHub issuecfgrib seems to miss some levels for the level types sigmaLayer
and depthBelowLandLayer
.
I’m working with this grib file: https://noaa-gfs-bdp-pds.s3.amazonaws.com/gfs.20210115/00/gfs.t00z.pgrb2.0p25.f003
wgrib2 -lev ~/Downloads/gfs.t00z.pgrb2.0p25.f003
shows four levels for each of these level types:
425:224793214:0-0.1 m below ground
427:225650288:0.1-0.4 m below ground
429:226508191:0.4-1 m below ground
431:227363072:1-2 m below ground
558:309354159:0.33-1 sigma layer
559:310143600:0.44-1 sigma layer
560:310922234:0.72-0.94 sigma layer
561:311736866:0.44-0.72 sigma layer
Reading the same file with cfgrib results in only two:
import cfgrib
ds = cfgrib.open_datasets("gfs.t00z.pgrb2.0p25.f003")
d = next(d for d in ds if 'depthBelowLandLayer' in d.variables)
d.depthBelowLandLayer
# <xarray.IndexVariable 'depthBelowLandLayer' (depthBelowLandLayer: 2)>
# array([0, 1])
# Attributes:
# long_name: soil depth
# units: m
# positive: down
# standard_name: depth
d = next(d for d in ds if 'sigmaLayer' in d.variables)
d.sigmaLayer
# <xarray.IndexVariable 'sigmaLayer' (sigmaLayer: 2)>
# array([0, 1])
# Attributes:
# long_name: original GRIB coordinate for key: level(sigmaLayer)
# units: 1
d.r.shape
# (2, 721, 1440)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@shahramn then this looks like an actual bug (or missing feature) in cfgrib as it only requests the
level
key and it accepts the default data type, that isint
.Thanks for the clarification.
Levels will be read as floats in the next release.