init_dvtype_3 Subroutine

private subroutine init_dvtype_3(dv, nspec)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(dens_vel_diagnostics), intent(inout), dimension(:,:,:) :: dv
integer, intent(in) :: nspec

Contents

Source Code


Source Code

  subroutine init_dvtype_3 (dv, nspec)
    implicit none
    type (dens_vel_diagnostics), dimension(:,:,:), intent(in out) :: dv
    integer, intent (in) :: nspec
    integer :: l, m, n, lmax, mmax, nmax

    lmax = size(dv, 1)
    mmax = size(dv, 2)
    nmax = size(dv, 3)

    do n = 1, nmax
       do m = 1, mmax
          do l = 1, lmax    
             allocate (dv(l,m,n) % dvpar(nspec))
             allocate (dv(l,m,n) % dvperp(nspec))    
             allocate (dv(l,m,n) % dn(nspec))  
          end do
       end do 
    end do

    call zero_dvtype (dv)

  end subroutine init_dvtype_3