Changeset 1036 for trunk/LMDZ.MARS/libf/dyn3d/gcm.F
- Timestamp:
- Sep 11, 2013, 2:34:44 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/dyn3d/gcm.F
r999 r1036 1 1 PROGRAM gcm 2 2 3 use infotrac, only: iniadvtrac, nqtot, iadv 3 4 IMPLICIT NONE 4 5 … … 48 49 #include "tracstoke.h" 49 50 #include "sponge.h" 50 #include"advtrac.h"51 !#include"advtrac.h" 51 52 52 53 INTEGER*4 iday ! jour julien … … 57 58 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 58 59 real, dimension(ip1jmp1,llm) :: teta ! temperature potentielle 59 REAL q(ip1jmp1,llm,nqmx)! champs advectes60 REAL,allocatable :: q(:,:,:) ! champs advectes 60 61 REAL ps(ip1jmp1) ! pression au sol 61 62 REAL pext(ip1jmp1) ! pression extensive … … 80 81 c tendances dynamiques 81 82 REAL dv(ip1jm,llm),du(ip1jmp1,llm) 82 REAL dteta(ip1jmp1,llm),dq(ip1jmp1,llm,nqmx),dp(ip1jmp1) 83 REAL dteta(ip1jmp1,llm),dp(ip1jmp1) 84 REAL,ALLOCATABLE :: dq(:,:,:) 83 85 84 86 c tendances de la dissipation … … 88 90 c tendances physiques 89 91 REAL dvfi(ip1jm,llm),dufi(ip1jmp1,llm) 90 REAL dhfi(ip1jmp1,llm),dqfi(ip1jmp1,llm,nqmx),dpfi(ip1jmp1) 92 REAL dhfi(ip1jmp1,llm),dpfi(ip1jmp1) 93 REAL,ALLOCATABLE :: dqfi(:,:,:) 91 94 92 95 c variables pour le fichier histoire … … 95 98 REAL tppn(iim),tpps(iim),tpn,tps 96 99 c 97 ! INTEGER iadv(nqmx) ! indice schema de transport pour le traceur iq98 100 99 101 INTEGER itau,itaufinp1,iav … … 124 126 LOGICAL tracer 125 127 data tracer/.true./ 126 INTEGER nq128 ! INTEGER nq 127 129 128 130 C Calendrier … … 142 144 143 145 c----------------------------------------------------------------------- 144 c Initialize tracers using iniadvtrac (Ehouarn, oct 2008)145 146 CALL defrun_new( 99, .TRUE. ) 146 147 147 CALL iniadvtrac(nq,numvanle) 148 149 CALL dynetat0("start.nc",nqmx,vcov,ucov, 148 ! Initialize tracers 149 call iniadvtrac(nqtot,numvanle) 150 ! Allocation de la tableau q : champs advectes 151 allocate(q(ip1jmp1,llm,nqtot)) 152 allocate(dq(ip1jmp1,llm,nqtot)) 153 allocate(dqfi(ip1jmp1,llm,nqtot)) 154 155 CALL dynetat0("start.nc",nqtot,vcov,ucov, 150 156 . teta,q,masse,ps,phis,time_0) 151 157 … … 245 251 . 'c''est a dire du jour',i7,3x,'au jour',i7//) 246 252 247 CALL dynredem0("restart.nc",day_ini,anne_ini,phis,nq mx)253 CALL dynredem0("restart.nc",day_ini,anne_ini,phis,nqtot) 248 254 249 255 ecripar = .TRUE. … … 253 259 254 260 c Quelques initialisations pour les traceurs 255 call initial0(ijp1llm*nqmx,dq)261 dq(:,:,:)=0 256 262 c istdyn=day_step/4 ! stockage toutes les 6h=1jour/4 257 263 c istphy=istdyn/iphysiq … … 348 354 IF( forward. OR . leapf ) THEN 349 355 350 DO iq = 1, nq mx356 DO iq = 1, nqtot 351 357 c 352 358 IF ( iadv(iq).EQ.1.OR.iadv(iq).EQ.2 ) THEN 353 359 CALL traceur( iq,iadv,q,teta,pk,w, pbaru, pbarv, dq ) 354 360 355 ELSE IF( iq.EQ. nq mx) THEN361 ELSE IF( iq.EQ. nqtot ) THEN 356 362 c 357 363 iapp_tracvl = 5 … … 361 367 c 362 368 363 CALL vanleer(numvanle,iapp_tracvl,nq mx,q,pbaru,pbarv,369 CALL vanleer(numvanle,iapp_tracvl,nqtot,q,pbaru,pbarv, 364 370 * p, masse, dq, iadv(1), teta, pk ) 365 371 … … 422 428 ENDIF 423 429 c 424 CALL calfis( nq mx, lafin ,rdayvrai,rday_ecri,time ,430 CALL calfis( nqtot, lafin ,rdayvrai,rday_ecri,time , 425 431 $ ucov,vcov,teta,q,masse,ps,p,pk,phis,phi , 426 432 $ du,dv,dteta,dq,w, dufi,dvfi,dhfi,dqfi,dpfi,tracer) … … 429 435 c ajout des tendances physiques: 430 436 c ------------------------------ 431 CALL addfi( nq mx, dtphys, leapf, forward ,437 CALL addfi( nqtot, dtphys, leapf, forward , 432 438 $ ucov, vcov, teta , q ,ps , masse, 433 439 $ dufi, dvfi, dhfi , dqfi ,dpfi ) … … 540 546 c iav=0 541 547 c ENDIF 542 c CALL writedynav(histaveid, nq mx, itau,vcov ,548 c CALL writedynav(histaveid, nqtot, itau,vcov , 543 549 c , ucov,teta,pk,phi,q,masse,ps,phis) 544 550 c ENDIF … … 556 562 . ' date=',REAL(itau)/REAL(day_step) 557 563 CALL dynredem1("restart.nc",REAL(itau)/REAL(day_step), 558 . vcov,ucov,teta,q,nq mx,masse,ps)564 . vcov,ucov,teta,q,nqtot,masse,ps) 559 565 560 566 CLOSE(99) … … 625 631 iav=0 626 632 ENDIF 627 c CALL writedynav(histaveid, nq mx, itau,vcov ,633 c CALL writedynav(histaveid, nqtot, itau,vcov , 628 634 c , ucov,teta,pk,phi,q,masse,ps,phis) 629 635 … … 636 642 CALL dynredem1("restart.nc", 637 643 . REAL(itau)/REAL(day_step), 638 . vcov,ucov,teta,q,nq mx,masse,ps)644 . vcov,ucov,teta,q,nqtot,masse,ps) 639 645 640 646 forward = .TRUE.
Note: See TracChangeset
for help on using the changeset viewer.