earthkit.meteo.vertical.xarray.interpolate_to_pressure_levels¶
- earthkit.meteo.vertical.xarray.interpolate_to_pressure_levels(data, p, target_p, target_p_units='Pa', interpolation='linear', vertical_dim='z')¶
Interpolate a field to pressure coordinates.
Example for vertical interpolation to isosurfaces of a pressure field, which is strictly monotonically decreasing with height.
- Parameters:
data (
xarray.DataArray) – field to interpolatep (
xarray.DataArray) – pressure field in Patarget_p (
listoffloat) – pressure target coordinate valuestarget_p_units (
str) – pressure target coordinate unitsinterpolation (
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