An abstract type with a procedure for calculating water density from its temperature and salinity.
Returns the water density for the given temperature and salinity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_of_state), | intent(in) | :: | this | |||
| class(scalar_field), | intent(in) | :: | temperature | A field containing the temperature of the water  | 
  
||
| class(scalar_field), | intent(in) | :: | salinity | A field containing the salinity of the water  | 
  
A field containing the density of the water
Returns the derivative of the water density for the given temperature and salinity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_of_state), | intent(in) | :: | this | |||
| class(scalar_field), | intent(in) | :: | temperature | A field containing the temperature of the water  | 
  
||
| class(scalar_field), | intent(in) | :: | d_temperature | A field containing the derivative of the temperature of the
 water, in teh same direction as   | 
  
||
| class(scalar_field), | intent(in) | :: | salinity | A field containing the salinity of the water  | 
  
||
| class(scalar_field), | intent(in) | :: | d_salinity | A field containing the derivative of the salinity of the
 water, in the same direction as   | 
  
||
| integer, | intent(in) | :: | dir | The direction in which to take the derivative  | 
  
A field containing the derivative of the density of the
 water in direction dir
Returns a (possibly approximated) haline contraction coefficient.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_of_state), | intent(in) | :: | this | |||
| class(scalar_field), | intent(in) | :: | temperature | |||
| class(scalar_field), | intent(in) | :: | salinity | 
Returns a (possibly approximated) therma contraction coefficient.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_of_state), | intent(in) | :: | this | |||
| class(scalar_field), | intent(in) | :: | temperature | |||
| class(scalar_field), | intent(in) | :: | salinity | 
  type, abstract, public :: equation_of_state
    !* Author: Chris MacMackin
    !  Date: April 2016
    !
    ! An abstract type with a procedure for calculating water density
    ! from its temperature and salinity.
    !
  contains
    procedure(get_property), deferred :: water_density
      !! Returns the water density for the given temperature and salinity.
    procedure(get_property_dx), deferred :: water_density_derivative
      !! Returns the derivative of the water density for the given
      !! temperature and salinity.
    procedure(get_coef), deferred    :: haline_contraction
      !! Returns a (possibly approximated) haline contraction coefficient.
    procedure(get_coef), deferred    :: thermal_contraction
      !! Returns a (possibly approximated) therma contraction coefficient.
 end type equation_of_state