alloc_array Subroutine

private subroutine alloc_array(nxg, nyg, nzg)

Uses

subroutine allocates allocatable arrays

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nxg

grid size

integer, intent(in) :: nyg

grid size

integer, intent(in) :: nzg

grid size


Source Code

        subroutine alloc_array(nxg, nyg, nzg)
        !!  subroutine allocates allocatable arrays  
  
            use iarray
            !> grid size
            integer, intent(IN) :: nxg, nyg, nzg

            if(allocated(phasor))call dealloc_array()

            allocate(phasor(nxg, nyg, nzg), phasorGLOBAL(nxg, nyg, nzg))
            allocate(jmean(nxg, nyg, nzg), jmeanGLOBAL(nxg, nyg, nzg))
            allocate(absorb(nxg, nyg, nzg), absorbGLOBAL(nxg, nyg, nzg))

        end subroutine alloc_array