one_equation_melt Derived Type

type, public, extends(abstract_melt_relationship) :: one_equation_melt

A parameterisation of melting into a plume which comes from heavily simplifying the 3 equation model. It is taken from Dallaston, Hewitt, and Wells (2015), prior to the their dropping some terms based on scaling arguments. The melt rate, as well as effect on termperature and salinity, are calculated by calling solve_for_melt and then accessed using melt_rate, heat_equation_terms, salt_equation_terms.


Inherits

type~~one_equation_melt~~InheritsGraph type~one_equation_melt one_equation_melt type~abstract_melt_relationship abstract_melt_relationship type~one_equation_melt->type~abstract_melt_relationship scalar_field scalar_field type~one_equation_melt->scalar_field forcing_values

Contents

Source Code


Components

TypeVisibility AttributesNameInitial
class(scalar_field), public, allocatable:: forcing_values

Stores the resulting forcing values.

real(kind=r8), public :: coef1 =0.018208_r8

The unitless multiplier on the thermal forcing term, .

real(kind=r8), public :: coef2 =0.023761_r8

The unitless multiplier applied to the thermal forcing term to get the melt rate, .

real(kind=r8), public :: sal_forcing =0._r8

The unitless multiplier applied to the forcing values to get the salinity forcing. It corresponds to the product of coef2 and the ice salinity. Typically this would be zero, but it might be positive if there is some marine ice present. Alternatively, depending on how the salinity has been scaled, it may have a negative value.

real(kind=r8), public :: melt_temp =0._r8

The melting temperature. While intuitively it makes sense to set this to zero, it can be useful to scale temperature in such a way that it will have a negative value.


Constructor

public interface one_equation_melt

  • private pure function constructor(coef1, coef2, fresh_sal, melt_temp) result(this)

    Arguments

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

    The unitless multiplier on the thermal forcing term, .

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

    The unitless multiplier applied to the theram forcing term to get the melt rate, .

    real(kind=r8), intent(in), optional :: fresh_sal

    The salinity of fresh water. Defaults to 0.

    real(kind=r8), intent(in), optional :: melt_temp

    The melting point of the ice. Defaults to 0.

    Return Value type(one_equation_melt)

    The newly created object representing the melt relationship.


Type-Bound Procedures

procedure, public :: solve_for_melt => one_equation_solve

  • private subroutine one_equation_solve(this, velocity, pressure, temperature, salinity, plume_thickness, time)

    Arguments

    Type IntentOptional AttributesName
    class(one_equation_melt), intent(inout) :: this
    class(vector_field), intent(in) :: velocity

    The velocity field of the plume into which fluid is melting.

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

    The water pressure at the interface where the melting occurs.

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

    The temperature of the plume into which fluid is melting.

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

    The salinity of the plume into which fluid is melting.

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

    The thickness of the plume into which fluid is melting.

    real(kind=r8), intent(in), optional :: time

    The time at which the melting is being solved for. If not present then assumed to be same as previous value passed.

procedure, public :: heat_equation_terms => one_equation_heat

Returns the terms this melt formulation contributes to the heat equation, after they have been solved for using solve_for_melt.

  • private function one_equation_heat(this) result(heat)

    Arguments

    Type IntentOptional AttributesName
    class(one_equation_melt), intent(in) :: this

    Return Value class(scalar_field), pointer

    The value of the contribution made by melting/thermal transfer to the heat equation for a plume

procedure, public :: salt_equation_terms => one_equation_salt

Returns the terms this melt formulation contributes to the salt equation, after they have been solved for using solve_for_melt.

  • private function one_equation_salt(this) result(salt)

    Arguments

    Type IntentOptional AttributesName
    class(one_equation_melt), intent(in) :: this

    Return Value class(scalar_field), pointer

    The value of the contribution made by melting/thermal transfer to the salt equation for a plume

procedure, public :: melt_rate => one_equation_melt_rate

Returns the melt rate calculated using this formulation, after it has been solved for using solve_for_melt.

  • private function one_equation_melt_rate(this) result(melt)

    Arguments

    Type IntentOptional AttributesName
    class(one_equation_melt), intent(in) :: this

    Return Value class(scalar_field), pointer

    The melt rate from the ice into the plume water.

procedure, public :: has_heat_terms => one_equation_has_heat

Whether this formulation of melting contributes any terms to a plume's heat equation.

  • private pure function one_equation_has_heat(this) result(has_heat)

    Arguments

    Type IntentOptional AttributesName
    class(one_equation_melt), intent(in) :: this

    Return Value logical

    Whether this formulation of melting contributes terms to the heat equation of the plume.

procedure, public :: has_salt_terms => one_equation_has_salt

Whether this formulation of melting contributes any terms to a plume's salinity equation.

  • private pure function one_equation_has_salt(this) result(has_salt)

    Arguments

    Type IntentOptional AttributesName
    class(one_equation_melt), intent(in) :: this

    Return Value logical

    Whether this formulation of melting contributes terms to the salinity equation of the plume.

Source Code

  type, extends(abstract_melt_relationship), public :: one_equation_melt
    !* Author: Christopher MacMackin
    !  Date: May 2017
    !
    ! A parameterisation of melting into a plume which comes from
    ! heavily simplifying the 3 equation model. It is taken from
    ! Dallaston, Hewitt, and Wells (2015), prior to the their dropping
    ! some terms based on scaling arguments. The melt rate, as well as
    ! effect on termperature and salinity, are calculated by calling
    ! [[abstract_melt_relationship:solve_for_melt]] and then accessed
    ! using [[abstract_melt_relationship:melt_rate]],
    ! [[abstract_melt_relationship:heat_equation_terms]],
    ! [[abstract_melt_relationship:salt_equation_terms]].
    ! 
    class(scalar_field), allocatable :: forcing_values
      !! Stores the resulting forcing values.
    real(r8) :: coef1 = 0.018208_r8
      !! The unitless multiplier on the thermal forcing term,
      !! \(\Gamma_Tx_0/D_0\).
    real(r8) :: coef2 = 0.023761_r8
      !! The unitless multiplier applied to the thermal forcing term to
      !! get the melt rate, \(c_oT_0/L\).
    real(r8) :: sal_forcing = 0._r8
      !! The unitless multiplier applied to the forcing values to get
      !! the salinity forcing. It corresponds to the product of
      !! `coef2` and the ice salinity. Typically this would be zero,
      !! but it might be positive if there is some marine ice
      !! present. Alternatively, depending on how the salinity has
      !! been scaled, it may have a negative value.
    real(r8) :: melt_temp = 0._r8
      !! The melting temperature. While intuitively it makes sense to
      !! set this to zero, it can be useful to scale temperature in
      !! such a way that it will have a negative value.
  contains
    procedure :: solve_for_melt => one_equation_solve
    procedure :: heat_equation_terms => one_equation_heat
      !! Returns the terms this melt formulation contributes to the
      !! heat equation, after they have been solved for using
      !! [[abstract_melt_relationship:solve_for_melt]]. 
    procedure :: salt_equation_terms => one_equation_salt
      !! Returns the terms this melt formulation contributes to the
      !! salt equation, after they have been solved for using
      !! [[abstract_melt_relationship:solve_for_melt]].
    procedure :: melt_rate => one_equation_melt_rate
      !! Returns the melt rate calculated using this formulation,
      !! after it has been solved for using 
      !! [[abstract_melt_relationship:solve_for_melt]]. 
    procedure :: has_heat_terms => one_equation_has_heat
      !! Whether this formulation of melting contributes any terms to
      !! a plume's heat equation.
    procedure :: has_salt_terms => one_equation_has_salt
      !! Whether this formulation of melting contributes any terms to
      !! a plume's salinity equation.
 end type one_equation_melt