uniform_ambient_conditions Derived Type

type, public, extends(ambient_conditions) :: uniform_ambient_conditions

An derived type with procedures for getting the ambient ocean conditions. This implementation takes these conditions to be everywhere uniform.


Inherits

type~~uniform_ambient_conditions~~InheritsGraph type~uniform_ambient_conditions uniform_ambient_conditions uniform_scalar_field uniform_scalar_field type~uniform_ambient_conditions->uniform_scalar_field temperature, salinity type~ambient_conditions ambient_conditions type~uniform_ambient_conditions->type~ambient_conditions

Contents


Components

TypeVisibility AttributesNameInitial
type(uniform_scalar_field), private :: temperature
type(uniform_scalar_field), private :: salinity

Constructor

public interface uniform_ambient_conditions

  • private 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.

    Arguments

    Type IntentOptional AttributesName
    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.

    Return Value type(uniform_ambient_conditions)


Type-Bound Procedures

procedure, public :: ambient_temperature => uniform_temperature

Returns the ambient ocean temperature

  • private function uniform_temperature(this, depth, t) result(property)

    Author
    Chris MacMackin
    Date
    November 2016

    Returns the ambient ocean temperature.

    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 temperature 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 temperature at the depth specified for each location.

procedure, public :: ambient_salinity => uniform_salinity

Returns the ambient ocean temperature

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

    Author
    Chris MacMackin
    Date
    November 2016

    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.

Source Code

  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