Returns the a vector representing the current state of the internal reflectors in the ice shelf. This takes the form of a 1D array. The routien is only used for debugging purposes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ice_shelf), | intent(in) | :: | this |
The state vector describing the ice shelf.
function shelf_kappa_vector(this) result(kappa_vector)
!* Author: Christopher MacMackin
! Date: April 2016
!
! Returns the a vector representing the current state of the
! internal reflectors in the ice shelf. This takes the form of a
! 1D array. The routien is only used for debugging purposes.
!
class(ice_shelf), intent(in) :: this
real(r8), dimension(:), allocatable :: kappa_vector
!! The state vector describing the ice shelf.
integer :: i
if (allocated(this%kappa)) then
allocate(kappa_vector(this%thickness_size*size(this%kappa)))
do i = 1, size(this%kappa)
kappa_vector((i-1)*this%thickness_size + 1:this%thickness_size*i) = this%kappa(i)%raw()
end do
end if
#ifdef DEBUG
call logger%debug('ice_shelf%state_vector','Returning state vector '// &
'for ice shelf.')
#endif
end function shelf_kappa_vector