earthkit.meteo.vertical.interpolate_monotonic

earthkit.meteo.vertical.interpolate_monotonic(data: ArrayLike, coords: ArrayLike, target_coords: ArrayLike, interpolation: str = 'linear', aux_min_level_data=None, aux_min_level_coord=None, aux_max_level_data=None, aux_max_level_coord=None, vertical_dim=None) ArrayLike
earthkit.meteo.vertical.interpolate_monotonic(data: xarray.DataArray, coords: xarray.DataArray, target_coords: ArrayLike, coord_type: str | None = None, interpolation: str = 'linear', vertical_dim=None) xarray.DataArray
earthkit.meteo.vertical.interpolate_monotonic(data: earthkit.data.FieldList, coords: ArrayLike | FieldList, target_coords: ArrayLike | FieldList, coord_type: str | None = None, interpolation: str = 'linear', aux_min_level_data=None, aux_min_level_coord=None, aux_max_level_data=None, aux_max_level_coord=None) earthkit.data.FieldList

Interpolate data between the same type of monotonic coordinate levels.

Parameters:
  • data (array-like | xarray.DataArray | FieldList) – Data to be interpolated. Must have at least two fields/elements.

  • coords (array-like | xarray.DataArray | FieldList) – Vertical coordinates related to data.

  • target_coords (array-like | xarray.DataArray | FieldList) – Target coordinate levels to which data will be interpolated.

  • coord_type (str | None, optional) – Type of the coordinate levels. This keyword argument is not supported when the input data is ArrayLike.

  • interpolation (str, optional) – Interpolation mode (“linear”, “log”, or “nearest”).

  • aux_min_level_data (optional) – Auxiliary data for minimum level extrapolation. This keyword argument is not supported when the input data is Xarray..

  • aux_min_level_coord (optional) – Coordinates of auxiliary minimum level data. This keyword argument is not supported when the input data is Xarray.

  • aux_max_level_data (optional) – Auxiliary data for maximum level extrapolation. This keyword argument is not supported when the input data is Xarray.

  • aux_max_level_coord (optional) – Coordinates of auxiliary maximum level data. This keyword argument is not supported when the input data is Xarray.

  • vertical_dim (int | str | None, optional) – Vertical dimension specification. This keyword argument is not supported when the input data is FieldList.

Returns:

Interpolated data at target coordinate levels.

Return type:

array-like | xarray.DataArray | FieldList

Implementations

interpolate_monotonic() calls one of the following implementations depending on the type of the input arguments:

The function returns an object of the same type as the data argument.