Skip to content

Commit 5d405ad

Browse files
committed
Add geo_strf_steric_height function
1 parent 42645a7 commit 5d405ad

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

gsw/geostrophy.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from .conversions import z_from_p
1010

1111
__all__ = ['geo_strf_dyn_height',
12+
'geo_strf_steric_height',
1213
'distance',
1314
'f',
1415
'geostrophic_velocity',
@@ -105,6 +106,42 @@ def geo_strf_dyn_height(SA, CT, p, p_ref=0, axis=0, max_dp=1.0,
105106
return dh
106107

107108

109+
@match_args_return
110+
def geo_strf_steric_height(SA, CT, p, p_ref=0, axis=0, max_dp=1.0, interp_method="pchip"):
111+
"""
112+
Steric height anomaly as a function of pressure.
113+
114+
Parameters
115+
----------
116+
SA : array-like
117+
Absolute Salinity, g/kg
118+
CT : array-like
119+
Conservative Temperature (ITS-90), degrees C
120+
p : array-like
121+
Sea pressure (absolute pressure minus 10.1325 dbar), dbar
122+
p_ref : float or array-like, optional
123+
Reference pressure, dbar
124+
axis : int, optional, default is 0
125+
The index of the pressure dimension in SA and CT.
126+
max_dp : float
127+
If any pressure interval in the input p exceeds max_dp, the dynamic
128+
height will be calculated after interpolating to a grid with this
129+
spacing.
130+
interp_method : string {'mrst', 'pchip', 'linear'}
131+
Interpolation algorithm.
132+
133+
Returns
134+
-------
135+
steric_height : array
136+
Dynamic height anomaly divided by the acceleration of gravity.
137+
138+
"""
139+
return (
140+
geo_strf_dyn_height(SA, CT, p, p_ref, axis=axis, max_dp=max_dp, interp_method=interp_method)
141+
/ 9.7963
142+
)
143+
144+
108145
def unwrap(lon, centered=True, copy=True):
109146
"""
110147
Unwrap a sequence of longitudes or headings in degrees.

0 commit comments

Comments
 (0)