[630] | 1 | ! |
---|
| 2 | ! $Header$ |
---|
| 3 | ! |
---|
| 4 | c |
---|
| 5 | c |
---|
[764] | 6 | #ifdef INCA |
---|
[630] | 7 | SUBROUTINE advtrac_p(pbaru,pbarv , |
---|
| 8 | * p, masse,q,iapptrac,teta, |
---|
| 9 | * flxw, |
---|
[764] | 10 | * pk ) |
---|
[630] | 11 | #else |
---|
| 12 | SUBROUTINE advtrac_p(pbaru,pbarv , |
---|
| 13 | * p, masse,q,iapptrac,teta, |
---|
| 14 | * pk) |
---|
| 15 | #endif |
---|
| 16 | |
---|
| 17 | c Auteur : F. Hourdin |
---|
| 18 | c |
---|
| 19 | c Modif. P. Le Van (20/12/97) |
---|
| 20 | c F. Codron (10/99) |
---|
| 21 | c D. Le Croller (07/2001) |
---|
| 22 | c M.A Filiberti (04/2002) |
---|
| 23 | c |
---|
| 24 | USE parallel |
---|
[764] | 25 | USE Write_Field_p |
---|
[630] | 26 | USE Bands |
---|
| 27 | USE mod_hallo |
---|
| 28 | USE Vampir |
---|
| 29 | USE times |
---|
| 30 | IMPLICIT NONE |
---|
| 31 | c |
---|
| 32 | #include "dimensions.h" |
---|
| 33 | #include "paramet.h" |
---|
| 34 | #include "comconst.h" |
---|
| 35 | #include "comvert.h" |
---|
| 36 | #include "comdissip.h" |
---|
| 37 | #include "comgeom2.h" |
---|
| 38 | #include "logic.h" |
---|
| 39 | #include "temps.h" |
---|
| 40 | #include "control.h" |
---|
| 41 | #include "ener.h" |
---|
| 42 | #include "description.h" |
---|
| 43 | #include "advtrac.h" |
---|
| 44 | |
---|
| 45 | c------------------------------------------------------------------- |
---|
| 46 | c Arguments |
---|
| 47 | c------------------------------------------------------------------- |
---|
| 48 | c Ajout PPM |
---|
| 49 | c-------------------------------------------------------- |
---|
| 50 | REAL massebx(ip1jmp1,llm),masseby(ip1jm,llm) |
---|
| 51 | c-------------------------------------------------------- |
---|
| 52 | INTEGER iapptrac |
---|
| 53 | REAL pbaru(ip1jmp1,llm),pbarv(ip1jm,llm) |
---|
| 54 | REAL q(ip1jmp1,llm,nqmx),masse(ip1jmp1,llm) |
---|
| 55 | REAL p( ip1jmp1,llmp1 ),teta(ip1jmp1,llm) |
---|
| 56 | REAL pk(ip1jmp1,llm) |
---|
[764] | 57 | #ifdef INCA |
---|
[630] | 58 | REAL :: flxw(ip1jmp1,llm) |
---|
| 59 | #endif |
---|
| 60 | |
---|
| 61 | c------------------------------------------------------------- |
---|
| 62 | c Variables locales |
---|
| 63 | c------------------------------------------------------------- |
---|
| 64 | |
---|
| 65 | REAL pbaruc(ip1jmp1,llm),pbarvc(ip1jm,llm) |
---|
| 66 | REAL massem(ip1jmp1,llm),zdp(ip1jmp1) |
---|
[764] | 67 | REAL,SAVE::pbarug(ip1jmp1,llm),pbarvg(ip1jm,llm),wg(ip1jmp1,llm) |
---|
[630] | 68 | REAL (kind=kind(1.d0)) :: t_initial, t_final, tps_cpu |
---|
| 69 | real cpuadv(nqmx) |
---|
| 70 | common/cpuadv/cpuadv |
---|
| 71 | |
---|
| 72 | INTEGER iadvtr |
---|
| 73 | INTEGER ij,l,iq,iiq |
---|
| 74 | REAL zdpmin, zdpmax |
---|
| 75 | SAVE iadvtr, massem, pbaruc, pbarvc |
---|
| 76 | DATA iadvtr/0/ |
---|
[764] | 77 | c$OMP THREADPRIVATE(iadvtr) |
---|
[630] | 78 | c---------------------------------------------------------- |
---|
| 79 | c Rajouts pour PPM |
---|
| 80 | c---------------------------------------------------------- |
---|
| 81 | INTEGER indice,n |
---|
| 82 | REAL dtbon ! Pas de temps adaptatif pour que CFL<1 |
---|
| 83 | REAL CFLmaxz,aaa,bbb ! CFL maximum |
---|
| 84 | REAL psppm(iim,jjp1) ! pression au sol |
---|
| 85 | REAL unatppm(iim,jjp1,llm),vnatppm(iim,jjp1,llm) |
---|
| 86 | REAL qppm(iim*jjp1,llm,nqmx) |
---|
| 87 | REAL fluxwppm(iim,jjp1,llm) |
---|
| 88 | REAL apppm(llmp1), bpppm(llmp1) |
---|
| 89 | LOGICAL dum,fill |
---|
| 90 | DATA fill/.true./ |
---|
| 91 | DATA dum/.true./ |
---|
| 92 | REAL finmasse(ip1jmp1,llm) |
---|
| 93 | integer ijb,ije,ijb_u,ijb_v,ije_u,ije_v,j |
---|
| 94 | type(Request) :: Request_vanleer |
---|
[764] | 95 | REAL,SAVE :: p_tmp( ip1jmp1,llmp1 ) |
---|
| 96 | REAL,SAVE :: teta_tmp(ip1jmp1,llm) |
---|
| 97 | REAL,SAVE :: pk_tmp(ip1jmp1,llm) |
---|
[630] | 98 | |
---|
| 99 | ijb_u=ij_begin |
---|
| 100 | ije_u=ij_end |
---|
| 101 | |
---|
| 102 | ijb_v=ij_begin-iip1 |
---|
| 103 | ije_v=ij_end |
---|
| 104 | if (pole_nord) ijb_v=ij_begin |
---|
| 105 | if (pole_sud) ije_v=ij_end-iip1 |
---|
| 106 | |
---|
| 107 | IF(iadvtr.EQ.0) THEN |
---|
| 108 | c CALL initial0(ijp1llm,pbaruc) |
---|
| 109 | c CALL initial0(ijmllm,pbarvc) |
---|
[764] | 110 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 111 | DO l=1,llm |
---|
| 112 | pbaruc(ijb_u:ije_u,l)=0. |
---|
| 113 | pbarvc(ijb_v:ije_v,l)=0. |
---|
| 114 | ENDDO |
---|
| 115 | c$OMP END DO NOWAIT |
---|
[630] | 116 | ENDIF |
---|
| 117 | |
---|
| 118 | c accumulation des flux de masse horizontaux |
---|
[764] | 119 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
[630] | 120 | DO l=1,llm |
---|
| 121 | DO ij = ijb_u,ije_u |
---|
| 122 | pbaruc(ij,l) = pbaruc(ij,l) + pbaru(ij,l) |
---|
| 123 | ENDDO |
---|
| 124 | DO ij = ijb_v,ije_v |
---|
| 125 | pbarvc(ij,l) = pbarvc(ij,l) + pbarv(ij,l) |
---|
| 126 | ENDDO |
---|
| 127 | ENDDO |
---|
[764] | 128 | c$OMP END DO NOWAIT |
---|
[630] | 129 | |
---|
| 130 | c selection de la masse instantannee des mailles avant le transport. |
---|
| 131 | IF(iadvtr.EQ.0) THEN |
---|
| 132 | |
---|
| 133 | c CALL SCOPY(ip1jmp1*llm,masse,1,massem,1) |
---|
| 134 | ijb=ij_begin |
---|
| 135 | ije=ij_end |
---|
| 136 | |
---|
[764] | 137 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 138 | DO l=1,llm |
---|
| 139 | massem(ijb:ije,l)=masse(ijb:ije,l) |
---|
| 140 | ENDDO |
---|
| 141 | c$OMP END DO NOWAIT |
---|
| 142 | |
---|
[630] | 143 | ccc CALL filtreg ( massem ,jjp1, llm,-2, 2, .TRUE., 1 ) |
---|
| 144 | c |
---|
| 145 | ENDIF |
---|
| 146 | |
---|
| 147 | iadvtr = iadvtr+1 |
---|
[764] | 148 | |
---|
| 149 | c$OMP MASTER |
---|
[630] | 150 | iapptrac = iadvtr |
---|
[764] | 151 | c$OMP END MASTER |
---|
[630] | 152 | |
---|
[764] | 153 | c Test pour savoir si on advecte a ce pas de temps |
---|
[630] | 154 | |
---|
| 155 | IF ( iadvtr.EQ.iapp_tracvl ) THEN |
---|
[764] | 156 | c$OMP MASTER |
---|
[630] | 157 | call suspend_timer(timer_caldyn) |
---|
[764] | 158 | c$OMP END MASTER |
---|
[630] | 159 | |
---|
| 160 | ijb=ij_begin |
---|
| 161 | ije=ij_end |
---|
| 162 | |
---|
| 163 | |
---|
| 164 | cc .. Modif P.Le Van ( 20/12/97 ) .... |
---|
| 165 | cc |
---|
| 166 | |
---|
| 167 | c traitement des flux de masse avant advection. |
---|
| 168 | c 1. calcul de w |
---|
| 169 | c 2. groupement des mailles pres du pole. |
---|
| 170 | |
---|
[764] | 171 | c$OMP BARRIER |
---|
[630] | 172 | CALL groupe_p( massem, pbaruc,pbarvc, pbarug,pbarvg,wg ) |
---|
[764] | 173 | c$OMP BARRIER |
---|
[630] | 174 | |
---|
[764] | 175 | c$OMP BARRIER |
---|
| 176 | c$OMP MASTER |
---|
| 177 | p_tmp(ijb:ije,1:llmp1)=p(ijb:ije,1:llmp1) |
---|
| 178 | pk_tmp(ijb:ije,1:llm)=pk(ijb:ije,1:llm) |
---|
| 179 | teta_tmp(ijb:ije,1:llm)=teta(ijb:ije,1:llm) |
---|
[630] | 180 | call VTb(VTHallo) |
---|
| 181 | call Register_SwapFieldHallo(pbarug,pbarug,ip1jmp1,llm, |
---|
| 182 | * jj_Nb_vanleer,0,0,Request_vanleer) |
---|
| 183 | call Register_SwapFieldHallo(pbarvg,pbarvg,ip1jm,llm, |
---|
| 184 | * jj_Nb_vanleer,1,0,Request_vanleer) |
---|
| 185 | call Register_SwapFieldHallo(massem,massem,ip1jmp1,llm, |
---|
| 186 | * jj_Nb_vanleer,0,0,Request_vanleer) |
---|
| 187 | call Register_SwapFieldHallo(wg,wg,ip1jmp1,llm, |
---|
| 188 | * jj_Nb_vanleer,0,0,Request_vanleer) |
---|
| 189 | call Register_SwapFieldHallo(teta_tmp,teta_tmp,ip1jmp1,llm, |
---|
| 190 | * jj_Nb_vanleer,1,1,Request_vanleer) |
---|
| 191 | call Register_SwapFieldHallo(p_tmp,p_tmp,ip1jmp1,llmp1, |
---|
| 192 | * jj_Nb_vanleer,1,1,Request_vanleer) |
---|
| 193 | call Register_SwapFieldHallo(pk_tmp,pk_tmp,ip1jmp1,llm, |
---|
| 194 | * jj_Nb_vanleer,1,1,Request_vanleer) |
---|
| 195 | do j=1,nqmx |
---|
| 196 | call Register_SwapFieldHallo(q(1,1,j),q(1,1,j),ip1jmp1,llm, |
---|
| 197 | * jj_nb_vanleer,0,0,Request_vanleer) |
---|
| 198 | enddo |
---|
| 199 | |
---|
| 200 | call SetDistrib(jj_nb_vanleer) |
---|
| 201 | call SendRequest(Request_vanleer) |
---|
| 202 | call WaitRequest(Request_vanleer) |
---|
| 203 | |
---|
| 204 | call VTe(VTHallo) |
---|
| 205 | |
---|
| 206 | call VTb(VTadvection) |
---|
| 207 | call start_timer(timer_vanleer) |
---|
[764] | 208 | c$OMP END MASTER |
---|
| 209 | c$OMP BARRIER |
---|
[630] | 210 | |
---|
[764] | 211 | #ifdef INCA |
---|
[630] | 212 | ! ... Flux de masse diaganostiques traceurs |
---|
| 213 | c flxw = wg / FLOAT(iapp_tracvl) |
---|
| 214 | ijb=ij_begin |
---|
| 215 | ije=ij_end |
---|
| 216 | flxw(ijb:ije,1:llm)=wg(ijb:ije,1:llm)/FLOAT(iapp_tracvl) |
---|
| 217 | #endif |
---|
| 218 | |
---|
| 219 | c test sur l'eventuelle creation de valeurs negatives de la masse |
---|
| 220 | ijb=ij_begin |
---|
| 221 | ije=ij_end |
---|
| 222 | if (pole_nord) ijb=ij_begin+iip1 |
---|
| 223 | if (pole_sud) ije=ij_end-iip1 |
---|
| 224 | |
---|
[764] | 225 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
[630] | 226 | DO l=1,llm-1 |
---|
| 227 | DO ij = ijb+1,ije |
---|
| 228 | zdp(ij) = pbarug(ij-1,l) - pbarug(ij,l) |
---|
| 229 | s - pbarvg(ij-iip1,l) + pbarvg(ij,l) |
---|
| 230 | s + wg(ij,l+1) - wg(ij,l) |
---|
| 231 | ENDDO |
---|
| 232 | |
---|
| 233 | c CALL SCOPY( jjm -1 ,zdp(iip1+iip1),iip1,zdp(iip2),iip1 ) |
---|
| 234 | c ym ---> pourquoi jjm-1 et non jjm ? a cause du pole ? |
---|
| 235 | |
---|
| 236 | do ij=ijb,ije-iip1+1,iip1 |
---|
| 237 | zdp(ij)=zdp(ij+iip1-1) |
---|
| 238 | enddo |
---|
| 239 | |
---|
| 240 | DO ij = ijb,ije |
---|
| 241 | zdp(ij)= zdp(ij)*dtvr/ massem(ij,l) |
---|
| 242 | ENDDO |
---|
| 243 | |
---|
| 244 | |
---|
| 245 | c CALL minmax ( ip1jm-iip1, zdp(iip2), zdpmin,zdpmax ) |
---|
| 246 | c ym ---> eventuellement a revoir |
---|
| 247 | CALL minmax ( ije-ijb+1, zdp(ijb), zdpmin,zdpmax ) |
---|
| 248 | |
---|
| 249 | IF(MAX(ABS(zdpmin),ABS(zdpmax)).GT.0.5) THEN |
---|
| 250 | PRINT*,'WARNING DP/P l=',l,' MIN:',zdpmin, |
---|
| 251 | s ' MAX:', zdpmax |
---|
| 252 | ENDIF |
---|
| 253 | |
---|
| 254 | ENDDO |
---|
[764] | 255 | c$OMP END DO NOWAIT |
---|
[630] | 256 | |
---|
| 257 | c------------------------------------------------------------------- |
---|
| 258 | c Advection proprement dite (Modification Le Croller (07/2001) |
---|
| 259 | c------------------------------------------------------------------- |
---|
| 260 | |
---|
| 261 | c---------------------------------------------------- |
---|
| 262 | c Calcul des moyennes basées sur la masse |
---|
| 263 | c---------------------------------------------------- |
---|
| 264 | |
---|
| 265 | cym ----> Normalement, inutile pour les schémas classiques |
---|
| 266 | cym ----> Revérifier lors de la parallélisation des autres schemas |
---|
| 267 | |
---|
[764] | 268 | cym call massbar_p(massem,massebx,masseby) |
---|
[630] | 269 | |
---|
[764] | 270 | call vlspltgen_p( q,iadv, 2., massem, wg , |
---|
| 271 | * pbarug,pbarvg,dtvr,p_tmp,pk_tmp,teta_tmp ) |
---|
| 272 | |
---|
| 273 | |
---|
| 274 | GOTO 1234 |
---|
[630] | 275 | c----------------------------------------------------------- |
---|
| 276 | c Appel des sous programmes d'advection |
---|
| 277 | c----------------------------------------------------------- |
---|
| 278 | do iq=1,nqmx |
---|
| 279 | c call clock(t_initial) |
---|
| 280 | if(iadv(iq) == 0) cycle |
---|
| 281 | c ---------------------------------------------------------------- |
---|
| 282 | c Schema de Van Leer I MUSCL |
---|
| 283 | c ---------------------------------------------------------------- |
---|
| 284 | if(iadv(iq).eq.10) THEN |
---|
| 285 | |
---|
| 286 | call vlsplt_p(q(1,1,iq),2.,massem,wg,pbarug,pbarvg,dtvr) |
---|
| 287 | |
---|
| 288 | c ---------------------------------------------------------------- |
---|
| 289 | c Schema "pseudo amont" + test sur humidite specifique |
---|
| 290 | C pour la vapeur d'eau. F. Codron |
---|
| 291 | c ---------------------------------------------------------------- |
---|
| 292 | else if(iadv(iq).eq.14) then |
---|
| 293 | c |
---|
| 294 | cym stop 'advtrac : appel à vlspltqs :schema non parallelise' |
---|
| 295 | CALL vlspltqs_p( q(1,1,1), 2., massem, wg , |
---|
| 296 | * pbarug,pbarvg,dtvr,p_tmp,pk_tmp,teta_tmp ) |
---|
| 297 | c ---------------------------------------------------------------- |
---|
| 298 | c Schema de Frederic Hourdin |
---|
| 299 | c ---------------------------------------------------------------- |
---|
| 300 | else if(iadv(iq).eq.12) then |
---|
| 301 | stop 'advtrac : schema non parallelise' |
---|
| 302 | c Pas de temps adaptatif |
---|
| 303 | call adaptdt(iadv(iq),dtbon,n,pbarug,massem) |
---|
| 304 | if (n.GT.1) then |
---|
| 305 | write(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=', |
---|
| 306 | s dtvr,'n=',n |
---|
| 307 | endif |
---|
| 308 | do indice=1,n |
---|
| 309 | call advn(q(1,1,iq),massem,wg,pbarug,pbarvg,dtbon,1) |
---|
| 310 | end do |
---|
| 311 | else if(iadv(iq).eq.13) then |
---|
| 312 | stop 'advtrac : schema non parallelise' |
---|
| 313 | c Pas de temps adaptatif |
---|
| 314 | call adaptdt(iadv(iq),dtbon,n,pbarug,massem) |
---|
| 315 | if (n.GT.1) then |
---|
| 316 | write(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=', |
---|
| 317 | s dtvr,'n=',n |
---|
| 318 | endif |
---|
| 319 | do indice=1,n |
---|
| 320 | call advn(q(1,1,iq),massem,wg,pbarug,pbarvg,dtbon,2) |
---|
| 321 | end do |
---|
| 322 | c ---------------------------------------------------------------- |
---|
| 323 | c Schema de pente SLOPES |
---|
| 324 | c ---------------------------------------------------------------- |
---|
| 325 | else if (iadv(iq).eq.20) then |
---|
| 326 | stop 'advtrac : schema non parallelise' |
---|
| 327 | |
---|
| 328 | call pentes_ini (q(1,1,iq),wg,massem,pbarug,pbarvg,0) |
---|
[764] | 329 | #ifdef INCA |
---|
[630] | 330 | do iiq = iq+1, iq+3 |
---|
[764] | 331 | q(:,:,iiq)=q(:,:,iiq)*1 |
---|
[630] | 332 | enddo |
---|
| 333 | #endif |
---|
| 334 | |
---|
| 335 | c ---------------------------------------------------------------- |
---|
| 336 | c Schema de Prather |
---|
| 337 | c ---------------------------------------------------------------- |
---|
| 338 | else if (iadv(iq).eq.30) then |
---|
| 339 | stop 'advtrac : schema non parallelise' |
---|
| 340 | c Pas de temps adaptatif |
---|
| 341 | call adaptdt(iadv(iq),dtbon,n,pbarug,massem) |
---|
| 342 | if (n.GT.1) then |
---|
| 343 | write(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=', |
---|
| 344 | s dtvr,'n=',n |
---|
| 345 | endif |
---|
| 346 | call prather(q(1,1,iq),wg,massem,pbarug,pbarvg, |
---|
| 347 | s n,dtbon) |
---|
[764] | 348 | #ifdef INCA |
---|
[630] | 349 | do iiq = iq+1, iq+9 |
---|
[764] | 350 | q(:,:,iiq)=q(:,:,iiq)*1 |
---|
[630] | 351 | enddo |
---|
| 352 | #endif |
---|
| 353 | c ---------------------------------------------------------------- |
---|
| 354 | c Schemas PPM Lin et Rood |
---|
| 355 | c ---------------------------------------------------------------- |
---|
| 356 | else if (iadv(iq).eq.11.OR.(iadv(iq).GE.16.AND. |
---|
| 357 | s iadv(iq).LE.18)) then |
---|
| 358 | |
---|
| 359 | stop 'advtrac : schema non parallelise' |
---|
| 360 | |
---|
| 361 | c Test sur le flux horizontal |
---|
| 362 | c Pas de temps adaptatif |
---|
| 363 | call adaptdt(iadv(iq),dtbon,n,pbarug,massem) |
---|
| 364 | if (n.GT.1) then |
---|
| 365 | write(*,*) 'WARNING horizontal dt=',dtbon,'dtvr=', |
---|
| 366 | s dtvr,'n=',n |
---|
| 367 | endif |
---|
| 368 | c Test sur le flux vertical |
---|
| 369 | CFLmaxz=0. |
---|
| 370 | do l=2,llm |
---|
| 371 | do ij=iip2,ip1jm |
---|
| 372 | aaa=wg(ij,l)*dtvr/massem(ij,l) |
---|
| 373 | CFLmaxz=max(CFLmaxz,aaa) |
---|
| 374 | bbb=-wg(ij,l)*dtvr/massem(ij,l-1) |
---|
| 375 | CFLmaxz=max(CFLmaxz,bbb) |
---|
| 376 | enddo |
---|
| 377 | enddo |
---|
| 378 | if (CFLmaxz.GE.1) then |
---|
| 379 | write(*,*) 'WARNING vertical','CFLmaxz=', CFLmaxz |
---|
| 380 | endif |
---|
| 381 | |
---|
| 382 | c----------------------------------------------------------- |
---|
| 383 | c Ss-prg interface LMDZ.4->PPM3d |
---|
| 384 | c----------------------------------------------------------- |
---|
| 385 | |
---|
| 386 | call interpre(q(1,1,iq),qppm(1,1,iq),wg,fluxwppm,massem, |
---|
| 387 | s apppm,bpppm,massebx,masseby,pbarug,pbarvg, |
---|
| 388 | s unatppm,vnatppm,psppm) |
---|
| 389 | |
---|
| 390 | do indice=1,n |
---|
| 391 | c--------------------------------------------------------------------- |
---|
| 392 | c VL (version PPM) horiz. et PPM vert. |
---|
| 393 | c--------------------------------------------------------------------- |
---|
| 394 | if (iadv(iq).eq.11) then |
---|
| 395 | c Ss-prg PPM3d de Lin |
---|
| 396 | call ppm3d(1,qppm(1,1,iq), |
---|
| 397 | s psppm,psppm, |
---|
| 398 | s unatppm,vnatppm,fluxwppm,dtbon,2,2,2,1, |
---|
| 399 | s iim,jjp1,2,llm,apppm,bpppm,0.01,6400000, |
---|
| 400 | s fill,dum,220.) |
---|
| 401 | |
---|
| 402 | c---------------------------------------------------------------------- |
---|
| 403 | c Monotonic PPM |
---|
| 404 | c---------------------------------------------------------------------- |
---|
| 405 | else if (iadv(iq).eq.16) then |
---|
| 406 | c Ss-prg PPM3d de Lin |
---|
| 407 | call ppm3d(1,qppm(1,1,iq), |
---|
| 408 | s psppm,psppm, |
---|
| 409 | s unatppm,vnatppm,fluxwppm,dtbon,3,3,3,1, |
---|
| 410 | s iim,jjp1,2,llm,apppm,bpppm,0.01,6400000, |
---|
| 411 | s fill,dum,220.) |
---|
| 412 | c--------------------------------------------------------------------- |
---|
| 413 | |
---|
| 414 | c--------------------------------------------------------------------- |
---|
| 415 | c Semi Monotonic PPM |
---|
| 416 | c--------------------------------------------------------------------- |
---|
| 417 | else if (iadv(iq).eq.17) then |
---|
| 418 | c Ss-prg PPM3d de Lin |
---|
| 419 | call ppm3d(1,qppm(1,1,iq), |
---|
| 420 | s psppm,psppm, |
---|
| 421 | s unatppm,vnatppm,fluxwppm,dtbon,4,4,4,1, |
---|
| 422 | s iim,jjp1,2,llm,apppm,bpppm,0.01,6400000, |
---|
| 423 | s fill,dum,220.) |
---|
| 424 | c--------------------------------------------------------------------- |
---|
| 425 | |
---|
| 426 | c--------------------------------------------------------------------- |
---|
| 427 | c Positive Definite PPM |
---|
| 428 | c--------------------------------------------------------------------- |
---|
| 429 | else if (iadv(iq).eq.18) then |
---|
| 430 | c Ss-prg PPM3d de Lin |
---|
| 431 | call ppm3d(1,qppm(1,1,iq), |
---|
| 432 | s psppm,psppm, |
---|
| 433 | s unatppm,vnatppm,fluxwppm,dtbon,5,5,5,1, |
---|
| 434 | s iim,jjp1,2,llm,apppm,bpppm,0.01,6400000, |
---|
| 435 | s fill,dum,220.) |
---|
| 436 | c--------------------------------------------------------------------- |
---|
| 437 | endif |
---|
| 438 | enddo |
---|
| 439 | c----------------------------------------------------------------- |
---|
| 440 | c Ss-prg interface PPM3d-LMDZ.4 |
---|
| 441 | c----------------------------------------------------------------- |
---|
| 442 | call interpost(q(1,1,iq),qppm(1,1,iq)) |
---|
| 443 | endif |
---|
| 444 | c---------------------------------------------------------------------- |
---|
| 445 | |
---|
| 446 | c----------------------------------------------------------------- |
---|
| 447 | c On impose une seule valeur du traceur au pôle Sud j=jjm+1=jjp1 |
---|
| 448 | c et Nord j=1 |
---|
| 449 | c----------------------------------------------------------------- |
---|
| 450 | |
---|
| 451 | c call traceurpole(q(1,1,iq),massem) |
---|
| 452 | |
---|
| 453 | c calcul du temps cpu pour un schema donne |
---|
| 454 | |
---|
| 455 | c call clock(t_final) |
---|
| 456 | cym tps_cpu=t_final-t_initial |
---|
| 457 | cym cpuadv(iq)=cpuadv(iq)+tps_cpu |
---|
| 458 | |
---|
| 459 | end DO |
---|
| 460 | |
---|
[764] | 461 | 1234 CONTINUE |
---|
| 462 | c$OMP BARRIER |
---|
| 463 | c$OMP MASTER |
---|
[630] | 464 | ijb=ij_begin |
---|
| 465 | ije=ij_end |
---|
| 466 | |
---|
| 467 | DO l = 1, llm |
---|
| 468 | DO ij = ijb, ije |
---|
| 469 | finmasse(ij,l) = p(ij,l) - p(ij,l+1) |
---|
| 470 | ENDDO |
---|
| 471 | ENDDO |
---|
| 472 | |
---|
[764] | 473 | |
---|
[630] | 474 | CALL qminimum_p( q, 2, finmasse ) |
---|
| 475 | |
---|
| 476 | c------------------------------------------------------------------ |
---|
| 477 | c on reinitialise a zero les flux de masse cumules |
---|
| 478 | c--------------------------------------------------- |
---|
[764] | 479 | c iadvtr=0 |
---|
[630] | 480 | call VTe(VTadvection) |
---|
| 481 | call stop_timer(timer_vanleer) |
---|
| 482 | |
---|
| 483 | call VTb(VThallo) |
---|
| 484 | do j=1,nqmx |
---|
| 485 | call Register_SwapFieldHallo(q(1,1,j),q(1,1,j),ip1jmp1,llm, |
---|
| 486 | * jj_nb_caldyn,0,0,Request_vanleer) |
---|
| 487 | enddo |
---|
| 488 | |
---|
[764] | 489 | #ifdef INCA |
---|
[630] | 490 | call Register_SwapFieldHallo(flxw,flxw,ip1jmp1,llm, |
---|
| 491 | * jj_nb_caldyn,0,0,Request_vanleer) |
---|
| 492 | #endif |
---|
| 493 | call SetDistrib(jj_nb_caldyn) |
---|
| 494 | call SendRequest(Request_vanleer) |
---|
| 495 | call WaitRequest(Request_vanleer) |
---|
| 496 | |
---|
| 497 | call VTe(VThallo) |
---|
| 498 | call resume_timer(timer_caldyn) |
---|
[764] | 499 | c$OMP END MASTER |
---|
| 500 | c$OMP BARRIER |
---|
| 501 | iadvtr=0 |
---|
[630] | 502 | ENDIF ! if iadvtr.EQ.iapp_tracvl |
---|
| 503 | |
---|
| 504 | RETURN |
---|
| 505 | END |
---|
| 506 | |
---|