ground_mod Module

Provides a concrete implementation of the basal_surface data type, representing solid ground.


Uses

  • module~~ground_mod~~UsesGraph module~ground_mod ground_mod factual_mod factual_mod module~ground_mod->factual_mod hdf5 hdf5 module~ground_mod->hdf5 module~basal_surface_mod basal_surface_mod module~ground_mod->module~basal_surface_mod iso_fortran_env iso_fortran_env module~ground_mod->iso_fortran_env module~basal_surface_mod->factual_mod module~basal_surface_mod->hdf5 module~basal_surface_mod->iso_fortran_env module~nitsol_mod nitsol_mod module~basal_surface_mod->module~nitsol_mod module~nitsol_mod->iso_fortran_env

Contents


Interfaces

public interface ground

  • private function constructor() result(this)

    Author
    Christopher MacMackin
    Date
    April 2016

    Instantiates a ground object.

    Arguments

    None

    Return Value type(ground)


Derived Types

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.

Constructor

private function constructor()

Instantiates a ground object.

Type-Bound Procedures

procedure, public :: basal_melt => ground_melt
procedure, public :: basal_drag_parameter => ground_drag_parameter
procedure, public :: water_density => ground_water_density
procedure, public :: update => ground_update
procedure, public :: data_size => ground_data_size
procedure, public :: state_vector => ground_state_vector
procedure, public :: read_data => ground_read_data
procedure, public :: write_data => ground_write_data
procedure, public :: solve => ground_solve

Functions

private function constructor() result(this)

Author
Christopher MacMackin
Date
April 2016

Instantiates a ground object.

Arguments

None

Return Value type(ground)

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.

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.

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.

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.

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.


Subroutines

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.

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.

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.

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