momlevel.reference module¶
reference.py - module to establish sea level reference states
- momlevel.reference.setup_reference_state(dset, patm=101325.0, eos='Wright', coord_names=None, time_index=0)¶
Function to generate reference dataset
This function generates a dataset of initial reference values for use in all sea level calculations. Values are taken from an input dataset that contains thetao, so, volcello, and areacello. The initial in situ density is calculated along with scalar properties that are used in offline approximations of the steric effect from Boussinesq models.
- Parameters:
dset (xarray.core.dataset.Dataset) – Dataset containing thetao, so, volcello, and areacello
patm (float or xarray.core.dataarray.DataArray) – Atmospheric pressure at the sea surface in Pa, by default 101325 Pa (US Standard Atmosphere)
eos (str, optional) – Equation of state, by default “Wright”
coord_names (
dict, optional) – Dictionary of coordinate name mappings. This should use x, y, z, and t as keys, e.g. {“x”:”xh”, “y”:”yh”, “z”:”z_l”, “t”:”time”}time_index (int, optional) – Time index to use for reference state, by default 0 (first time index)
- Returns:
Dataset of reference values
- Return type:
xarray.core.dataset.Dataset