geocat.comp.interpolation.interp_sigma_to_hybrid

geocat.comp.interpolation.interp_sigma_to_hybrid#

geocat.comp.interpolation.interp_sigma_to_hybrid(data, sig_coords, ps, hyam, hybm, p0=100000.0, lev_dim=None, method='linear')#

Interpolate data from sigma to hybrid coordinates. Keeps the attributes (i.e. meta information) of the input data in the output as default.

Parameters:
  • data (xarray.DataArray) – Multidimensional data array, which holds sigma levels and has a lev_dim coordinate.

  • sig_coords (xarray.DataArray) – A one-dimensional array of sigma coordinates of lev_dim of data.

  • ps (xarray.DataArray) – A multi-dimensional array of surface pressures (Pa), same time/space shape as data.

  • hyam, hybm (xarray.DataArray) – One-dimensional arrays containing the hybrid A and B coefficients. Must have the same dimension as the output hybrid levels.

  • p0 (float, optional) – Scalar numeric value equal to surface reference pressure (Pa). Defaults to 100000 Pa.

  • 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 (xarray.DataArray) – Interpolated data with hybrid levels

See also

Related NCL Function: sigma2hybrid