10 |
use cv30_param_m |
use cv30_param_m |
11 |
use cvthermo |
use cvthermo |
12 |
|
|
13 |
!--------------------------------------------------------------------- |
! |
14 |
! a faire: |
! a faire: |
15 |
! - changer rr(il, 1) -> qnk(il) |
! - changer rr(il, 1) -> qnk(il) |
16 |
! - vectorisation de la partie normalisation des flux (do 789) |
! - vectorisation de la partie normalisation des flux (do 789) |
17 |
!--------------------------------------------------------------------- |
! |
18 |
|
|
19 |
! inputs: |
! inputs: |
20 |
integer, intent(in):: ncum, nd, na, nloc |
integer, intent(in):: ncum, nd, na, nloc |
44 |
real zm(nloc, na) |
real zm(nloc, na) |
45 |
logical lwork(nloc) |
logical lwork(nloc) |
46 |
|
|
47 |
! --- INITIALIZE VARIOUS ARRAYS USED IN THE COMPUTATIONS |
! INITIALIZE VARIOUS ARRAYS USED IN THE COMPUTATIONS |
48 |
|
|
49 |
do j=1, nl |
do j=1, nl |
50 |
do i=1, ncum |
do i=1, ncum |
73 |
|
|
74 |
zm(:, :)=0. |
zm(:, :)=0. |
75 |
|
|
76 |
! --- CALCULATE ENTRAINED AIR MASS FLUX (ment), TOTAL WATER MIXING |
! CALCULATE ENTRAINED AIR MASS FLUX (ment), TOTAL WATER MIXING |
77 |
! --- RATIO (QENT), TOTAL CONDENSED WATER (elij), AND MIXING |
! RATIO (QENT), TOTAL CONDENSED WATER (elij), AND MIXING |
78 |
! --- FRACTION (sij) |
! FRACTION (sij) |
79 |
|
|
80 |
do i=minorig+1, nl |
do i=minorig+1, nl |
81 |
|
|
120 |
end do |
end do |
121 |
end do |
end do |
122 |
|
|
123 |
! *** if no air can entrain at level i assume that updraft detrains *** |
! if no air can entrain at level i assume that updraft detrains |
124 |
! *** at that level and calculate detrained air flux and properties *** |
! at that level and calculate detrained air flux and properties |
125 |
|
|
126 |
do il=1, ncum |
do il=1, ncum |
127 |
if ((i >= icb(il)).and.(i <= inb(il)).and.(nent(il, i) == 0)) then |
if ((i >= icb(il)).and.(i <= inb(il)).and.(nent(il, i) == 0)) then |
137 |
end do |
end do |
138 |
end do |
end do |
139 |
|
|
140 |
! --- NORMALIZE ENTRAINED AIR MASS FLUXES |
! NORMALIZE ENTRAINED AIR MASS FLUXES |
141 |
! --- TO REPRESENT EQUAL PROBABILITIES OF MIXING |
! TO REPRESENT EQUAL PROBABILITIES OF MIXING |
142 |
|
|
143 |
asum = 0. |
asum = 0. |
144 |
csum = 0. |
csum = 0. |