An derived type with procedures for getting the ambient ocean conditions. This implementation takes these conditions to be everywhere uniform.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(uniform_scalar_field), | private | :: | temperature | ||||
| type(uniform_scalar_field), | private | :: | salinity |
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. |
Returns the ambient ocean temperature
Returns the ambient ocean temperature.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(uniform_ambient_conditions), | intent(in) | :: | this | |||
| class(scalar_field), | intent(in) | :: | depth | A field containing the depths at which the ambient temperature is to be calculated. |
||
| real(kind=r8), | intent(in) | :: | t | The time at which the ambient conditions are to be calculated. |
A field containing the ambient temperature at the depth specified for each location.
Returns the ambient ocean temperature
Returns the ambient ocean salinity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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. |
A field containing the ambient salinity at the depth specified for each location.
type, extends(ambient_conditions), public :: uniform_ambient_conditions
!* Author: Chris MacMackin
! Date: April 2016
!
! An derived type with procedures for getting the ambient ocean
! conditions. This implementation takes these conditions to be
! everywhere uniform.
!
private
type(uniform_scalar_field) :: temperature
type(uniform_scalar_field) :: salinity
contains
procedure :: ambient_temperature => uniform_temperature
!! Returns the ambient ocean temperature
procedure :: ambient_salinity => uniform_salinity
!! Returns the ambient ocean temperature
end type uniform_ambient_conditions