pvtend.isentropic_interpolation
- pvtend.isentropic_interpolation(theta_levels: ndarray, pressure_hpa: ndarray, temperature_k: ndarray, *fields: ndarray, vertical_axis: int = 0, max_iters: int = 50, eps: float = 1e-06, bottom_up_search: bool = True) list[ndarray][source]
Interpolate fields from isobaric to isentropic coordinates.
This is a pure-NumPy/SciPy re-implementation of MetPy’s
isentropic_interpolationthat does not require pint units, making it suitable for use inside pvtend’s compositing pipeline.Parameters
theta_levels : (n_theta,) — target θ [K]. pressure_hpa : (nlev,) or (nlev, ny, nx) — pressure [hPa]. temperature_k : (nlev, ny, nx) or (nlev, …) — temperature [K]. *fields : additional arrays of same shape to interpolate. vertical_axis : int — the pressure/vertical axis (default 0). max_iters, eps, bottom_up_search : Newton-Raphson controls.
Returns
- [isen_pressure, *interpolated_fields] — each (n_theta, …).
Pressure in [hPa]; fields in their original units.