From bafeaa0d420d05aa110afaac3c80203d7df2b142 Mon Sep 17 00:00:00 2001 From: Heather Craker Date: Thu, 2 Mar 2023 12:45:55 -0500 Subject: [PATCH] Fix some delta_pressure docs formatting (#361) * Change conda badge to conda-forge channel * Adjust docstring formatting --- src/geocat/comp/meteorology.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/geocat/comp/meteorology.py b/src/geocat/comp/meteorology.py index 1b73af08..aa160fea 100644 --- a/src/geocat/comp/meteorology.py +++ b/src/geocat/comp/meteorology.py @@ -1440,23 +1440,24 @@ def delta_pressure(pressure_lev, surface_pressure): """Calculates the pressure layer thickness (delta pressure) of a constant pressure level coordinate system. - Returns an array of shape matching (`surface_pressure`, `pressure_lev`). + Returns an array of shape matching (``surface_pressure``, ``pressure_lev``). Parameters ---------- - pressure_lev : :class:`numpy.ndarray`, :class:'xarray.DataArray` + pressure_lev : :class:`numpy.ndarray`, :class:`xarray.DataArray` The pressure level array. May be in ascending or descending order. - Must have the same units as `surface_pressure`. - surface_pressure : :class:`np.Array`, :class:'xr.DataArray` + Must have the same units as ``surface_pressure``. + + surface_pressure : :class:`int`, :class:`float`, :class:`np.ndarray`, :class:`xr.DataArray` The scalar or N-dimensional surface pressure array. Must have the same - units as `pressure_lev`. + units as ``pressure_lev``. Returns ------- - delta_pressure : :class:`numpy.ndarray`, :class:'xarray.DataArray` - The pressure layer thickness array. Shares units with `pressure_lev`. - If `surface_pressure` is scalar, shares dimensions with - `pressure_level`. If `surface_pressure` is an array than the returned + delta_pressure : :class:`numpy.ndarray`, :class:`xarray.DataArray` + The pressure layer thickness array. Shares units with ``pressure_lev``. + If ``surface_pressure`` is scalar, shares dimensions with + ``pressure_level``. If ``surface_pressure`` is an array than the returned array will have an additional dimension [e.g. (lat, lon, time) becomes (lat, lon, time, lev)].