--- trunk/Sources/phylmd/CV3_routines/cv3_mixing.f 2016/03/11 18:47:26 178 +++ trunk/Sources/phylmd/CV30_routines/cv30_mixing.f 2016/03/29 15:20:23 189 @@ -1,24 +1,24 @@ -module cv3_mixing_m +module cv30_mixing_m implicit none contains - SUBROUTINE cv3_mixing(nloc, ncum, nd, na, icb, nk, inb, t, rr, rs, u, v, h, & + SUBROUTINE cv30_mixing(nloc, ncum, nd, na, icb, nk, inb, t, rr, rs, u, v, h, & lv, hp, ep, clw, m, sig, ment, qent, uent, vent, nent, sij, elij, & ments, qents) - use cv3_param_m + 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,12 +44,12 @@ 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 nent(i, j)=0 - ! in convect3, m is computed in cv3_closure + ! in convect3, m is computed in cv30_closure ! ori m(i, 1)=0.0 end do end do @@ -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. @@ -316,6 +313,6 @@ enddo enddo - end SUBROUTINE cv3_mixing + end SUBROUTINE cv30_mixing -end module cv3_mixing_m +end module cv30_mixing_m