earthkit.meteo.vertical.interpolate_hybrid_to_pressure_levels¶
- earthkit.meteo.vertical.interpolate_hybrid_to_pressure_levels(data: ArrayLike, target_p: ArrayLike, sp: ArrayLike, A: ArrayLike, B: ArrayLike, alpha_top: Literal['ifs', 'arpege'] = 'ifs', interpolation: Literal['linear', 'log', 'nearest'] = 'linear', aux_bottom_data: ArrayLike | None = None, aux_bottom_p: ArrayLike | None = None, aux_top_data: ArrayLike | None = None, aux_top_p: ArrayLike | None = None, vertical_dim: int = 0) ArrayLike¶
- earthkit.meteo.vertical.interpolate_hybrid_to_pressure_levels(data: earthkit.data.FieldList, target_p: ArrayLike | FieldList | Field, sp: FieldList | Field, A: ArrayLike | None = None, B: ArrayLike | None = None, alpha_top: Literal['ifs', 'arpege'] = 'ifs', interpolation: Literal['linear', 'log', 'nearest'] = 'linear', aux_bottom_data: float | FieldList | Field | None = None, aux_bottom_p: float | FieldList | Field | None = None, aux_top_data: float | FieldList | Field | None = None, aux_top_p: float | FieldList | Field | None = None) earthkit.data.FieldList
Interpolate data from hybrid full-levels (IFS model levels) to pressure levels.
- Parameters:
data (
ArrayLike | FieldList) – Data to be interpolated. Levels must be in ascending order with respect to the model level number. The axis corresponding to the vertical coordinate is defined byvertical_dim.target_p (
ArrayLike|FieldList|Field) – Target pressure (Pa). See the concrete implementations for details.sp (
ArrayLike|FieldList|Field) – Surface pressure (Pa). See the concrete implementations for details.A (
ArrayLike | None, optional) – A-coefficients defining the hybrid levels. Must contain all the half-levels in ascending order with respect to the model level number. Can be None for FieldList/Field input if the coefficients can be resolved from metadata (FieldList only).B (
ArrayLike | None, optional) – B-coefficients defining the hybrid levels. Must contain all the half-levels in ascending order with respect to the model level number. Must have the same size asA. Can be None for FieldList/Field input if the coefficients can be resolved from metadata (FieldList only).alpha_top (
{"ifs", "arpege"}, default"ifs") – Option to initialise the alpha parameter at the top of the model atmosphere. Seeearthkit.meteo.vertical.array.pressure_on_hybrid_levels()for details.interpolation (
{"linear", "log", "nearest"}, default"linear") –Interpolation mode. Possible values:
"linear": linear interpolation in pressure"log": linear interpolation in log-pressure"nearest": nearest level interpolation
aux_bottom_data (
ArrayLike | float | FieldList | Field | None, optional) – Auxiliary data for interpolation to pressures between the bottom hybrid full-level andaux_bottom_p. See the concrete implementations for details.aux_bottom_p (
ArrayLike | float | FieldList | Field | None, optional) – Pressures (Pa) ofaux_bottom_data. See the concrete implementations for details.aux_top_data (
ArrayLike | float | FieldList | Field | None, optional) – Auxiliary data for interpolation to pressures above the top hybrid full-level and belowaux_top_p. See the concrete implementations for details.aux_top_p (
ArrayLike | float | FieldList | Field | None, optional) – Pressures (Pa) ofaux_top_data. See the concrete implementations for details.vertical_dim (
int, default0) – Axis corresponding to the vertical coordinate in the input and output arrays. Cannot be specified for FieldList/Field data.
- Returns:
Data interpolated to the target pressure. Values outside the available pressure range are set to nan. See the concrete implementations for details.
- Return type:
array-like | FieldList
See also
Implementations¶
interpolate_hybrid_to_pressure_levels()calls one of the following implementations depending on the type of the input arguments:earthkit.meteo.vertical.array.interpolate_hybrid_to_pressure_levels()for array-likeearthkit.meteo.vertical.fieldlist.interpolate_hybrid_to_pressure_levels()for FieldList
The function returns an object of the same type as the input arguments.