polaris.ocean.model.get_layer_mass
- polaris.ocean.model.get_layer_mass(ds, config)[source]
Get the mass per unit area of each layer
For Omega,
PseudoThicknessis the layer’s extent in pseudo-height \(\tilde{h}\), and \(\rho_0 \tilde{h} = \rho h = \Delta p / g\) is the layer’s mass per unit area exactly, by hydrostatic balance and by the definition of pseudo-height. For MPAS-Ocean,layerThicknessis the geometric thickness \(h\) and the model is Boussinesq, so \(\rho_0 h\) is its mass per unit area. Neither needs an equation of state.- Parameters:
ds (xarray.Dataset) – A data set holding the model’s mass-like thickness under the name the model writes it with
config (polaris.config.PolarisConfigParser) – Configuration options, used only for
[ocean] model
- Returns:
layer_mass (xarray.DataArray) – The mass per unit area of each layer, in kg m-2
- Raises:
ValueError – If the model is not one Polaris knows, or if the data set does not hold that model’s mass-like thickness