Returns a field containing the salinity boundary values for the specified boundary location.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dallaston2015_seasonal_boundary), | intent(in) | :: | this | |||
integer, | intent(in) | :: | location | Which boundary information is to be provided for. The
boundary will be the one normal to dimension of number
|
function seasonal_salinity_bound(this, location) result(bound)
!* Author: Chris MacMackin
! Date: March 2017
!
! Returns a field containing the salinity boundary values for
! the specified boundary location.
!
class(dallaston2015_seasonal_boundary), intent(in) :: this
integer, intent(in) :: location
!! Which boundary information is to be provided for. The
!! boundary will be the one normal to dimension of number
!! `abs(boundary)`. If the argument is negative, then the lower
!! boundary is returned. If positive, then the upper boundary is
!! returned.
class(scalar_field), pointer :: bound
call dummy%allocate_scalar_field(bound)
select case(location)
case(-1)
bound = uniform_scalar_field(this%discharge**(2._r8/3._r8)/this%thickness)
case(1)
bound = uniform_scalar_field(0._r8)
case default
bound = uniform_scalar_field(0._r8)
end select
call bound%set_temp() ! Shouldn't need to call this, but for some
! reason being set as non-temporary when
! assignment subroutine returns.
end function seasonal_salinity_bound