MOM_EOS_base_type module reference
A generic type for equations of state
Data Types
The base class for implementations of the equation of state |
Procedure Interfaces
In situ density [kg m-3] |
|
In situ density anomaly [kg m-3] |
|
In situ specific volume [m3 kg-1] |
|
In situ specific volume anomaly [m3 kg-1] |
|
Calculate the partial derivatives of density with potential temperature and salinity |
|
Calculate the partial derivatives of specific volume with temperature and salinity |
|
Calculate second derivatives of density with respect to temperature, salinity, and pressure |
|
Compute the in situ density of sea water (rho) and the compressibility (drho/dp == C_sound^-2) at the given salinity, potential temperature and pressure |
|
Return the range of temperatures, salinities and pressures for which the equations of state has been fitted or is valid. Care should be taken when applying this equation of state outside of its fit range. |
Functions/Subroutines
In situ density [kg m-3] |
|
Calculate the in-situ density for scalar inputs and outputs. |
|
Calculate the in-situ density for 1D arraya inputs and outputs. |
|
In situ specific volume [m3 kg-1] |
|
Calculate the in-situ specific volume for scalar inputs and outputs. |
|
Calculate the in-situ specific volume for 1D array inputs and outputs. |
|
Calculate the derivatives of density with respect to temperature, salinity and pressure for scalar inputs |
|
Calculate the derivatives of density with respect to temperature, salinity and pressure for array inputs |
|
Calculate the second derivatives of density with respect to temperature, salinity and pressure for scalar inputs |
|
Calculate the second derivatives of density with respect to temperature, salinity and pressure for array inputs |
|
Calculate the partial derivatives of specific volume with temperature and salinity for array inputs |
|
Compute the in situ density of sea water (rho) and the compressibility (drho/dp == C_sound^-2) at the given salinity, potential temperature and pressure for array inputs |
Detailed Description
Generic EOS type
Type Documentation
- type, abstract :: EOS_base
The base class for implementations of the equation of state
Procedure Interface Documentation
- real elemental function i_density_elem(this, T, S, pressure)
In situ density [kg m-3]
This is an elemental function that can be applied to any combination of scalar and array inputs.
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
- real elemental function i_density_anomaly_elem(this, T, S, pressure, rho_ref)
In situ density anomaly [kg m-3]
This is an elemental function that can be applied to any combination of scalar and array inputs.
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
rho_ref [in]
A reference density [kg m-3]
- real elemental function i_spec_vol_elem(this, T, S, pressure)
In situ specific volume [m3 kg-1]
This is an elemental function that can be applied to any combination of scalar and array inputs.
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
- real elemental function i_spec_vol_anomaly_elem(this, T, S, pressure, spv_ref)
In situ specific volume anomaly [m3 kg-1]
This is an elemental function that can be applied to any combination of scalar and array inputs.
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
spv_ref [in]
A reference specific volume [m3 kg-1]
- elemental subroutine i_calculate_density_derivs_elem(this, T, S, pressure, drho_dT, drho_dS)
Calculate the partial derivatives of density with potential temperature and salinity
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
drho_dT [out]
The partial derivative of density with potential temperature [kg m-3 degC-1]
drho_dS [out]
The partial derivative of density with salinity, in [kg m-3 PSU-1]
- elemental subroutine i_calculate_specvol_derivs_elem(this, T, S, pressure, dSV_dT, dSV_dS)
Calculate the partial derivatives of specific volume with temperature and salinity
- Parameters
this [in]
This EOS
T [in]
Potential temperature [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
dSV_dT [inout]
The partial derivative of specific volume with potential temperature [m3 kg-1 degC-1]
dSV_dS [inout]
The partial derivative of specific volume with salinity [m3 kg-1 PSU-1]
- elemental subroutine i_calculate_density_second_derivs_elem(this, T, S, pressure, drho_ds_ds, drho_ds_dt, drho_dt_dt, drho_ds_dp, drho_dt_dp)
Calculate second derivatives of density with respect to temperature, salinity, and pressure
- Parameters
this [in]
This EOS
T [in]
Potential temperature referenced to 0 dbar [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
drho_ds_ds [inout]
Partial derivative of beta with respect to S [kg m-3 PSU-2]
drho_ds_dt [inout]
Partial derivative of beta with respect to T [kg m-3 PSU-1 degC-1]
drho_dt_dt [inout]
Partial derivative of alpha with respect to T [kg m-3 degC-2]
drho_ds_dp [inout]
Partial derivative of beta with respect to pressure [kg m-3 PSU-1 Pa-1] = [s2 m-2 PSU-1]
drho_dt_dp [inout]
Partial derivative of alpha with respect to pressure [kg m-3 degC-1 Pa-1] = [s2 m-2 degC-1]
- elemental subroutine i_calculate_compress_elem(this, T, S, pressure, rho, drho_dp)
Compute the in situ density of sea water (rho) and the compressibility (drho/dp == C_sound^-2) at the given salinity, potential temperature and pressure
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
rho [out]
In situ density [kg m-3]
drho_dp [out]
The partial derivative of density with pressure (or the inverse of the square of sound speed) [s2 m-2]
- subroutine i_EOS_fit_range(this, T_min, T_max, S_min, S_max, p_min, p_max)
Return the range of temperatures, salinities and pressures for which the equations of state has been fitted or is valid. Care should be taken when applying this equation of state outside of its fit range.
- Parameters
this [in]
This EOS
T_min [out]
The minimum potential temperature over which this EoS is fitted [degC]
T_max [out]
The maximum potential temperature over which this EoS is fitted [degC]
S_min [out]
The minimum practical salinity over which this EoS is fitted [PSU]
S_max [out]
The maximum practical salinity over which this EoS is fitted [PSU]
p_min [out]
The minimum pressure over which this EoS is fitted [Pa]
p_max [out]
The maximum pressure over which this EoS is fitted [Pa]
Functions/Subroutine Documentation
- real function a_density_fn(this, T, S, pressure, rho_ref)
In situ density [kg m-3]
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
rho_ref [in]
A reference density [kg m-3]
- subroutine a_calculate_density_scalar(this, T, S, pressure, rho, rho_ref)
Calculate the in-situ density for scalar inputs and outputs.
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
rho [out]
In situ density [kg m-3]
rho_ref [in]
A reference density [kg m-3]
- subroutine a_calculate_density_array(this, T, S, pressure, rho, start, npts, rho_ref)
Calculate the in-situ density for 1D arraya inputs and outputs.
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
rho [out]
In situ density [kg m-3]
start [in]
The starting index for calculations
npts [in]
The number of values to calculate
rho_ref [in]
A reference density [kg m-3]
- real function a_spec_vol_fn(this, T, S, pressure, spv_ref)
In situ specific volume [m3 kg-1]
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
spv_ref [in]
A reference specific volume [m3 kg-1]
- subroutine a_calculate_spec_vol_scalar(this, T, S, pressure, specvol, spv_ref)
Calculate the in-situ specific volume for scalar inputs and outputs.
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
specvol [out]
In situ specific volume [m3 kg-1]
spv_ref [in]
A reference specific volume [m3 kg-1]
- subroutine a_calculate_spec_vol_array(this, T, S, pressure, specvol, start, npts, spv_ref)
Calculate the in-situ specific volume for 1D array inputs and outputs.
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
specvol [out]
In situ specific volume [m3 kg-1]
start [in]
The starting index for calculations
npts [in]
The number of values to calculate
spv_ref [in]
A reference specific volume [m3 kg-1]
- subroutine a_calculate_density_derivs_scalar(this, T, S, P, drho_dT, drho_dS)
Calculate the derivatives of density with respect to temperature, salinity and pressure for scalar inputs
- Parameters
this [in]
This EOS
T [in]
Potential temperature referenced to 0 dbar
S [in]
Salinity [PSU]
P [in]
Pressure [Pa]
drho_dT [out]
The partial derivative of density with potential temperature [kg m-3 degC-1]
drho_dS [out]
The partial derivative of density with salinity, in [kg m-3 PSU-1]
- subroutine a_calculate_density_derivs_array(this, T, S, pressure, drho_dT, drho_dS, start, npts)
Calculate the derivatives of density with respect to temperature, salinity and pressure for array inputs
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
drho_dT [out]
The partial derivative of density with potential temperature [kg m-3 degC-1]
drho_dS [out]
The partial derivative of density with salinity, in [kg m-3 PSU-1]
start [in]
The starting index for calculations
npts [in]
The number of values to calculate
- subroutine a_calculate_density_second_derivs_scalar(this, T, S, pressure, drho_ds_ds, drho_ds_dt, drho_dt_dt, drho_ds_dp, drho_dt_dp)
Calculate the second derivatives of density with respect to temperature, salinity and pressure for scalar inputs
- Parameters
this [in]
This EOS
T [in]
Potential temperature referenced to 0 dbar
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
drho_ds_ds [out]
Partial derivative of beta with respect to S [kg m-3 PSU-2]
drho_ds_dt [out]
Partial derivative of beta with respect to T [kg m-3 PSU-1 degC-1]
drho_dt_dt [out]
Partial derivative of alpha with respect to T [kg m-3 degC-2]
drho_ds_dp [out]
Partial derivative of beta with respect to pressure [kg m-3 PSU-1 Pa-1] = [s2 m-2 PSU-1]
drho_dt_dp [out]
Partial derivative of alpha with respect to pressure [kg m-3 degC-1 Pa-1] = [s2 m-2 degC-1]
- subroutine a_calculate_density_second_derivs_array(this, T, S, pressure, drho_ds_ds, drho_ds_dt, drho_dt_dt, drho_ds_dp, drho_dt_dp, start, npts)
Calculate the second derivatives of density with respect to temperature, salinity and pressure for array inputs
- Parameters
this [in]
This EOS
T [in]
Potential temperature referenced to 0 dbar
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
drho_ds_ds [out]
Partial derivative of beta with respect to S [kg m-3 PSU-2]
drho_ds_dt [out]
Partial derivative of beta with respect to T [kg m-3 PSU-1 degC-1]
drho_dt_dt [out]
Partial derivative of alpha with respect to T [kg m-3 degC-2]
drho_ds_dp [out]
Partial derivative of beta with respect to pressure [kg m-3 PSU-1 Pa-1] = [s2 m-2 PSU-1]
drho_dt_dp [out]
Partial derivative of alpha with respect to pressure [kg m-3 degC-1 Pa-1] = [s2 m-2 degC-1]
start [in]
The starting index for calculations
npts [in]
The number of values to calculate
- subroutine a_calculate_specvol_derivs_array(this, T, S, pressure, dSV_dT, dSV_dS, start, npts)
Calculate the partial derivatives of specific volume with temperature and salinity for array inputs
- Parameters
this [in]
This EOS
T [in]
Potential temperature [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
dSV_dT [inout]
The partial derivative of specific volume with potential temperature [m3 kg-1 degC-1]
dSV_dS [inout]
The partial derivative of specific volume with salinity [m3 kg-1 PSU-1]
start [in]
The starting index for calculations
npts [in]
The number of values to calculate
- subroutine a_calculate_compress_array(this, T, S, pressure, rho, drho_dp, start, npts)
Compute the in situ density of sea water (rho) and the compressibility (drho/dp == C_sound^-2) at the given salinity, potential temperature and pressure for array inputs
- Parameters
this [in]
This EOS
T [in]
Potential temperature relative to the surface [degC]
S [in]
Salinity [PSU]
pressure [in]
Pressure [Pa]
rho [out]
In situ density [kg m-3]
drho_dp [out]
The partial derivative of density with pressure (or the inverse of the square of sound speed) [s2 m-2]
start [in]
The starting index for calculations
npts [in]
The number of values to calculate