uniform_salinity Function

private function uniform_salinity(this, depth, t) result(property)

Returns the ambient ocean salinity.

Arguments

Type IntentOptional AttributesName
class(uniform_ambient_conditions), intent(in) :: this
class(scalar_field), intent(in) :: depth

A field containing the depths at which the ambient salinity is to be calculated.

real(kind=r8), intent(in) :: t

The time at which the ambient conditions are to be calculated.

Return Value class(scalar_field), pointer

A field containing the ambient salinity at the depth specified for each location.


Contents

Source Code


Source Code

  function uniform_salinity(this, depth, t) result(property)
    !* Author: Chris MacMackin
    !  Date: November 2016
    !
    ! Returns the ambient ocean salinity.
    !
    class(uniform_ambient_conditions), intent(in) :: this
    class(scalar_field), intent(in)               :: depth
      !! A field containing the depths at which the ambient salinity
      !! is to be calculated.
    real(r8), intent(in)                          :: t
      !! The time at which the ambient conditions are to be calculated.
    class(scalar_field), pointer                  :: property
      !! A field containing the ambient salinity at the depth specified
      !! for each location.
    call this%salinity%allocate_scalar_field(property)
    property = this%salinity
    call property%set_temp() ! Shouldn't need to call this, but for
                             ! some rason being set as non-temporary
                             ! when assignment subroutine returns.
  end function uniform_salinity