prescribed_eos_mod Module

Provides an equation of state where the salinity is prescribed such that . This is useful for testing and debugging the plume model.


Uses

  • module~~prescribed_eos_mod~~UsesGraph module~prescribed_eos_mod prescribed_eos_mod factual_mod factual_mod module~prescribed_eos_mod->factual_mod iso_fortran_env iso_fortran_env module~prescribed_eos_mod->iso_fortran_env module~equation_of_state_mod equation_of_state_mod module~prescribed_eos_mod->module~equation_of_state_mod module~equation_of_state_mod->factual_mod module~equation_of_state_mod->iso_fortran_env

Contents


Variables

TypeVisibility AttributesNameInitial
real(kind=r8), private, parameter:: absolute_zero =-273.15_r8

Interfaces

public interface prescribed_eos

  • private function constructor(const, beta_s, thickness) result(this)

    Arguments

    Type IntentOptional AttributesName
    real(kind=r8), intent(in) :: const

    The constant to which is equal.

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

    The haline contraction coefficient, , relating salinity and density.

    class(scalar_field), intent(in) :: thickness

    The thickness of the plume, from which the salinity is calculated.

    Return Value type(prescribed_eos)


Derived Types

type, public, extends(equation_of_state) :: prescribed_eos

An equation of state, depending only on salinity, where the salinity is prescribed such that for some specified thickness . The salinity is related to the density by the haline contraction coefficient . The only real use for this is testing and debugging the plume model.

Components

TypeVisibility AttributesNameInitial
class(scalar_field), private, allocatable:: density

The density calculated from the prescribed salinity

real(kind=r8), private :: beta_s

The haline contraction coefficient

Constructor

private function constructor(const, beta_s, thickness)

Type-Bound Procedures

procedure, public :: water_density => prescribed_water_density
procedure, public, pass(rhs) :: prescribed_assign
generic, public :: assignment(=) => prescribed_assign
procedure, public :: water_density_derivative => prescribed_water_deriv
procedure, public :: haline_contraction => prescribed_haline_contraction
procedure, public :: thermal_contraction => prescribed_thermal_contraction

Functions

private function constructor(const, beta_s, thickness) result(this)

Arguments

Type IntentOptional AttributesName
real(kind=r8), intent(in) :: const

The constant to which is equal.

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

The haline contraction coefficient, , relating salinity and density.

class(scalar_field), intent(in) :: thickness

The thickness of the plume, from which the salinity is calculated.

Return Value type(prescribed_eos)

private function prescribed_water_density(this, temperature, salinity) result(density)

Author
Chris MacMackin
Date
March 2017

Returns the density corresponding to the prescribed salinity, as calculated in the constructor.

Arguments

Type IntentOptional AttributesName
class(prescribed_eos), intent(in) :: this
class(scalar_field), intent(in) :: temperature

A field containing the temperature of the water

class(scalar_field), intent(in) :: salinity

A field containing the salinity of the water

Return Value class(scalar_field), pointer

A field containing the density of the water

private function prescribed_water_deriv(this, temperature, d_temperature, salinity, d_salinity, dir) result(d_density)

Author
Chris MacMackin
Date
July 2017

Calculates the derivative of the water density.

Arguments

Type IntentOptional AttributesName
class(prescribed_eos), intent(in) :: this
class(scalar_field), intent(in) :: temperature

A field containing the temperature of the water

class(scalar_field), intent(in) :: d_temperature

A field containing the derivative of the temperature of the water, in teh same direction as dir

class(scalar_field), intent(in) :: salinity

A field containing the salinity of the water

class(scalar_field), intent(in) :: d_salinity

A field containing the derivative of the salinity of the water, in the same direction as dir

integer, intent(in) :: dir

The direction in which to take the derivative

Return Value class(scalar_field), pointer

A field containing the density of the water

private function prescribed_haline_contraction(this, temperature, salinity) result(coef)

Author
Chris MacMackin
Date
June 2017

Returns the haline contraction coefficient.

Arguments

Type IntentOptional AttributesName
class(prescribed_eos), intent(in) :: this
class(scalar_field), intent(in) :: temperature
class(scalar_field), intent(in) :: salinity

Return Value class(scalar_field), allocatable

private function prescribed_thermal_contraction(this, temperature, salinity) result(coef)

Author
Chris MacMackin
Date
June 2017

Returns the thermal contraction coefficient.

Arguments

Type IntentOptional AttributesName
class(prescribed_eos), intent(in) :: this
class(scalar_field), intent(in) :: temperature
class(scalar_field), intent(in) :: salinity

Return Value class(scalar_field), allocatable


Subroutines

private subroutine prescribed_assign(lhs, rhs)

Author
Chris MacMackin
Date
March 2017

Assigns this object to another equation of state object, allowing the definided assignment for the precalculated density field to work correctly.

Arguments

Type IntentOptional AttributesName
class(equation_of_state), intent(out) :: lhs
class(prescribed_eos), intent(in) :: rhs