-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I tried to read a .grib file from ECMWF forecasting products downloaded from https://apps.ecmwf.int/datasets/data/tigge/levtype=sfc/type=fc/. I opened the file with python xarray:
>>> import xarray as xr
>>> import cfgrib
>>> data=xr.open_dataset('test.grib',engine='cfgrib')
>>> data
<xarray.Dataset>
Dimensions: (time: 62, step: 4, latitude: 91, longitude: 180)
Coordinates:
* time (time) datetime64[ns] 2024-01-01 ... 2024-01-31T12:00:00
* step (step) timedelta64[ns] 00:00:00 06:00:00 12:00:00 18:00:00
meanSea float64 ...
* latitude (latitude) float64 90.0 88.0 86.0 84.0 ... -86.0 -88.0 -90.0
* longitude (longitude) float64 0.0 2.0 4.0 6.0 ... 352.0 354.0 356.0 358.0
valid_time (time, step) datetime64[ns] ...
Data variables:
msl (time, step, latitude, longitude) float32 ...
Attributes:
GRIB_edition: 2
GRIB_centre: ecmf
GRIB_centreDescription: European Centre for Medium-Range Weather Forecasts
GRIB_subCentre: 0
Conventions: CF-1.7
institution: European Centre for Medium-Range Weather Forecasts
history: 2024-11-22T18:00 GRIB to CDM+CF via cfgrib-0.9.1...It gave right results and showed the dimension of the mean sea level pressure (msl) is (time, step, latitude, longitude)
However, when I used Julia to read it with GRIBDatasets:
julia> using GRIBDatasets
julia> ds=GRIBDataset("test.grib")
Dataset: test.grib
Group: /
Dimensions
lon = 180
lat = 91
valid_time = 126
Variables
lon (180)
Datatype: Float64 (Float64)
Dimensions: lon
Attributes:
units = degrees_east
long_name = longitude
standard_name = longitude
lat (91)
Datatype: Float64 (Float64)
Dimensions: lat
Attributes:
units = degrees_north
long_name = latitude
standard_name = latitude
valid_time (126)
Datatype: Dates.DateTime (Int64)
Dimensions: valid_time
Attributes:
units = seconds since 1970-01-01T00:00:00
calendar = proleptic_gregorian
long_name = time
standard_name = time
msl (180 × 91 × 126)
Datatype: Union{Missing, Float64} (Float64)
Dimensions: lon × lat × valid_time
Attributes:
units = Pa
long_name = Mean sea level pressure
standard_name = air_pressure_at_mean_sea_level
Global attributes
edition = 2
source = test.grib
centreDescription = European Centre for Medium-Range Weather Forecasts
centre = ecmf
subCentre = 0
Conventions = CF-1.7The dimension of msl changed into (lon × lat × valid_time), however the length of "valid_time" did not match with "time" and "step" obtained from xarray.
The ECMWF forcasting file was uploaded as attachment test.zip. I would like to ask how can I deal with this issue with GRIBDatasets?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels