xoa.sigma.ocean_s_coordinate_g2
- xoa.sigma.ocean_s_coordinate_g2(sig, ssh, bathy, hc, thetas=None, thetab=None, cs=None, cs_type=None, cache=None, dask='parallelized')[source]
Convert from s [-1, 0] generic form 2 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 + (\eta + h) * S\\S & = \frac{h_c s + h C}{h_c + h}\\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_g2
- Formula terms:
s: var1 C: var2 eta: var3 depth: var4 depth_c: var5
- 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
). Optional if cs is provided.thetab (xarray.DataArray) – Bottom control parameter (\(b\) |
b
) Optional if cs is provided.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\))