-
Notifications
You must be signed in to change notification settings - Fork 11
Can not Compute the Difference Between Two Steps #123
Description
What happened?
Hello Earthkit team,
I am trying to compute the difference between two time steps (e.g., total precipitation with step=12,24, from grib file "data.grib2") using Earthkit.
According to the JUPYTER medium-mslp-rain.ipynb for drawing past 12 hour rainfall in charts.ecmwf.int, I tried to do like:
IN [1]:
ds = ek.data.from_source("file", "data.grib2")
tp1 = ds.sel(shortName="tp", step=12)
tp2 = ds.sel(shortName="tp", step=24)
print(tp1)
print(tp2)
OUT [1]:
MaskIndex(GRIBReader(data.grib2),[0])
MaskIndex(GRIBReader(data.grib2),[1])
IN [2]:
tp = (tp2 -tp1)
print(tp)
OUT:
(Nothing)
**But there were no error messages.
It seems like this operation could not work.
Environment:
earthkit 0.11.1
earthkit-data 0.14.3
earthkit-geo 0.3.0
earthkit-hydro 0.1.3
earthkit-meteo 0.3.0
earthkit-plots 0.3.1
earthkit-plots-default-styles 0.1.0
earthkit-regrid 0.4.0
earthkit-time 0.1.7
earthkit-transforms 0.4.0
earthkit-utils 0.0.1
What are the steps to reproduce the bug?
ds = ek.data.from_source("file", "data.grib2")
tp1 = ds.sel(shortName="tp", step=12)
tp2 = ds.sel(shortName="tp", step=24)
tp = (tp2 - tp1)
Version
v0.11.1
Platform (OS and architecture)
ubuntu 22.04
Relevant log output
MaskIndex(GRIBReader(data.grib2),[0])
MaskIndex(GRIBReader(data.grib2),[1])Accompanying data
No response
Organisation
No response