geocat.comp.interpolation.interp_hybrid_to_pressure¶
- geocat.comp.interpolation.interp_hybrid_to_pressure(data, ps, hyam, hybm, p0=100000.0, new_levels=array([100000., 92500., 85000., 70000., 50000., 40000., 30000., 25000., 20000., 15000., 10000., 7000., 5000., 3000., 2000., 1000., 700., 500., 300., 200., 100.], dtype=float32), lev_dim=None, method='linear')¶
Interpolate data from hybrid-sigma levels to isobaric levels. Keeps attributes (i.e. meta information) of the input data in the output as default.
Notes
ACKNOWLEDGEMENT: We’d like to thank to [Brian Medeiros](https://github.com/brianpm), [Matthew Long](https://github.com/matt-long), and [Deepak Cherian](https://github.com/dcherian) at NCAR for their great contributions since the code implemented here is mostly based on their work.
- Parameters
data (
xarray.DataArray
) – Multidimensional data array, which holds hybrid-sigma levels and has a lev_dim coordinate.ps (
xarray.DataArray
) – A multi-dimensional array of surface pressures (Pa), same time/space shape as data.hyam (
xarray.DataArray
) – One-dimensional arrays containing the hybrid A and B coefficients. Must have the same dimension size as the lev_dim dimension of data.hybm (
xarray.DataArray
) – One-dimensional arrays containing the hybrid A and B coefficients. Must have the same dimension size as the lev_dim dimension of data.p0 (
float
, Optional) – Scalar numeric value equal to surface reference pressure (Pa). Defaults to 100000 Pa.new_levels (
numpy.ndarray
, Optional) – A one-dimensional array of output pressure levels (Pa). If not given, the mandatory list of 21 pressure levels is used.lev_dim (
str
, Optional) – String that is the name of level dimension in data. Defaults to “lev”.method (
str
, Optional) – String that is the interpolation method; can be either “linear” or “log”. Defaults to “linear”.
- Returns
output – Interpolated data with isobaric levels
- Return type
See also
Related NCL Functions: vinth2p, vinth2p_ecmwf