Encoding 2m relative humidity in GribMetadata object #736
-
|
Hi, I have a GRIB file containing 2m dewpoint temperature ( import earthkit.data as ekd
import earthkit.meteo as ekm
ds = ekd.from_source("file", "input.grib")
r2m = ekm.thermo.relative_humidity_from_dewpoint(
t = ds.sel(param="2t").to_numpy(),
td = ds.sel(param="2d").to_numpy()
)
md = ds.sel(param="2d")[0].metadata().override(shortName="2r")
ds += ekd.FieldList.from_array(r2m, md)But it seems the However, it is in ECMWF's param-database. Any ideas about the correct Thanks in advance. Michiel |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
@mpvginde, it seems from the param-database that md = ds.sel(param="2d")[0].metadata().override(edition=2, shortName="2r") |
Beta Was this translation helpful? Give feedback.
@mpvginde, it seems from the param-database that
2ris only a GRIB2 concept for ECMWF data. So you need to set the edition to 2. E.g.