isentropic_interpolation#

metpy.calc.isentropic_interpolation(levels, pressure, temperature, *args, vertical_dim=0, temperature_out=False, max_iters=50, eps=1e-06, bottom_up_search=True, **kwargs)#

Interpolate data in isobaric coordinates to isentropic coordinates.

Parameters
  • levels (array-like) – One-dimensional array of desired potential temperature surfaces

  • pressure (array-like) – One-dimensional array of pressure levels

  • temperature (array-like) – Array of temperature

  • args (array-like, optional) – Any additional variables will be interpolated to each isentropic level.

  • vertical_dim (int, optional) – The axis corresponding to the vertical in the temperature array, defaults to 0.

  • temperature_out (bool, optional) – If true, will calculate temperature and output as the last item in the output list. Defaults to False.

  • max_iters (int, optional) – Maximum number of iterations to use in calculation, defaults to 50.

  • eps (float, optional) – The desired absolute error in the calculated value, defaults to 1e-6.

  • bottom_up_search (bool, optional) – Controls whether to search for levels bottom-up (starting at lower indices), or top-down (starting at higher indices). Defaults to True, which is bottom-up search.

Returns

list – List with pressure at each isentropic level, followed by each additional argument interpolated to isentropic coordinates.

Notes

Input variable arrays must have the same number of vertical levels as the pressure levels array. Pressure is calculated on isentropic surfaces by assuming that temperature varies linearly with the natural log of pressure. Linear interpolation is then used in the vertical to find the pressure at each isentropic level. Interpolation method from [Ziv1994]. Any additional arguments are assumed to vary linearly with temperature and will be linearly interpolated to the new isentropic levels.

Will only return Pint Quantities, even when given xarray DataArray profiles. To obtain a xarray Dataset instead, use isentropic_interpolation_as_dataset instead.

Changed in version 1.0: Renamed theta_levels, axis parameters to levels, vertical_dim