mom_eos_base_type module reference

A generic type for equations of state.

More…

Data Types

eos_base

The base class for implementations of the equation of state.

Functions/Subroutines

a_density_fn()

In situ density [kg m-3].

a_calculate_density_scalar()

Calculate the in-situ density for scalar inputs and outputs.

a_calculate_density_array()

Calculate the in-situ density for 1D arraya inputs and outputs.

a_spec_vol_fn()

In situ specific volume [m3 kg-1].

a_calculate_spec_vol_scalar()

Calculate the in-situ specific volume for scalar inputs and outputs.

a_calculate_spec_vol_array()

Calculate the in-situ specific volume for 1D array inputs and outputs.

a_calculate_density_derivs_scalar()

Calculate the derivatives of density with respect to temperature, salinity and pressure for scalar inputs.

a_calculate_density_derivs_array()

Calculate the derivatives of density with respect to temperature, salinity and pressure for array inputs.

a_calculate_density_second_derivs_scalar()

Calculate the second derivatives of density with respect to temperature, salinity and pressure for scalar inputs.

a_calculate_density_second_derivs_array()

Calculate the second derivatives of density with respect to temperature, salinity and pressure for array inputs.

a_calculate_specvol_derivs_array()

Calculate the partial derivatives of specific volume with temperature and salinity for array inputs.

a_calculate_compress_array()

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 mom_eos_base_type/eos_base

The base class for implementations of the equation of state.

Type fields:
  • % density_elem [procedure( i_density_elem ),deferred, private] :: Deferred implementation of the in-situ density as an elemental function [kg m-3].

  • % density_anomaly_elem [procedure( i_density_anomaly_elem ),deferred, private] :: Deferred implementation of the in-situ density anomaly as an elemental function [kg m-3].

  • % spec_vol_elem [procedure( i_spec_vol_elem ),deferred, private] :: Deferred implementation of the in-situ specific volume as an elemental function [m3 kg-1].

  • % spec_vol_anomaly_elem [procedure( i_spec_vol_anomaly_elem ),deferred, private] :: Deferred implementation of the in-situ specific volume anomaly as an elemental function [m3 kg-1].

  • % calculate_density_derivs_elem [procedure( i_calculate_density_derivs_elem ),deferred, private] :: Deferred implementation of the calculation of derivatives of density.

  • % calculate_density_second_derivs_elem [procedure( i_calculate_density_second_derivs_elem ),deferred, private] :: Deferred implementation of the calculation of second derivatives of density.

  • % calculate_specvol_derivs_elem [procedure( i_calculate_specvol_derivs_elem ),deferred, private] :: Deferred implementation of the calculation of derivatives of specific volume.

  • % calculate_compress_elem [procedure( i_calculate_compress_elem ),deferred, private] :: Deferred implementation of the calculation of compressibility.

  • % eos_fit_range [procedure( i_EOS_fit_range ),deferred, private] :: Deferred implementation of the range query function.

  • % density_fn [procedure,private] :: Returns the in-situ density or density anomaly [kg m-3].

  • % spec_vol_fn [procedure,private] :: Returns the in-situ specific volume or specific volume anomaly [m3 kg-1].

  • % calculate_density_scalar [procedure,private] :: Calculates the in-situ density or density anomaly for scalar inputs [m3 kg-1].

  • % calculate_density_array [procedure,private] :: Calculates the in-situ density or density anomaly for array inputs [m3 kg-1].

  • % calculate_spec_vol_scalar [procedure,private] :: Calculates the in-situ specific volume or specific volume anomaly for scalar inputs [m3 kg-1].

  • % calculate_spec_vol_array [procedure,private] :: Calculates the in-situ specific volume or specific volume anomaly for array inputs [m3 kg-1].

  • % calculate_density_derivs_scalar [procedure,private] :: Calculates the derivatives of density for scalar inputs.

  • % calculate_density_derivs_array [procedure,private] :: Calculates the derivatives of density for array inputs.

  • % calculate_density_second_derivs_scalar [procedure,private] :: Calculates the second derivatives of density for scalar inputs.

  • % calculate_density_second_derivs_array [procedure,private] :: Calculates the second derivatives of density for array inputs.

  • % calculate_specvol_derivs_array [procedure,private] :: Calculates the derivatives of specific volume for array inputs.

  • % calculate_compress_array [procedure,private] :: Calculates the compressibility for array inputs.

Function/Subroutine Documentation

function mom_eos_base_type/a_density_fn(this, T, S, pressure, rho_ref) [real]

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 mom_eos_base_type/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 mom_eos_base_type/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]

function mom_eos_base_type/a_spec_vol_fn(this, T, S, pressure, spv_ref) [real]

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 mom_eos_base_type/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 mom_eos_base_type/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 mom_eos_base_type/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 mom_eos_base_type/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 mom_eos_base_type/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 mom_eos_base_type/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 mom_eos_base_type/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 mom_eos_base_type/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