Free a 3-dimensional array of reals
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string |
Human-readable description string of the deallocation operation, just for output purpose. |
||
real(kind=rp), | intent(inout), | allocatable | :: | v(:,:,:) |
Array to free |
subroutine r_free3(string, v)
!! Free a 3-dimensional array of reals
character (len=*), intent(in) :: string
!! Human-readable description string of the deallocation
!! operation, just for output purpose.
real(rp), allocatable, intent(inout) :: v(:,:,:)
!! Array to free
integer(ip) :: istat, ltot
if(allocated(v)) then
ltot = size(v) * size_of_real
deallocate(v, stat=istat)
call chk_free(string, ltot, istat)
end if
end subroutine r_free3