earthkit.meteo.vertical.fieldlist.interpolate_hybrid_to_pressure_levels

earthkit.meteo.vertical.fieldlist.interpolate_hybrid_to_pressure_levels(data, target_p, sp, A=None, B=None, alpha_top='ifs', interpolation='linear', aux_bottom_data=None, aux_bottom_p=None, aux_top_data=None, aux_top_p=None)

Interpolate data from hybrid full-levels to pressure levels.

Parameters:
  • data (FieldList) – Data on hybrid full-levels 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_p (ArrayLike | FieldList | Field) – Target pressures(s) (Pa) to which data will be interpolated. When provided as an ArrayLike, it must be a 1D array of pressures 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 pressures to the corresponding grid points in data (and not the level metadata).

  • 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 and data (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 and data (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.

  • 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 (float | FieldList | Field | None, optional) – Auxiliary data for interpolation to targets below the bottom hybrid full-level and above the level specified by aux_bottom_p. Can be a number, a single Field or a FieldList containing exactly one Field. Must be provided together with aux_bottom_p.

  • aux_bottom_p (float | FieldList | Field | None, optional) – Pressure(s) (Pa) 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 targets above the top hybrid full-level and below the level specified by aux_top_p. Can be a number, a single Field or a FieldList containing exactly one Field. Must be provided together with aux_top_p.

  • aux_top_p (float | FieldList | Field | None, optional) – Pressure(s) (Pa) of aux_top_data. Can be a number, a single Field, or a FieldList containing exactly one Field.

Returns:

Data interpolated to the target pressure levels. When interpolation is not possible for a given target pressure level, the corresponding output values are set to NaN.

Return type:

FieldList