plume Derived Type

type, public, extends(basal_surface) :: plume

A concrete implementation of the basal_surface abstract data type, representing the buoyant plume beneath an ice shelf.


Inherits

type~~plume~~InheritsGraph type~plume plume type~abstract_melt_relationship abstract_melt_relationship type~plume->type~abstract_melt_relationship melt_formulation type~basal_surface basal_surface type~plume->type~basal_surface type~ambient_conditions ambient_conditions type~plume->type~ambient_conditions ambient_conds type~plume_boundary plume_boundary type~plume->type~plume_boundary boundaries cheb1d_scalar_field cheb1d_scalar_field type~plume->cheb1d_scalar_field thickness, temperature, temperature_dx, salinity, salinity_dx cheb1d_vector_field cheb1d_vector_field type~plume->cheb1d_vector_field velocity, velocity_dx type~pseudospec_block pseudospec_block type~plume->type~pseudospec_block precond type~abstract_entrainment abstract_entrainment type~plume->type~abstract_entrainment entrainment_formulation type~equation_of_state equation_of_state type~plume->type~equation_of_state eos

Contents

Source Code


Components

TypeVisibility AttributesNameInitial
type(cheb1d_scalar_field), private :: thickness

The thickness of the plume

type(cheb1d_vector_field), private :: velocity

The velocity of the plume

type(cheb1d_vector_field), private :: velocity_dx

The derivative of the velocity field

type(cheb1d_scalar_field), private :: temperature

The temperature of the plume

type(cheb1d_scalar_field), private :: temperature_dx

The derivative of the temperature of the plume

type(cheb1d_scalar_field), private :: salinity

The salinity of the plume

type(cheb1d_scalar_field), private :: salinity_dx

The derivative of the salinity of the plume

class(abstract_entrainment), private, allocatable:: entrainment_formulation

An object which provides the parameterisation for entrainment of water into the plume.

class(abstract_melt_relationship), private, allocatable:: melt_formulation

An object which provides the parameterisation for melting, salt, and heat fluxes from the plume to the ice.

class(ambient_conditions), private, allocatable:: ambient_conds

An object specifying the temperature and salinity of the ambient ocean at its interface with the plume.

class(equation_of_state), public, allocatable:: eos

An object specifying the equation of state relating the plume water's density to its temperature and salinity.

class(plume_boundary), private, allocatable:: boundaries

An object specifying the boundary conditions for the plume.

real(kind=r8), private :: delta

The dimensionless ratio

real(kind=r8), public :: nu

The dimensionless ratio

real(kind=r8), private :: mu

The dimensionless ratio

real(kind=r8), private :: r_val

The dimensionless ratio of the ocean water density to the density of the overlying ice shelf.

real(kind=r8), public :: phi

The inverse Rossby number,

real(kind=r8), private :: time

The time at which the ice shelf is in this state

integer, private :: thickness_size

The number of data values in the thickness field

integer, private :: velocity_size

The number of data values in the velocity field

integer, private :: temperature_size

The number of data values in the temperature field

integer, private :: salinity_size

the number of data values in the salinity field

logical, private, dimension(7):: lower_bounds =.false.

Which variables have boundary conditions at the grounding line.

logical, private, dimension(7):: upper_bounds =.false.

Which variables have boundary conditions at the calving front.

type(pseudospec_block), private :: precond

A pseudospectral differentiation block which can be used for preconditioning.


Type-Bound Procedures

procedure, public :: initialise => plume_initialise

  • private subroutine plume_initialise(this, domain, resolution, thickness, velocity, temperature, salinity, entrainment_formulation, melt_formulation, ambient_conds, eos, boundaries, delta, nu, mu, r_val, phi)

    Author
    Christopher MacMackin
    Date
    April 2016

    Instantiates a plume object with initial coniditions provided by the arguments.At present only a 1D model is supported. If information is provided for higher dimensions then it will be ignored.

    Arguments

    Type IntentOptional AttributesName
    class(plume), intent(out) :: this

    A plume object with its domain and initial conditions set according to the arguments of the constructor function.

    real(kind=r8), intent(in), dimension(:,:):: domain

    An array containing the upper and lower limits of the domain for the plume. The first index represents the dimension for which the boundaries apply. If the second index is 1 then it corresponds to the lower bound. If the second index is 2 then it corresponds to the upper bound.

    integer, intent(in), dimension(:):: resolution

    The number of data points in each dimension

    procedure(scalar_func) :: thickness

    A function which calculates the initial value of the thickness of the plume at a given location.

    procedure(velocity_func) :: velocity

    A function which calculates the initial value of the velocity (vector) of the water at a given location in a plume.

    procedure(scalar_func) :: temperature

    A function which calculates the initial value of the temperature of the plume at a given location.

    procedure(scalar_func) :: salinity

    A function which calculates the initial value of the salinity of the plume at a given location.

    class(abstract_entrainment), intent(inout), optional allocatable:: entrainment_formulation

    An object which calculates entrainment into the plume. Will be unallocated on exit. Defaults to that used by Jenkins (1991) with the coefficient $E_0 = 1$.

    class(abstract_melt_relationship), intent(inout), optional allocatable:: melt_formulation

    An object which calculates melting and the resulting thermal transfer into/out of the plume. Will be unallocated on exit. Defaults to that used by Dallaston et al. (2015), scaled to be consistent with the nondimensionalisation used here.

    class(ambient_conditions), intent(inout), optional allocatable:: ambient_conds

    An object specifying the salinity and temperature of the ambient ocean. Will be unallocated on exit. Defaults to uniform ambient salinity and temperature, both of which are set to 0 (as temperature and salinity are measured relative to some reference value).

    class(equation_of_state), intent(inout), optional allocatable:: eos

    An object specifying the equation of state for the water in the plume. Will be unallocated on exit. Defaults to linearised equation of state with no temperature dependence and a haline contraction coefficient of 1. The reference density is set to be 1 in the dimensionless units when salinity and temeprature are 0.

    class(plume_boundary), intent(inout), optional allocatable:: boundaries

    An object providing the boundary conditions for the plume. Will be unallocated on exit. Defaults to those used by Dallaston et al. (2015).

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

    The dimensionless ratio . Defaults to 0.036.

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

    The dimensionless ratio . Defaults to 0.

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

    The dimensionless ratio . Defaults to 0.

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

    The dimensionless ratio of the water density to the ice shelf density, Defaults to 1.12.

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

    The inverse Rossby number, . Defaults to 0.

procedure, public :: basal_melt => plume_melt

  • private function plume_melt(this) result(melt)

    Author
    Christopher MacMackin
    Date
    April 2016

    Computes and returns the melt rate at the bottom of the ice shelf due to interaction with the plume.

    Arguments

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

    Return Value class(scalar_field), pointer

    The melt rate at the base of the ice shelf.

procedure, public :: basal_drag_parameter => plume_drag_parameter

  • private function plume_drag_parameter(this) result(drag)

    Author
    Christopher MacMackin
    Date
    April 2016

    Computes and returns a quantity which may be necessary to determine the frictional drag the plume exerts on the bottom of the ice shelf. The plume would actually tend to exert no drag on the bottom of the ice shelf, but this method is present so that there is a consistent interface with the ground data type.

    Arguments

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

    Return Value class(scalar_field), pointer

    The melt rate at the base of the ice sheet.

procedure, public :: water_density => plume_water_density

  • private function plume_water_density(this) result(density)

    Author
    Christopher MacMackin
    Date
    April 2016

    Computes and returns the density of the plume water beneath the ice shelf. The density of this water would vary depending on how much saline ambient water has been entrained into the plume versus how much fresh water has been released due to melting. However, the Boussinesq approximation is used here and only a single reference density is returned.

    Read more…

    Arguments

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

    Return Value real(kind=r8)

    The density of the water at the base of the ice sheet.

procedure, public :: update => plume_update

  • private subroutine plume_update(this, state_vector, ice_thickness)

    Author
    Christopher MacMackin
    Date
    April 2016

    Updates the state of the plume from its state vector. The state vector is a real array containing the value of each of the plume's properties at each of the locations on the grid used in discretization.

    Arguments

    Type IntentOptional AttributesName
    class(plume), intent(inout) :: this
    real(kind=r8), intent(in), dimension(:):: state_vector

    A real array containing the data describing the state of the plume.

    class(scalar_field), intent(in), optional :: ice_thickness

    The ice thickness which, if present, will be used to update the calculation of the melt rate.

procedure, public :: data_size => plume_data_size

  • private function plume_data_size(this)

    Author
    Christopher MacMackin
    Date
    August 2016

    Returns the number of elements in the plume's state vector. This is the size of the vector returned by state_vector and taken as an argument by update.

    Arguments

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

    Return Value integer

    The number of elements in the plume's state vector.

procedure, public :: state_vector => plume_state_vector

  • private function plume_state_vector(this) result(state_vector)

    Author
    Christopher MacMackin
    Date
    April 2016

    Returns the state vector for the current state of the plume. This takes the form of a 1D array.

    Arguments

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

    Return Value real(kind=r8), dimension(:), allocatable

    The state vector describing the plume.

procedure, public :: read_data => plume_read_data

  • private subroutine plume_read_data(this, file_id, group_name, error)

    Author
    Chris MacMackin
    Date
    April 2017

    Reads the state of the plume object from an HDF file in the specified group. This sets the thickness, velocity, temperature, salinity dataset, and parameter values.

    Arguments

    Type IntentOptional AttributesName
    class(plume), intent(inout) :: this
    integer(kind=hid_t), intent(in) :: file_id

    The identifier for the HDF5 file/group in which this data is meant to be written.

    character(len=*), intent(in) :: group_name

    The name to give the group in the HDF5 file storing the ice shelf's data.

    integer, intent(out) :: error

    Flag indicating whether routine ran without error. If no error occurs then has value 0.

procedure, public :: write_data => plume_write_data

  • private subroutine plume_write_data(this, file_id, group_name, error)

    Author
    Chris MacMackin
    Date
    November 2016

    Writes the state of the plume object to an HDF file in the specified group. This will consist of a thickness, a velocity, a temperature, and a salinity dataset.

    Arguments

    Type IntentOptional AttributesName
    class(plume), intent(in) :: this
    integer(kind=hid_t), intent(in) :: file_id

    The identifier for the HDF5 file/group in which this data is meant to be written.

    character(len=*), intent(in) :: group_name

    The name to give the group in the HDF5 file storing the ice shelf's data.

    integer, intent(out) :: error

    Flag indicating whether routine ran without error. If no error occurs then has value 0.

procedure, public :: solve => plume_solve

  • private subroutine plume_solve(this, ice_thickness, ice_density, ice_temperature, time, success)

    Author
    Chris MacMackin
    Date
    March 2017

    Solves the state of the plume for the specified ice properties, at the specified time. This is done using the a quasilinearisation method and a GMRES iterative linear solver.

    Arguments

    Type IntentOptional AttributesName
    class(plume), intent(inout) :: this
    class(scalar_field), intent(in) :: ice_thickness

    Thickness of the ice above the basal surface

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

    The density of the ice above the basal surface, assumed uniform

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

    The temperature of the ice above the basal surface, assumed uniform

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

    The time to which the basal surface should be solved

    logical, intent(out) :: success

    True if the solver is successful, false otherwise

Source Code

  type, extends(basal_surface), public :: plume
    !* Author: Christopher MacMackin
    !  Date: April 2016
    !
    ! A concrete implementation of the [[basal_surface(type)]]
    ! abstract data type, representing the buoyant plume beneath an
    ! ice shelf.
    !
    private
    type(cheb1d_scalar_field) :: thickness
      !! The thickness of the plume
    type(cheb1d_vector_field) :: velocity
      !! The velocity of the plume
    type(cheb1d_vector_field) :: velocity_dx
      !! The derivative of the velocity field
    type(cheb1d_scalar_field) :: temperature
      !! The temperature of the plume
    type(cheb1d_scalar_field) :: temperature_dx
      !! The derivative of the temperature of the plume
    type(cheb1d_scalar_field) :: salinity
      !! The salinity of the plume
    type(cheb1d_scalar_field) :: salinity_dx
      !! The derivative of the salinity of the plume
    class(abstract_entrainment), allocatable :: entrainment_formulation
      !! An object which provides the parameterisation for entrainment
      !! of water into the plume.
    class(abstract_melt_relationship), allocatable :: melt_formulation
      !! An object which provides the parameterisation for melting,
      !! salt, and heat fluxes from the plume to the ice.
    class(ambient_conditions), allocatable :: ambient_conds
      !! An object specifying the temperature and salinity of the
      !! ambient ocean at its interface with the plume.
    class(equation_of_state), allocatable, public :: eos
      !! An object specifying the equation of state relating the plume
      !! water's density to its temperature and salinity.
    class(plume_boundary), allocatable :: boundaries
      !! An object specifying the boundary conditions for the plume.
    real(r8)                  :: delta
      !! The dimensionless ratio \(\delta \equiv \frac{D_0}{h_0}\)
    real(r8), public                  :: nu
      !! The dimensionless ratio \(\nu \equiv \frac{\kappa_0}{x_0U_o}\)
    real(r8)                  :: mu
      !! The dimensionless ratio \(\mu \equiv \frac{C_dx_0}{D_0}\)
    real(r8)                  :: r_val
      !! The dimensionless ratio of the ocean water density to the
      !! density of the overlying ice shelf.
    real(r8), public                  :: phi
      !! The inverse Rossby number, \(\Phi \equiv \frac{fx_0}{U_0}\)
    real(r8)                  :: time
      !! The time at which the ice shelf is in this state
    integer                   :: thickness_size
      !! The number of data values in the thickness field
    integer                   :: velocity_size
      !! The number of data values in the velocity field
    integer                   :: temperature_size
      !! The number of data values in the temperature field
    integer                   :: salinity_size
      !! the number of data values in the salinity field
    logical, dimension(7)     :: lower_bounds = .false.
      !! Which variables have boundary conditions at the grounding
      !! line.
    logical, dimension(7)     :: upper_bounds = .false.
      !! Which variables have boundary conditions at the calving
      !! front.
    type(pseudospec_block)    :: precond
      !! A pseudospectral differentiation block which can be used for
      !! preconditioning.
  contains
    procedure :: initialise => plume_initialise
    procedure :: basal_melt => plume_melt
    procedure :: basal_drag_parameter => plume_drag_parameter
    procedure :: water_density => plume_water_density
    procedure :: update => plume_update
    procedure :: data_size => plume_data_size
    procedure :: state_vector => plume_state_vector
    procedure :: read_data => plume_read_data
    procedure :: write_data => plume_write_data
    procedure :: solve => plume_solve
  end type plume