--- trunk/Sources/phylmd/CV30_routines/cv30_mixing.f 2016/03/16 15:04:46 185 +++ trunk/Sources/phylmd/CV30_routines/cv30_mixing.f 2016/03/29 15:20:23 189 @@ -10,15 +10,15 @@ use cv30_param_m use cvthermo - !--------------------------------------------------------------------- + ! ! a faire: ! - changer rr(il, 1) -> qnk(il) ! - vectorisation de la partie normalisation des flux (do 789) - !--------------------------------------------------------------------- + ! ! inputs: integer, intent(in):: ncum, nd, na, nloc - integer icb(nloc), inb(nloc), nk(nloc) + integer, intent(in):: icb(nloc), inb(nloc), nk(nloc) real sig(nloc, nd) real t(nloc, nd), rr(nloc, nd), rs(nloc, nd) real u(nloc, nd), v(nloc, nd) @@ -44,7 +44,7 @@ real zm(nloc, na) logical lwork(nloc) - ! --- INITIALIZE VARIOUS ARRAYS USED IN THE COMPUTATIONS + ! INITIALIZE VARIOUS ARRAYS USED IN THE COMPUTATIONS do j=1, nl do i=1, ncum @@ -73,9 +73,9 @@ zm(:, :)=0. - ! --- CALCULATE ENTRAINED AIR MASS FLUX (ment), TOTAL WATER MIXING - ! --- RATIO (QENT), TOTAL CONDENSED WATER (elij), AND MIXING - ! --- FRACTION (sij) + ! CALCULATE ENTRAINED AIR MASS FLUX (ment), TOTAL WATER MIXING + ! RATIO (QENT), TOTAL CONDENSED WATER (elij), AND MIXING + ! FRACTION (sij) do i=minorig+1, nl @@ -120,10 +120,8 @@ end do end do - ! *** if no air can entrain at level i assume that updraft detrains *** - ! *** at that level and calculate detrained air flux and properties *** - - !@ do 170 i=icb(il), inb(il) + ! if no air can entrain at level i assume that updraft detrains + ! at that level and calculate detrained air flux and properties do il=1, ncum if ((i >= icb(il)).and.(i <= inb(il)).and.(nent(il, i) == 0)) then @@ -139,12 +137,11 @@ end do end do - ! --- NORMALIZE ENTRAINED AIR MASS FLUXES - ! --- TO REPRESENT EQUAL PROBABILITIES OF MIXING + ! NORMALIZE ENTRAINED AIR MASS FLUXES + ! TO REPRESENT EQUAL PROBABILITIES OF MIXING - call zilch(asum, nloc*nd) - call zilch(csum, nloc*nd) - call zilch(csum, nloc*nd) + asum = 0. + csum = 0. do il=1, ncum lwork(il) = .FALSE.