earthkit.meteo.vertical.xarray.interpolate_monotonic

earthkit.meteo.vertical.xarray.interpolate_monotonic(data, coords, target_coords, coord_type=None, interpolation='linear', vertical_dim='z', **kwargs)

Interpolate a field to isolevels of a monotonic target field.

Parameters:
  • data (xarray.DataArray) – field to interpolate

  • coords (xarray.DataArray) – target coordinate field data on the same levels as data

  • target_coords (sequence of float) – target coordinate definition

  • coord_type (str, optional) – type of level of the output. Currently unused. Intended for future use in the output metadata.

  • interpolation (str) – interpolation algorithm, one of {“linear”, “log”, “nearest”}

  • vertical_dim (str) – name of the vertical dimension

Returns:

field_on_target – field on target (i.e., pressure) coordinates

Return type:

xarray.DataArray