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 by vertical_dim.

  • target_h (array-like) – Target height levels (m) to which data will be interpolated. Can be a scalar, a 1D array, or a multidimensional array whose non-vertical axes match those of data. The type of the height and the reference level are defined by h_type and h_reference.

  • t (array-like | xarray.DataArray | FieldList) – Temperature on hybrid full-levels (K). Must have the same shape, level range and order as data.

  • q (array-like | xarray.DataArray | FieldList) – Specific humidity on hybrid full-levels (kg/kg). Must have the same shape, level range and order as t.

  • za (array-like | xarray.DataArray | FieldList) – Surface geopotential (m2/s2). Not used when h_type is "geopotential" and h_reference is "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). See hybrid_level_parameters() for details.

  • B (array-like | None, optional) – B-coefficients defining the hybrid levels. Must have the same size as A. 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". See pressure_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 and aux_bottom_h.

  • aux_bottom_h (array-like | None, optional) – Heights (m) of aux_bottom_data.

  • aux_top_data (array-like | None, optional) – Auxiliary data for interpolation to heights above the top hybrid full-level and below aux_top_h.

  • aux_top_h (array-like | None, optional) – Heights (m) of aux_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

Implementations

interpolate_hybrid_to_height_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 input arguments.