Version 0.4 Updates¶
Version 0.4.3¶
Dependency updates¶
Ensure compatibility between earthkit components by restricting the following dependencies:
earthkit-utils<0.2
Version 0.4.1¶
Array formats¶
Made almost all of the methods array format agnostic with support for Numpy, Torch and CuPy arrays/tensors as an input. The array backend is automatically detected from the input data type.
from earthkit.meteo import thermo
# Example with Numpy array
import numpy as np
t = np.array([264.12, 261.45])
p = np.array([850, 850]) * 100.0
theta = thermo.potential_temperature(t, p)
# Example with Torch tensor
import torch
t = torch.tensor([264.12, 261.45])
p = torch.tensor([850.0, 850.0]) * 100.0
theta = thermo.potential_temperature(t, p)
New features¶
Added the
earthkit.meteo.verticalsubmoduleAdded the
earthkit.meteo.stats.array.value_to_return_period()andearthkit.meteo.stats.array.return_period_to_value()methods. They are based on a Gumbel-distribution fit to the sample data (#29). See the following notebook example:/how-tos/return_period.ipynb.
Added
earthkit.meteo.score.array.correlation.pearson()to compute the Pearson correlation over fields.Implemented the symmetric Compute Crossing Point Forecast (CPF) method
earthkit.meteo.extreme.array.cpf()(#28).Added
earthkit.meteo.thermo.array.specific_gas_constant()to compute the specific gas constant for moist airEnabled
earthkit.meteo.solar.array.julian_day()to use timezone aware datetime objects as input (#41).Added the
nan_policyoption toearthkit.meteo.score.array.crps()to handle nans. The possible values are: “raise”, “propagate”, and “omit”. The default is “propagate”. (#45)
New dependencies¶
earthkit-utils >= 0.0.1