An equation of state, depending only on salinity, where the salinity is prescribed such that for some specified thickness . The salinity is related to the density by the haline contraction coefficient . The only real use for this is testing and debugging the plume model.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
class(scalar_field), | private, | allocatable | :: | density | The density calculated from the prescribed salinity |
||
real(kind=r8), | private | :: | beta_s | The haline contraction coefficient |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in) | :: | const | The constant to which is equal. |
||
real(kind=r8), | intent(in) | :: | beta_s | The haline contraction coefficient, , relating salinity and density. |
||
class(scalar_field), | intent(in) | :: | thickness | The thickness of the plume, from which the salinity is calculated. |
Returns the density corresponding to the prescribed salinity, as calculated in the constructor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(prescribed_eos), | 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
Assigns this object to another equation of state object, allowing the definided assignment for the precalculated density field to work correctly.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(equation_of_state), | intent(out) | :: | lhs | |||
class(prescribed_eos), | intent(in) | :: | rhs |
Assigns this object to another equation of state object, allowing the definided assignment for the precalculated density field to work correctly.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(equation_of_state), | intent(out) | :: | lhs | |||
class(prescribed_eos), | intent(in) | :: | rhs |
Calculates the derivative of the water density.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(prescribed_eos), | 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 density of the water
Returns the haline contraction coefficient.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(prescribed_eos), | intent(in) | :: | this | |||
class(scalar_field), | intent(in) | :: | temperature | |||
class(scalar_field), | intent(in) | :: | salinity |
Returns the thermal contraction coefficient.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(prescribed_eos), | intent(in) | :: | this | |||
class(scalar_field), | intent(in) | :: | temperature | |||
class(scalar_field), | intent(in) | :: | salinity |
type, extends(equation_of_state), public :: prescribed_eos
!* Author: Chris MacMackin
! Date: March 2017
!
! An equation of state, depending only on salinity, where the
! salinity is prescribed such that \(SD = {\rm constant}\) for
! some specified thickness \(D\). The salinity is related to the
! density by the haline contraction coefficient \(\beta_S\). The
! only real use for this is testing and debugging the plume model.
!
private
class(scalar_field), allocatable :: density
!! The density calculated from the prescribed salinity
real(r8) :: beta_s
!! The haline contraction coefficient
contains
procedure :: water_density => prescribed_water_density
procedure, pass(rhs) :: prescribed_assign
generic :: assignment(=) => prescribed_assign
procedure :: water_density_derivative => prescribed_water_deriv
procedure :: haline_contraction => prescribed_haline_contraction
procedure :: thermal_contraction => prescribed_thermal_contraction
end type prescribed_eos