[1632] | 1 | ! $Header$ |
---|
[5099] | 2 | |
---|
[5101] | 3 | SUBROUTINE vlspltgen_loc(q, pente_max, masse, w, pbaru, pbarv, & |
---|
| 4 | pdt, p, pk, teta) |
---|
[1632] | 5 | |
---|
[5159] | 6 | |
---|
[5101] | 7 | ! Auteurs: P.Le Van, F.Hourdin, F.Forget, F.Codron |
---|
[5159] | 8 | |
---|
[5101] | 9 | ! ******************************************************************** |
---|
| 10 | ! Schema d'advection " pseudo amont " . |
---|
| 11 | ! + test sur humidite specifique: Q advecte< Qsat aval |
---|
| 12 | ! (F. Codron, 10/99) |
---|
| 13 | ! ******************************************************************** |
---|
| 14 | ! q,pbaru,pbarv,w sont des arguments d'entree pour le s-pg .... |
---|
[5159] | 15 | |
---|
[5101] | 16 | ! pente_max facteur de limitation des pentes: 2 en general |
---|
| 17 | ! 0 pour un schema amont |
---|
| 18 | ! pbaru,pbarv,w flux de masse en u ,v ,w |
---|
| 19 | ! pdt pas de temps |
---|
[5159] | 20 | |
---|
[5101] | 21 | ! teta temperature potentielle, p pression aux interfaces, |
---|
| 22 | ! pk exner au milieu des couches necessaire pour calculer Qsat |
---|
| 23 | ! -------------------------------------------------------------------- |
---|
| 24 | USE parallel_lmdz |
---|
| 25 | USE mod_hallo |
---|
[5117] | 26 | USE lmdz_vampir |
---|
[5113] | 27 | ! CRisi: on rajoute variables utiles d'infotrac |
---|
[5182] | 28 | USE lmdz_infotrac, ONLY: nqtot, tracers, isoCheck |
---|
[5101] | 29 | USE vlspltgen_mod |
---|
| 30 | USE comconst_mod, ONLY: cpp |
---|
| 31 | USE logic_mod, ONLY: adv_qsat_liq |
---|
[5128] | 32 | |
---|
| 33 | |
---|
[5159] | 34 | USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm |
---|
| 35 | USE lmdz_paramet |
---|
[5101] | 36 | IMPLICIT NONE |
---|
[1632] | 37 | |
---|
[5101] | 38 | ! |
---|
[1632] | 39 | |
---|
[5159] | 40 | |
---|
| 41 | |
---|
| 42 | |
---|
[5101] | 43 | ! Arguments: |
---|
| 44 | ! ---------- |
---|
| 45 | REAL :: masse(ijb_u:ije_u, llm), pente_max |
---|
| 46 | REAL :: pbaru(ijb_u:ije_u, llm), pbarv(ijb_v:ije_v, llm) |
---|
| 47 | REAL :: q(ijb_u:ije_u, llm, nqtot) |
---|
| 48 | REAL :: w(ijb_u:ije_u, llm), pdt |
---|
| 49 | REAL :: p(ijb_u:ije_u, llmp1), teta(ijb_u:ije_u, llm) |
---|
| 50 | REAL :: pk(ijb_u:ije_u, llm) |
---|
[5159] | 51 | |
---|
[5101] | 52 | ! Local |
---|
| 53 | ! --------- |
---|
[5159] | 54 | |
---|
[5101] | 55 | INTEGER :: ij, l |
---|
[5159] | 56 | |
---|
[5101] | 57 | REAL :: zzpbar, zzw |
---|
[1632] | 58 | |
---|
[5101] | 59 | REAL :: qmin, qmax |
---|
| 60 | DATA qmin, qmax/0., 1.e33/ |
---|
[1632] | 61 | |
---|
[5101] | 62 | !--pour rapport de melange saturant-- |
---|
[1632] | 63 | |
---|
[5101] | 64 | REAL :: rtt, retv, r2es, r3les, r3ies, r4les, r4ies, play |
---|
| 65 | REAL :: ptarg, pdelarg, foeew, zdelta |
---|
| 66 | REAL :: tempe(ijb_u:ije_u) |
---|
| 67 | INTEGER :: ijb, ije, iq, iq2, ifils |
---|
| 68 | LOGICAL, SAVE :: firstcall = .TRUE. |
---|
| 69 | !$OMP THREADPRIVATE(firstcall) |
---|
| 70 | type(request), SAVE :: MyRequest1 |
---|
| 71 | !$OMP THREADPRIVATE(MyRequest1) |
---|
| 72 | type(request), SAVE :: MyRequest2 |
---|
| 73 | !$OMP THREADPRIVATE(MyRequest2) |
---|
| 74 | ! fonction psat(T) |
---|
[1632] | 75 | |
---|
[5101] | 76 | FOEEW (PTARG, PDELARG) = EXP (& |
---|
| 77 | (R3LES * (1. - PDELARG) + R3IES * PDELARG) * (PTARG - RTT) & |
---|
| 78 | / (PTARG - (R4LES * (1. - PDELARG) + R4IES * PDELARG))) |
---|
[1632] | 79 | |
---|
[5101] | 80 | r2es = 380.11733 |
---|
| 81 | r3les = 17.269 |
---|
| 82 | r3ies = 21.875 |
---|
| 83 | r4les = 35.86 |
---|
| 84 | r4ies = 7.66 |
---|
| 85 | retv = 0.6077667 |
---|
| 86 | rtt = 273.16 |
---|
[1632] | 87 | |
---|
[5101] | 88 | ! Allocate variables depending on dynamic variable nqtot |
---|
[1632] | 89 | |
---|
[5101] | 90 | IF (firstcall) THEN |
---|
| 91 | firstcall = .FALSE. |
---|
| 92 | END IF |
---|
| 93 | !-- Calcul de Qsat en chaque point |
---|
| 94 | !-- approximation: au milieu des couches play(l)=(p(l)+p(l+1))/2 |
---|
| 95 | ! pour eviter une exponentielle. |
---|
[1632] | 96 | |
---|
[5101] | 97 | CALL SetTag(MyRequest1, 100) |
---|
| 98 | CALL SetTag(MyRequest2, 101) |
---|
[1632] | 99 | |
---|
[5101] | 100 | ijb = ij_begin - iip1 |
---|
| 101 | ije = ij_end + iip1 |
---|
[5117] | 102 | IF (pole_nord) ijb = ij_begin |
---|
| 103 | IF (pole_sud) ije = ij_end |
---|
[1632] | 104 | |
---|
[5101] | 105 | !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 106 | DO l = 1, llm |
---|
| 107 | DO ij = ijb, ije |
---|
| 108 | tempe(ij) = teta(ij, l) * pk(ij, l) / cpp |
---|
| 109 | ENDDO |
---|
| 110 | DO ij = ijb, ije |
---|
| 111 | IF (adv_qsat_liq) THEN |
---|
| 112 | zdelta = 0. |
---|
| 113 | ELSE |
---|
| 114 | zdelta = MAX(0., SIGN(1., rtt - tempe(ij))) |
---|
| 115 | ENDIF |
---|
| 116 | play = 0.5 * (p(ij, l) + p(ij, l + 1)) |
---|
| 117 | qsat(ij, l) = MIN(0.5, r2es * FOEEW(tempe(ij), zdelta) / play) |
---|
| 118 | qsat(ij, l) = qsat(ij, l) / (1. - retv * qsat(ij, l)) |
---|
| 119 | ENDDO |
---|
| 120 | ENDDO |
---|
| 121 | !$OMP END DO NOWAIT |
---|
| 122 | ! PRINT*,'Debut vlsplt version debug sans vlyqs' |
---|
[1632] | 123 | |
---|
[5101] | 124 | zzpbar = 0.5 * pdt |
---|
| 125 | zzw = pdt |
---|
[1632] | 126 | |
---|
[5101] | 127 | ijb = ij_begin |
---|
| 128 | ije = ij_end |
---|
[5117] | 129 | IF (pole_nord) ijb = ijb + iip1 |
---|
| 130 | IF (pole_sud) ije = ije - iip1 |
---|
[1632] | 131 | |
---|
[5101] | 132 | !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 133 | DO l = 1, llm |
---|
| 134 | DO ij = ijb, ije |
---|
| 135 | mu(ij, l) = pbaru(ij, l) * zzpbar |
---|
| 136 | ENDDO |
---|
| 137 | ENDDO |
---|
| 138 | !$OMP END DO NOWAIT |
---|
[1632] | 139 | |
---|
[5101] | 140 | ijb = ij_begin - iip1 |
---|
| 141 | ije = ij_end |
---|
[5117] | 142 | IF (pole_nord) ijb = ij_begin |
---|
| 143 | IF (pole_sud) ije = ij_end - iip1 |
---|
[1632] | 144 | |
---|
[5101] | 145 | !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 146 | DO l = 1, llm |
---|
| 147 | DO ij = ijb, ije |
---|
| 148 | mv(ij, l) = pbarv(ij, l) * zzpbar |
---|
| 149 | ENDDO |
---|
| 150 | ENDDO |
---|
| 151 | !$OMP END DO NOWAIT |
---|
| 152 | |
---|
| 153 | ijb = ij_begin |
---|
| 154 | ije = ij_end |
---|
| 155 | |
---|
| 156 | DO iq = 1, nqtot |
---|
| 157 | !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 158 | DO l = 1, llm |
---|
| 159 | DO ij = ijb, ije |
---|
| 160 | mw(ij, l, iq) = w(ij, l) * zzw |
---|
[1632] | 161 | ENDDO |
---|
[5101] | 162 | ENDDO |
---|
| 163 | !$OMP END DO NOWAIT |
---|
| 164 | ENDDO |
---|
[1632] | 165 | |
---|
[5101] | 166 | DO iq = 1, nqtot |
---|
| 167 | !$OMP MASTER |
---|
| 168 | DO ij = ijb, ije |
---|
| 169 | mw(ij, llm + 1, iq) = 0. |
---|
| 170 | ENDDO |
---|
| 171 | !$OMP END MASTER |
---|
| 172 | ENDDO |
---|
[1632] | 173 | |
---|
[5101] | 174 | ijb = ij_begin |
---|
| 175 | ije = ij_end |
---|
[1632] | 176 | |
---|
[5101] | 177 | DO iq = 1, nqtot |
---|
| 178 | !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 179 | DO l = 1, llm |
---|
| 180 | zq(ijb:ije, l, iq) = q(ijb:ije, l, iq) |
---|
| 181 | zm(ijb:ije, l, iq) = masse(ijb:ije, l) |
---|
| 182 | ENDDO |
---|
| 183 | !$OMP END DO NOWAIT |
---|
| 184 | ENDDO |
---|
[1632] | 185 | |
---|
[5113] | 186 | ! verif temporaire |
---|
[5101] | 187 | ijb = ij_begin |
---|
| 188 | ije = ij_end |
---|
| 189 | CALL check_isotopes(zq, ijb, ije, 'vlspltgen_loc 191') |
---|
| 190 | |
---|
| 191 | !$OMP BARRIER |
---|
| 192 | DO iq = 1, nqtot |
---|
[5113] | 193 | ! CRisi: on ne boucle que sur les pères= ceux qui sont transportés directement par l'air |
---|
[5101] | 194 | IF(tracers(iq)%parent /= 'air') CYCLE |
---|
[5116] | 195 | !WRITE(*,*) 'vlspltgen 192: iq,iadv=',iq,tracers(iq)%iadv |
---|
[5101] | 196 | SELECT CASE(tracers(iq)%iadv) |
---|
| 197 | CASE(0); CYCLE |
---|
| 198 | CASE(10) |
---|
| 199 | CALL vlx_loc(zq, pente_max, zm, mu, & |
---|
| 200 | ij_begin, ij_end, iq) |
---|
[1632] | 201 | |
---|
[5101] | 202 | !$OMP MASTER |
---|
| 203 | CALL VTb(VTHallo) |
---|
| 204 | !$OMP END MASTER |
---|
| 205 | CALL Register_Hallo_u(zq(:, :, iq), llm, 2, 2, 2, 2, MyRequest1) |
---|
| 206 | CALL Register_Hallo_u(zm(:, :, iq), llm, 1, 1, 1, 1, MyRequest1) |
---|
| 207 | ! CRisi |
---|
[5158] | 208 | DO ifils = 1, tracers(iq)%nqDescen |
---|
[5101] | 209 | iq2 = tracers(iq)%iqDescen(ifils) |
---|
| 210 | CALL Register_Hallo_u(zq(:, :, iq2), llm, 2, 2, 2, 2, MyRequest1) |
---|
| 211 | CALL Register_Hallo_u(zm(:, :, iq2), llm, 1, 1, 1, 1, MyRequest1) |
---|
| 212 | enddo |
---|
[1632] | 213 | |
---|
[5101] | 214 | !$OMP MASTER |
---|
| 215 | CALL VTe(VTHallo) |
---|
| 216 | !$OMP END MASTER |
---|
| 217 | CASE(14) |
---|
| 218 | CALL vlxqs_loc(zq, pente_max, zm, mu, & |
---|
| 219 | qsat, ij_begin, ij_end, iq) |
---|
[1632] | 220 | |
---|
[5101] | 221 | !$OMP MASTER |
---|
| 222 | CALL VTb(VTHallo) |
---|
| 223 | !$OMP END MASTER |
---|
[1632] | 224 | |
---|
[5101] | 225 | CALL Register_Hallo_u(zq(:, :, iq), llm, 2, 2, 2, 2, MyRequest1) |
---|
| 226 | CALL Register_Hallo_u(zm(:, :, iq), llm, 1, 1, 1, 1, MyRequest1) |
---|
[5158] | 227 | DO ifils = 1, tracers(iq)%nqDescen |
---|
[5101] | 228 | iq2 = tracers(iq)%iqDescen(ifils) |
---|
| 229 | CALL Register_Hallo_u(zq(:, :, iq2), llm, 2, 2, 2, 2, MyRequest1) |
---|
| 230 | CALL Register_Hallo_u(zm(:, :, iq2), llm, 1, 1, 1, 1, MyRequest1) |
---|
| 231 | enddo |
---|
[1632] | 232 | |
---|
[5101] | 233 | !$OMP MASTER |
---|
| 234 | CALL VTe(VTHallo) |
---|
| 235 | !$OMP END MASTER |
---|
| 236 | CASE DEFAULT |
---|
| 237 | CALL abort_gcm("vlspltgen_loc", "schema non parallelise", 1) |
---|
| 238 | END SELECT |
---|
[1632] | 239 | |
---|
[5101] | 240 | enddo !DO iq=1,nqtot |
---|
[1632] | 241 | |
---|
| 242 | |
---|
[5101] | 243 | !$OMP BARRIER |
---|
| 244 | !$OMP MASTER |
---|
| 245 | CALL VTb(VTHallo) |
---|
| 246 | !$OMP END MASTER |
---|
[2270] | 247 | |
---|
[5101] | 248 | CALL SendRequest(MyRequest1) |
---|
[2270] | 249 | |
---|
[5101] | 250 | !$OMP MASTER |
---|
| 251 | CALL VTe(VTHallo) |
---|
| 252 | !$OMP END MASTER |
---|
| 253 | !$OMP BARRIER |
---|
| 254 | |
---|
[5113] | 255 | ! verif temporaire |
---|
[5101] | 256 | ijb = ij_begin - 2 * iip1 |
---|
| 257 | ije = ij_end + 2 * iip1 |
---|
[5117] | 258 | IF (pole_nord) ijb = ij_begin |
---|
| 259 | IF (pole_sud) ije = ij_end |
---|
[5101] | 260 | CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 280') |
---|
| 261 | |
---|
[5158] | 262 | DO iq = 1, nqtot |
---|
[5101] | 263 | IF(tracers(iq)%parent /= 'air') CYCLE |
---|
[5116] | 264 | !WRITE(*,*) 'vlspltgen 279: iq=',iq |
---|
[5101] | 265 | |
---|
| 266 | SELECT CASE(tracers(iq)%iadv) |
---|
| 267 | CASE(0); CYCLE |
---|
| 268 | CASE(10) |
---|
| 269 | CASE(14) |
---|
| 270 | CASE DEFAULT |
---|
| 271 | CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1) |
---|
| 272 | END SELECT |
---|
[1632] | 273 | |
---|
[5101] | 274 | enddo |
---|
| 275 | !$OMP BARRIER |
---|
| 276 | !$OMP MASTER |
---|
| 277 | CALL VTb(VTHallo) |
---|
| 278 | !$OMP END MASTER |
---|
[1632] | 279 | |
---|
[5101] | 280 | ! CALL WaitRecvRequest(MyRequest1) |
---|
| 281 | ! CALL WaitSendRequest(MyRequest1) |
---|
| 282 | !$OMP BARRIER |
---|
| 283 | CALL WaitRequest(MyRequest1) |
---|
[1632] | 284 | |
---|
| 285 | |
---|
[5101] | 286 | !$OMP MASTER |
---|
| 287 | CALL VTe(VTHallo) |
---|
| 288 | !$OMP END MASTER |
---|
| 289 | !$OMP BARRIER |
---|
[1632] | 290 | |
---|
[5101] | 291 | IF(isoCheck) THEN |
---|
| 292 | CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 326') |
---|
| 293 | ijb = ij_begin - 2 * iip1 |
---|
| 294 | ije = ij_end + 2 * iip1 |
---|
[5117] | 295 | IF (pole_nord) ijb = ij_begin |
---|
| 296 | IF (pole_sud) ije = ij_end |
---|
[5101] | 297 | CALL check_isotopes(zq, ijb, ije, 'vlspltgen_loc 336') |
---|
| 298 | END IF |
---|
[2270] | 299 | |
---|
[5158] | 300 | DO iq = 1, nqtot |
---|
[5101] | 301 | IF(tracers(iq)%parent /= 'air') CYCLE |
---|
[1632] | 302 | |
---|
[5101] | 303 | SELECT CASE(tracers(iq)%iadv) |
---|
| 304 | CASE(0); CYCLE |
---|
| 305 | CASE(10); CALL vly_loc(zq, pente_max, zm, mv, iq) |
---|
| 306 | CASE(14); CALL vlyqs_loc(zq, pente_max, zm, mv, qsat, iq) |
---|
| 307 | CASE DEFAULT |
---|
| 308 | CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1) |
---|
| 309 | END SELECT |
---|
[1632] | 310 | |
---|
[5101] | 311 | enddo |
---|
| 312 | |
---|
| 313 | CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 357') |
---|
| 314 | |
---|
[5158] | 315 | DO iq = 1, nqtot |
---|
[5101] | 316 | IF(tracers(iq)%parent /= 'air') CYCLE |
---|
| 317 | SELECT CASE(tracers(iq)%iadv) |
---|
| 318 | CASE(0); CYCLE |
---|
| 319 | CASE(10, 14) |
---|
| 320 | !$OMP BARRIER |
---|
| 321 | CALL vlz_loc(zq, pente_max, zm, mw, & |
---|
| 322 | ij_begin, ij_end, iq) |
---|
| 323 | !$OMP BARRIER |
---|
[1632] | 324 | |
---|
[5101] | 325 | !$OMP MASTER |
---|
| 326 | CALL VTb(VTHallo) |
---|
| 327 | !$OMP END MASTER |
---|
[1632] | 328 | |
---|
[5101] | 329 | CALL Register_Hallo_u(zq(:, :, iq), llm, 2, 2, 2, 2, MyRequest2) |
---|
| 330 | CALL Register_Hallo_u(zm(:, :, iq), llm, 1, 1, 1, 1, MyRequest2) |
---|
[5113] | 331 | ! CRisi |
---|
[5158] | 332 | DO ifils = 1, tracers(iq)%nqDescen |
---|
[5101] | 333 | iq2 = tracers(iq)%iqDescen(ifils) |
---|
| 334 | CALL Register_Hallo_u(zq(:, :, iq2), llm, 2, 2, 2, 2, MyRequest2) |
---|
| 335 | CALL Register_Hallo_u(zm(:, :, iq2), llm, 1, 1, 1, 1, MyRequest2) |
---|
[1632] | 336 | enddo |
---|
[5101] | 337 | !$OMP MASTER |
---|
| 338 | CALL VTe(VTHallo) |
---|
| 339 | !$OMP END MASTER |
---|
| 340 | !$OMP BARRIER |
---|
| 341 | CASE DEFAULT |
---|
[1632] | 342 | |
---|
[5101] | 343 | CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1) |
---|
| 344 | END SELECT |
---|
[1632] | 345 | |
---|
[5101] | 346 | enddo |
---|
| 347 | !$OMP BARRIER |
---|
[1632] | 348 | |
---|
[5101] | 349 | !$OMP MASTER |
---|
| 350 | CALL VTb(VTHallo) |
---|
| 351 | !$OMP END MASTER |
---|
[1632] | 352 | |
---|
[5101] | 353 | CALL SendRequest(MyRequest2) |
---|
[2270] | 354 | |
---|
[5101] | 355 | !$OMP MASTER |
---|
| 356 | CALL VTe(VTHallo) |
---|
| 357 | !$OMP END MASTER |
---|
[2270] | 358 | |
---|
[5101] | 359 | CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 429') |
---|
[1632] | 360 | |
---|
[5101] | 361 | !$OMP BARRIER |
---|
[5158] | 362 | DO iq = 1, nqtot |
---|
[5101] | 363 | IF(tracers(iq)%parent /= 'air') CYCLE |
---|
[5116] | 364 | !WRITE(*,*) 'vlspltgen 409: iq=',iq |
---|
[1632] | 365 | |
---|
[5101] | 366 | SELECT CASE(tracers(iq)%iadv) |
---|
| 367 | CASE(0); CYCLE |
---|
| 368 | CASE(10, 14) |
---|
| 369 | !$OMP BARRIER |
---|
| 370 | CASE DEFAULT |
---|
| 371 | CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1) |
---|
| 372 | END SELECT |
---|
[1632] | 373 | |
---|
[5101] | 374 | enddo |
---|
[5116] | 375 | !WRITE(*,*) 'vlspltgen_loc 476' |
---|
[1632] | 376 | |
---|
[5101] | 377 | !$OMP BARRIER |
---|
[5116] | 378 | !WRITE(*,*) 'vlspltgen_loc 477' |
---|
[5101] | 379 | !$OMP MASTER |
---|
| 380 | CALL VTb(VTHallo) |
---|
| 381 | !$OMP END MASTER |
---|
[1632] | 382 | |
---|
[5101] | 383 | ! CALL WaitRecvRequest(MyRequest2) |
---|
| 384 | ! CALL WaitSendRequest(MyRequest2) |
---|
| 385 | !$OMP BARRIER |
---|
| 386 | CALL WaitRequest(MyRequest2) |
---|
[1632] | 387 | |
---|
[5101] | 388 | !$OMP MASTER |
---|
| 389 | CALL VTe(VTHallo) |
---|
| 390 | !$OMP END MASTER |
---|
| 391 | !$OMP BARRIER |
---|
[1632] | 392 | |
---|
[2270] | 393 | |
---|
[5116] | 394 | !WRITE(*,*) 'vlspltgen_loc 494' |
---|
[5101] | 395 | CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 461') |
---|
[1632] | 396 | |
---|
[5158] | 397 | DO iq = 1, nqtot |
---|
[5101] | 398 | IF(tracers(iq)%parent /= 'air') CYCLE |
---|
| 399 | SELECT CASE(tracers(iq)%iadv) |
---|
| 400 | CASE(0); CYCLE |
---|
| 401 | CASE(10); CALL vly_loc(zq, pente_max, zm, mv, iq) |
---|
| 402 | CASE(14); CALL vlyqs_loc(zq, pente_max, zm, mv, qsat, iq) |
---|
| 403 | CASE DEFAULT |
---|
| 404 | CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1) |
---|
| 405 | END SELECT |
---|
[1632] | 406 | |
---|
[5101] | 407 | enddo !do iq=1,nqtot |
---|
[1632] | 408 | |
---|
[5101] | 409 | CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 493') |
---|
[1632] | 410 | |
---|
[5158] | 411 | DO iq = 1, nqtot |
---|
[5101] | 412 | IF(tracers(iq)%parent /= 'air') CYCLE |
---|
| 413 | SELECT CASE(tracers(iq)%iadv) |
---|
| 414 | CASE(0); CYCLE |
---|
| 415 | CASE(10); CALL vlx_loc(zq, pente_max, zm, mu, & |
---|
| 416 | ij_begin, ij_end, iq) |
---|
| 417 | CASE(14); CALL vlxqs_loc(zq, pente_max, zm, mu, & |
---|
| 418 | qsat, ij_begin, ij_end, iq) |
---|
| 419 | CASE DEFAULT |
---|
| 420 | CALL abort_gcm("vlspltgen_p", "schema non parallelise", 1) |
---|
| 421 | END SELECT |
---|
[1632] | 422 | |
---|
[5101] | 423 | enddo !do iq=1,nqtot |
---|
[1632] | 424 | |
---|
[5116] | 425 | !WRITE(*,*) 'vlspltgen 550: apres derniere serie de CALL vlx' |
---|
[5101] | 426 | CALL check_isotopes(zq, ij_begin, ij_end, 'vlspltgen_loc 521') |
---|
[1632] | 427 | |
---|
[5101] | 428 | ijb = ij_begin |
---|
| 429 | ije = ij_end |
---|
| 430 | !$OMP BARRIER |
---|
[1632] | 431 | |
---|
[5101] | 432 | DO iq = 1, nqtot |
---|
| 433 | !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 434 | DO l = 1, llm |
---|
| 435 | DO ij = ijb, ije |
---|
[5160] | 436 | ! PRINT *,'zq-->',ij,l,iq,zq(ij,l,iq) |
---|
| 437 | ! PRINT *,'q-->',ij,l,iq,q(ij,l,iq) |
---|
[5101] | 438 | q(ij, l, iq) = zq(ij, l, iq) |
---|
| 439 | ENDDO |
---|
| 440 | ENDDO |
---|
| 441 | !$OMP END DO NOWAIT |
---|
| 442 | |
---|
| 443 | !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 444 | DO l = 1, llm |
---|
| 445 | DO ij = ijb, ije - iip1 + 1, iip1 |
---|
| 446 | q(ij + iim, l, iq) = q(ij, l, iq) |
---|
| 447 | ENDDO |
---|
| 448 | ENDDO |
---|
| 449 | !$OMP END DO NOWAIT |
---|
| 450 | ENDDO !DO iq=1,nqtot |
---|
| 451 | |
---|
| 452 | CALL check_isotopes(q, ij_begin, ij_end, 'vlspltgen_loc 557') |
---|
| 453 | |
---|
| 454 | !$OMP BARRIER |
---|
| 455 | |
---|
| 456 | !c$OMP MASTER |
---|
| 457 | ! CALL WaitSendRequest(MyRequest1) |
---|
| 458 | ! CALL WaitSendRequest(MyRequest2) |
---|
| 459 | !c$OMP END MASTER |
---|
| 460 | !c$OMP BARRIER |
---|
| 461 | |
---|
[5116] | 462 | !WRITE(*,*) 'vlspltgen 597: sortie' |
---|
[5105] | 463 | |
---|
[5101] | 464 | END SUBROUTINE vlspltgen_loc |
---|