geocat.comp.meteorology.zonal_meridional_psi

geocat.comp.meteorology.zonal_meridional_psi#

geocat.comp.meteorology.zonal_meridional_psi(uxds, lat=(-90, 90, 10), meridional_wind_varname=None, surface_air_pressure_varname=None, plev_coordname=None, hyam_coordname=None, hybm_coordname=None)#

Calculate the zonally averaged meridional streamfunction (mpsi) from a UXarray Dataset.

Parameters:
  • uxds (uxarray.UxDataset) –

    Input dataset containing the following required fields:
    • meridional_wind : CF Compliant Meridional wind component (on pressure or hybrid sigma-pressure levels)

    • surface_air_pressure : CF Compliant Surface pressure

    • plev : Pressure levels (if meridional_wind is on pressure levels)

    • hyam : Hybrid A coefficients (if meridional_wind is on hybrid sigma-pressure levels)

    • hybm : Hybrid B coefficients (if meridional_wind is on hybrid sigma-pressure levels)

    • uxgrid : Grid information for uxarray

  • lat (tuple, float, or array-like, default (-90, 90, 10)) –

    Latitude specification:
    • tuple (start, end, step): Computes meridional streamfunction at intervals of step.

    • float: Single latitude

    • array-like: Latitudes to sample.

  • meridional_wind_varname (str, optional) – The variable name for the meridional wind component in uxds. If not provided, the function will attempt to find a variable with standard_name ‘northward_wind’ or long_name ‘Meridional wind’, or one of the possible names [‘V’, ‘vs’, ‘meridional_wind’].

  • surface_air_pressure_varname (str, optional) – The variable name for the surface air pressure in uxds. If not provided, the function will attempt to find a variable with standard_name ‘surface_air_pressure’ or long_name ‘Surface pressure’, or one of the possible names [‘PS’, ‘p_surface’, ‘surface_pressure’, ‘pressure_surface’].

  • plev_coordname (str, optional) – The coordinate name for pressure levels in uxds. If not provided, the function will attempt to find a coordinate with standard_name ‘air_pressure’ or one of the possible names [‘plev’, ‘pressure_lev’, ‘pressure_levels’].

  • hyam_coordname (str, optional) – The coordinate name for hybrid A coefficients in uxds. If not provided, the function will attempt to find a coordinate with long_name ‘hybrid A coefficient at layer midpoints’ or one of the possible names [‘hyam’, ‘hya’, ‘hybrid_A_midpoints’].

  • hybm_coordname (str, optional) – The coordinate name for hybrid B coefficients in uxds. If not provided, the function will attempt to find a coordinate with long_name ‘hybrid B coefficient at layer midpoints’ or one of the possible names [‘hybm’, ‘hyb’, ‘hybrid_B_midpoints’].

Returns:

da_mpsi (xarray.DataArray) – Zonal mean meridional streamfunction, scaled by Earth’s geometry and gravity. Dimensions: [“time”, “latitudes”, “plev”]

Notes

  • Optionally converts wind data from hybrid sigma-pressure levels to pressure levels.

  • Computes zonal means and pressure integration deltas.

  • Integrates over pressure levels, handling orientation.

  • Applies scaling factor based on Earth’s radius (6378137 m) and gravity.

  • Currently only supports UXarray Datasets with specified structure.

Zonal meridional streamfunction defined from: Buja, L. E. (1994) CCM Processor User’s Guide(Unicos Version). NCAR Technical Note NCAR/TN-384+IA, pages B-17 to B-18. https://opensky.ucar.edu/islandora/object/technotes%3A151

Earth’s average radius from: Moritz, H. Geodetic Reference System (1980) Journal of Geodesy 74, 128–133 (2000). page 128. https://doi.org/10.1007/s001900050278

See also

Related NCL Functions: zonal_mpsi