state_vector Function

private function state_vector(this)

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


Contents

Source Code


Source Code

  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.
    !
    class(cryosphere), intent(in) :: this
    real(r8), dimension(:), allocatable :: state_vector
    state_vector = [this%ice%state_vector(), this%sub_ice%state_vector()]
  end function state_vector