Layers2Pressure

Contents

Layers2Pressure#

class ufs2arco.Layers2Pressure(ak: ndarray | None = None, bk: ndarray | None = None, pfull: ndarray | None = None, phalf: ndarray | None = None, level_name: str | None = 'pfull', interface_name: str | None = 'phalf')#

A class to interpolate from Lagrangian layers to pressure levels, and also compute layer thickness, etc

Parameters:
  • ak (np.ndarray, optional) – coefficients that define the vertical grid. If not provided, will default to the 127 vertical levels defined for NOAA GFS

  • bk (np.ndarray, optional) – coefficients that define the vertical grid. If not provided, will default to the 127 vertical levels defined for NOAA GFS

  • pfull (np.ndarray, optional) – if ak and bk are provided, these are not necessary since they can be computed from those coefficients. However, these can be provided in case there are slight numerical differences between how these values are computed here, versus the grid information from an existing dataset.

  • phalf (np.ndarray, optional) – if ak and bk are provided, these are not necessary since they can be computed from those coefficients. However, these can be provided in case there are slight numerical differences between how these values are computed here, versus the grid information from an existing dataset.

  • level_name (str, optional) – names to use for the vertical coordinate at cell center and interfaces, defaulting to “pfull” and “phalf” as in FV3. However, new names can be provided in order to work with datasets that use a different name.

  • interface_name (str, optional) – names to use for the vertical coordinate at cell center and interfaces, defaulting to “pfull” and “phalf” as in FV3. However, new names can be provided in order to work with datasets that use a different name.

Methods

Layers2Pressure.__init__([ak, bk, pfull, ...])

Layers2Pressure.calc_delz(pressfc, temp, spfh)

Compute a hydrostatic approximation of the layer thickness at each vertical level.

Layers2Pressure.calc_dlogp(prsi)

Compute difference of log of interface pressure

Layers2Pressure.calc_geopotential(hgtsfc, delz)

Compute geopotential field

Layers2Pressure.calc_layer_mean_pressure(...)

Compute pressure at vertical grid cell center (i.e., layer mean)

Layers2Pressure.calc_pressure_interfaces(pressfc)

Compute pressure at vertical grid interfaces

Layers2Pressure.calc_pressure_thickness(prsi)

Compute pressure thickness at each vertical level

Layers2Pressure.get_interp_coefficients(...)

Compute the coefficients needed to interpolate between pressure levels

Layers2Pressure.interp2pressure(xda, pstar, prsl)

Interpolate data on FV3 native vertical grid to pressure level (p*)

Attributes

Layers2Pressure.Rd

Layers2Pressure.Rv

Layers2Pressure.ak

Layers2Pressure.bk

Layers2Pressure.g

Layers2Pressure.pfull

Layers2Pressure.phalf

Layers2Pressure.q_min

Layers2Pressure.xds

Layers2Pressure.z_vir