xoa.sigma.ocean_s_coordinate_g1

xoa.sigma.ocean_s_coordinate_g1(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 1 to depths in an ocean model

Note

This function is dask-aware since it delegates the core computation to xarray.apply_ufunc().

Source:

Ocean s-coordinate, generic form 1

Formula:
\[ \begin{align}\begin{aligned}z & = S + \eta*(1+s) + (1 + S / h)\\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_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)

  • cs_type (str, None) – Stretching type (see get_cs())

  • 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\))