[1992] | 1 | |
---|
[1403] | 2 | ! $Id: cva_driver.F90 2311 2015-06-25 07:45:24Z musat $ |
---|
[1774] | 3 | |
---|
[2259] | 4 | SUBROUTINE cva_driver(len, nd, ndp1, ntra, nloc, k_upper, & |
---|
[2007] | 5 | iflag_con, iflag_mix, iflag_ice_thermo, iflag_clos, ok_conserv_q, & |
---|
[2253] | 6 | !! delt, t1, q1, qs1, t1_wake, q1_wake, qs1_wake, s1_wake, & ! jyg |
---|
| 7 | delt, comp_threshold, & ! jyg |
---|
| 8 | t1, q1, qs1, t1_wake, q1_wake, qs1_wake, s1_wake, & ! jyg |
---|
[2007] | 9 | u1, v1, tra1, & |
---|
| 10 | p1, ph1, & |
---|
[2201] | 11 | Ale1, Alp1, omega1, & |
---|
[2007] | 12 | sig1feed1, sig2feed1, wght1, & |
---|
| 13 | iflag1, ft1, fq1, fu1, fv1, ftra1, & |
---|
| 14 | precip1, kbas1, ktop1, & |
---|
| 15 | cbmf1, plcl1, plfc1, wbeff1, & |
---|
| 16 | sig1, w01, & !input/output |
---|
| 17 | ptop21, sigd1, & |
---|
[2306] | 18 | ma1, mip1, Vprecip1, Vprecipi1, upwd1, dnwd1, dnwd01, & ! jyg |
---|
[2007] | 19 | qcondc1, wd1, & |
---|
| 20 | cape1, cin1, tvp1, & |
---|
| 21 | ftd1, fqd1, & |
---|
| 22 | Plim11, Plim21, asupmax1, supmax01, asupmaxmin1, & |
---|
[2253] | 23 | lalim_conv1, & |
---|
[2007] | 24 | !! da1,phi1,mp1,phi21,d1a1,dam1,sigij1,clw1, & ! RomP |
---|
| 25 | !! elij1,evap1,ep1,epmlmMm1,eplaMm1, & ! RomP |
---|
| 26 | da1, phi1, mp1, phi21, d1a1, dam1, sigij1, wghti1, & ! RomP, RL |
---|
| 27 | clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP, RL |
---|
[2207] | 28 | wdtrainA1, wdtrainM1, qtc1, sigt1, tau_cld_cv, & |
---|
[2205] | 29 | coefw_cld_cv) ! RomP, AJ |
---|
[2007] | 30 | ! ************************************************************** |
---|
| 31 | ! * |
---|
| 32 | ! CV_DRIVER * |
---|
| 33 | ! * |
---|
| 34 | ! * |
---|
| 35 | ! written by : Sandrine Bony-Lena , 17/05/2003, 11.19.41 * |
---|
| 36 | ! modified by : * |
---|
| 37 | ! ************************************************************** |
---|
| 38 | ! ************************************************************** |
---|
[1403] | 39 | |
---|
[1992] | 40 | USE dimphy |
---|
[2311] | 41 | USE print_control_mod, ONLY: prt_level, lunout |
---|
[1992] | 42 | IMPLICIT NONE |
---|
[879] | 43 | |
---|
[2007] | 44 | ! .............................START PROLOGUE............................ |
---|
[879] | 45 | |
---|
| 46 | |
---|
[2007] | 47 | ! All argument names (except len,nd,ntra,nloc,delt and the flags) have a "1" appended. |
---|
| 48 | ! The "1" is removed for the corresponding compressed variables. |
---|
| 49 | ! PARAMETERS: |
---|
| 50 | ! Name Type Usage Description |
---|
| 51 | ! ---------- ---------- ------- ---------------------------- |
---|
[879] | 52 | |
---|
[2007] | 53 | ! len Integer Input first (i) dimension |
---|
| 54 | ! nd Integer Input vertical (k) dimension |
---|
| 55 | ! ndp1 Integer Input nd + 1 |
---|
| 56 | ! ntra Integer Input number of tracors |
---|
[2259] | 57 | ! nloc Integer Input dimension of arrays for compressed fields |
---|
| 58 | ! k_upper Integer Input upmost level for vertical loops |
---|
[2007] | 59 | ! iflag_con Integer Input version of convect (3/4) |
---|
| 60 | ! iflag_mix Integer Input version of mixing (0/1/2) |
---|
| 61 | ! iflag_ice_thermo Integer Input accounting for ice thermodynamics (0/1) |
---|
| 62 | ! iflag_clos Integer Input version of closure (0/1) |
---|
[2205] | 63 | ! tau_cld_cv Real Input characteristic time of dissipation of mixing fluxes |
---|
| 64 | ! coefw_cld_cv Real Input coefficient for updraft velocity in convection |
---|
[2007] | 65 | ! ok_conserv_q Logical Input when true corrections for water conservation are swtiched on |
---|
| 66 | ! delt Real Input time step |
---|
[2253] | 67 | ! comp_threshold Real Input threshold on the fraction of convective points below which |
---|
| 68 | ! fields are compressed |
---|
[2007] | 69 | ! t1 Real Input temperature (sat draught envt) |
---|
| 70 | ! q1 Real Input specific hum (sat draught envt) |
---|
| 71 | ! qs1 Real Input sat specific hum (sat draught envt) |
---|
| 72 | ! t1_wake Real Input temperature (unsat draught envt) |
---|
| 73 | ! q1_wake Real Input specific hum(unsat draught envt) |
---|
| 74 | ! qs1_wake Real Input sat specific hum(unsat draughts envt) |
---|
| 75 | ! s1_wake Real Input fractionnal area covered by wakes |
---|
| 76 | ! u1 Real Input u-wind |
---|
| 77 | ! v1 Real Input v-wind |
---|
| 78 | ! tra1 Real Input tracors |
---|
| 79 | ! p1 Real Input full level pressure |
---|
| 80 | ! ph1 Real Input half level pressure |
---|
| 81 | ! ALE1 Real Input Available lifting Energy |
---|
| 82 | ! ALP1 Real Input Available lifting Power |
---|
| 83 | ! sig1feed1 Real Input sigma coord at lower bound of feeding layer |
---|
| 84 | ! sig2feed1 Real Input sigma coord at upper bound of feeding layer |
---|
| 85 | ! wght1 Real Input weight density determining the feeding mixture |
---|
| 86 | ! iflag1 Integer Output flag for Emanuel conditions |
---|
| 87 | ! ft1 Real Output temp tend |
---|
| 88 | ! fq1 Real Output spec hum tend |
---|
| 89 | ! fu1 Real Output u-wind tend |
---|
| 90 | ! fv1 Real Output v-wind tend |
---|
| 91 | ! ftra1 Real Output tracor tend |
---|
| 92 | ! precip1 Real Output precipitation |
---|
| 93 | ! kbas1 Integer Output cloud base level |
---|
| 94 | ! ktop1 Integer Output cloud top level |
---|
| 95 | ! cbmf1 Real Output cloud base mass flux |
---|
| 96 | ! sig1 Real In/Out section adiabatic updraft |
---|
| 97 | ! w01 Real In/Out vertical velocity within adiab updraft |
---|
| 98 | ! ptop21 Real In/Out top of entraining zone |
---|
| 99 | ! Ma1 Real Output mass flux adiabatic updraft |
---|
| 100 | ! mip1 Real Output mass flux shed by the adiabatic updraft |
---|
[2306] | 101 | ! Vprecip1 Real Output vertical profile of total precipitation |
---|
| 102 | ! Vprecipi1 Real Output vertical profile of ice precipitation |
---|
[2007] | 103 | ! upwd1 Real Output total upward mass flux (adiab+mixed) |
---|
| 104 | ! dnwd1 Real Output saturated downward mass flux (mixed) |
---|
| 105 | ! dnwd01 Real Output unsaturated downward mass flux |
---|
| 106 | ! qcondc1 Real Output in-cld mixing ratio of condensed water |
---|
| 107 | ! wd1 Real Output downdraft velocity scale for sfc fluxes |
---|
| 108 | ! cape1 Real Output CAPE |
---|
| 109 | ! cin1 Real Output CIN |
---|
| 110 | ! tvp1 Real Output adiab lifted parcell virt temp |
---|
| 111 | ! ftd1 Real Output precip temp tend |
---|
| 112 | ! fqt1 Real Output precip spec hum tend |
---|
| 113 | ! Plim11 Real Output |
---|
| 114 | ! Plim21 Real Output |
---|
| 115 | ! asupmax1 Real Output |
---|
| 116 | ! supmax01 Real Output |
---|
| 117 | ! asupmaxmin1 Real Output |
---|
[879] | 118 | |
---|
[2007] | 119 | ! ftd1 Real Output Array of temperature tendency due to precipitations (K/s) of dimension ND, |
---|
| 120 | ! defined at same grid levels as T, Q, QS and P. |
---|
[879] | 121 | |
---|
[2007] | 122 | ! fqd1 Real Output Array of specific humidity tendencies due to precipitations ((gm/gm)/s) |
---|
| 123 | ! of dimension ND, defined at same grid levels as T, Q, QS and P. |
---|
[879] | 124 | |
---|
[2007] | 125 | ! wdtrainA1 Real Output precipitation detrained from adiabatic draught; |
---|
| 126 | ! used in tracer transport (cvltr) |
---|
| 127 | ! wdtrainM1 Real Output precipitation detrained from mixed draughts; |
---|
| 128 | ! used in tracer transport (cvltr) |
---|
| 129 | ! da1 Real Output used in tracer transport (cvltr) |
---|
| 130 | ! phi1 Real Output used in tracer transport (cvltr) |
---|
| 131 | ! mp1 Real Output used in tracer transport (cvltr) |
---|
[2207] | 132 | ! qtc1 Real Output specific humidity in convection |
---|
| 133 | ! sigt1 Real Output surface fraction in adiabatic updrafts |
---|
[2007] | 134 | ! phi21 Real Output used in tracer transport (cvltr) |
---|
| 135 | |
---|
| 136 | ! d1a1 Real Output used in tracer transport (cvltr) |
---|
| 137 | ! dam1 Real Output used in tracer transport (cvltr) |
---|
| 138 | |
---|
| 139 | ! epmlmMm1 Real Output used in tracer transport (cvltr) |
---|
| 140 | ! eplaMm1 Real Output used in tracer transport (cvltr) |
---|
| 141 | |
---|
| 142 | ! evap1 Real Output |
---|
| 143 | ! ep1 Real Output |
---|
| 144 | ! sigij1 Real Output used in tracer transport (cvltr) |
---|
| 145 | ! elij1 Real Output |
---|
| 146 | ! wghti1 Real Output final weight of the feeding layers, |
---|
| 147 | ! used in tracer transport (cvltr) |
---|
[879] | 148 | |
---|
| 149 | |
---|
[2007] | 150 | ! S. Bony, Mar 2002: |
---|
| 151 | ! * Several modules corresponding to different physical processes |
---|
| 152 | ! * Several versions of convect may be used: |
---|
| 153 | ! - iflag_con=3: version lmd (previously named convect3) |
---|
| 154 | ! - iflag_con=4: version 4.3b (vect. version, previously convect1/2) |
---|
| 155 | ! + tard: - iflag_con=5: version lmd with ice (previously named convectg) |
---|
| 156 | ! S. Bony, Oct 2002: |
---|
| 157 | ! * Vectorization of convect3 (ie version lmd) |
---|
[879] | 158 | |
---|
[2007] | 159 | ! ..............................END PROLOGUE............................. |
---|
[879] | 160 | |
---|
| 161 | |
---|
[1992] | 162 | include "dimensions.h" |
---|
[2007] | 163 | !!!!!#include "dimphy.h" |
---|
[879] | 164 | |
---|
[2007] | 165 | ! Input |
---|
[2253] | 166 | INTEGER, INTENT (IN) :: len |
---|
| 167 | INTEGER, INTENT (IN) :: nd |
---|
| 168 | INTEGER, INTENT (IN) :: ndp1 |
---|
| 169 | INTEGER, INTENT (IN) :: ntra |
---|
[2259] | 170 | INTEGER, INTENT(IN) :: nloc ! (nloc=klon) pour l'instant |
---|
| 171 | INTEGER, INTENT (IN) :: k_upper |
---|
[2253] | 172 | INTEGER, INTENT (IN) :: iflag_con |
---|
| 173 | INTEGER, INTENT (IN) :: iflag_mix |
---|
| 174 | INTEGER, INTENT (IN) :: iflag_ice_thermo |
---|
| 175 | INTEGER, INTENT (IN) :: iflag_clos |
---|
| 176 | LOGICAL, INTENT (IN) :: ok_conserv_q |
---|
| 177 | REAL, INTENT (IN) :: tau_cld_cv |
---|
| 178 | REAL, INTENT (IN) :: coefw_cld_cv |
---|
| 179 | REAL, INTENT (IN) :: delt |
---|
| 180 | REAL, INTENT (IN) :: comp_threshold |
---|
| 181 | REAL, DIMENSION (len, nd), INTENT (IN) :: t1 |
---|
| 182 | REAL, DIMENSION (len, nd), INTENT (IN) :: q1 |
---|
| 183 | REAL, DIMENSION (len, nd), INTENT (IN) :: qs1 |
---|
| 184 | REAL, DIMENSION (len, nd), INTENT (IN) :: t1_wake |
---|
| 185 | REAL, DIMENSION (len, nd), INTENT (IN) :: q1_wake |
---|
| 186 | REAL, DIMENSION (len, nd), INTENT (IN) :: qs1_wake |
---|
| 187 | REAL, DIMENSION (len), INTENT (IN) :: s1_wake |
---|
| 188 | REAL, DIMENSION (len, nd), INTENT (IN) :: u1 |
---|
| 189 | REAL, DIMENSION (len, nd), INTENT (IN) :: v1 |
---|
| 190 | REAL, DIMENSION (len, nd, ntra), INTENT (IN) :: tra1 |
---|
| 191 | REAL, DIMENSION (len, nd), INTENT (IN) :: p1 |
---|
| 192 | REAL, DIMENSION (len, ndp1), INTENT (IN) :: ph1 |
---|
| 193 | REAL, DIMENSION (len), INTENT (IN) :: Ale1 |
---|
| 194 | REAL, DIMENSION (len), INTENT (IN) :: Alp1 |
---|
| 195 | REAL, DIMENSION (len, nd), INTENT (IN) :: omega1 |
---|
| 196 | REAL, INTENT (IN) :: sig1feed1 ! pressure at lower bound of feeding layer |
---|
| 197 | REAL, INTENT (IN) :: sig2feed1 ! pressure at upper bound of feeding layer |
---|
| 198 | REAL, DIMENSION (nd), INTENT (IN) :: wght1 ! weight density determining the feeding mixture |
---|
| 199 | INTEGER, DIMENSION (len), INTENT (IN) :: lalim_conv1 |
---|
[879] | 200 | |
---|
[2253] | 201 | ! Input/Output |
---|
| 202 | REAL, DIMENSION (len, nd), INTENT (INOUT) :: sig1 |
---|
| 203 | REAL, DIMENSION (len, nd), INTENT (INOUT) :: w01 |
---|
| 204 | |
---|
[2007] | 205 | ! Output |
---|
[2253] | 206 | INTEGER, DIMENSION (len), INTENT (OUT) :: iflag1 |
---|
| 207 | REAL, DIMENSION (len, nd), INTENT (OUT) :: ft1 |
---|
| 208 | REAL, DIMENSION (len, nd), INTENT (OUT) :: fq1 |
---|
| 209 | REAL, DIMENSION (len, nd), INTENT (OUT) :: fu1 |
---|
| 210 | REAL, DIMENSION (len, nd), INTENT (OUT) :: fv1 |
---|
| 211 | REAL, DIMENSION (len, nd, ntra), INTENT (OUT) :: ftra1 |
---|
| 212 | REAL, DIMENSION (len), INTENT (OUT) :: precip1 |
---|
| 213 | INTEGER, DIMENSION (len), INTENT (OUT) :: kbas1 |
---|
| 214 | INTEGER, DIMENSION (len), INTENT (OUT) :: ktop1 |
---|
| 215 | REAL, DIMENSION (len), INTENT (OUT) :: cbmf1 |
---|
| 216 | REAL, DIMENSION (len), INTENT (OUT) :: plcl1 |
---|
| 217 | REAL, DIMENSION (len), INTENT (OUT) :: plfc1 |
---|
| 218 | REAL, DIMENSION (len), INTENT (OUT) :: wbeff1 |
---|
| 219 | REAL, DIMENSION (len), INTENT (OUT) :: ptop21 |
---|
| 220 | REAL, DIMENSION (len), INTENT (OUT) :: sigd1 |
---|
| 221 | REAL, DIMENSION (len, nd), INTENT (OUT) :: ma1 |
---|
| 222 | REAL, DIMENSION (len, nd), INTENT (OUT) :: mip1 |
---|
[2007] | 223 | ! real Vprecip1(len,nd) |
---|
[2253] | 224 | REAL, DIMENSION (len, ndp1), INTENT (OUT) :: vprecip1 |
---|
[2306] | 225 | REAL, DIMENSION (len, ndp1), INTENT (OUT) :: vprecipi1 |
---|
[2253] | 226 | REAL, DIMENSION (len, nd), INTENT (OUT) :: upwd1 |
---|
| 227 | REAL, DIMENSION (len, nd), INTENT (OUT) :: dnwd1 |
---|
| 228 | REAL, DIMENSION (len, nd), INTENT (OUT) :: dnwd01 |
---|
| 229 | REAL, DIMENSION (len, nd), INTENT (OUT) :: qcondc1 ! cld |
---|
| 230 | REAL, DIMENSION (len), INTENT (OUT) :: wd1 ! gust |
---|
| 231 | REAL, DIMENSION (len), INTENT (OUT) :: cape1 |
---|
| 232 | REAL, DIMENSION (len), INTENT (OUT) :: cin1 |
---|
| 233 | REAL, DIMENSION (len, nd), INTENT (OUT) :: tvp1 |
---|
[879] | 234 | |
---|
[2007] | 235 | !AC! |
---|
| 236 | !! real da1(len,nd),phi1(len,nd,nd) |
---|
| 237 | !! real da(len,nd),phi(len,nd,nd) |
---|
| 238 | !AC! |
---|
[2253] | 239 | REAL, DIMENSION (len, nd), INTENT (OUT) :: ftd1 |
---|
| 240 | REAL, DIMENSION (len, nd), INTENT (OUT) :: fqd1 |
---|
| 241 | REAL, DIMENSION (len), INTENT (OUT) :: Plim11 |
---|
| 242 | REAL, DIMENSION (len), INTENT (OUT) :: Plim21 |
---|
| 243 | REAL, DIMENSION (len, nd), INTENT (OUT) :: asupmax1 |
---|
| 244 | REAL, DIMENSION (len), INTENT (OUT) :: supmax01 |
---|
| 245 | REAL, DIMENSION (len), INTENT (OUT) :: asupmaxmin1 |
---|
| 246 | REAL, DIMENSION (len, nd), INTENT (OUT) :: qtc1 ! cld |
---|
| 247 | REAL, DIMENSION (len, nd), INTENT (OUT) :: sigt1 ! cld |
---|
[2207] | 248 | |
---|
[2007] | 249 | ! RomP >>> |
---|
[2253] | 250 | REAL, DIMENSION (len, nd), INTENT (OUT) :: wdtrainA1, wdtrainM1 |
---|
| 251 | REAL, DIMENSION (len, nd), INTENT (OUT) :: da1, mp1 |
---|
| 252 | REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: phi1 |
---|
| 253 | REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: epmlmMm1 |
---|
| 254 | REAL, DIMENSION (len, nd), INTENT (OUT) :: eplaMm1 |
---|
| 255 | REAL, DIMENSION (len, nd), INTENT (OUT) :: evap1, ep1 |
---|
| 256 | REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: sigij1, elij1 |
---|
[2007] | 257 | !JYG,RL |
---|
[2253] | 258 | REAL, DIMENSION (len, nd), INTENT (OUT) :: wghti1 ! final weight of the feeding layers |
---|
[2007] | 259 | !JYG,RL |
---|
[2253] | 260 | REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: phi21 |
---|
| 261 | REAL, DIMENSION (len, nd), INTENT (OUT) :: d1a1, dam1 |
---|
[2007] | 262 | ! RomP <<< |
---|
[879] | 263 | |
---|
[2007] | 264 | ! ------------------------------------------------------------------- |
---|
| 265 | ! Prolog by Kerry Emanuel. |
---|
| 266 | ! ------------------------------------------------------------------- |
---|
| 267 | ! --- ARGUMENTS |
---|
| 268 | ! ------------------------------------------------------------------- |
---|
| 269 | ! --- On input: |
---|
[879] | 270 | |
---|
[2007] | 271 | ! t: Array of absolute temperature (K) of dimension ND, with first |
---|
| 272 | ! index corresponding to lowest model level. Note that this array |
---|
| 273 | ! will be altered by the subroutine if dry convective adjustment |
---|
| 274 | ! occurs and if IPBL is not equal to 0. |
---|
[879] | 275 | |
---|
[2007] | 276 | ! q: Array of specific humidity (gm/gm) of dimension ND, with first |
---|
| 277 | ! index corresponding to lowest model level. Must be defined |
---|
| 278 | ! at same grid levels as T. Note that this array will be altered |
---|
| 279 | ! if dry convective adjustment occurs and if IPBL is not equal to 0. |
---|
[879] | 280 | |
---|
[2007] | 281 | ! qs: Array of saturation specific humidity of dimension ND, with first |
---|
| 282 | ! index corresponding to lowest model level. Must be defined |
---|
| 283 | ! at same grid levels as T. Note that this array will be altered |
---|
| 284 | ! if dry convective adjustment occurs and if IPBL is not equal to 0. |
---|
[879] | 285 | |
---|
[2007] | 286 | ! t_wake: Array of absolute temperature (K), seen by unsaturated draughts, |
---|
| 287 | ! of dimension ND, with first index corresponding to lowest model level. |
---|
[879] | 288 | |
---|
[2007] | 289 | ! q_wake: Array of specific humidity (gm/gm), seen by unsaturated draughts, |
---|
| 290 | ! of dimension ND, with first index corresponding to lowest model level. |
---|
| 291 | ! Must be defined at same grid levels as T. |
---|
[879] | 292 | |
---|
[2007] | 293 | ! qs_wake: Array of saturation specific humidity, seen by unsaturated draughts, |
---|
| 294 | ! of dimension ND, with first index corresponding to lowest model level. |
---|
| 295 | ! Must be defined at same grid levels as T. |
---|
[879] | 296 | |
---|
[2007] | 297 | ! s_wake: Array of fractionnal area occupied by the wakes. |
---|
[879] | 298 | |
---|
[2007] | 299 | ! u: Array of zonal wind velocity (m/s) of dimension ND, witth first |
---|
| 300 | ! index corresponding with the lowest model level. Defined at |
---|
| 301 | ! same levels as T. Note that this array will be altered if |
---|
| 302 | ! dry convective adjustment occurs and if IPBL is not equal to 0. |
---|
[879] | 303 | |
---|
[2007] | 304 | ! v: Same as u but for meridional velocity. |
---|
[1146] | 305 | |
---|
[2007] | 306 | ! tra: Array of passive tracer mixing ratio, of dimensions (ND,NTRA), |
---|
| 307 | ! where NTRA is the number of different tracers. If no |
---|
| 308 | ! convective tracer transport is needed, define a dummy |
---|
| 309 | ! input array of dimension (ND,1). Tracers are defined at |
---|
| 310 | ! same vertical levels as T. Note that this array will be altered |
---|
| 311 | ! if dry convective adjustment occurs and if IPBL is not equal to 0. |
---|
[879] | 312 | |
---|
[2007] | 313 | ! p: Array of pressure (mb) of dimension ND, with first |
---|
| 314 | ! index corresponding to lowest model level. Must be defined |
---|
| 315 | ! at same grid levels as T. |
---|
[879] | 316 | |
---|
[2007] | 317 | ! ph: Array of pressure (mb) of dimension ND+1, with first index |
---|
| 318 | ! corresponding to lowest level. These pressures are defined at |
---|
| 319 | ! levels intermediate between those of P, T, Q and QS. The first |
---|
| 320 | ! value of PH should be greater than (i.e. at a lower level than) |
---|
| 321 | ! the first value of the array P. |
---|
[879] | 322 | |
---|
[2007] | 323 | ! ALE: Available lifting Energy |
---|
[879] | 324 | |
---|
[2007] | 325 | ! ALP: Available lifting Power |
---|
[879] | 326 | |
---|
[2007] | 327 | ! nl: The maximum number of levels to which convection can penetrate, plus 1. |
---|
| 328 | ! NL MUST be less than or equal to ND-1. |
---|
[879] | 329 | |
---|
[2007] | 330 | ! delt: The model time step (sec) between calls to CONVECT |
---|
[879] | 331 | |
---|
[2007] | 332 | ! ---------------------------------------------------------------------------- |
---|
| 333 | ! --- On Output: |
---|
[879] | 334 | |
---|
[2007] | 335 | ! iflag: An output integer whose value denotes the following: |
---|
| 336 | ! VALUE INTERPRETATION |
---|
| 337 | ! ----- -------------- |
---|
| 338 | ! 0 Moist convection occurs. |
---|
| 339 | ! 1 Moist convection occurs, but a CFL condition |
---|
| 340 | ! on the subsidence warming is violated. This |
---|
| 341 | ! does not cause the scheme to terminate. |
---|
| 342 | ! 2 Moist convection, but no precip because ep(inb) lt 0.0001 |
---|
| 343 | ! 3 No moist convection because new cbmf is 0 and old cbmf is 0. |
---|
| 344 | ! 4 No moist convection; atmosphere is not |
---|
| 345 | ! unstable |
---|
| 346 | ! 6 No moist convection because ihmin le minorig. |
---|
| 347 | ! 7 No moist convection because unreasonable |
---|
| 348 | ! parcel level temperature or specific humidity. |
---|
| 349 | ! 8 No moist convection: lifted condensation |
---|
| 350 | ! level is above the 200 mb level. |
---|
| 351 | ! 9 No moist convection: cloud base is higher |
---|
| 352 | ! then the level NL-1. |
---|
[879] | 353 | |
---|
[2007] | 354 | ! ft: Array of temperature tendency (K/s) of dimension ND, defined at same |
---|
| 355 | ! grid levels as T, Q, QS and P. |
---|
[1652] | 356 | |
---|
[2007] | 357 | ! fq: Array of specific humidity tendencies ((gm/gm)/s) of dimension ND, |
---|
| 358 | ! defined at same grid levels as T, Q, QS and P. |
---|
[1652] | 359 | |
---|
[2007] | 360 | ! fu: Array of forcing of zonal velocity (m/s^2) of dimension ND, |
---|
| 361 | ! defined at same grid levels as T. |
---|
[1652] | 362 | |
---|
[2007] | 363 | ! fv: Same as FU, but for forcing of meridional velocity. |
---|
[879] | 364 | |
---|
[2007] | 365 | ! ftra: Array of forcing of tracer content, in tracer mixing ratio per |
---|
| 366 | ! second, defined at same levels as T. Dimensioned (ND,NTRA). |
---|
[879] | 367 | |
---|
[2007] | 368 | ! precip: Scalar convective precipitation rate (mm/day). |
---|
[879] | 369 | |
---|
[2007] | 370 | ! wd: A convective downdraft velocity scale. For use in surface |
---|
| 371 | ! flux parameterizations. See convect.ps file for details. |
---|
[879] | 372 | |
---|
[2007] | 373 | ! tprime: A convective downdraft temperature perturbation scale (K). |
---|
| 374 | ! For use in surface flux parameterizations. See convect.ps |
---|
| 375 | ! file for details. |
---|
[879] | 376 | |
---|
[2007] | 377 | ! qprime: A convective downdraft specific humidity |
---|
| 378 | ! perturbation scale (gm/gm). |
---|
| 379 | ! For use in surface flux parameterizations. See convect.ps |
---|
| 380 | ! file for details. |
---|
[1992] | 381 | |
---|
[2007] | 382 | ! cbmf: The cloud base mass flux ((kg/m**2)/s). THIS SCALAR VALUE MUST |
---|
| 383 | ! BE STORED BY THE CALLING PROGRAM AND RETURNED TO CONVECT AT |
---|
| 384 | ! ITS NEXT CALL. That is, the value of CBMF must be "remembered" |
---|
| 385 | ! by the calling program between calls to CONVECT. |
---|
[1992] | 386 | |
---|
[2007] | 387 | ! det: Array of detrainment mass flux of dimension ND. |
---|
| 388 | ! ------------------------------------------------------------------- |
---|
[1992] | 389 | |
---|
[2007] | 390 | ! Local (non compressed) arrays |
---|
[1992] | 391 | |
---|
| 392 | |
---|
| 393 | INTEGER i, k, n, il, j |
---|
| 394 | INTEGER nword1, nword2, nword3, nword4 |
---|
| 395 | INTEGER icbmax |
---|
| 396 | INTEGER nk1(klon) |
---|
| 397 | INTEGER icb1(klon) |
---|
| 398 | INTEGER icbs1(klon) |
---|
| 399 | |
---|
| 400 | LOGICAL ok_inhib ! True => possible inhibition of convection by dryness |
---|
| 401 | LOGICAL, SAVE :: debut = .TRUE. |
---|
[2007] | 402 | !$OMP THREADPRIVATE(debut) |
---|
[1992] | 403 | |
---|
[2253] | 404 | REAL coef_convective(len) ! = 1 for convective points, = 0 otherwise |
---|
[1992] | 405 | REAL tnk1(klon) |
---|
| 406 | REAL thnk1(klon) |
---|
| 407 | REAL qnk1(klon) |
---|
| 408 | REAL gznk1(klon) |
---|
| 409 | REAL pnk1(klon) |
---|
| 410 | REAL qsnk1(klon) |
---|
| 411 | REAL unk1(klon) |
---|
| 412 | REAL vnk1(klon) |
---|
| 413 | REAL cpnk1(klon) |
---|
| 414 | REAL hnk1(klon) |
---|
| 415 | REAL pbase1(klon) |
---|
| 416 | REAL buoybase1(klon) |
---|
| 417 | |
---|
| 418 | REAL lf1(klon, klev), lf1_wake(klon, klev) |
---|
| 419 | REAL lv1(klon, klev), lv1_wake(klon, klev) |
---|
| 420 | REAL cpn1(klon, klev), cpn1_wake(klon, klev) |
---|
| 421 | REAL tv1(klon, klev), tv1_wake(klon, klev) |
---|
| 422 | REAL gz1(klon, klev), gz1_wake(klon, klev) |
---|
| 423 | REAL hm1(klon, klev), hm1_wake(klon, klev) |
---|
| 424 | REAL h1(klon, klev), h1_wake(klon, klev) |
---|
| 425 | REAL tp1(klon, klev) |
---|
| 426 | REAL clw1(klon, klev) |
---|
| 427 | REAL th1(klon, klev), th1_wake(klon, klev) |
---|
| 428 | |
---|
| 429 | REAL bid(klon, klev) ! dummy array |
---|
| 430 | |
---|
| 431 | INTEGER ncum |
---|
| 432 | |
---|
| 433 | INTEGER j1feed(klon) |
---|
| 434 | INTEGER j2feed(klon) |
---|
| 435 | REAL p1feed1(len) ! pressure at lower bound of feeding layer |
---|
| 436 | REAL p2feed1(len) ! pressure at upper bound of feeding layer |
---|
[2007] | 437 | !JYG,RL |
---|
| 438 | !! real wghti1(len,nd) ! weights of the feeding layers |
---|
| 439 | !JYG,RL |
---|
[1992] | 440 | |
---|
[2007] | 441 | ! (local) compressed fields: |
---|
[1992] | 442 | |
---|
| 443 | |
---|
| 444 | INTEGER idcum(nloc) |
---|
[2253] | 445 | !jyg< |
---|
| 446 | LOGICAL compress ! True if compression occurs |
---|
| 447 | !>jyg |
---|
[1992] | 448 | INTEGER iflag(nloc), nk(nloc), icb(nloc) |
---|
| 449 | INTEGER nent(nloc, klev) |
---|
| 450 | INTEGER icbs(nloc) |
---|
| 451 | INTEGER inb(nloc), inbis(nloc) |
---|
| 452 | |
---|
| 453 | REAL cbmf(nloc), plcl(nloc), plfc(nloc), wbeff(nloc) |
---|
| 454 | REAL t(nloc, klev), q(nloc, klev), qs(nloc, klev) |
---|
| 455 | REAL t_wake(nloc, klev), q_wake(nloc, klev), qs_wake(nloc, klev) |
---|
| 456 | REAL s_wake(nloc) |
---|
| 457 | REAL u(nloc, klev), v(nloc, klev) |
---|
| 458 | REAL gz(nloc, klev), h(nloc, klev), hm(nloc, klev) |
---|
| 459 | REAL h_wake(nloc, klev), hm_wake(nloc, klev) |
---|
| 460 | REAL lv(nloc, klev), lf(nloc, klev), cpn(nloc, klev) |
---|
| 461 | REAL lv_wake(nloc, klev), lf_wake(nloc, klev), cpn_wake(nloc, klev) |
---|
| 462 | REAL p(nloc, klev), ph(nloc, klev+1), tv(nloc, klev), tp(nloc, klev) |
---|
| 463 | REAL tv_wake(nloc, klev) |
---|
| 464 | REAL clw(nloc, klev) |
---|
| 465 | REAL dph(nloc, klev) |
---|
| 466 | REAL pbase(nloc), buoybase(nloc), th(nloc, klev) |
---|
| 467 | REAL th_wake(nloc, klev) |
---|
| 468 | REAL tvp(nloc, klev) |
---|
| 469 | REAL sig(nloc, klev), w0(nloc, klev), ptop2(nloc) |
---|
| 470 | REAL hp(nloc, klev), ep(nloc, klev), sigp(nloc, klev) |
---|
| 471 | REAL buoy(nloc, klev) |
---|
| 472 | REAL cape(nloc) |
---|
| 473 | REAL cin(nloc) |
---|
| 474 | REAL m(nloc, klev) |
---|
| 475 | REAL ment(nloc, klev, klev), sigij(nloc, klev, klev) |
---|
| 476 | REAL qent(nloc, klev, klev) |
---|
| 477 | REAL hent(nloc, klev, klev) |
---|
| 478 | REAL uent(nloc, klev, klev), vent(nloc, klev, klev) |
---|
| 479 | REAL ments(nloc, klev, klev), qents(nloc, klev, klev) |
---|
| 480 | REAL elij(nloc, klev, klev) |
---|
| 481 | REAL supmax(nloc, klev) |
---|
[2007] | 482 | REAL Ale(nloc), Alp(nloc), coef_clos(nloc) |
---|
[2201] | 483 | REAL omega(nloc,klev) |
---|
[1992] | 484 | REAL sigd(nloc) |
---|
[2007] | 485 | ! real mp(nloc,klev), qp(nloc,klev), up(nloc,klev), vp(nloc,klev) |
---|
| 486 | ! real wt(nloc,klev), water(nloc,klev), evap(nloc,klev), ice(nloc,klev) |
---|
| 487 | ! real b(nloc,klev), sigd(nloc) |
---|
| 488 | ! save mp,qp,up,vp,wt,water,evap,b |
---|
[1992] | 489 | REAL, SAVE, ALLOCATABLE :: mp(:, :), qp(:, :), up(:, :), vp(:, :) |
---|
| 490 | REAL, SAVE, ALLOCATABLE :: wt(:, :), water(:, :), evap(:, :) |
---|
| 491 | REAL, SAVE, ALLOCATABLE :: ice(:, :), fondue(:, :), b(:, :) |
---|
| 492 | REAL, SAVE, ALLOCATABLE :: frac(:, :), faci(:, :) |
---|
[2007] | 493 | !$OMP THREADPRIVATE(mp,qp,up,vp,wt,water,evap,ice,fondue,b,frac,faci) |
---|
[1992] | 494 | REAL ft(nloc, klev), fq(nloc, klev) |
---|
| 495 | REAL ftd(nloc, klev), fqd(nloc, klev) |
---|
| 496 | REAL fu(nloc, klev), fv(nloc, klev) |
---|
| 497 | REAL upwd(nloc, klev), dnwd(nloc, klev), dnwd0(nloc, klev) |
---|
[2259] | 498 | REAL ma(nloc, klev), mip(nloc, klev) |
---|
| 499 | !! REAL tls(nloc, klev), tps(nloc, klev) ! unused . jyg |
---|
| 500 | REAL qprime(nloc), tprime(nloc) |
---|
[1992] | 501 | REAL precip(nloc) |
---|
[2007] | 502 | ! real Vprecip(nloc,klev) |
---|
[1992] | 503 | REAL vprecip(nloc, klev+1) |
---|
[2306] | 504 | REAL vprecipi(nloc, klev+1) |
---|
[1992] | 505 | REAL tra(nloc, klev, ntra), trap(nloc, klev, ntra) |
---|
| 506 | REAL ftra(nloc, klev, ntra), traent(nloc, klev, klev, ntra) |
---|
[2007] | 507 | REAL qcondc(nloc, klev) ! cld |
---|
| 508 | REAL wd(nloc) ! gust |
---|
| 509 | REAL Plim1(nloc), plim2(nloc) |
---|
[1992] | 510 | REAL asupmax(nloc, klev) |
---|
| 511 | REAL supmax0(nloc) |
---|
| 512 | REAL asupmaxmin(nloc) |
---|
| 513 | |
---|
| 514 | REAL tnk(nloc), qnk(nloc), gznk(nloc) |
---|
| 515 | REAL wghti(nloc, nd) |
---|
| 516 | REAL hnk(nloc), unk(nloc), vnk(nloc) |
---|
| 517 | |
---|
[2207] | 518 | REAL qtc(nloc, klev) ! cld |
---|
| 519 | REAL sigt(nloc, klev) ! cld |
---|
| 520 | |
---|
[2007] | 521 | ! RomP >>> |
---|
| 522 | REAL wdtrainA(nloc, klev), wdtrainM(nloc, klev) |
---|
[1992] | 523 | REAL da(len, nd), phi(len, nd, nd) |
---|
[2007] | 524 | REAL epmlmMm(nloc, klev, klev), eplaMm(nloc, klev) |
---|
[1992] | 525 | REAL phi2(len, nd, nd) |
---|
| 526 | REAL d1a(len, nd), dam(len, nd) |
---|
[2007] | 527 | ! RomP <<< |
---|
[1992] | 528 | |
---|
| 529 | LOGICAL, SAVE :: first = .TRUE. |
---|
[2007] | 530 | !$OMP THREADPRIVATE(first) |
---|
[1992] | 531 | CHARACTER (LEN=20) :: modname = 'cva_driver' |
---|
| 532 | CHARACTER (LEN=80) :: abort_message |
---|
| 533 | |
---|
| 534 | |
---|
[2007] | 535 | ! print *, 't1, t1_wake ',(k,t1(1,k),t1_wake(1,k),k=1,klev) |
---|
| 536 | ! print *, 'q1, q1_wake ',(k,q1(1,k),q1_wake(1,k),k=1,klev) |
---|
[1992] | 537 | |
---|
[2007] | 538 | ! ------------------------------------------------------------------- |
---|
| 539 | ! --- SET CONSTANTS AND PARAMETERS |
---|
| 540 | ! ------------------------------------------------------------------- |
---|
[1992] | 541 | |
---|
| 542 | IF (first) THEN |
---|
| 543 | ALLOCATE (mp(nloc,klev), qp(nloc,klev), up(nloc,klev)) |
---|
| 544 | ALLOCATE (vp(nloc,klev), wt(nloc,klev), water(nloc,klev)) |
---|
| 545 | ALLOCATE (ice(nloc,klev), fondue(nloc,klev)) |
---|
| 546 | ALLOCATE (evap(nloc,klev), b(nloc,klev)) |
---|
| 547 | ALLOCATE (frac(nloc,klev), faci(nloc,klev)) |
---|
| 548 | first = .FALSE. |
---|
| 549 | END IF |
---|
[2007] | 550 | ! -- set simulation flags: |
---|
| 551 | ! (common cvflag) |
---|
[1992] | 552 | |
---|
| 553 | CALL cv_flag(iflag_ice_thermo) |
---|
| 554 | |
---|
[2007] | 555 | ! -- set thermodynamical constants: |
---|
| 556 | ! (common cvthermo) |
---|
[1992] | 557 | |
---|
| 558 | CALL cv_thermo(iflag_con) |
---|
| 559 | |
---|
[2007] | 560 | ! -- set convect parameters |
---|
[1992] | 561 | |
---|
[2007] | 562 | ! includes microphysical parameters and parameters that |
---|
| 563 | ! control the rate of approach to quasi-equilibrium) |
---|
| 564 | ! (common cvparam) |
---|
[1992] | 565 | |
---|
| 566 | IF (iflag_con==3) THEN |
---|
[2259] | 567 | CALL cv3_param(nd, k_upper, delt) |
---|
[1992] | 568 | |
---|
| 569 | END IF |
---|
| 570 | |
---|
| 571 | IF (iflag_con==4) THEN |
---|
| 572 | CALL cv_param(nd) |
---|
| 573 | END IF |
---|
| 574 | |
---|
[2007] | 575 | ! --------------------------------------------------------------------- |
---|
| 576 | ! --- INITIALIZE OUTPUT ARRAYS AND PARAMETERS |
---|
| 577 | ! --------------------------------------------------------------------- |
---|
[1992] | 578 | nword1 = len |
---|
| 579 | nword2 = len*nd |
---|
| 580 | nword3 = len*nd*ntra |
---|
| 581 | nword4 = len*nd*nd |
---|
| 582 | |
---|
| 583 | iflag1(:) = 0 |
---|
| 584 | ktop1(:) = 0 |
---|
| 585 | kbas1(:) = 0 |
---|
| 586 | ft1(:, :) = 0.0 |
---|
| 587 | fq1(:, :) = 0.0 |
---|
| 588 | fu1(:, :) = 0.0 |
---|
| 589 | fv1(:, :) = 0.0 |
---|
| 590 | ftra1(:, :, :) = 0. |
---|
| 591 | precip1(:) = 0. |
---|
| 592 | cbmf1(:) = 0. |
---|
| 593 | ptop21(:) = 0. |
---|
| 594 | sigd1(:) = 0. |
---|
| 595 | ma1(:, :) = 0. |
---|
| 596 | mip1(:, :) = 0. |
---|
| 597 | vprecip1(:, :) = 0. |
---|
[2306] | 598 | vprecipi1(:, :) = 0. |
---|
[1992] | 599 | upwd1(:, :) = 0. |
---|
| 600 | dnwd1(:, :) = 0. |
---|
| 601 | dnwd01(:, :) = 0. |
---|
| 602 | qcondc1(:, :) = 0. |
---|
| 603 | wd1(:) = 0. |
---|
| 604 | cape1(:) = 0. |
---|
| 605 | cin1(:) = 0. |
---|
| 606 | tvp1(:, :) = 0. |
---|
| 607 | ftd1(:, :) = 0. |
---|
| 608 | fqd1(:, :) = 0. |
---|
[2007] | 609 | Plim11(:) = 0. |
---|
| 610 | Plim21(:) = 0. |
---|
[1992] | 611 | asupmax1(:, :) = 0. |
---|
| 612 | supmax01(:) = 0. |
---|
| 613 | asupmaxmin1(:) = 0. |
---|
| 614 | |
---|
| 615 | DO il = 1, len |
---|
| 616 | cin1(il) = -100000. |
---|
| 617 | cape1(il) = -1. |
---|
| 618 | END DO |
---|
| 619 | |
---|
| 620 | IF (iflag_con==3) THEN |
---|
| 621 | DO il = 1, len |
---|
| 622 | sig1(il, nd) = sig1(il, nd) + 1. |
---|
| 623 | sig1(il, nd) = amin1(sig1(il,nd), 12.1) |
---|
| 624 | END DO |
---|
| 625 | END IF |
---|
| 626 | |
---|
[2007] | 627 | ! RomP >>> |
---|
[2207] | 628 | sigt1(:, :) = 0. |
---|
| 629 | qtc1(:, :) = 0. |
---|
[2007] | 630 | wdtrainA1(:, :) = 0. |
---|
| 631 | wdtrainM1(:, :) = 0. |
---|
[1992] | 632 | da1(:, :) = 0. |
---|
| 633 | phi1(:, :, :) = 0. |
---|
[2007] | 634 | epmlmMm1(:, :, :) = 0. |
---|
| 635 | eplaMm1(:, :) = 0. |
---|
[1992] | 636 | mp1(:, :) = 0. |
---|
| 637 | evap1(:, :) = 0. |
---|
| 638 | ep1(:, :) = 0. |
---|
| 639 | sigij1(:, :, :) = 0. |
---|
| 640 | elij1(:, :, :) = 0. |
---|
| 641 | phi21(:, :, :) = 0. |
---|
| 642 | d1a1(:, :) = 0. |
---|
| 643 | dam1(:, :) = 0. |
---|
[2007] | 644 | ! RomP <<< |
---|
| 645 | ! --------------------------------------------------------------------- |
---|
| 646 | ! --- INITIALIZE LOCAL ARRAYS AND PARAMETERS |
---|
| 647 | ! --------------------------------------------------------------------- |
---|
[1992] | 648 | |
---|
| 649 | DO il = 1, nloc |
---|
| 650 | coef_clos(il) = 1. |
---|
| 651 | END DO |
---|
| 652 | |
---|
[2007] | 653 | ! -------------------------------------------------------------------- |
---|
| 654 | ! --- CALCULATE ARRAYS OF GEOPOTENTIAL, HEAT CAPACITY & STATIC ENERGY |
---|
| 655 | ! -------------------------------------------------------------------- |
---|
[1992] | 656 | |
---|
| 657 | IF (iflag_con==3) THEN |
---|
| 658 | |
---|
| 659 | IF (debut) THEN |
---|
| 660 | PRINT *, 'Emanuel version 3 nouvelle' |
---|
| 661 | END IF |
---|
[2007] | 662 | ! print*,'t1, q1 ',t1,q1 |
---|
| 663 | CALL cv3_prelim(len, nd, ndp1, t1, q1, p1, ph1, & ! nd->na |
---|
| 664 | lv1, lf1, cpn1, tv1, gz1, h1, hm1, th1) |
---|
[1992] | 665 | |
---|
| 666 | |
---|
[2007] | 667 | CALL cv3_prelim(len, nd, ndp1, t1_wake, q1_wake, p1, ph1, & ! nd->na |
---|
| 668 | lv1_wake, lf1_wake, cpn1_wake, tv1_wake, gz1_wake, & |
---|
| 669 | h1_wake, bid, th1_wake) |
---|
[1992] | 670 | |
---|
| 671 | END IF |
---|
| 672 | |
---|
| 673 | IF (iflag_con==4) THEN |
---|
| 674 | PRINT *, 'Emanuel version 4 ' |
---|
[2007] | 675 | CALL cv_prelim(len, nd, ndp1, t1, q1, p1, ph1, & |
---|
| 676 | lv1, cpn1, tv1, gz1, h1, hm1) |
---|
[1992] | 677 | END IF |
---|
| 678 | |
---|
[2007] | 679 | ! -------------------------------------------------------------------- |
---|
| 680 | ! --- CONVECTIVE FEED |
---|
| 681 | ! -------------------------------------------------------------------- |
---|
[1992] | 682 | |
---|
[2007] | 683 | ! compute feeding layer potential temperature and mixing ratio : |
---|
[1992] | 684 | |
---|
[2007] | 685 | ! get bounds of feeding layer |
---|
[1992] | 686 | |
---|
[2007] | 687 | ! test niveaux couche alimentation KE |
---|
[1992] | 688 | IF (sig1feed1==sig2feed1) THEN |
---|
| 689 | WRITE (lunout, *) 'impossible de choisir sig1feed=sig2feed' |
---|
| 690 | WRITE (lunout, *) 'changer la valeur de sig2feed dans physiq.def' |
---|
| 691 | abort_message = '' |
---|
[2311] | 692 | CALL abort_physic(modname, abort_message, 1) |
---|
[1992] | 693 | END IF |
---|
| 694 | |
---|
| 695 | DO i = 1, len |
---|
| 696 | p1feed1(i) = sig1feed1*ph1(i, 1) |
---|
| 697 | p2feed1(i) = sig2feed1*ph1(i, 1) |
---|
[2007] | 698 | !test maf |
---|
| 699 | ! p1feed1(i)=ph1(i,1) |
---|
| 700 | ! p2feed1(i)=ph1(i,2) |
---|
| 701 | ! p2feed1(i)=ph1(i,3) |
---|
| 702 | !testCR: on prend la couche alim des thermiques |
---|
[2253] | 703 | ! p2feed1(i)=ph1(i,lalim_conv1(i)+1) |
---|
[2007] | 704 | ! print*,'lentr=',lentr(i),ph1(i,lentr(i)+1),ph1(i,2) |
---|
[1992] | 705 | END DO |
---|
| 706 | |
---|
| 707 | IF (iflag_con==3) THEN |
---|
| 708 | END IF |
---|
| 709 | DO i = 1, len |
---|
[2007] | 710 | ! print*,'avant cv3_feed Plim',p1feed1(i),p2feed1(i) |
---|
[1992] | 711 | END DO |
---|
| 712 | IF (iflag_con==3) THEN |
---|
| 713 | |
---|
[2007] | 714 | ! print*, 'IFLAG1 avant cv3_feed' |
---|
| 715 | ! print*,'len,nd',len,nd |
---|
| 716 | ! write(*,'(64i1)') iflag1(2:klon-1) |
---|
[1992] | 717 | |
---|
[2007] | 718 | CALL cv3_feed(len, nd, ok_conserv_q, & ! nd->na |
---|
| 719 | t1, q1, u1, v1, p1, ph1, hm1, gz1, & |
---|
| 720 | p1feed1, p2feed1, wght1, & |
---|
| 721 | wghti1, tnk1, thnk1, qnk1, qsnk1, unk1, vnk1, & |
---|
| 722 | cpnk1, hnk1, nk1, icb1, icbmax, iflag1, gznk1, plcl1) |
---|
[1992] | 723 | END IF |
---|
| 724 | |
---|
[2007] | 725 | ! print*, 'IFLAG1 apres cv3_feed' |
---|
| 726 | ! print*,'len,nd',len,nd |
---|
| 727 | ! write(*,'(64i1)') iflag1(2:klon-1) |
---|
[1992] | 728 | |
---|
| 729 | IF (iflag_con==4) THEN |
---|
[2007] | 730 | CALL cv_feed(len, nd, t1, q1, qs1, p1, hm1, gz1, & |
---|
| 731 | nk1, icb1, icbmax, iflag1, tnk1, qnk1, gznk1, plcl1) |
---|
[1992] | 732 | END IF |
---|
| 733 | |
---|
[2007] | 734 | ! print *, 'cv3_feed-> iflag1, plcl1 ',iflag1(1),plcl1(1) |
---|
[1992] | 735 | |
---|
[2007] | 736 | ! -------------------------------------------------------------------- |
---|
| 737 | ! --- UNDILUTE (ADIABATIC) UPDRAFT / 1st part |
---|
| 738 | ! (up through ICB for convect4, up through ICB+1 for convect3) |
---|
| 739 | ! Calculates the lifted parcel virtual temperature at nk, the |
---|
| 740 | ! actual temperature, and the adiabatic liquid water content. |
---|
| 741 | ! -------------------------------------------------------------------- |
---|
[1992] | 742 | |
---|
| 743 | IF (iflag_con==3) THEN |
---|
| 744 | |
---|
[2007] | 745 | CALL cv3_undilute1(len, nd, t1, qs1, gz1, plcl1, p1, icb1, tnk1, qnk1, & ! nd->na |
---|
| 746 | gznk1, tp1, tvp1, clw1, icbs1) |
---|
[1992] | 747 | END IF |
---|
| 748 | |
---|
| 749 | |
---|
| 750 | IF (iflag_con==4) THEN |
---|
[2007] | 751 | CALL cv_undilute1(len, nd, t1, q1, qs1, gz1, p1, nk1, icb1, icbmax, & |
---|
| 752 | tp1, tvp1, clw1) |
---|
[1992] | 753 | END IF |
---|
| 754 | |
---|
[2007] | 755 | ! ------------------------------------------------------------------- |
---|
| 756 | ! --- TRIGGERING |
---|
| 757 | ! ------------------------------------------------------------------- |
---|
[1992] | 758 | |
---|
[2007] | 759 | ! print *,' avant triggering, iflag_con ',iflag_con |
---|
[1992] | 760 | |
---|
| 761 | IF (iflag_con==3) THEN |
---|
| 762 | |
---|
[2007] | 763 | CALL cv3_trigger(len, nd, icb1, plcl1, p1, th1, tv1, tvp1, thnk1, & ! nd->na |
---|
| 764 | pbase1, buoybase1, iflag1, sig1, w01) |
---|
[1992] | 765 | |
---|
| 766 | |
---|
[2007] | 767 | ! print*, 'IFLAG1 apres cv3_triger' |
---|
| 768 | ! print*,'len,nd',len,nd |
---|
| 769 | ! write(*,'(64i1)') iflag1(2:klon-1) |
---|
[1992] | 770 | |
---|
[2007] | 771 | ! call dump2d(iim,jjm-1,sig1(2) |
---|
[1992] | 772 | END IF |
---|
| 773 | |
---|
| 774 | IF (iflag_con==4) THEN |
---|
| 775 | CALL cv_trigger(len, nd, icb1, cbmf1, tv1, tvp1, iflag1) |
---|
| 776 | END IF |
---|
| 777 | |
---|
| 778 | |
---|
[2007] | 779 | ! ===================================================================== |
---|
| 780 | ! --- IF THIS POINT IS REACHED, MOIST CONVECTIVE ADJUSTMENT IS NECESSARY |
---|
| 781 | ! ===================================================================== |
---|
[1992] | 782 | |
---|
[2253] | 783 | ! Determine the number "ncum" of convective gridpoints, the list "idcum" of convective |
---|
| 784 | ! gridpoints and the weights "coef_convective" (= 1. for convective gridpoints and = 0. |
---|
| 785 | ! elsewhere). |
---|
[1992] | 786 | ncum = 0 |
---|
[2253] | 787 | coef_convective(:) = 0. |
---|
[1992] | 788 | DO i = 1, len |
---|
| 789 | IF (iflag1(i)==0) THEN |
---|
[2253] | 790 | coef_convective(i) = 1. |
---|
[1992] | 791 | ncum = ncum + 1 |
---|
| 792 | idcum(ncum) = i |
---|
| 793 | END IF |
---|
| 794 | END DO |
---|
| 795 | |
---|
[2007] | 796 | ! print*,'klon, ncum = ',len,ncum |
---|
[1992] | 797 | |
---|
| 798 | IF (ncum>0) THEN |
---|
| 799 | |
---|
[2007] | 800 | ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 801 | ! --- COMPRESS THE FIELDS |
---|
| 802 | ! (-> vectorization over convective gridpoints) |
---|
| 803 | ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[1992] | 804 | |
---|
| 805 | IF (iflag_con==3) THEN |
---|
[2007] | 806 | ! print*,'ncum tv1 ',ncum,tv1 |
---|
| 807 | ! print*,'tvp1 ',tvp1 |
---|
[2253] | 808 | !jyg< |
---|
| 809 | ! If the fraction of convective points is larger than comp_threshold, then compression |
---|
| 810 | ! is assumed useless. |
---|
| 811 | ! |
---|
| 812 | compress = ncum .lt. len*comp_threshold |
---|
| 813 | ! |
---|
| 814 | IF (.not. compress) THEN |
---|
| 815 | DO i = 1,len |
---|
| 816 | idcum(i) = i |
---|
| 817 | ENDDO |
---|
| 818 | ENDIF |
---|
| 819 | ! |
---|
| 820 | !>jyg |
---|
| 821 | CALL cv3a_compress(len, nloc, ncum, nd, ntra, compress, & |
---|
[2007] | 822 | iflag1, nk1, icb1, icbs1, & |
---|
| 823 | plcl1, tnk1, qnk1, gznk1, hnk1, unk1, vnk1, & |
---|
| 824 | wghti1, pbase1, buoybase1, & |
---|
| 825 | t1, q1, qs1, t1_wake, q1_wake, qs1_wake, s1_wake, & |
---|
| 826 | u1, v1, gz1, th1, th1_wake, & |
---|
| 827 | tra1, & |
---|
| 828 | h1, lv1, lf1, cpn1, p1, ph1, tv1, tp1, tvp1, clw1, & |
---|
| 829 | h1_wake, lv1_wake, lf1_wake, cpn1_wake, tv1_wake, & |
---|
| 830 | sig1, w01, ptop21, & |
---|
[2201] | 831 | Ale1, Alp1, omega1, & |
---|
[2007] | 832 | iflag, nk, icb, icbs, & |
---|
| 833 | plcl, tnk, qnk, gznk, hnk, unk, vnk, & |
---|
| 834 | wghti, pbase, buoybase, & |
---|
| 835 | t, q, qs, t_wake, q_wake, qs_wake, s_wake, & |
---|
| 836 | u, v, gz, th, th_wake, & |
---|
| 837 | tra, & |
---|
| 838 | h, lv, lf, cpn, p, ph, tv, tp, tvp, clw, & |
---|
| 839 | h_wake, lv_wake, lf_wake, cpn_wake, tv_wake, & |
---|
| 840 | sig, w0, ptop2, & |
---|
[2201] | 841 | Ale, Alp, omega) |
---|
[1992] | 842 | |
---|
[2007] | 843 | ! print*,'tv ',tv |
---|
| 844 | ! print*,'tvp ',tvp |
---|
[1992] | 845 | |
---|
| 846 | END IF |
---|
| 847 | |
---|
| 848 | IF (iflag_con==4) THEN |
---|
[2007] | 849 | CALL cv_compress(len, nloc, ncum, nd, & |
---|
| 850 | iflag1, nk1, icb1, & |
---|
| 851 | cbmf1, plcl1, tnk1, qnk1, gznk1, & |
---|
| 852 | t1, q1, qs1, u1, v1, gz1, & |
---|
| 853 | h1, lv1, cpn1, p1, ph1, tv1, tp1, tvp1, clw1, & |
---|
| 854 | iflag, nk, icb, & |
---|
| 855 | cbmf, plcl, tnk, qnk, gznk, & |
---|
| 856 | t, q, qs, u, v, gz, h, lv, cpn, p, ph, tv, tp, tvp, clw, & |
---|
| 857 | dph) |
---|
[1992] | 858 | END IF |
---|
| 859 | |
---|
[2007] | 860 | ! ------------------------------------------------------------------- |
---|
| 861 | ! --- UNDILUTE (ADIABATIC) UPDRAFT / second part : |
---|
| 862 | ! --- FIND THE REST OF THE LIFTED PARCEL TEMPERATURES |
---|
| 863 | ! --- & |
---|
| 864 | ! --- COMPUTE THE PRECIPITATION EFFICIENCIES AND THE |
---|
| 865 | ! --- FRACTION OF PRECIPITATION FALLING OUTSIDE OF CLOUD |
---|
| 866 | ! --- & |
---|
| 867 | ! --- FIND THE LEVEL OF NEUTRAL BUOYANCY |
---|
| 868 | ! ------------------------------------------------------------------- |
---|
[1992] | 869 | |
---|
| 870 | IF (iflag_con==3) THEN |
---|
[2007] | 871 | CALL cv3_undilute2(nloc, ncum, nd, icb, icbs, nk, & !na->nd |
---|
| 872 | tnk, qnk, gznk, hnk, t, q, qs, gz, & |
---|
| 873 | p, h, tv, lv, lf, pbase, buoybase, plcl, & |
---|
| 874 | inb, tp, tvp, clw, hp, ep, sigp, buoy, & |
---|
| 875 | frac) |
---|
[1992] | 876 | END IF |
---|
| 877 | |
---|
| 878 | IF (iflag_con==4) THEN |
---|
[2007] | 879 | CALL cv_undilute2(nloc, ncum, nd, icb, nk, & |
---|
| 880 | tnk, qnk, gznk, t, q, qs, gz, & |
---|
| 881 | p, dph, h, tv, lv, & |
---|
| 882 | inb, inbis, tp, tvp, clw, hp, ep, sigp, frac) |
---|
[1992] | 883 | END IF |
---|
| 884 | |
---|
[2007] | 885 | ! ------------------------------------------------------------------- |
---|
| 886 | ! --- MIXING(1) (if iflag_mix .ge. 1) |
---|
| 887 | ! ------------------------------------------------------------------- |
---|
[1992] | 888 | IF (iflag_con==3) THEN |
---|
| 889 | IF ((iflag_ice_thermo==1) .AND. (iflag_mix/=0)) THEN |
---|
[2007] | 890 | WRITE (*, *) ' iflag_ice_thermo==1 requires iflag_mix==0', ' but iflag_mix=', iflag_mix, & |
---|
| 891 | '. Might as well stop here.' |
---|
[1992] | 892 | STOP |
---|
| 893 | END IF |
---|
| 894 | IF (iflag_mix>=1) THEN |
---|
| 895 | CALL zilch(supmax, nloc*klev) |
---|
[2007] | 896 | CALL cv3p_mixing(nloc, ncum, nd, nd, ntra, icb, nk, inb, & ! na->nd |
---|
| 897 | ph, t, q, qs, u, v, tra, h, lv, qnk, & |
---|
| 898 | unk, vnk, hp, tv, tvp, ep, clw, sig, & |
---|
| 899 | ment, qent, hent, uent, vent, nent, & |
---|
| 900 | sigij, elij, supmax, ments, qents, traent) |
---|
| 901 | ! print*, 'cv3p_mixing-> supmax ', (supmax(1,k), k=1,nd) |
---|
[1992] | 902 | |
---|
| 903 | ELSE |
---|
| 904 | CALL zilch(supmax, nloc*klev) |
---|
| 905 | END IF |
---|
| 906 | END IF |
---|
[2007] | 907 | ! ------------------------------------------------------------------- |
---|
| 908 | ! --- CLOSURE |
---|
| 909 | ! ------------------------------------------------------------------- |
---|
[1992] | 910 | |
---|
| 911 | |
---|
| 912 | IF (iflag_con==3) THEN |
---|
| 913 | IF (iflag_clos==0) THEN |
---|
[2007] | 914 | CALL cv3_closure(nloc, ncum, nd, icb, inb, & ! na->nd |
---|
| 915 | pbase, p, ph, tv, buoy, & |
---|
| 916 | sig, w0, cape, m, iflag) |
---|
[1992] | 917 | END IF |
---|
| 918 | |
---|
| 919 | ok_inhib = iflag_mix == 2 |
---|
| 920 | |
---|
| 921 | IF (iflag_clos==1) THEN |
---|
| 922 | PRINT *, ' pas d appel cv3p_closure' |
---|
[2007] | 923 | ! c CALL cv3p_closure(nloc,ncum,nd,icb,inb ! na->nd |
---|
| 924 | ! c : ,pbase,plcl,p,ph,tv,tvp,buoy |
---|
| 925 | ! c : ,supmax |
---|
| 926 | ! c o ,sig,w0,ptop2,cape,cin,m) |
---|
[1992] | 927 | END IF |
---|
| 928 | IF (iflag_clos==2) THEN |
---|
[2007] | 929 | CALL cv3p1_closure(nloc, ncum, nd, icb, inb, & ! na->nd |
---|
| 930 | pbase, plcl, p, ph, tv, tvp, buoy, & |
---|
[2201] | 931 | supmax, ok_inhib, Ale, Alp, omega, & |
---|
[2007] | 932 | sig, w0, ptop2, cape, cin, m, iflag, coef_clos, & |
---|
| 933 | Plim1, plim2, asupmax, supmax0, & |
---|
| 934 | asupmaxmin, cbmf, plfc, wbeff) |
---|
[2079] | 935 | if (prt_level >= 10) & |
---|
| 936 | PRINT *, 'cv3p1_closure-> plfc,wbeff ', plfc(1), wbeff(1) |
---|
[1992] | 937 | END IF |
---|
| 938 | END IF ! iflag_con.eq.3 |
---|
| 939 | |
---|
| 940 | IF (iflag_con==4) THEN |
---|
[2007] | 941 | CALL cv_closure(nloc, ncum, nd, nk, icb, & |
---|
| 942 | tv, tvp, p, ph, dph, plcl, cpn, & |
---|
| 943 | iflag, cbmf) |
---|
[1992] | 944 | END IF |
---|
| 945 | |
---|
[2007] | 946 | ! print *,'cv_closure-> cape ',cape(1) |
---|
[1992] | 947 | |
---|
[2007] | 948 | ! ------------------------------------------------------------------- |
---|
| 949 | ! --- MIXING(2) |
---|
| 950 | ! ------------------------------------------------------------------- |
---|
[1992] | 951 | |
---|
| 952 | IF (iflag_con==3) THEN |
---|
| 953 | IF (iflag_mix==0) THEN |
---|
[2007] | 954 | CALL cv3_mixing(nloc, ncum, nd, nd, ntra, icb, nk, inb, & ! na->nd |
---|
| 955 | ph, t, q, qs, u, v, tra, h, lv, lf, frac, qnk, & |
---|
| 956 | unk, vnk, hp, tv, tvp, ep, clw, m, sig, & |
---|
| 957 | ment, qent, uent, vent, nent, sigij, elij, ments, qents, traent) |
---|
[1992] | 958 | CALL zilch(hent, nloc*klev*klev) |
---|
| 959 | ELSE |
---|
| 960 | CALL cv3_mixscale(nloc, ncum, nd, ment, m) |
---|
| 961 | IF (debut) THEN |
---|
| 962 | PRINT *, ' cv3_mixscale-> ' |
---|
| 963 | END IF !(debut) THEN |
---|
| 964 | END IF |
---|
| 965 | END IF |
---|
| 966 | |
---|
| 967 | IF (iflag_con==4) THEN |
---|
[2007] | 968 | CALL cv_mixing(nloc, ncum, nd, icb, nk, inb, inbis, & |
---|
| 969 | ph, t, q, qs, u, v, h, lv, qnk, & |
---|
| 970 | hp, tv, tvp, ep, clw, cbmf, & |
---|
| 971 | m, ment, qent, uent, vent, nent, sigij, elij) |
---|
| 972 | END IF |
---|
[1992] | 973 | |
---|
| 974 | IF (debut) THEN |
---|
| 975 | PRINT *, ' cv_mixing ->' |
---|
| 976 | END IF !(debut) THEN |
---|
[2007] | 977 | ! do i = 1,klev |
---|
| 978 | ! print*,'cv_mixing-> i,ment ',i,(ment(1,i,j),j=1,klev) |
---|
| 979 | ! enddo |
---|
[1992] | 980 | |
---|
[2007] | 981 | ! ------------------------------------------------------------------- |
---|
| 982 | ! --- UNSATURATED (PRECIPITATING) DOWNDRAFTS |
---|
| 983 | ! ------------------------------------------------------------------- |
---|
[1992] | 984 | IF (iflag_con==3) THEN |
---|
| 985 | IF (debut) THEN |
---|
| 986 | PRINT *, ' cva_driver -> cv3_unsat ' |
---|
| 987 | END IF !(debut) THEN |
---|
| 988 | |
---|
[2007] | 989 | CALL cv3_unsat(nloc, ncum, nd, nd, ntra, icb, inb, iflag, & ! na->nd |
---|
| 990 | t_wake, q_wake, qs_wake, gz, u, v, tra, p, ph, & |
---|
| 991 | th_wake, tv_wake, lv_wake, lf_wake, cpn_wake, & |
---|
| 992 | ep, sigp, clw, & |
---|
| 993 | m, ment, elij, delt, plcl, coef_clos, & |
---|
| 994 | mp, qp, up, vp, trap, wt, water, evap, fondue, ice, & |
---|
| 995 | faci, b, sigd, & |
---|
| 996 | wdtrainA, wdtrainM) ! RomP |
---|
[1992] | 997 | END IF |
---|
| 998 | |
---|
| 999 | IF (iflag_con==4) THEN |
---|
[2007] | 1000 | CALL cv_unsat(nloc, ncum, nd, inb, t, q, qs, gz, u, v, p, ph, & |
---|
| 1001 | h, lv, ep, sigp, clw, m, ment, elij, & |
---|
| 1002 | iflag, mp, qp, up, vp, wt, water, evap) |
---|
[1992] | 1003 | END IF |
---|
| 1004 | |
---|
| 1005 | IF (debut) THEN |
---|
| 1006 | PRINT *, 'cv_unsat-> ' |
---|
| 1007 | END IF !(debut) THEN |
---|
| 1008 | |
---|
[2007] | 1009 | ! print *,'cv_unsat-> mp ',mp |
---|
| 1010 | ! print *,'cv_unsat-> water ',water |
---|
| 1011 | ! ------------------------------------------------------------------- |
---|
| 1012 | ! --- YIELD |
---|
| 1013 | ! (tendencies, precipitation, variables of interface with other |
---|
| 1014 | ! processes, etc) |
---|
| 1015 | ! ------------------------------------------------------------------- |
---|
[1992] | 1016 | |
---|
| 1017 | IF (iflag_con==3) THEN |
---|
| 1018 | |
---|
[2007] | 1019 | CALL cv3_yield(nloc, ncum, nd, nd, ntra, ok_conserv_q, & ! na->nd |
---|
| 1020 | icb, inb, delt, & |
---|
| 1021 | t, q, t_wake, q_wake, s_wake, u, v, tra, & |
---|
| 1022 | gz, p, ph, h, hp, lv, lf, cpn, th, th_wake, & |
---|
| 1023 | ep, clw, m, tp, mp, qp, up, vp, trap, & |
---|
| 1024 | wt, water, ice, evap, fondue, faci, b, sigd, & |
---|
| 1025 | ment, qent, hent, iflag_mix, uent, vent, & |
---|
| 1026 | nent, elij, traent, sig, & |
---|
| 1027 | tv, tvp, wghti, & |
---|
[2306] | 1028 | iflag, precip, Vprecip, Vprecipi, ft, fq, fu, fv, ftra, & ! jyg |
---|
[2007] | 1029 | cbmf, upwd, dnwd, dnwd0, ma, mip, & |
---|
[2259] | 1030 | !! tls, tps, & ! useless . jyg |
---|
| 1031 | qcondc, wd, & |
---|
[2205] | 1032 | ftd, fqd, qnk, qtc, sigt, tau_cld_cv, coefw_cld_cv) |
---|
[1992] | 1033 | END IF |
---|
| 1034 | |
---|
| 1035 | IF (debut) THEN |
---|
| 1036 | PRINT *, ' cv3_yield -> fqd(1) = ', fqd(1, 1) |
---|
| 1037 | END IF !(debut) THEN |
---|
| 1038 | |
---|
| 1039 | IF (iflag_con==4) THEN |
---|
[2007] | 1040 | CALL cv_yield(nloc, ncum, nd, nk, icb, inb, delt, & |
---|
| 1041 | t, q, u, v, & |
---|
| 1042 | gz, p, ph, h, hp, lv, cpn, & |
---|
| 1043 | ep, clw, frac, m, mp, qp, up, vp, & |
---|
| 1044 | wt, water, evap, & |
---|
| 1045 | ment, qent, uent, vent, nent, elij, & |
---|
| 1046 | tv, tvp, & |
---|
| 1047 | iflag, wd, qprime, tprime, & |
---|
| 1048 | precip, cbmf, ft, fq, fu, fv, ma, qcondc) |
---|
[1992] | 1049 | END IF |
---|
| 1050 | |
---|
[2007] | 1051 | !AC! |
---|
| 1052 | !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 1053 | !--- passive tracers |
---|
| 1054 | !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[1992] | 1055 | |
---|
| 1056 | IF (iflag_con==3) THEN |
---|
[2007] | 1057 | !RomP >>> |
---|
| 1058 | CALL cv3_tracer(nloc, len, ncum, nd, nd, & |
---|
| 1059 | ment, sigij, da, phi, phi2, d1a, dam, & |
---|
| 1060 | ep, vprecip, elij, clw, epmlmMm, eplaMm, & |
---|
| 1061 | icb, inb) |
---|
| 1062 | !RomP <<< |
---|
[1992] | 1063 | END IF |
---|
| 1064 | |
---|
[2007] | 1065 | !AC! |
---|
[1992] | 1066 | |
---|
[2007] | 1067 | ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 1068 | ! --- UNCOMPRESS THE FIELDS |
---|
| 1069 | ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
[1992] | 1070 | |
---|
| 1071 | |
---|
| 1072 | IF (iflag_con==3) THEN |
---|
[2253] | 1073 | CALL cv3a_uncompress(nloc, len, ncum, nd, ntra, idcum, compress, & |
---|
[2007] | 1074 | iflag, icb, inb, & |
---|
| 1075 | precip, cbmf, plcl, plfc, wbeff, sig, w0, ptop2, & |
---|
| 1076 | ft, fq, fu, fv, ftra, & |
---|
[2306] | 1077 | sigd, ma, mip, vprecip, vprecipi, upwd, dnwd, dnwd0, & |
---|
[2007] | 1078 | qcondc, wd, cape, cin, & |
---|
| 1079 | tvp, & |
---|
| 1080 | ftd, fqd, & |
---|
| 1081 | Plim1, plim2, asupmax, supmax0, & |
---|
| 1082 | asupmaxmin, & |
---|
| 1083 | da, phi, mp, phi2, d1a, dam, sigij, & ! RomP |
---|
| 1084 | clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP |
---|
| 1085 | wdtrainA, wdtrainM, & ! RomP |
---|
[2207] | 1086 | qtc, sigt, & |
---|
[2007] | 1087 | iflag1, kbas1, ktop1, & |
---|
| 1088 | precip1, cbmf1, plcl1, plfc1, wbeff1, sig1, w01, ptop21, & |
---|
| 1089 | ft1, fq1, fu1, fv1, ftra1, & |
---|
[2306] | 1090 | sigd1, ma1, mip1, vprecip1, vprecipi1, upwd1, dnwd1, dnwd01, & |
---|
[2007] | 1091 | qcondc1, wd1, cape1, cin1, & |
---|
| 1092 | tvp1, & |
---|
| 1093 | ftd1, fqd1, & |
---|
| 1094 | Plim11, plim21, asupmax1, supmax01, & |
---|
| 1095 | asupmaxmin1, & |
---|
| 1096 | da1, phi1, mp1, phi21, d1a1, dam1, sigij1, & ! RomP |
---|
| 1097 | clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP |
---|
[2207] | 1098 | wdtrainA1, wdtrainM1, & ! RomP |
---|
| 1099 | qtc1, sigt1) |
---|
[1992] | 1100 | END IF |
---|
| 1101 | |
---|
| 1102 | IF (iflag_con==4) THEN |
---|
[2007] | 1103 | CALL cv_uncompress(nloc, len, ncum, nd, idcum, & |
---|
| 1104 | iflag, & |
---|
| 1105 | precip, cbmf, & |
---|
| 1106 | ft, fq, fu, fv, & |
---|
| 1107 | ma, qcondc, & |
---|
| 1108 | iflag1, & |
---|
| 1109 | precip1,cbmf1, & |
---|
| 1110 | ft1, fq1, fu1, fv1, & |
---|
| 1111 | ma1, qcondc1) |
---|
[1992] | 1112 | END IF |
---|
| 1113 | |
---|
| 1114 | END IF ! ncum>0 |
---|
| 1115 | |
---|
[2253] | 1116 | ! |
---|
| 1117 | ! In order take into account the possibility of changing the compression, |
---|
| 1118 | ! reset m, sig and w0 to zero for non-convective points. |
---|
| 1119 | DO k = 1,nd-1 |
---|
| 1120 | sig1(:, k) = sig1(:, k)*coef_convective(:) |
---|
| 1121 | w01(:, k) = w01(:, k)*coef_convective(:) |
---|
| 1122 | ENDDO |
---|
| 1123 | |
---|
[1992] | 1124 | IF (debut) THEN |
---|
[2255] | 1125 | PRINT *, ' cv_uncompress -> ' |
---|
[1992] | 1126 | debut = .FALSE. |
---|
[2007] | 1127 | END IF !(debut) THEN |
---|
[1992] | 1128 | |
---|
[2007] | 1129 | |
---|
[1992] | 1130 | RETURN |
---|
| 1131 | END SUBROUTINE cva_driver |
---|