act.utils.height_adjusted_pressure

act.utils.height_adjusted_pressure(ds=None, press_var_name=None, height_difference=0, height_units='m', pressure=None, press_var_units=None)[source]

Converts pressure for change in height.

Parameters:
  • ds (xarray.DataSet, None) – Optional Xarray dataset for retrieving pressure values. Not needed if using pressure keyword.

  • press_var_name (str, None) – Optional pressure variable name in the Xarray dataset containing the pressure data to use in conversion. If not set or set to None will use values from pressure keyword.

  • height_difference (int, float) – Required difference in height to adjust pressure values. Positive values to increase height negative values to decrease height.

  • height_units (str) – Units of height value.

  • pressure (int, float, numpy array, None) – Optional pressure values to use instead of values in the dataset.

  • press_var_units (str, None) – Pint recognized units string for pressure data. If set to None will use the units attribute under pressure variable in the dataset. If using the pressure keyword this must be set.

Returns:

adjusted_pressure (None, int, float, numpy array) – The height adjusted pressure or None if something goes wrong.

References

May, R. M., Arms, S. C., Marsh, P., Bruning, E., Leeman, J. R., Goebbert, K., Thielen, J. E., and Bruick, Z., 2021: MetPy: A Python Package for Meteorological Data. Unidata, https://github.com/Unidata/MetPy, doi:10.5065/D6WW7G29.