Changeset 3564
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/dynphy_lonlat/phypluto/leapfrog_nogcm_pluto.F
r3548 r3564 22 22 use exner_milieu_m, only: exner_milieu 23 23 use cpdet_mod, only: cpdet,tpot2t,t2tpot 24 use sponge_mod, only: callsponge,mode_sponge,sponge25 24 use comuforc_h 26 25 USE comvert_mod, ONLY: ap,bp,pressure_exner,presnivs, … … 34 33 USE callkeys_mod 35 34 USE tracer_h, ONLY: igcm_n2,igcm_ch4_gas,igcm_co_gas, 36 . igcm_prec_haze,igcm_haze 35 . igcm_prec_haze,igcm_haze 37 36 38 37 … … 85 84 86 85 ! ADAPTATION GCM POUR CP(T) 87 REAL temp(ip1jmp1,llm) ! temperature 88 REAL tsurpk(ip1jmp1,llm) ! cpp*T/pk 86 REAL temp(ip1jmp1,llm) ! temperature 87 REAL tsurpk(ip1jmp1,llm) ! cpp*T/pk 89 88 90 89 ! nogcm … … 115 114 INTEGER itau,itaufinp1,iav 116 115 ! INTEGER iday ! jour julien 117 REAL time 116 REAL time 118 117 119 118 REAL SSUM … … 135 134 data first/.true./ 136 135 logical ok_sync 137 parameter (ok_sync = .true.) 136 parameter (ok_sync = .true.) 138 137 logical physics 139 138 … … 144 143 REAL :: flxw(ip1jmp1,llm) ! flux de masse verticale 145 144 146 REAL psmean ! pression moyenne 145 REAL psmean ! pression moyenne 147 146 REAL pqn2mean ! moyenne globale ps*qco 148 147 REAL pqch4mean ! moyenne globale ps*qch4 149 148 REAL pqcomean ! moyenne globale ps*qco 150 REAL pqhazemean 151 REAL pqprechazemean 149 REAL pqhazemean 150 REAL pqprechazemean 152 151 REAL qmean_ch4 ! mass mean mixing ratio vap ch4 153 152 REAL qmean_co ! mass mean mixing ratio vap co 154 REAL qmean_haze 155 REAL qmean_prechaze 153 REAL qmean_haze 154 REAL qmean_prechaze 156 155 REAL pqch4(ip1jmp1) ! average methane mass index : ps*qch4 157 156 REAL pqco(ip1jmp1) ! average CO mass index : ps*q_co 158 REAL pqhaze(ip1jmp1) 159 REAL pqprechaze(ip1jmp1) 157 REAL pqhaze(ip1jmp1) 158 REAL pqprechaze(ip1jmp1) 160 159 161 160 REAL p0 ! pression de reference … … 167 166 c+jld variables test conservation energie 168 167 REAL ecin(ip1jmp1,llm),ecin0(ip1jmp1,llm) 169 C Tendance de la temp. potentiel d (theta)/ d t due a la 168 C Tendance de la temp. potentiel d (theta)/ d t due a la 170 169 C tansformation d'energie cinetique en energie thermique 171 170 C cree par la dissipation … … 186 185 187 186 logical , parameter :: flag_verif = .false. 188 187 189 188 ! for CP(T) 190 189 real :: dtec … … 214 213 endif 215 214 itaufinp1 = itaufin +1 216 215 217 216 218 217 … … 272 271 273 272 c------------------ 274 c Preparing mixing of pressure and tracers in nogcm 273 c Preparing mixing of pressure and tracers in nogcm 275 274 c kpd=exp(-z/H) Needed to define a reference pressure : 276 c P0=pmean/globalaverage(kpd) 275 c P0=pmean/globalaverage(kpd) 277 276 c thus P(i) = P0*exp(-z(i)/H) = P0*kpd(i) 278 277 c It is checked that globalaverage2d(Pi)=pmean … … 281 280 ENDDO 282 281 p00d=globaverage2d(kpd) ! mean pres at ref level 283 tau_ps = tau_n2 ! constante de rappel for pressure (s) 282 tau_ps = tau_n2 ! constante de rappel for pressure (s) 284 283 285 284 PRINT*,'igcm_n2 = ',igcm_n2 … … 300 299 c ----- 301 300 302 jD_cur = jD_ref + day_ini - day_ref + 303 & (itau+1)/day_step 304 jH_cur = jH_ref + start_time + 305 & mod(itau+1,day_step)/float(day_step) 301 jD_cur = jD_ref + day_ini - day_ref + 302 & (itau+1)/day_step 303 jH_cur = jH_ref + start_time + 304 & mod(itau+1,day_step)/float(day_step) 306 305 jD_cur = jD_cur + int(jH_cur) 307 306 jH_cur = jH_cur - int(jH_cur) … … 330 329 ! Purely Matsuno time stepping 331 330 IF( MOD(itau,iconser) .EQ.0.AND. forward ) conser = .TRUE. 332 333 IF( MOD(itau,iphysiq ).EQ.0.AND..NOT.forward 331 332 IF( MOD(itau,iphysiq ).EQ.0.AND..NOT.forward 334 333 s .and. physics ) apphys = .TRUE. 335 334 ELSE 336 ! Leapfrog/Matsuno time stepping 335 ! Leapfrog/Matsuno time stepping 337 336 IF( MOD(itau ,iconser) .EQ. 0 ) conser = .TRUE. 338 337 IF( MOD(itau+1,iphysiq).EQ.0.AND.physics) apphys=.TRUE. … … 370 369 CALL geopot ( ip1jmp1, teta , pk , pks, phis , phi ) 371 370 372 jD_cur = jD_ref + day_ini - day_ref + 373 & (itau+1)/day_step 371 jD_cur = jD_ref + day_ini - day_ref + 372 & (itau+1)/day_step 374 373 375 374 ! AS: we make jD_cur to be pday 376 375 jD_cur = int(day_ini + itau/day_step) 377 376 378 jH_cur = jH_ref + start_time + 379 & mod(itau+1,day_step)/float(day_step) 380 jH_cur = jH_ref + start_time + 377 jH_cur = jH_ref + start_time + 378 & mod(itau+1,day_step)/float(day_step) 379 jH_cur = jH_ref + start_time + 381 380 & mod(itau,day_step)/float(day_step) 382 381 jD_cur = jD_cur + int(jH_cur) … … 392 391 $ dufi,dvfi,dtetafi,dqfi,dpfi ) 393 392 394 c ajout des tendances physiques 393 c ajout des tendances physiques 395 394 c ------------------------------ 396 395 … … 401 400 c CALL pression (ip1jmp1,ap,bp,ps,p) 402 401 c CALL massdair(p,masse) 403 402 404 403 ! 1) Saving pressure and mass of N2 tracer in each mess (kg) before Horizontal mixing of pressure 405 404 DO ij=1,ip1jmp1 406 oldps(ij)=ps(ij) 405 oldps(ij)=ps(ij) 407 406 ENDDO 408 407 409 408 !DO l=1, llm 410 409 ! DO ij=1,ip1jmp1 … … 461 460 ! 6) Horizontal redistribution of other tracers 462 461 ! intermediaire de calcul si methane or CO 463 if ((methane).or.(carbox)) then 462 if ((methane).or.(carbox)) then 464 463 psmean= globaverage2d(ps) 465 464 endif … … 537 536 ENDIF ! of IF( apphys ) 538 537 539 538 540 539 c ******************************************************************** 541 540 c ******************************************************************** … … 559 558 ENDIF 560 559 561 IF( itau. EQ. itaufinp1 ) then 560 IF( itau. EQ. itaufinp1 ) then 562 561 if (flag_verif) then 563 562 write(79,*) 'ucov',ucov … … 585 584 iav=0 586 585 ENDIF 587 586 588 587 ! ! Ehouarn: re-compute geopotential for outputs 589 588 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) … … 664 663 leapf = .TRUE. 665 664 dt = 2.*dtvr 666 GO TO 2 665 GO TO 2 667 666 END IF ! of IF (forward) 668 667 ELSE … … 697 696 698 697 forward = .FALSE. 699 IF( itau. EQ. itaufinp1 ) then 698 IF( itau. EQ. itaufinp1 ) then 700 699 abort_message = 'Simulation finished' 701 700 call abort_gcm(modname,abort_message,0) … … 707 706 if (ok_iso_verif) then 708 707 call check_isotopes_seq(q,ip1jmp1,'leapfrog 1698') 709 endif !if (ok_iso_verif) then 708 endif !if (ok_iso_verif) then 710 709 711 710 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN … … 751 750 endif 752 751 753 ENDIF ! of IF(MOD(itau,iecri ).EQ.0) 752 ENDIF ! of IF(MOD(itau,iecri ).EQ.0) 754 753 755 754 IF(itau.EQ.itaufin) THEN … … 805 804 END DO 806 805 END DO 807 806 808 807 DO i=1,iim 809 808 globaverage2d = globaverage2d + var(i,1)*aire(i,1)
Note: See TracChangeset
for help on using the changeset viewer.