cryosphere_mod Module

Provides a data structure representing a system of ice sheets and/or ice shelves, as well as the ground and/or ocean which they interact with. This is the fundamental data type of the ISOFT software suite.


Uses

  • module~~cryosphere_mod~~UsesGraph module~cryosphere_mod cryosphere_mod logger_mod logger_mod module~cryosphere_mod->logger_mod h5lt h5lt module~cryosphere_mod->h5lt hdf5 hdf5 module~cryosphere_mod->hdf5 module~glacier_mod glacier_mod module~cryosphere_mod->module~glacier_mod module~basal_surface_mod basal_surface_mod module~cryosphere_mod->module~basal_surface_mod module~meta_mod meta_mod module~cryosphere_mod->module~meta_mod iso_fortran_env iso_fortran_env module~cryosphere_mod->iso_fortran_env penf penf module~cryosphere_mod->penf module~nitsol_mod nitsol_mod module~cryosphere_mod->module~nitsol_mod module~glacier_mod->logger_mod module~glacier_mod->hdf5 module~glacier_mod->iso_fortran_env module~glacier_mod->penf module~glacier_mod->module~nitsol_mod factual_mod factual_mod module~glacier_mod->factual_mod module~basal_surface_mod->hdf5 module~basal_surface_mod->iso_fortran_env module~basal_surface_mod->module~nitsol_mod module~basal_surface_mod->factual_mod module~meta_mod->iso_fortran_env module~nitsol_mod->iso_fortran_env

Contents


Variables

TypeVisibility AttributesNameInitial
character(len=12), public, parameter:: hdf_glacier ='glacier'
character(len=18), public, parameter:: hdf_basal ='basal_surface'
character(len=13), public, parameter:: hdf_version ='isoft_version'
character(len=23), public, parameter:: hdf_comp_time ='binary_compilation_time'
character(len=16), public, parameter:: hdf_write_time ='data_output_time'
character(len=15), public, parameter:: hdf_simulation_time ='simulation_time'
character(len=25), public, parameter:: hdf_crash_file ='isoft_termination_dump.h5'

Derived Types

type, public :: cryosphere

A data structure representing glaciers, either as ice shelves or (eventually) ice sheets. It will allow coupled systems of glaciers as well as different basal couplings with the ocean or ground. This type is a subclass of the FOODIE integrand, allowing it to take advantage of that set of integration libraries for evolution in time.

Components

TypeVisibility AttributesNameInitial
class(glacier), private, allocatable:: ice

A model for the ice shelf or ice sheet

class(basal_surface), private, allocatable:: sub_ice

A model for the ground or ocean underneath the ice

real(kind=r8), private :: time

The time in the simulation

logical, private :: first_integration

Indicates whether the cryosphere has been integrated before or not.

real(kind=r8), private :: dt_factor =1.0_r8

A factor by which to reduce the time step

real(kind=r8), private :: min_dt_factor =1e-3_r8

The smallest time step reduction to allow

logical, private :: performing_time_step

True if in the process of trying to get a time-step to successfully integrate.

Type-Bound Procedures

procedure, public :: initialise
procedure, public :: time_step
procedure, public :: reduce_time_step
procedure, public :: increase_time_step
procedure, public :: state_vector
procedure, public :: integrate
procedure, public :: read_data
procedure, public :: read_ice
procedure, public :: read_sub_ice
procedure, public :: write_data
procedure, public :: get_time

Functions

private function time_step(this)

Author
Chris MacMackin
Date
December 2016

Calculates an appropriate time step with which to integrate the cryosphere so as not to cause numerical instability.

Arguments

Type IntentOptional AttributesName
class(cryosphere), intent(inout) :: this

Return Value real(kind=r8)

private function state_vector(this)

Author
Chris MacMackin
Date
April 2017

Returns the state vector for the current state of the cryosphere. This takes the form of a 1D array. This routine is mainly useful for unit-testing.

Arguments

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

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

private pure function get_time(this)

Author
Chris MacMackin
Date
April 2017

Returns the current time of the cryosphere system.

Arguments

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

Return Value real(kind=r8)


Subroutines

private subroutine initialise(this, ice, sub_ice)

Author
Christopher MacMackin
Date
November 2016

Initialise a cryosphere object from the provided components. This object will model the evolution of a glacier/ice shelf/ice sheet and its surroundings.

Arguments

Type IntentOptional AttributesName
class(cryosphere), intent(out) :: this
class(glacier), intent(inout), allocatable:: ice

An object modelling the ice sheet or shelf component of this system. Will be deallocated on return.

class(basal_surface), intent(inout), allocatable:: sub_ice

An object modelling the component of this system beneath the ice. Will be deallocated on return.

private subroutine reduce_time_step(this)

Author
Christopher MacMackin
Date
April 2017

Reuces the time step by a factor of 2, unless doing so would take it below the minimum value.

Arguments

Type IntentOptional AttributesName
class(cryosphere), intent(inout) :: this

private subroutine increase_time_step(this)

Author
Christopher MacMackin
Date
April 2017

Increases the time step by a factor of 2, unless doing so would take it above the maximum.

Arguments

Type IntentOptional AttributesName
class(cryosphere), intent(inout) :: this

private subroutine integrate(this, time)

Author
Christopher MacMackin
Date
April 2016

Integrates the cryosphere forward until the specified time is reached.

Arguments

Type IntentOptional AttributesName
class(cryosphere), intent(inout) :: this
real(kind=r8), intent(in) :: time

The time to which to integrate the cryosphere

private subroutine read_data(this, infile, set_time)

Author
Christopher MacMackin
Date
April 2017

Reads the data describing the cryosphere from an HDF5 file on the disc. h5open_f must have been called once prior to using this method. After the method has been used, h5close_f must be called once before the end of the program.

Arguments

Type IntentOptional AttributesName
class(cryosphere), intent(inout) :: this
character(len=*), intent(in) :: infile

The file from which to read the data describing the state of the cryosphere

logical, intent(in), optional :: set_time

If present and .true. then set the simulation time of the cryosphere to be the same as that in the HDF file. Otherwise, leave it unchanged.

private subroutine read_ice(this, infile, set_time)

Author
Christopher MacMackin
Date
December 2017

Reads the data describing the ice component of the cryosphere from an HDF5 file on the disc. Data on anything below the ice is ignored. h5open_f must have been called once prior to using this method. After the method has been used, h5close_f must be called once before the end of the program.

Arguments

Type IntentOptional AttributesName
class(cryosphere), intent(inout) :: this
character(len=*), intent(in) :: infile

The file from which to read the data describing the state of the cryosphere

logical, intent(in), optional :: set_time

If present and .true. then set the simulation time of the cryosphere to be the same as that in the HDF file. Otherwise, leave it unchanged.

private subroutine read_sub_ice(this, infile, set_time)

Author
Christopher MacMackin
Date
April 2017

Reads the data describing the part of the cryosphere beneath the ice from an HDF5 file on the disc. Data on the ice itself is ignored. h5open_f must have been called once prior to using this method. After the method has been used, h5close_f must be called once before the end of the program.

Arguments

Type IntentOptional AttributesName
class(cryosphere), intent(inout) :: this
character(len=*), intent(in) :: infile

The file from which to read the data describing the state of the cryosphere

logical, intent(in), optional :: set_time

If present and .true. then set the simulation time of the cryosphere to be the same as that in the HDF file. Otherwise, leave it unchanged.

private subroutine write_data(this, outfile)

Author
Christopher MacMackin
Date
April 2016

Writes the data describing the cryosphere to the disc as an HDF5 file. h5open_f must have been called once prior to using this method. After the method has been used, h5close_f must be called once before the end of the program.

Arguments

Type IntentOptional AttributesName
class(cryosphere), intent(in) :: this
character(len=*), intent(in) :: outfile

The file to which to write the data describing the state of the cryosphere