earthkit.meteo.vertical.interpolate_hybrid_to_height_levels¶
- earthkit.meteo.vertical.interpolate_hybrid_to_height_levels(data: ArrayLike, target_h: ArrayLike, t: ArrayLike, q: ArrayLike, za: ArrayLike, sp: ArrayLike, A: ArrayLike, B: ArrayLike, alpha_top: str = ..., h_type: str = ..., h_reference: str = ..., interpolation: str = ..., aux_bottom_data: ArrayLike | None = ..., aux_bottom_h: ArrayLike | None = ..., aux_top_data: ArrayLike | None = ..., aux_top_h: ArrayLike | None = ..., vertical_dim: int = ...) ArrayLike¶
- earthkit.meteo.vertical.interpolate_hybrid_to_height_levels(data: earthkit.data.FieldList, target_h: ArrayLike, t: earthkit.data.FieldList, q: earthkit.data.FieldList, za: earthkit.data.FieldList, sp: earthkit.data.FieldList, A: ArrayLike | None = ..., B: ArrayLike | None = ..., alpha_top: str = ..., h_type: str = ..., h_reference: str = ..., interpolation: str = ..., aux_bottom_data: ArrayLike | None = ..., aux_bottom_h: ArrayLike | None = ..., aux_top_data: ArrayLike | None = ..., aux_top_h: ArrayLike | None = ..., vertical_dim: int = ...) earthkit.data.FieldList
Interpolate data from hybrid full-levels (IFS model levels) to height levels.
- Parameters:
data (
array-like | xarray.DataArray | 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_h (
array-like) – Target height levels (m) to whichdatawill be interpolated. Can be a scalar, a 1D array, or a multidimensional array whose non-vertical axes match those ofdata. The type of the height and the reference level are defined byh_typeandh_reference.t (
array-like | xarray.DataArray | FieldList) – Temperature on hybrid full-levels (K). Must have the same shape, level range and order asdata.q (
array-like | xarray.DataArray | FieldList) – Specific humidity on hybrid full-levels (kg/kg). Must have the same shape, level range and order ast.za (
array-like | xarray.DataArray | FieldList) – Surface geopotential (m2/s2). Not used whenh_typeis"geopotential"andh_referenceis"ground".sp (
array-like | xarray.DataArray | FieldList) – Surface pressure (Pa).A (
array-like | None, optional) – A-coefficients defining the hybrid levels. If None (default), must be resolvable from metadata (FieldList only). Seehybrid_level_parameters()for details.B (
array-like | None, optional) – B-coefficients defining the hybrid levels. Must have the same size asA. If None (default), must be resolvable from metadata (FieldList only).alpha_top (
str, optional) – Option to initialise alpha at the top of the model atmosphere. Default is"ifs". Seepressure_on_hybrid_levels()for details.h_type (
str, optional) – Type of height. Default is"geometric". Possible values are"geometric"and"geopotential".h_reference (
str, optional) – Reference level. Default is"ground". Possible values are"ground"and"sea".interpolation (
str, optional) – Interpolation mode. Default is"linear". Possible values are"linear","log"and"nearest".aux_bottom_data (
array-like | None, optional) – Auxiliary data for interpolation to heights between the bottom hybrid full-level andaux_bottom_h.aux_bottom_h (
array-like | None, optional) – Heights (m) ofaux_bottom_data.aux_top_data (
array-like | None, optional) – Auxiliary data for interpolation to heights above the top hybrid full-level and belowaux_top_h.aux_top_h (
array-like | None, optional) – Heights (m) ofaux_top_data.vertical_dim (
int, optional) – Axis corresponding to the vertical coordinate in the input and output arrays. Default is 0.
- Returns:
Data interpolated to the target height levels. Values outside the available height range are set to nan. The axis corresponding to the vertical coordinate is defined by
vertical_dim.- Return type:
array-like | xarray.DataArray | FieldList
See also
Implementations¶
interpolate_hybrid_to_height_levels()calls one of the following implementations depending on the type of the input arguments:earthkit.meteo.vertical.array.interpolate_hybrid_to_height_levels()for array-likeearthkit.meteo.vertical.fieldlist.interpolate_hybrid_to_height_levels()for FieldList
The function returns an object of the same type as the input arguments.