xoa.sigma.ocean_s_coordinate
- xoa.sigma.ocean_s_coordinate(sig, ssh, bathy, hc, thetas=None, thetab=None, cs=None, cs_type=None, cache=None, dask='parallelized')[source]
Convert from s [-1, 0] to depths in an ocean model
Note
This function is dask-aware since it delegates the core computation to
xarray.apply_ufunc()
.- Source:
- Formula:
- \[ \begin{align}\begin{aligned}z & = \eta*(1+s) + h_c*s + (h-h_c)*C\\C & = (1-b)*\frac{\sinh(a*s)}{\sinh(a)} + b*\left[\frac{\tanh(a*(s+0.5))}{2*\tanh(0.5*a)} - 0.5\right]\end{aligned}\end{align} \]
- Sigma standard name:
ocean_s_coordinate
- Formula terms:
s: var1 eta: var2 depth: var3 a: var4 b: var5 depth_c: var6
- Parameters:
sig (xarray.DataArray) – Sigma coordinates range from -1 to 0 (\(s\) |
s
)ssh (xarray.DataArray) – Surface air pressure (\(\eta\) |
eta
)bathy (xarray.DataArray) – Positive sea floor depth (\(h\) |
depth
)hc (xarray.DataArray, float) – Positive critical depth (\(h_c\) |
depth_c
)thetas (xarray.DataArray) – Surface control parameter (\(a\) |
a
)thetab (xarray.DataArray) – Bottom control parameter (\(b\) |
b
)cs (xarray.DataArray, None) – Stretching curve, which defaults to the formula above computed by
get_cs()
(\(C\) |C
)cache (dict) – Dict variable that stores intermediate results to be used from call to call.
- Returns:
xarray.DataArray – Negative depth below surface in m (\(z\))