earthkit.meteo.vertical.xarray.interpolate_monotonic

earthkit.meteo.vertical.xarray.interpolate_monotonic(data, coord, target_coord, interpolation='linear', vertical_dim='z', **kwargs)

Interpolate a field to isolevels of a monotonic target field.

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

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

  • target_coord (TargetCoordinates) – target coordinate definition

  • 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