earthkit.meteo.vertical.interpolate_to_pressure_levels

earthkit.meteo.vertical.interpolate_to_pressure_levels(data, p, target_p, target_p_units='Pa', interpolation='linear', vertical_dim='z')

Interpolate data to pressure levels.

Parameters:
  • data (xarray.DataArray) – Data to be interpolated.

  • p (xarray.DataArray) – Pressure coordinate of data.

  • target_p (ArrayLike) – Target pressure levels.

  • target_p_units (str, optional) – Units of target_p (default: “Pa”).

  • interpolation (str, optional) – Interpolation mode (default: “linear”).

  • vertical_dim (str, optional) – Vertical dimension (default: “z”).

Returns:

Interpolated data at target pressure levels.

Return type:

xarray.DataArray

Implementations

interpolate_to_pressure_levels() 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.