Provides a concrete implementation of the glacier type, using a vertically integrated model of an ice sheet.
Creates a new ice_sheet object with initial conditions provided by the arguments. At present only a 1D model is supported. If information is provided for higher dimensions then it will be ignored.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in), | dimension(:,:) | :: | domain | An array containing the upper and lower limits of the domain for the ice sheet. 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(thickness_func) | :: | thickness | A function which calculates the initial value of the thickness of the ice sheet at a given location. |
|||
procedure(velocity_func) | :: | velocity | A function which calculates the initial value of the velocity (vector) of the ice at a given location in an ice sheet. |
|||
class(abstract_viscosity), | intent(in), | optional | :: | viscosity_law | An object which calculates the viscosity of the ice. |
|
real(kind=r8), | intent(in), | optional | :: | lambda | The dimensionless ratio $\lambda \equiv \frac{\rho_0m_0x_0}{\rho_iH-0u_0}$ |
|
real(kind=r8), | intent(in), | optional | :: | chi | The dimensionless ratio $\chi \equiv \frac{\rho_igh_0x_x}{2\eta_0u_0}$ |
An ice sheet object with its domain and initial conditions set according to the arguments of the constructor function.
A concrete implementation of the glacier type, using a vertically integrated model of an ice sheet. This model is 1-dimensional only.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(cheb1d_scalar_field), | private | :: | thickness | Thickness of ice sheet, $h$ |
|||
type(cheb1d_vector_field), | private | :: | velocity | Flow velocity of ice sheet, $\vec{u}$ |
|||
real(kind=r8), | private | :: | lambda | The dimensionless ratio $\lambda \equiv \frac{\rho_0m_0x_0}{\rho_iH-0u_0}$ |
|||
real(kind=r8), | private | :: | chi | The dimensionless ratio $\chi \equiv \frac{\rho_igh_0x_x}{2\eta_0u_0}$ |
|||
class(abstract_viscosity), | private, | allocatable | :: | viscosity_law | An object representing the model used for ice viscosity. |
||
real(kind=r8), | private | :: | time | The time at which the ice sheet is in this state |
private function constructor(domain, resolution, thickness, velocity, viscosity_law, lambda, chi) | Creates a new ice_sheet object with initial conditions provided by the arguments. At present only a 1D model is supported. If information is provided for higher dimensions then it will be ignored. |
generic, public :: assignment(=) => assign | |
procedure, public :: integrate => glacier_integrate | Performs a time-step of the integration, taking the state of the glacier to the specified time using the provided melt-rate data. |
procedure, public :: integrate_layers => glacier_integrate_layers | Dummy routine which can be over-ridden to integrate internal layers of the glacier to the specified time. |
procedure, public :: ice_thickness => sheet_thickness | |
procedure, public :: ice_density => sheet_density | |
procedure, public :: ice_temperature => sheet_temperature | |
procedure, public :: residual => sheet_residual | |
procedure, public :: update => sheet_update | |
procedure, public :: precondition => sheet_precondition | |
procedure, public :: set_time => sheet_set_time | |
procedure, public :: data_size => sheet_data_size | |
procedure, public :: state_vector => sheet_state_vector | |
procedure, public :: solve_velocity => sheet_solve_velocity | |
procedure, public :: read_data => sheet_read_data | |
procedure, public :: write_data => sheet_write_data | |
procedure, public :: time_step => sheet_time_step | |
procedure, private :: assign => sheet_assign |
Creates a new ice_sheet object with initial conditions provided by the arguments. At present only a 1D model is supported. If information is provided for higher dimensions then it will be ignored.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in), | dimension(:,:) | :: | domain | An array containing the upper and lower limits of the domain for the ice sheet. 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(thickness_func) | :: | thickness | A function which calculates the initial value of the thickness of the ice sheet at a given location. |
|||
procedure(velocity_func) | :: | velocity | A function which calculates the initial value of the velocity (vector) of the ice at a given location in an ice sheet. |
|||
class(abstract_viscosity), | intent(in), | optional | :: | viscosity_law | An object which calculates the viscosity of the ice. |
|
real(kind=r8), | intent(in), | optional | :: | lambda | The dimensionless ratio $\lambda \equiv \frac{\rho_0m_0x_0}{\rho_iH-0u_0}$ |
|
real(kind=r8), | intent(in), | optional | :: | chi | The dimensionless ratio $\chi \equiv \frac{\rho_igh_0x_x}{2\eta_0u_0}$ |
An ice sheet object with its domain and initial conditions set according to the arguments of the constructor function.
Returns the thickness of the ice sheet across its domain.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(in) | :: | this |
The ice thickness.
Returns the velocity of the ice sheet across its domain.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(in) | :: | this |
The ice velocity.
Returns the density of the ice in the sheet, which is assumed to be uniform across its domain.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(in) | :: | this |
The ice density.
Returns the density of the ice in the sheet, which is assumed to be uniform across its domain.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(in) | :: | this |
The ice density.
Returns the residual when the current state of the glacier is run through the system of equations describing it. The residual takes the form of a 1D array, with each element respresenting the residual for one of the equations in the system.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(in) | :: | this | |||
class(glacier), | intent(in), | dimension(:) | :: | previous_states | The states of the glacier in the previous time steps. The first element of the array should be the most recent. The default implementation will only make use of the most recent state, but the fact that this is an array allows overriding methods to use older states for higher-order integration methods. |
|
class(scalar_field), | intent(in) | :: | melt_rate | Thickness of the ice above the glacier. |
||
class(scalar_field), | intent(in) | :: | basal_drag_parameter | A paramter, e.g. coefficient of friction, needed to calculate the drag on basal surface of the glacier. |
||
real(kind=r8), | intent(in) | :: | water_density | The density of the water below the glacier. |
The residual of the system of equations describing the glacier.
Provides a preconditioner for the nonlinear solver trying to bring the residual to zero. The Jacobian is approximated as a block matrix, where each block is a tridiagonal matrix using a finite difference method for differentiation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(inout) | :: | this | |||
class(glacier), | intent(in), | dimension(:) | :: | previous_states | The states of the glacier in the previous time steps. The first element of the array should be the most recent. The default implementation will only make use of the most recent state, but the fact that this is an array allows overriding methods to use older states for higher-order integration methods. |
|
class(scalar_field), | intent(in) | :: | melt_rate | Thickness of the ice above the glacier |
||
class(scalar_field), | intent(in) | :: | basal_drag_parameter | A paramter, e.g. coefficient of friction, needed to calculate the drag on basal surface of the glacier. |
||
real(kind=r8), | intent(in) | :: | water_density | The density of the water below the glacier |
||
real(kind=r8), | intent(in), | dimension(:) | :: | delta_state | The change to the state vector which is being preconditioned. |
The result of applying the preconditioner to delta_state
.
Returns the number of elements in the ice sheet's state vector. This is the size of the vector returned by residual and state_vector and taken as an argument by update.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(in) | :: | this |
The number of elements in the ice sheet's state vector.
Returns the state vector for the current state of the ice sheet. This takes the form of a 1D array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(in) | :: | this |
The state vector describing the ice sheet.
Calculates the time step for integrating the ice sheet, using the CFL condition.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(in) | :: | this |
The time-step to use
Updates the state of the ice sheet from its state vector. The state vector is a real array containing the value of each of the ice sheet's properties at each of the locations on the grid used in descretization.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(inout) | :: | this | |||
real(kind=r8), | intent(in), | dimension(:) | :: | state_vector | A real array containing the data describing the state of the glacier. |
Sets the time information held by the ice sheet object. This is the time at which the ice sheet is in its current state.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(inout) | :: | this | |||
real(kind=r8), | intent(in) | :: | time | The time at which the glacier is in the present state. |
Computes the ice sheet velocity at the current time with the current ice thickness.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(inout) | :: | this | |||
class(scalar_field), | intent(in) | :: | basal_drag | A paramter, e.g. coefficient of friction, needed to calculate the drag on basal surface of the glacier. |
||
logical, | intent(out) | :: | success | True if the integration is successful, false otherwise |
Reads the state of the ice shelf object from the specified group in an HDF5 file. This sets the thickness, the velocity, and parameter values.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | 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. |
Writes the state of the ice sheet object to an HDF file in the specified group. This will consist of a thickness and a velocity dataset.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | 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 sheet's data. |
||
integer, | intent(out) | :: | error | Flag indicating whether routine ran without error. If no error occurs then has value 0. |
Copies the data from one ice sheet into another. This is only needed due to a bug in gfortran which means that the intrinsic assignment for glacier types is not using the appropriate defined assignment for the field components.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_sheet), | intent(out) | :: | this | |||
class(glacier), | intent(in) | :: | rhs | The ice sheet to be assigned to this one. |