momlevel.steric module¶
steric.py - module to calculate local and global steric sea level
- momlevel.steric.halosteric(*args, **kwargs)¶
Wrapper for halosteric calculation
- momlevel.steric.steric(dset, reference=None, coord_names=None, varname_map=None, rhozero=1035.0, patm=101325.0, equation_of_state='Wright', variant='steric', domain='local', dtype='float32', strict=True, annual=False, verbose=False)¶
Function to calculate steric sea level change
Calculates the steric, thermosteric, or halosteric sea level change and other associated quantities relative to a known reference state.
The calculation can either be performed locally at each grid point, or globally. Global calculations are performed using an offline approximation of the steric effect commonly used for Boussinesq models.
- Parameters:
dset (xarray.core.dataset.Dataset) – Input dataset containing sea water potential temperature (thetao), sea water salinity (so), ocean grid cell volume (volcello), and ocean cell area (areacello)
reference (
xarray.core.dataset.Dataset) – Reference data set containing initial ocean state. The first time level of dset is used if not supplied, by default Nonecoord_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”}, by default Nonevarname_map (
dict, optional) – Dictionary of variable mappings. Variables are renamed according to these mappings at the start of the routine, by default None.rhozero (float, optional) – Globally constant reference density in kg m-3, by default 1035.0
patm (float or xarray.core.dataarray.DataArray) – Atmospheric pressure at the sea surface in Pa, by default 101325 Pa (US Standard Atmosphere)
equation_of_state (str, optional) – Equation of state to use in calculations, by default “Wright”
variant (str, optional) – Options are “steric”, “thermosteric”, and “halosteric”, by default “steric”
domain (str, optional) – Options are “local” and “global”, by default “local”
dtype (str, optional) – Encoding data type for output, by default “float32”
strict (bool, optional) – If True, errors are handled as fatal Exceptions. If False, errors are passed as warnings. By default, True
annual (bool, optional) – Perform annual averaging on results. By default, False
verbose (bool, optional) – Verbose output. By default, False
- Returns:
Results of sea level change calculation
- Return type:
xarray.core.dataset.Dataset
- momlevel.steric.thermosteric(*args, **kwargs)¶
Wrapper for thermosteric calculation