init_dvtype_2 Subroutine

private subroutine init_dvtype_2(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_2 (dv, nspec)
    implicit none
    type (dens_vel_diagnostics), dimension(:,:), intent(in out) :: dv
    integer, intent (in) :: nspec
    integer :: m, n, mmax, nmax

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

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

    call zero_dvtype (dv)

  end subroutine init_dvtype_2