[524] | 1 | ! |
---|
| 2 | ! $Header$ |
---|
| 3 | ! |
---|
| 4 | SUBROUTINE concvl (iflag_con,dtime,paprs,pplay,t,q,u,v,tra,ntra, |
---|
| 5 | . work1,work2,d_t,d_q,d_u,d_v,d_tra, |
---|
| 6 | . rain, snow, kbas, ktop, |
---|
| 7 | . upwd,dnwd,dnwdbis,Ma,cape,tvp,iflag, |
---|
| 8 | . pbase,bbase,dtvpdt1,dtvpdq1,dplcldt,dplcldr, |
---|
[619] | 9 | . qcondc,wd, |
---|
| 10 | . pmflxr,pmflxs, |
---|
| 11 | . da,phi,mp) |
---|
[524] | 12 | |
---|
| 13 | c |
---|
[766] | 14 | USE dimphy |
---|
[524] | 15 | IMPLICIT none |
---|
| 16 | c====================================================================== |
---|
| 17 | c Auteur(s): Z.X. Li (LMD/CNRS) date: 19930818 |
---|
| 18 | c Objet: schema de convection de Emanuel (1991) interface |
---|
| 19 | c====================================================================== |
---|
| 20 | c Arguments: |
---|
| 21 | c dtime--input-R-pas d'integration (s) |
---|
| 22 | c s-------input-R-la valeur "s" pour chaque couche |
---|
| 23 | c sigs----input-R-la valeur "sigma" de chaque couche |
---|
| 24 | c sig-----input-R-la valeur de "sigma" pour chaque niveau |
---|
| 25 | c psolpa--input-R-la pression au sol (en Pa) |
---|
| 26 | C pskapa--input-R-exponentiel kappa de psolpa |
---|
| 27 | c h-------input-R-enthalpie potentielle (Cp*T/P**kappa) |
---|
| 28 | c q-------input-R-vapeur d'eau (en kg/kg) |
---|
| 29 | c |
---|
| 30 | c work*: input et output: deux variables de travail, |
---|
| 31 | c on peut les mettre a 0 au debut |
---|
| 32 | c ALE-----input-R-energie disponible pour soulevement |
---|
| 33 | c |
---|
| 34 | C d_h-----output-R-increment de l'enthalpie potentielle (h) |
---|
| 35 | c d_q-----output-R-increment de la vapeur d'eau |
---|
| 36 | c rain----output-R-la pluie (mm/s) |
---|
| 37 | c snow----output-R-la neige (mm/s) |
---|
| 38 | c upwd----output-R-saturated updraft mass flux (kg/m**2/s) |
---|
| 39 | c dnwd----output-R-saturated downdraft mass flux (kg/m**2/s) |
---|
| 40 | c dnwd0---output-R-unsaturated downdraft mass flux (kg/m**2/s) |
---|
| 41 | c Cape----output-R-CAPE (J/kg) |
---|
| 42 | c Tvp-----output-R-Temperature virtuelle d'une parcelle soulevee |
---|
| 43 | c adiabatiquement a partir du niveau 1 (K) |
---|
| 44 | c deltapb-output-R-distance entre LCL et base de la colonne (<0 ; Pa) |
---|
| 45 | c Ice_flag-input-L-TRUE->prise en compte de la thermodynamique de la glace |
---|
| 46 | c====================================================================== |
---|
| 47 | c |
---|
| 48 | #include "dimensions.h" |
---|
[766] | 49 | cym#include "dimphy.h" |
---|
[524] | 50 | c |
---|
| 51 | integer NTRAC |
---|
| 52 | PARAMETER (NTRAC=nqmx-2) |
---|
| 53 | c |
---|
| 54 | INTEGER iflag_con |
---|
| 55 | c |
---|
| 56 | REAL dtime, paprs(klon,klev+1),pplay(klon,klev) |
---|
| 57 | REAL t(klon,klev),q(klon,klev),u(klon,klev),v(klon,klev) |
---|
| 58 | REAL tra(klon,klev,ntrac) |
---|
| 59 | INTEGER ntra |
---|
| 60 | REAL work1(klon,klev),work2(klon,klev) |
---|
[619] | 61 | REAL pmflxr(klon,klev+1),pmflxs(klon,klev+1) |
---|
[524] | 62 | c |
---|
| 63 | REAL d_t(klon,klev),d_q(klon,klev),d_u(klon,klev),d_v(klon,klev) |
---|
| 64 | REAL d_tra(klon,klev,ntrac) |
---|
| 65 | REAL rain(klon),snow(klon) |
---|
| 66 | c |
---|
| 67 | INTEGER kbas(klon),ktop(klon) |
---|
| 68 | REAL em_ph(klon,klev+1),em_p(klon,klev) |
---|
| 69 | REAL upwd(klon,klev),dnwd(klon,klev),dnwdbis(klon,klev) |
---|
| 70 | REAL Ma(klon,klev),cape(klon),tvp(klon,klev) |
---|
[619] | 71 | real da(klon,klev),phi(klon,klev,klev),mp(klon,klev) |
---|
[524] | 72 | INTEGER iflag(klon) |
---|
| 73 | REAL rflag(klon) |
---|
| 74 | REAL pbase(klon),bbase(klon) |
---|
| 75 | REAL dtvpdt1(klon,klev),dtvpdq1(klon,klev) |
---|
| 76 | REAL dplcldt(klon),dplcldr(klon) |
---|
| 77 | REAL qcondc(klon,klev) |
---|
| 78 | REAL wd(klon) |
---|
| 79 | c |
---|
| 80 | REAL zx_t,zdelta,zx_qs,zcor |
---|
| 81 | c |
---|
| 82 | INTEGER noff, minorig |
---|
| 83 | INTEGER i,k,itra |
---|
| 84 | REAL qs(klon,klev) |
---|
[766] | 85 | cym REAL cbmf(klon) |
---|
| 86 | cym SAVE cbmf |
---|
| 87 | REAL,ALLOCATABLE,SAVE :: cbmf(:) |
---|
| 88 | c$OMP THREADPRIVATE(cbmf) |
---|
[524] | 89 | INTEGER ifrst |
---|
| 90 | SAVE ifrst |
---|
| 91 | DATA ifrst /0/ |
---|
[766] | 92 | c$OMP THREADPRIVATE(ifrst) |
---|
| 93 | |
---|
[524] | 94 | #include "YOMCST.h" |
---|
| 95 | #include "YOETHF.h" |
---|
| 96 | #include "FCTTRE.h" |
---|
| 97 | c |
---|
| 98 | c |
---|
[559] | 99 | cym |
---|
| 100 | snow(:)=0 |
---|
| 101 | |
---|
[524] | 102 | IF (ifrst .EQ. 0) THEN |
---|
| 103 | ifrst = 1 |
---|
[766] | 104 | allocate(cbmf(klon)) |
---|
[524] | 105 | DO i = 1, klon |
---|
| 106 | cbmf(i) = 0. |
---|
| 107 | ENDDO |
---|
| 108 | ENDIF |
---|
| 109 | |
---|
| 110 | DO k = 1, klev+1 |
---|
| 111 | DO i=1,klon |
---|
| 112 | em_ph(i,k) = paprs(i,k) / 100.0 |
---|
[619] | 113 | pmflxs(i,k)=0. |
---|
[524] | 114 | ENDDO |
---|
| 115 | ENDDO |
---|
| 116 | c |
---|
| 117 | DO k = 1, klev |
---|
| 118 | DO i=1,klon |
---|
| 119 | em_p(i,k) = pplay(i,k) / 100.0 |
---|
| 120 | ENDDO |
---|
| 121 | ENDDO |
---|
| 122 | |
---|
| 123 | c |
---|
| 124 | if (iflag_con .eq. 4) then |
---|
| 125 | DO k = 1, klev |
---|
| 126 | DO i = 1, klon |
---|
| 127 | zx_t = t(i,k) |
---|
| 128 | zdelta=MAX(0.,SIGN(1.,rtt-zx_t)) |
---|
| 129 | zx_qs= MIN(0.5 , r2es * FOEEW(zx_t,zdelta)/em_p(i,k)/100.0) |
---|
| 130 | zcor=1./(1.-retv*zx_qs) |
---|
| 131 | qs(i,k)=zx_qs*zcor |
---|
| 132 | ENDDO |
---|
| 133 | ENDDO |
---|
| 134 | else ! iflag_con=3 (modif de puristes qui fait la diffce pour la convergence numerique) |
---|
| 135 | DO k = 1, klev |
---|
| 136 | DO i = 1, klon |
---|
| 137 | zx_t = t(i,k) |
---|
| 138 | zdelta=MAX(0.,SIGN(1.,rtt-zx_t)) |
---|
| 139 | zx_qs= r2es * FOEEW(zx_t,zdelta)/em_p(i,k)/100.0 |
---|
| 140 | zx_qs= MIN(0.5,zx_qs) |
---|
| 141 | zcor=1./(1.-retv*zx_qs) |
---|
| 142 | zx_qs=zx_qs*zcor |
---|
| 143 | qs(i,k)=zx_qs |
---|
| 144 | ENDDO |
---|
| 145 | ENDDO |
---|
| 146 | endif ! iflag_con |
---|
| 147 | c |
---|
| 148 | C------------------------------------------------------------------ |
---|
| 149 | |
---|
| 150 | C Main driver for convection: |
---|
| 151 | C iflag_con = 3 -> equivalent to convect3 |
---|
| 152 | C iflag_con = 4 -> equivalent to convect1/2 |
---|
| 153 | |
---|
| 154 | CALL cv_driver(klon,klev,klev+1,ntra,iflag_con, |
---|
| 155 | : t,q,qs,u,v,tra, |
---|
| 156 | $ em_p,em_ph,iflag, |
---|
| 157 | $ d_t,d_q,d_u,d_v,d_tra,rain, |
---|
[619] | 158 | $ pmflxr,cbmf,work1,work2, |
---|
| 159 | $ kbas,ktop, |
---|
| 160 | $ dtime,Ma,upwd,dnwd,dnwdbis,qcondc,wd,cape, |
---|
| 161 | $ da,phi,mp) |
---|
[524] | 162 | |
---|
| 163 | C------------------------------------------------------------------ |
---|
| 164 | |
---|
| 165 | DO i = 1,klon |
---|
| 166 | rain(i) = rain(i)/86400. |
---|
| 167 | rflag(i)=iflag(i) |
---|
| 168 | ENDDO |
---|
| 169 | |
---|
| 170 | DO k = 1, klev |
---|
| 171 | DO i = 1, klon |
---|
| 172 | d_t(i,k) = dtime*d_t(i,k) |
---|
| 173 | d_q(i,k) = dtime*d_q(i,k) |
---|
| 174 | d_u(i,k) = dtime*d_u(i,k) |
---|
| 175 | d_v(i,k) = dtime*d_v(i,k) |
---|
| 176 | ENDDO |
---|
| 177 | ENDDO |
---|
[619] | 178 | DO itra = 1,ntra |
---|
| 179 | DO k = 1, klev |
---|
| 180 | DO i = 1, klon |
---|
| 181 | d_tra(i,k,itra) =dtime*d_tra(i,k,itra) |
---|
| 182 | ENDDO |
---|
| 183 | ENDDO |
---|
| 184 | ENDDO |
---|
[524] | 185 | c les traceurs ne sont pas mis dans cette version de convect4: |
---|
| 186 | if (iflag_con.eq.4) then |
---|
| 187 | DO itra = 1,ntra |
---|
| 188 | DO k = 1, klev |
---|
| 189 | DO i = 1, klon |
---|
| 190 | d_tra(i,k,itra) = 0. |
---|
| 191 | ENDDO |
---|
| 192 | ENDDO |
---|
| 193 | ENDDO |
---|
| 194 | endif |
---|
| 195 | |
---|
| 196 | RETURN |
---|
| 197 | END |
---|
| 198 | |
---|