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. |
function constructor(const, beta_s, thickness) result(this)
real(r8), intent(in) :: const
!! The constant to which \(SD\) is equal.
real(r8), intent(in) :: beta_s
!! The haline contraction coefficient, \(\beta_S\), relating
!! salinity and density.
class(scalar_field), intent(in) :: thickness
!! The thickness of the plume, from which the salinity is calculated.
type(prescribed_eos) :: this
call thickness%guard_temp()
allocate(this%density, mold=thickness)
this%density = const*beta_s/thickness
this%beta_s = beta_s
call thickness%clean_temp()
end function constructor