interpolate_to_isosurface#
- metpy.interpolate.interpolate_to_isosurface(level_var, interp_var, level, bottom_up_search=True)#
Linear interpolation of a variable to a given vertical level from given values.
This function assumes that highest vertical level (lowest pressure) is zeroth index. A classic use of this function would be to compute the potential temperature on the dynamic tropopause (2 PVU surface).
- Parameters
level_var (array-like (P, M, N)) – Level values in 3D grid on common vertical coordinate (e.g., PV values on isobaric levels). Assumes height dimension is highest to lowest in atmosphere.
interp_var (array-like (P, M, N)) – Variable on 3D grid with same vertical coordinate as level_var to interpolate to given level (e.g., potential temperature on isobaric levels)
level (int or float) – Desired interpolated level (e.g., 2 PVU surface)
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
interp_level ((M, N) numpy.ndarray) – The interpolated variable (e.g., potential temperature) on the desired level (e.g., 2 PVU surface)
Notes
This function implements a linear interpolation to estimate values on a given surface. The prototypical example is interpolation of potential temperature to the dynamic tropopause (e.g., 2 PVU surface)