earthkit.meteo.vertical.xarray.interpolate_sleve_to_coord_levels

earthkit.meteo.vertical.xarray.interpolate_sleve_to_coord_levels(data, h, coord, target_coords, coord_type=None, folding_mode='undef_fold', vertical_dim='z')

Interpolate a field from sleve levels to coordinates w.r.t. an arbitrary field.

Parameters:
  • data (xarray.DataArray) – field to interpolate (e.g. on model levels)

  • h (xarray.DataArray) – height on same levels as data field

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

  • target_coords (sequence of float) – target coordinate values

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

  • folding_mode (str) – handle when the target is observed multiple times in a column, one of {“low_fold”, “high_fold”, “undef_fold”}

  • vertical_dim (str) – name of the vertical dimension

Returns:

field on target coordinates

Return type:

xarray.DataArray