Initialise a cryosphere object from the provided components. This object will model the evolution of a glacier/ice shelf/ice sheet and its surroundings.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
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.
!
class(cryosphere), intent(out) :: this
class(glacier), allocatable, intent(inout) :: ice
!! An object modelling the ice sheet or shelf component of this
!! system. Will be deallocated on return.
class(basal_surface), allocatable, intent(inout) :: sub_ice
!! An object modelling the component of this system beneath the
!! ice. Will be deallocated on return.
call move_alloc(ice, this%ice)
call move_alloc(sub_ice, this%sub_ice)
this%time = 0.0_r8
this%first_integration = .true.
#ifdef DEBUG
call logger%debug('cryosphere','Instantiated new cryosphere object.')
#endif
end subroutine initialise