| 1 | c $Header$ |
|---|
| 2 | SUBROUTINE calcratqs ( |
|---|
| 3 | I paprs,pplay,q_seri,d_t_con,d_t_ajs |
|---|
| 4 | O ,ratqs,zpt_conv) |
|---|
| 5 | IMPLICIT none |
|---|
| 6 | c====================================================================== |
|---|
| 7 | c |
|---|
| 8 | c Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818 |
|---|
| 9 | c |
|---|
| 10 | c Objet: Moniteur general de la physique du modele |
|---|
| 11 | cAA Modifications quant aux traceurs : |
|---|
| 12 | cAA - uniformisation des parametrisations ds phytrac |
|---|
| 13 | cAA - stockage des moyennes des champs necessaires |
|---|
| 14 | cAA en mode traceur off-line |
|---|
| 15 | c====================================================================== |
|---|
| 16 | c modif ( P. Le Van , 12/10/98 ) |
|---|
| 17 | c |
|---|
| 18 | c Arguments: |
|---|
| 19 | c |
|---|
| 20 | c paprs---input-R-pression pour chaque inter-couche (en Pa) |
|---|
| 21 | c pplay---input-R-pression pour le mileu de chaque couche (en Pa) |
|---|
| 22 | c presnivs-input_R_pressions approximat. des milieux couches ( en PA) |
|---|
| 23 | #include "dimensions.h" |
|---|
| 24 | #include "dimphy.h" |
|---|
| 25 | REAL paprs(klon,klev+1) |
|---|
| 26 | REAL pplay(klon,klev) |
|---|
| 27 | REAL d_t_con(klon,klev) |
|---|
| 28 | REAL d_t_ajs(klon,klev) |
|---|
| 29 | REAL ratqs(klon,klev) |
|---|
| 30 | LOGICAL pt_conv(klon,klev) |
|---|
| 31 | REAL q_seri(klon,klev) |
|---|
| 32 | |
|---|
| 33 | logical firstcall |
|---|
| 34 | save firstcall |
|---|
| 35 | data firstcall/.true./ |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | REAL ratqsmin,ratqsmax,zx,epmax |
|---|
| 39 | REAL ratqs1,ratqs2,ratqs3,ratqs4 |
|---|
| 40 | REAL ratqsc1,ratqsc2,ratqsc3,ratqsc4 |
|---|
| 41 | INTEGER i,k |
|---|
| 42 | INTEGER flag_ratqs |
|---|
| 43 | save ratqsmin,ratqsmax,flag_ratqs,epmax |
|---|
| 44 | save ratqs1,ratqs2,ratqs3,ratqs4 |
|---|
| 45 | save ratqsc1,ratqsc2,ratqsc3,ratqsc4 |
|---|
| 46 | real zpt_conv(klon,klev) |
|---|
| 47 | |
|---|
| 48 | REAL zx_min |
|---|
| 49 | PARAMETER (zx_min=1.0) |
|---|
| 50 | REAL zx_max |
|---|
| 51 | PARAMETER (zx_max=0.1) |
|---|
| 52 | |
|---|
| 53 | flag_ratqs=1 |
|---|
| 54 | flag_ratqs=0 |
|---|
| 55 | c |
|---|
| 56 | c Appeler le processus de condensation a grande echelle |
|---|
| 57 | c et le processus de precipitation |
|---|
| 58 | c |
|---|
| 59 | if (flag_ratqs.eq.0) then |
|---|
| 60 | |
|---|
| 61 | ratqsmax=0.01 |
|---|
| 62 | ratqsmin=0.3 |
|---|
| 63 | |
|---|
| 64 | if (firstcall) print*,'RATQS ANCIEN ' |
|---|
| 65 | do k=1,klev |
|---|
| 66 | do i=1,klon |
|---|
| 67 | zx = pplay(i,k)/paprs(i,1) |
|---|
| 68 | zx = (zx_max-zx)/(zx_max-zx_min) |
|---|
| 69 | zx = MIN(MAX(zx,0.0),1.0) |
|---|
| 70 | zx = zx * zx * zx |
|---|
| 71 | ratqs(i,k)= zx * (ratqsmax-ratqsmin) + ratqsmin |
|---|
| 72 | enddo |
|---|
| 73 | enddo |
|---|
| 74 | |
|---|
| 75 | else |
|---|
| 76 | |
|---|
| 77 | c On aplique un ratqs "interactif" a toutes les mailles affectees |
|---|
| 78 | c par la convection ou se trouvant "sous" une maille affectee. |
|---|
| 79 | do i=1,klon |
|---|
| 80 | pt_conv(i,klev)=.false. |
|---|
| 81 | enddo |
|---|
| 82 | do k=klev-1,1,-1 |
|---|
| 83 | do i=1,klon |
|---|
| 84 | pt_conv(i,k)=pt_conv(i,k+1).or. |
|---|
| 85 | s (abs(d_t_con(i,k))+abs(d_t_ajs(i,k))).gt.1.e-8 |
|---|
| 86 | if(pt_conv(i,k)) then |
|---|
| 87 | zpt_conv(i,k)=1. |
|---|
| 88 | else |
|---|
| 89 | zpt_conv(i,k)=0. |
|---|
| 90 | endif |
|---|
| 91 | enddo |
|---|
| 92 | enddo |
|---|
| 93 | |
|---|
| 94 | if (flag_ratqs.eq.1) then |
|---|
| 95 | |
|---|
| 96 | ratqsmin=0.4 |
|---|
| 97 | ratqsmax=0.99 |
|---|
| 98 | if (firstcall) print*,'RATQS INTERACTIF ' |
|---|
| 99 | do k=1,klev |
|---|
| 100 | do i=1,klon |
|---|
| 101 | if (pt_conv(i,k)) then |
|---|
| 102 | ratqs(i,k)=0.01 |
|---|
| 103 | s +0.25*(q_seri(i,1)-q_seri(i,k))/q_seri(i,k) |
|---|
| 104 | ratqs(i,k)=min(ratqs(i,k),ratqsmax) |
|---|
| 105 | ratqs(i,k)=max(ratqs(i,k),0.1) |
|---|
| 106 | else |
|---|
| 107 | ratqs(i,k)=0.01+(ratqsmin-0.01)* |
|---|
| 108 | s min((paprs(i,1)-pplay(i,k))/(paprs(i,1)-30000.),1.) |
|---|
| 109 | endif |
|---|
| 110 | enddo |
|---|
| 111 | enddo |
|---|
| 112 | else if (flag_ratqs.eq.2) then |
|---|
| 113 | do k=1,klev |
|---|
| 114 | do i=1,klon |
|---|
| 115 | ratqs(i,k)=0.001+ |
|---|
| 116 | s (q_seri(i,1)-q_seri(i,k))/q_seri(i,k) |
|---|
| 117 | if (pt_conv(i,k)) then |
|---|
| 118 | ratqs(i,k)=min(ratqs(i,k),ratqsmax) |
|---|
| 119 | else |
|---|
| 120 | ratqs(i,k)=min(ratqs(i,k),ratqsmin) |
|---|
| 121 | endif |
|---|
| 122 | enddo |
|---|
| 123 | enddo |
|---|
| 124 | else |
|---|
| 125 | do k=1,klev |
|---|
| 126 | do i=1,klon |
|---|
| 127 | if (pplay(i,k).ge.95000.) then |
|---|
| 128 | if (pt_conv(i,k)) then |
|---|
| 129 | ratqs(i,k)=ratqsc1 |
|---|
| 130 | else |
|---|
| 131 | ratqs(i,k)=ratqs1 |
|---|
| 132 | endif |
|---|
| 133 | else if (pplay(i,k).ge.75000.) then |
|---|
| 134 | if (pt_conv(i,k)) then |
|---|
| 135 | ratqs(i,k)=ratqsc2 |
|---|
| 136 | else |
|---|
| 137 | ratqs(i,k)=ratqs2 |
|---|
| 138 | endif |
|---|
| 139 | else if (pplay(i,k).ge.50000.) then |
|---|
| 140 | if (pt_conv(i,k)) then |
|---|
| 141 | ratqs(i,k)=ratqsc3 |
|---|
| 142 | else |
|---|
| 143 | ratqs(i,k)=ratqs3 |
|---|
| 144 | endif |
|---|
| 145 | else |
|---|
| 146 | if (pt_conv(i,k)) then |
|---|
| 147 | ratqs(i,k)=ratqsc4 |
|---|
| 148 | else |
|---|
| 149 | ratqs(i,k)=ratqs4 |
|---|
| 150 | endif |
|---|
| 151 | endif |
|---|
| 152 | enddo |
|---|
| 153 | enddo |
|---|
| 154 | endif |
|---|
| 155 | |
|---|
| 156 | endif |
|---|
| 157 | |
|---|
| 158 | firstcall=.false. |
|---|
| 159 | |
|---|
| 160 | return |
|---|
| 161 | end |
|---|