shelf_update Subroutine

private subroutine shelf_update(this, state_vector)

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

Arguments

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

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


Contents

Source Code


Source Code

  subroutine shelf_update(this, state_vector)
    !* Author: Christopher MacMackin
    !  Date: April 2016
    !
    ! Updates the state of the ice shelf from its state vector. The state
    ! vector is a real array containing the value of each of the ice shelf's
    ! properties at each of the locations on the grid used in discretization.
    !
    class(ice_shelf), intent(inout)     :: this
    real(r8), dimension(:), intent(in)  :: state_vector
      !! A real array containing the data describing the state of the
      !! glacier.
    !TODO: Add some assertion-like checks that the state vector is the right size
    call this%thickness%set_from_raw(state_vector(1:this%thickness_size))
    this%stale_jacobian = .true.
#ifdef DEBUG
    call logger%debug('ice_shelf%update','Updated state of ice shelf.')
#endif
  end subroutine shelf_update