earthkit.meteo.vertical.fieldlist.interpolate_pressure_to_height_levels¶
- earthkit.meteo.vertical.fieldlist.interpolate_pressure_to_height_levels(data, target_h, z, zs=None, h_type='geometric', h_reference='ground', interpolation='linear', aux_bottom_data=None, aux_bottom_h=None, aux_top_data=None, aux_top_h=None)¶
Interpolate data from pressure levels to height levels.
- Parameters:
data (
FieldList) – Data on pressure levels to be interpolated. Fields must correspond to a distinct set of pressure levels in arbitrary order. Must have at least two fields.target_h (
ArrayLike | FieldList | Field) – Target height levels (m). The type and reference of the height are defined byh_typeandh_reference.z (
FieldList) – Geopotential (m2/s2) on the same pressure levels asdata. The number of fields and levels must be the same as indata, but the level ordering can be different.zs (
FieldList|Field|None, optional) – Surface geopotential (m2/s2). Can be a single Field or a FieldList. If a FieldList is provided, it must contain exactly one Field. Only used whenh_referenceis “ground”.h_type (
{"geometric", "geopotential"}, default"geometric") –Type of height to compute. Default is
"geometric". Possible values:"geometric": geometric height (m)"geopotential": geopotential height (m)
h_reference (
{"ground", "sea"}, default"ground") –Reference level for the height calculation. Default is
"ground". Possible values:"ground": height with respect to the ground/surface level"sea": height with respect to the sea level
interpolation (
{"linear", "log", "nearest"}, default"linear") –Interpolation mode. Default is
"linear". Possible values:"linear": linear interpolation in height"log": linear interpolation in log-height"nearest": nearest level interpolation
aux_bottom_data (
float | FieldList | Field | None) – Auxiliary data for interpolation below the bottom pressure level.aux_bottom_h (
float | FieldList | Field | None, optional) – Heights (m) ofaux_bottom_data.aux_top_data (
float | FieldList | Field | None, optional) – Auxiliary data for interpolation above the top pressure level.aux_top_h (
float | FieldList | Field | None, optional) – Heights (m) ofaux_top_data.
- Returns:
Data interpolated to the target height levels. When interpolation is not possible for a given target height level, the corresponding output values are set to NaN.
- Return type:
FieldList