earthkit.meteo.vertical.fieldlist.interpolate_hybrid_to_height_levels

earthkit.meteo.vertical.fieldlist.interpolate_hybrid_to_height_levels(data, target_h, t, q, zs, sp, A=None, B=None, alpha_top='ifs', 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 hybrid full-levels to height levels.

Parameters:
  • data (FieldList) – Data to be interpolated. Fields must correspond to a distinct set of hybrid full-levels in arbitrary order. Not all the levels must be present, but a contiguous level range including the bottom-most level must be used. E.g. if the vertical coordinate system has 137 model levels using only a subset of levels between e.g. 137-96 is allowed. Must have at least two fields.

  • target_h (ArrayLike | FieldList | Field) – Target height(s) (m) to which data will be interpolated. When provided as an ArrayLike, it must be a 1D array of heights each defining a constant target (a single number is also allowed in this case). When it is a FieldList or Field the field values themselves will provide the target heights to the corresponding grid points in data (and not the level metadata). The type and reference of the height are defined by h_type and h_reference.

  • t (FieldList) – Temperature on hybrid full-levels (K). Must have the same number of fields and levels as data, the level ordering can be different.

  • q (FieldList) – Specific humidity on hybrid full-levels (kg/kg). Must have the same number of fields and levels as data, the level ordering can be different.

  • zs (FieldList|Field|None) – Surface geopotential (m2/s2). Can be a single Field or a FieldList. If a FieldList is provided, it must contain exactly one Field. Not used when h_type is “geopotential” and h_reference is “ground”.

  • sp (FieldList|Field) – Surface pressure (Pa). Can be a single Field or a FieldList. If a FieldList is provided, it must contain exactly one Field.

  • 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. When None, the A and B coefficients will be inferred from the metadata of the input fields sp, zs, t and q (tried in this order).

  • 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 be defined when A is provided and have the same size as A. When None, the A and B coefficients will be inferred from the metadata of the input fields sp, zs, t and q (tried in this order).

  • alpha_top ({"ifs", "arpege"}, default "ifs") – Option to initialise the alpha parameter on the top of the model atmosphere. See earthkit.meteo.vertical.array.pressure_on_hybrid_levels() for details.

  • 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, optional) – Auxiliary data for interpolation to heights between the bottom hybrid full-level and aux_bottom_h. Can be a number, a single Field or a FieldList containing exactly one Field. Must be provided together with aux_bottom_h.

  • aux_bottom_h (float|FieldList|Field|None, optional) – Heights (m) of aux_bottom_data. Can be a number, a single Field or a FieldList containing exactly one Field.

  • aux_top_data (float|FieldList|Field|None, optional) – Auxiliary data for interpolation to heights above the top hybrid full-level and below aux_top_h. Can be a number, a single Field or a FieldList containing exactly one Field. Must be provided together with aux_top_h.

  • aux_top_h (float|FieldList|Field|None, optional) – Heights (m) of aux_top_data. Can be a number, a single Field or a FieldList containing exactly one Field.

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