You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
earthkit-data objects are immutable but when we perform computations we need to create new objects from existing ones. The computations in earthkit-meteo will always take numpy input and result in numpy output.
The following code snippet illustrates a possible workflow that:
starts from an earthkit-data object
performs the computations in earthkit-meteo using numpy arrays
generates a new earthkit-data object using the resulting array and the metadata from the original object
#ensemble is a GRIB fieldlist with 51 fieldsnp_efi=earthkit.meteo.efi(ensemble.to_numpy(), clim)
# option 1metadata=ensemble[0].metadata().override(param=‘efi’)
# option 2metadata=earthkit.data.Metadata(param=efi_param(ensemble[0]), template=ensemble[0])
fs_efi=earthkit.data.FieldList.from_numpy(np_efi, metadata)
fs_efi.save(…)
The key element here, regarding the current issue, is the metadata object. #107 provides guidelines for the concrete API it should implement.
The text was updated successfully, but these errors were encountered:
earthkit-data
objects are immutable but when we perform computations we need to create new objects from existing ones. The computations inearthkit-meteo
will always take numpy input and result in numpy output.The following code snippet illustrates a possible workflow that:
The key element here, regarding the current issue, is the
metadata
object. #107 provides guidelines for the concrete API it should implement.The text was updated successfully, but these errors were encountered: