Produces an ambient object which will return the specified salinity and temeprature values.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in), | optional | :: | temperature | The temperature of the ambient ocean. Default is 0. |
|
real(kind=r8), | intent(in), | optional | :: | salinity | The salinity of the ambient ocean. Default is 0. |
function constructor(temperature, salinity) result(this)
!* Author: Chris MacMackin
! Date: November 2016
!
! Produces an ambient object which will return the specified
! salinity and temeprature values.
!
real(r8), intent(in), optional :: temperature
!! The temperature of the ambient ocean. Default is 0.
real(r8), intent(in), optional :: salinity
!! The salinity of the ambient ocean. Default is 0.
type(uniform_ambient_conditions) :: this
if (present(temperature)) then
this%temperature = uniform_scalar_field(temperature)
else
this%temperature = uniform_scalar_field(0.0_r8)
end if
if (present(salinity)) then
this%salinity = uniform_scalar_field(salinity)
else
this%salinity = uniform_scalar_field(0.0_r8)
end if
end function constructor