ground Derived Type

type, public, extends(basal_surface) :: ground

A concrete implementation of the basal_surface abstract data type, representing the ground beneath an ice sheet. At the moment this doesn't actually do anything.


Inherits

type~~ground~~InheritsGraph type~ground ground type~basal_surface basal_surface type~ground->type~basal_surface

Contents

Source Code


Constructor

public interface ground

  • private function constructor() result(this)

    Author
    Christopher MacMackin
    Date
    April 2016

    Instantiates a ground object.

    Arguments

    None

    Return Value type(ground)


Type-Bound Procedures

procedure, public :: basal_melt => ground_melt

  • private function ground_melt(this) result(melt)

    Author
    Christopher MacMackin
    Date
    April 2016

    Computes and returns the melt rate at the bottom of the ice sheet due to interaction with the ground.

    Arguments

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

    Return Value class(scalar_field), pointer

    The melt rate at the base of the ice sheet.

procedure, public :: basal_drag_parameter => ground_drag_parameter

  • private function ground_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 ground exerts on the bottom of the ice sheet. An example would be the coefficient of friction. The description of this method is left deliberately vague so that as not to constrain how the drag is parameterized.

    Arguments

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

    Return Value class(scalar_field), pointer

    The value of a paramter describing the drag of the ground on the ice sheet.

procedure, public :: water_density => ground_water_density

  • private function ground_water_density(this) result(density)

    Author
    Christopher MacMackin
    Date
    April 2016

    Computes and returns the density of the water beneath the ice sheet. This water would be subglacial discharge and would tend to lubricate the motion of the ice sheet. The density probably won't be important in the case of an ice sheet, but is included so that the ground data type can have the same interface as the plume data type.

    Arguments

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

    Return Value real(kind=r8)

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

procedure, public :: update => ground_update

  • private subroutine ground_update(this, state_vector, ice_thickness)

    Author
    Christopher MacMackin
    Date
    April 2016

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

    Arguments

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

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

    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 and/or drag parameter.

procedure, public :: data_size => ground_data_size

  • private pure function ground_data_size(this)

    Author
    Christopher MacMackin
    Date
    August 2016

    Returns the number of elements in the ground'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(ground), intent(in) :: this

    Return Value integer

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

procedure, public :: state_vector => ground_state_vector

  • private pure function ground_state_vector(this) result(state_vector)

    Author
    Christopher MacMackin
    Date
    April 2016

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

    Arguments

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

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

    The state vector describing the ground.

procedure, public :: read_data => ground_read_data

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

    Author
    Chris MacMackin
    Date
    April 2017

    Reads the state of the ground object from the specified group in an HDF file.

    Arguments

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

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

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

    The name of the group in the HDF5 file storing the ground'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 => ground_write_data

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

    Author
    Chris MacMackin
    Date
    November 2016

    Writes the state of the ground object to an HDF file in the specified group.

    Arguments

    Type IntentOptional AttributesName
    class(ground), 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 ground's data.

    integer, intent(out) :: error

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

procedure, public :: solve => ground_solve

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

    Author
    Chris MacMackin
    Date
    April 2017

    Solves the state of the ground for the specified ice properties, at the specified time.

    Arguments

    Type IntentOptional AttributesName
    class(ground), 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 :: ground
    !* Author: Christopher MacMackin
    !  Date: April 2016
    !
    ! A concrete implementation of the [[basal_surface]] abstract data type,
    ! representing the ground beneath an ice sheet. At the moment this
    ! doesn't actually do anything.
    !
  contains
    procedure :: basal_melt => ground_melt
    procedure :: basal_drag_parameter => ground_drag_parameter
    procedure :: water_density => ground_water_density
    procedure :: update => ground_update
    procedure :: data_size => ground_data_size
    procedure :: state_vector => ground_state_vector
    procedure :: read_data => ground_read_data
    procedure :: write_data => ground_write_data
    procedure :: solve => ground_solve
  end type ground