Changeset 1216 for trunk/LMDZ.GENERIC/libf/dyn3d
- Timestamp:
- Apr 3, 2014, 9:09:47 AM (11 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/dyn3d
- Files:
-
- 1 added
- 9 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/dyn3d/calfis.F
r787 r1216 6 6 c Auteur : P. Le Van, F. Hourdin 7 7 c ......... 8 8 USE infotrac, ONLY: tname, nqtot 9 9 IMPLICIT NONE 10 10 c======================================================================= … … 71 71 #include "comvert.h" 72 72 #include "comgeom2.h" 73 #include "control.h"74 75 #include "advtrac.h"73 !#include "control.h" 74 75 !#include "advtrac.h" 76 76 !! this is to get tnom (tracers name) 77 77 … … 85 85 REAL pteta(iip1,jjp1,llm) 86 86 REAL pmasse(iip1,jjp1,llm) 87 REAL pq(iip1,jjp1,llm,nq mx)87 REAL pq(iip1,jjp1,llm,nqtot) 88 88 REAL pphis(iip1,jjp1) 89 89 REAL pphi(iip1,jjp1,llm) … … 92 92 REAL pducov(iip1,jjp1,llm) 93 93 REAL pdteta(iip1,jjp1,llm) 94 REAL pdq(iip1,jjp1,llm,nq mx)94 REAL pdq(iip1,jjp1,llm,nqtot) 95 95 c 96 96 REAL pw(iip1,jjp1,llm) … … 103 103 REAL pdufi(iip1,jjp1,llm) 104 104 REAL pdhfi(iip1,jjp1,llm) 105 REAL pdqfi(iip1,jjp1,llm,nq mx)105 REAL pdqfi(iip1,jjp1,llm,nqtot) 106 106 REAL pdpsfi(iip1,jjp1) 107 107 logical tracer … … 116 116 c 117 117 REAL zufi(ngridmx,llm), zvfi(ngridmx,llm) 118 REAL ztfi(ngridmx,llm),zqfi(ngridmx,llm,nq mx)118 REAL ztfi(ngridmx,llm),zqfi(ngridmx,llm,nqtot) 119 119 c 120 120 REAL zvervel(ngridmx,llm) 121 121 c 122 122 REAL zdufi(ngridmx,llm),zdvfi(ngridmx,llm) 123 REAL zdtfi(ngridmx,llm),zdqfi(ngridmx,llm,nq mx)123 REAL zdtfi(ngridmx,llm),zdqfi(ngridmx,llm,nqtot) 124 124 REAL zdpsrf(ngridmx) 125 125 c … … 170 170 171 171 c 172 IF (firstcal) THEN173 latfi(1)=rlatu(1)174 lonfi(1)=0.175 DO j=2,jjm176 DO i=1,iim177 latfi((j-2)*iim+1+i)= rlatu(j)178 lonfi((j-2)*iim+1+i)= rlonv(i)179 ENDDO180 ENDDO181 latfi(ngridmx)= rlatu(jjp1)182 lonfi(ngridmx)= 0.183 184 ! build airefi(), mesh area on physics grid185 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,aire,airefi)186 ! Poles are single points on physics grid187 airefi(1)=airefi(1)*iim188 airefi(ngridmx)=airefi(ngridmx)*iim189 190 CALL inifis(ngridmx,llm,day_ini,daysec,dtphys,191 . latfi,lonfi,airefi,rad,g,r,cpp)192 ENDIF172 ! IF (firstcal) THEN 173 ! latfi(1)=rlatu(1) 174 ! lonfi(1)=0. 175 ! DO j=2,jjm 176 ! DO i=1,iim 177 ! latfi((j-2)*iim+1+i)= rlatu(j) 178 ! lonfi((j-2)*iim+1+i)= rlonv(i) 179 ! ENDDO 180 ! ENDDO 181 ! latfi(ngridmx)= rlatu(jjp1) 182 ! lonfi(ngridmx)= 0. 183 ! 184 ! ! build airefi(), mesh area on physics grid 185 ! CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,aire,airefi) 186 ! ! Poles are single points on physics grid 187 ! airefi(1)=airefi(1)*iim 188 ! airefi(ngridmx)=airefi(ngridmx)*iim 189 ! 190 ! CALL inifis(ngridmx,llm,day_ini,daysec,dtphys, 191 ! . latfi,lonfi,airefi,rad,g,r,cpp) 192 ! ENDIF 193 193 194 194 c … … 278 278 c 43.bis Taceurs (en kg/kg) 279 279 c -------------------------- 280 DO iq=1,nq mx280 DO iq=1,nqtot 281 281 DO l=1,llm 282 282 zqfi(1,l,iq) = pq(1,1,l,iq) … … 425 425 426 426 CALL physiq (ngridmx,llm,nq, 427 . tn om,427 . tname, 428 428 , debut,lafin, 429 429 , rday_ecri,heure,dtphys, … … 467 467 468 468 469 c 62. humidite specifique469 c 62. traceurs 470 470 c --------------------- 471 471 472 DO iq=1,nq mx472 DO iq=1,nqtot 473 473 DO l=1,llm 474 474 DO i=1,iip1 -
trunk/LMDZ.GENERIC/libf/dyn3d/control_mod.F90
r1214 r1216 1 !-----------------------------------------------------------------------2 ! INCLUDE 'control.h'3 ! For Fortran 77/Fortran 90 compliance always use line continuation4 ! symbols '&' in columns 73 and 65 !6 1 7 COMMON/control/nday,day_step, & 8 & iperiod,iconser,idissip,iphysiq , & 9 & periodav,ecritphy,anneeref 2 module control_mod 10 3 11 INTEGER nday,day_step,iperiod,iconser, & 12 & idissip,iphysiq,anneeref 13 REAL periodav, ecritphy 4 implicit none 14 5 15 !----------------------------------------------------------------------- 6 integer,save :: nday ! # of days to run 7 integer,save :: day_step ! # of dynamical time steps per day 8 integer,save :: iperiod ! make a Matsuno step before avery iperiod-1 LF steps 9 integer,save :: iconser ! 10 integer,save :: idissip ! apply dissipation every idissip dynamical step 11 integer,save :: iphysiq ! call physics every iphysiq dynamical steps 12 integer,save :: anneeref ! reference year # ! not used 13 real,save :: periodav 14 integer,save :: ecritphy ! output data in "diagfi.nc" every ecritphy dynamical steps 15 16 end module control_mod -
trunk/LMDZ.GENERIC/libf/dyn3d/defrun_new.F
r1006 r1216 38 38 USE ioipsl_getincom 39 39 use sponge_mod,only: callsponge,nsponge,mode_sponge,tetasponge 40 use control_mod,only: nday, day_step, iperiod, anneeref, 41 & iconser, idissip, iphysiq, ecritphy 40 42 IMPLICIT NONE 41 43 42 44 #include "dimensions.h" 43 45 #include "paramet.h" 44 #include "control.h"46 !#include "control.h" 45 47 #include "logic.h" 46 48 #include "serre.h" -
trunk/LMDZ.GENERIC/libf/dyn3d/dynetat0.F
r993 r1216 1 1 SUBROUTINE dynetat0(fichnom,nq,vcov,ucov, 2 2 . teta,q,masse,ps,phis,time) 3 use infotrac, only: tname, nqtot 3 4 IMPLICIT NONE 4 5 … … 30 31 #include "serre.h" 31 32 #include "logic.h" 32 #include"advtrac.h"33 !#include"advtrac.h" 33 34 34 35 c Arguments: … … 328 329 ! WRITE(str3(2:3),'(i2.2)') iq 329 330 ! ierr = NF_INQ_VARID (nid, str3, nvarid) 330 ! NB: tracers are now read in using their name ('tn om' from advtrac.h)331 ! write(*,*) " loading tracer:",trim(tn om(iq))332 ierr=NF_INQ_VARID(nid,tn om(iq),nvarid)331 ! NB: tracers are now read in using their name ('tname' from infotrac) 332 ! write(*,*) " loading tracer:",trim(tname(iq)) 333 ierr=NF_INQ_VARID(nid,tname(iq),nvarid) 333 334 IF (ierr .NE. NF_NOERR) THEN 334 335 ! PRINT*, "dynetat0: Le champ <"//str3//"> est absent" 335 PRINT*, "dynetat0: Le champ <"//trim(tn om(iq))//336 PRINT*, "dynetat0: Le champ <"//trim(tname(iq))// 336 337 & "> est absent" 337 338 PRINT*, " Il est donc initialise a zero" … … 346 347 IF (ierr .NE. NF_NOERR) THEN 347 348 ! PRINT*, "dynetat0: Lecture echouee pour "//str3 348 PRINT*, "dynetat0: Lecture echouee pour "//trim(tnom(iq))349 PRINT*,"dynetat0: Lecture echouee pour "//trim(tname(iq)) 349 350 CALL abort 350 351 ENDIF … … 354 355 c case when new tracer are added in addition to old ones 355 356 write(*,*)'tracers 1 to ', nqold,'were already present' 356 write(*,*)'tracers ', nqold+1,' to ', nq mx,'are new'357 write(*,*)'tracers ', nqold+1,' to ', nqtot,'are new' 357 358 write(*,*)' and initialized to zero' 358 q(:,:,:,nqold+1:nq mx)=0.0359 q(:,:,:,nqold+1:nqtot)=0.0 359 360 ! yes=' ' 360 361 ! do while ((yes.ne.'y').and.(yes.ne.'n')) -
trunk/LMDZ.GENERIC/libf/dyn3d/dynredem.F
r993 r1216 1 1 SUBROUTINE dynredem0(fichnom,idayref,anneeref,phis,nq) 2 use infotrac, only: tname 2 3 IMPLICIT NONE 3 4 c======================================================================= … … 16 17 #include "netcdf.inc" 17 18 #include "serre.h" 18 #include "advtrac.h"19 !#include "advtrac.h" 19 20 c Arguments: 20 21 c ---------- … … 902 903 ! ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 12, 903 904 ! . "Traceurs "//str3) 904 txt="Traceur "//trim(tn om(iq))905 #ifdef NC_DOUBLE 906 ierr=NF_DEF_VAR(nid,tn om(iq),NF_DOUBLE,4,dims4,nvarid)907 #else 908 ierr=NF_DEF_VAR(nid,tn om(iq),NF_FLOAT,4,dims4,nvarid)905 txt="Traceur "//trim(tname(iq)) 906 #ifdef NC_DOUBLE 907 ierr=NF_DEF_VAR(nid,tname(iq),NF_DOUBLE,4,dims4,nvarid) 908 #else 909 ierr=NF_DEF_VAR(nid,tname(iq),NF_FLOAT,4,dims4,nvarid) 909 910 #endif 910 911 ierr=NF_PUT_ATT_TEXT(nid,nvarid,"title", … … 954 955 SUBROUTINE dynredem1(fichnom,time, 955 956 . vcov,ucov,teta,q,nq,masse,ps) 957 use infotrac, only: nqtot, tname 956 958 IMPLICIT NONE 957 959 c================================================================= … … 963 965 #include "comvert.h" 964 966 #include "comgeom.h" 965 #include"advtrac.h"967 !#include"advtrac.h" 966 968 967 969 INTEGER nq, l … … 969 971 REAL teta(ip1jmp1,llm) 970 972 REAL ps(ip1jmp1),masse(ip1jmp1,llm) 971 REAL q(iip1,jjp1,llm,nq mx)973 REAL q(iip1,jjp1,llm,nqtot) 972 974 REAL q3d(iip1,jjp1,llm) !temporary variable 973 975 CHARACTER*(*) fichnom … … 1052 1054 ! WRITE(str3(2:3),'(i2.2)') iq 1053 1055 ! ierr = NF_INQ_VARID(nid, str3, nvarid) 1054 ierr=NF_INQ_VARID(nid,tn om(iq),nvarid)1056 ierr=NF_INQ_VARID(nid,tname(iq),nvarid) 1055 1057 IF (ierr .NE. NF_NOERR) THEN 1056 1058 ! PRINT*, "Variable "//str3//" n est pas definie" 1057 PRINT*, "Variable "//trim(tnom(iq))//" n est pas definie"1059 PRINT*,"Variable "//trim(tname(iq))//" n est pas definie" 1058 1060 CALL abort 1059 1061 ENDIF -
trunk/LMDZ.GENERIC/libf/dyn3d/gcm.F
r1006 r1216 1 1 PROGRAM gcm 2 2 3 use infotrac, only: iniadvtrac, nqtot, iadv 3 4 use sponge_mod,only: callsponge,mode_sponge,sponge 5 use control_mod, only: nday, day_step, iperiod, iphysiq, 6 & iconser, ecritphy, idissip 7 use comgeomphy, only: initcomgeomphy 4 8 IMPLICIT NONE 5 9 … … 42 46 #include "logic.h" 43 47 #include "temps.h" 44 #include "control.h"48 !#include "control.h" 45 49 #include "ener.h" 46 50 #include "netcdf.inc" 47 51 #include "serre.h" 48 52 #include "tracstoke.h" 49 #include"advtrac.h"53 !#include"advtrac.h" 50 54 51 55 INTEGER*4 iday ! jour julien … … 56 60 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 57 61 real, dimension(ip1jmp1,llm) :: teta ! temperature potentielle 58 REAL q(ip1jmp1,llm,nqmx)! champs advectes62 REAL,allocatable :: q(:,:,:) ! champs advectes 59 63 REAL ps(ip1jmp1) ! pression au sol 60 64 REAL pext(ip1jmp1) ! pression extensive … … 79 83 c tendances dynamiques 80 84 REAL dv(ip1jm,llm),du(ip1jmp1,llm) 81 REAL dteta(ip1jmp1,llm),dq(ip1jmp1,llm,nqmx),dp(ip1jmp1) 85 REAL dteta(ip1jmp1,llm),dp(ip1jmp1) 86 REAL,ALLOCATABLE :: dq(:,:,:) 82 87 83 88 c tendances de la dissipation … … 87 92 c tendances physiques 88 93 REAL dvfi(ip1jm,llm),dufi(ip1jmp1,llm) 89 REAL dhfi(ip1jmp1,llm),dqfi(ip1jmp1,llm,nqmx),dpfi(ip1jmp1) 94 REAL dhfi(ip1jmp1,llm),dpfi(ip1jmp1) 95 REAL,ALLOCATABLE :: dqfi(:,:,:) 90 96 91 97 c variables pour le fichier histoire … … 123 129 LOGICAL tracer 124 130 data tracer/.true./ 125 INTEGER nq131 ! INTEGER nq 126 132 127 133 C Calendrier … … 150 156 REAL vnat(ip1jm,llm),unat(ip1jmp1,llm) 151 157 158 c----------------------------------------------------------------------- 159 c variables pour l'initialisation de la physique : 160 c ------------------------------------------------ 161 INTEGER ngridmx 162 PARAMETER( ngridmx = 2+(jjm-1)*iim - 1/jjm ) 163 REAL zcufi(ngridmx),zcvfi(ngridmx) 164 REAL latfi(ngridmx),lonfi(ngridmx) 165 REAL airefi(ngridmx) 166 SAVE latfi, lonfi, airefi 167 INTEGER i,j 152 168 153 169 c----------------------------------------------------------------------- … … 159 175 160 176 c----------------------------------------------------------------------- 161 c Initialize tracers using iniadvtrac (Ehouarn, oct 2008) 162 CALL iniadvtrac(nq,numvanle) 163 164 165 CALL dynetat0("start.nc",nqmx,vcov,ucov, 177 CALL defrun_new( 99, .TRUE. ) 178 179 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 180 ! FH 2008/05/02 181 ! A nettoyer. On ne veut qu'une ou deux routines d'interface 182 ! dynamique -> physique pour l'initialisation 183 !#ifdef CPP_PHYS 184 CALL init_phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/)) 185 call initcomgeomphy 186 !#endif 187 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 188 189 ! Initialize tracers 190 CALL iniadvtrac(nqtot,numvanle) 191 ! Allocation de la tableau q : champs advectes 192 allocate(q(ip1jmp1,llm,nqtot)) 193 allocate(dq(ip1jmp1,llm,nqtot)) 194 allocate(dqfi(ip1jmp1,llm,nqtot)) 195 196 CALL dynetat0("start.nc",nqtot,vcov,ucov, 166 197 . teta,q,masse,ps,phis, time_0) 167 168 CALL defrun_new( 99, .TRUE. )169 198 170 199 c on recalcule eventuellement le pas de temps … … 196 225 * tetagdiv, tetagrot , tetatemp ) 197 226 c 227 228 c----------------------------------------------------------------------- 229 c Initialisation de la physique : 230 c ------------------------------- 231 232 ! IF (call_iniphys.and.(iflag_phys==1.or.iflag_phys>=100)) THEN 233 latfi(1)=rlatu(1) 234 lonfi(1)=0. 235 zcufi(1) = cu(1) 236 zcvfi(1) = cv(1) 237 DO j=2,jjm 238 DO i=1,iim 239 latfi((j-2)*iim+1+i)= rlatu(j) 240 lonfi((j-2)*iim+1+i)= rlonv(i) 241 zcufi((j-2)*iim+1+i) = cu((j-1)*iip1+i) 242 zcvfi((j-2)*iim+1+i) = cv((j-1)*iip1+i) 243 ENDDO 244 ENDDO 245 latfi(ngridmx)= rlatu(jjp1) 246 lonfi(ngridmx)= 0. 247 zcufi(ngridmx) = cu(ip1jm+1) 248 zcvfi(ngridmx) = cv(ip1jm-iim) 249 250 ! build airefi(), mesh area on physics grid 251 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,aire,airefi) 252 ! Poles are single points on physics grid 253 airefi(1)=airefi(1)*iim 254 airefi(ngridmx)=airefi(ngridmx)*iim 255 256 ! Initialisation de la physique: pose probleme quand on tourne 257 ! SANS physique, car iniphysiq.F est dans le repertoire phy[]... 258 ! Il faut une cle CPP_PHYS 259 !#ifdef CPP_PHYS 260 ! CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys/nsplit_phys, 261 CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys, 262 & latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp, 263 & 1) 264 ! & iflag_phys) 265 !#endif 266 ! call_iniphys=.false. 267 ! ENDIF ! of IF (call_iniphys.and.(iflag_phys.eq.1)) 198 268 199 269 CALL pression ( ip1jmp1, ap, bp, ps, p ) … … 229 299 . 'c''est a dire du jour',i7,3x,'au jour',i7//) 230 300 231 CALL dynredem0("restart.nc",day_end,anne_ini,phis,nq mx)301 CALL dynredem0("restart.nc",day_end,anne_ini,phis,nqtot) 232 302 233 303 ecripar = .TRUE. … … 237 307 238 308 c Quelques initialisations pour les traceurs 239 call initial0(ijp1llm*nq mx,dq)309 call initial0(ijp1llm*nqtot,dq) 240 310 c istdyn=day_step/4 ! stockage toutes les 6h=1jour/4 241 311 c istphy=istdyn/iphysiq … … 328 398 IF( forward. OR . leapf ) THEN 329 399 330 DO iq = 1, nq mx400 DO iq = 1, nqtot 331 401 c 332 402 IF ( iadv(iq).EQ.1.OR.iadv(iq).EQ.2 ) THEN 333 403 CALL traceur( iq,iadv,q,teta,pk,w, pbaru, pbarv, dq ) 334 404 335 ELSE IF( iq.EQ. nq mx) THEN405 ELSE IF( iq.EQ. nqtot ) THEN 336 406 c 337 407 iapp_tracvl = 5 … … 341 411 c 342 412 343 CALL vanleer(numvanle,iapp_tracvl,nq mx,q,pbaru,pbarv,413 CALL vanleer(numvanle,iapp_tracvl,nqtot,q,pbaru,pbarv, 344 414 * p, masse, dq, iadv(1), teta, pk ) 345 415 … … 413 483 414 484 415 CALL calfis( nq mx, lafin ,rdayvrai,rday_ecri,time ,485 CALL calfis( nqtot, lafin ,rdayvrai,rday_ecri,time , 416 486 $ ucov,vcov,teta,q,masse,ps,p,pk,phis,phi , 417 487 $ du,dv,dteta,dq,w, dufi,dvfi,dhfi,dqfi,dpfi,tracer) … … 421 491 c ------------------------------ 422 492 ! if(1.eq.2)then 423 CALL addfi( nq mx, dtphys, leapf, forward ,493 CALL addfi( nqtot, dtphys, leapf, forward , 424 494 $ ucov, vcov, teta , q ,ps , masse, 425 495 $ dufi, dvfi, dhfi , dqfi ,dpfi ) … … 556 626 c iav=0 557 627 c ENDIF 558 c CALL writedynav(histaveid, nq mx, itau,vcov ,628 c CALL writedynav(histaveid, nqtot, itau,vcov , 559 629 c , ucov,teta,pk,phi,q,masse,ps,phis) 560 630 c ENDIF … … 569 639 CALL test_period ( ucov,vcov,teta,q,p,phis ) 570 640 CALL dynredem1("restart.nc",0.0, 571 . vcov,ucov,teta,q,nq mx,masse,ps)641 . vcov,ucov,teta,q,nqtot,masse,ps) 572 642 573 643 CLOSE(99) … … 636 706 iav=0 637 707 ENDIF 638 c CALL writedynav(histaveid, nq mx, itau,vcov ,708 c CALL writedynav(histaveid, nqtot, itau,vcov , 639 709 c , ucov,teta,pk,phi,q,masse,ps,phis) 640 710 … … 644 714 IF(itau.EQ.itaufin) 645 715 . CALL dynredem1("restart.nc",0.0, 646 . vcov,ucov,teta,q,nq mx,masse,ps)716 . vcov,ucov,teta,q,nqtot,masse,ps) 647 717 648 718 forward = .TRUE. -
trunk/LMDZ.GENERIC/libf/dyn3d/infotrac.F90
r1214 r1216 1 MODULE infotrac 2 3 IMPLICIT NONE 4 ! nqtot : total number of tracers and higher order of moment, water vapor and liquid included 5 INTEGER, SAVE :: nqtot 6 INTEGER,allocatable :: iadv(:) ! tracer advection scheme number 7 CHARACTER(len=20),allocatable :: tname(:) ! tracer name 8 9 CONTAINS 10 1 11 subroutine iniadvtrac(nq,numvanle) 2 12 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 8 18 IMPLICIT NONE 9 19 10 #include "dimensions.h"11 #include "advtrac.h"12 #include "control.h"20 !#include "dimensions.h" 21 !#include "advtrac.h" 22 !#include "control.h" 13 23 14 24 ! routine arguments: … … 20 30 INTEGER :: iq 21 31 INTEGER :: ierr 22 23 24 if (nqmx > 0) then 32 CHARACTER(len=3) :: qname 25 33 26 34 ! Look for file traceur.def 27 OPEN(90,file='traceur.def',form='formatted',status='old', 28 &iostat=ierr)35 OPEN(90,file='traceur.def',form='formatted',status='old', & 36 iostat=ierr) 29 37 IF (ierr.eq.0) THEN 30 38 write(*,*) "iniadvtrac: Reading file traceur.def" … … 35 43 write(*,*) " (first line of traceur.def) " 36 44 stop 37 else38 ! check that the number of tracers is indeed nqmx39 if (nq.ne.nqmx) then40 write(*,*) "iniadvtrac: error, wrong number of tracers:"41 write(*,*) "nq=",nq," whereas nqmx=",nqmx42 stop43 endif44 45 endif 46 47 ! allocate arrays: 48 allocate(iadv(nq)) 49 allocate(tname(nq)) 45 50 46 51 ! initialize advection schemes to Van-Leer for all tracers … … 49 54 enddo 50 55 51 52 53 ! MODIFICATION TO TEST OTHER SCHEMES BY RDW54 ! do iq=1,nq55 ! iadv(iq)=156 ! enddo57 ! print*,'IADV SET TO 1 IN iniadvtrac!!!!'58 59 56 do iq=1,nq 60 57 ! minimal version, just read in the tracer names, 1 per line 61 read(90,*,iostat=ierr) tn om(iq)58 read(90,*,iostat=ierr) tname(iq) 62 59 if (ierr.ne.0) then 63 60 write(*,*) 'iniadvtrac: error reading tracer names...' … … 65 62 endif 66 63 enddo !of do iq=1,nq 67 ELSE 68 write(*,*) "iniadvtrac: can't find file traceur.def..." 69 stop 64 close(90) ! done reading tracer names, close file 70 65 ENDIF ! of IF (ierr.eq.0) 71 66 72 c .... Choix des shemas d'advection pour l'eau et les traceurs ... 73 c ................................................................... 74 c 75 c iadv = 1 shema transport type "humidite specifique LMD" 76 c iadv = 2 shema amont 77 c iadv = 3 shema Van-leer 78 c iadv = 4 schema Van-leer + humidite specifique 79 c Modif F.Codron 80 c 81 c 82 DO iq = 1, nqmx 83 IF( iadv(iq).EQ.1 ) PRINT *,' Choix du shema humidite specifique' 84 * ,' pour le traceur no ', iq 85 IF( iadv(iq).EQ.2 ) PRINT *,' Choix du shema amont',' pour le' 86 87 * ,' traceur no ', iq 88 IF( iadv(iq).EQ.3 ) PRINT *,' Choix du shema Van-Leer ',' pour' 89 * ,'le traceur no ', iq 67 ! .... Choix des shemas d'advection pour l'eau et les traceurs ... 68 ! ................................................................... 69 ! 70 ! iadv = 1 shema transport type "humidite specifique LMD" 71 ! iadv = 2 shema amont 72 ! iadv = 3 shema Van-leer 73 ! iadv = 4 schema Van-leer + humidite specifique 74 ! Modif F.Codron 75 ! 76 ! 77 DO iq = 1, nq-1 78 IF( iadv(iq).EQ.1 ) PRINT *,' Choix du shema humidite specifique'& 79 ,' pour le traceur no ', iq 80 IF( iadv(iq).EQ.2 ) PRINT *,' Choix du shema amont',' pour le' & 81 ,' traceur no ', iq 82 IF( iadv(iq).EQ.3 ) PRINT *,' Choix du shema Van-Leer ',' pour' & 83 ,'le traceur no ', iq 90 84 91 85 IF( iadv(iq).EQ.4 ) THEN 92 PRINT *,' Le shema Van-Leer + humidite specifique ', 93 *' est uniquement pour la vapeur d eau .'86 PRINT *,' Le shema Van-Leer + humidite specifique ', & 87 ' est uniquement pour la vapeur d eau .' 94 88 PRINT *,' Corriger iadv( ',iq, ') et repasser ! ' 95 89 CALL ABORT … … 97 91 98 92 IF( iadv(iq).LE.0.OR.iadv(iq).GT.4 ) THEN 99 PRINT *,' Erreur dans le choix de iadv (nq mx).Corriger et '100 *,' repasser car iadv(iq) = ', iadv(iq)93 PRINT *,' Erreur dans le choix de iadv (nqtot).Corriger et ' & 94 ,' repasser car iadv(iq) = ', iadv(iq) 101 95 CALL ABORT 102 96 ENDIF 103 97 ENDDO 104 98 105 !!!! AS: compiler complains about iadv(nqmx) when there is nqmx=0 106 !!!! AS: so I commented those lines and changed nqmx-1 for nqmx above 107 ! IF( iadv(nqmx).EQ.1 ) PRINT *,' Choix du shema humidite ' 108 ! * ,'specifique pour la vapeur d''eau' 109 ! IF( iadv(nqmx).EQ.2 ) PRINT *,' Choix du shema amont',' pour la' 110 ! * ,' vapeur d''eau ' 111 ! IF( iadv(nqmx).EQ.3 ) PRINT *,' Choix du shema Van-Leer ' 112 ! * ,' pour la vapeur d''eau' 113 ! IF( iadv(nqmx).EQ.4 ) PRINT *,' Choix du shema Van-Leer + ' 114 ! * ,' humidite specifique pour la vapeur d''eau' 99 IF( iadv(nq).EQ.1 ) PRINT *,' Choix du shema humidite ' & 100 ,'specifique pour la vapeur d''eau' 101 IF( iadv(nq).EQ.2 ) PRINT *,' Choix du shema amont',' pour la' & 102 ,' vapeur d''eau ' 103 IF( iadv(nq).EQ.3 ) PRINT *,' Choix du shema Van-Leer ' & 104 ,' pour la vapeur d''eau' 105 IF( iadv(nq).EQ.4 ) PRINT *,' Choix du shema Van-Leer + ' & 106 ,' humidite specifique pour la vapeur d''eau' 115 107 ! 116 !c 117 !! IF( (iadv(nqmx).LE.0).OR.(iadv(nqmx).GT.4) ) THEN 118 !! MODIFICATION TO TEST WITHOUT TRACER ADVECTION BY RDW 119 ! IF( (iadv(nqmx).LT.0).OR.(iadv(nqmx).GT.4) ) THEN 120 ! PRINT *,' Erreur dans le choix de iadv (nqmx).Corriger et ' 121 ! * ,' repasser car iadv(nqmx) = ', iadv(nqmx) 122 ! CALL ABORT 123 ! ENDIF 108 IF( (iadv(nq).LE.0).OR.(iadv(nq).GT.4) ) THEN 109 PRINT *,' Erreur dans le choix de iadv (nqtot).Corriger et ' & 110 ,' repasser car iadv(nqtot) = ', iadv(nqtot) 111 CALL ABORT 112 ENDIF 124 113 125 114 first = .TRUE. 126 numvanle = nq mx+ 1127 DO iq = 1, nq mx115 numvanle = nq + 1 116 DO iq = 1, nq 128 117 IF(((iadv(iq).EQ.3).OR.(iadv(iq).EQ.4)).AND.first ) THEN 129 118 numvanle = iq … … 131 120 ENDIF 132 121 ENDDO 133 c 134 DO iq = 1, nq mx122 ! 123 DO iq = 1, nq 135 124 136 125 IF( (iadv(iq).NE.3.AND.iadv(iq).NE.4).AND.iq.GT.numvanle ) THEN 137 PRINT *,' Il y a discontinuite dans le choix du shema de ', 138 *'Van-leer pour les traceurs . Corriger et repasser . '126 PRINT *,' Il y a discontinuite dans le choix du shema de ', & 127 'Van-leer pour les traceurs . Corriger et repasser . ' 139 128 CALL ABORT 140 129 ENDIF 141 130 142 131 ENDDO 143 c 144 end if ! of if nqmx > 0132 ! 133 end subroutine iniadvtrac 145 134 146 end 135 END MODULE infotrac -
trunk/LMDZ.GENERIC/libf/dyn3d/iniconst.F
r135 r1216 1 1 SUBROUTINE iniconst 2 2 3 use control_mod, only: iphysiq, idissip 3 4 IMPLICIT NONE 4 5 c … … 13 14 #include "comconst.h" 14 15 #include "temps.h" 15 #include "control.h"16 !#include "control.h" 16 17 #include "comvert.h" 17 18 -
trunk/LMDZ.GENERIC/libf/dyn3d/inidissip.F
r253 r1216 8 8 c ------------- 9 9 10 use control_mod, only: idissip, iperiod 10 11 IMPLICIT NONE 11 12 #include "dimensions.h" … … 14 15 #include "comconst.h" 15 16 #include "comvert.h" 16 #include "control.h"17 !#include "control.h" 17 18 18 19 LOGICAL lstardis -
trunk/LMDZ.GENERIC/libf/dyn3d/logic.h
r253 r1216 3 3 4 4 COMMON/logic/ purmats,physic,forward,leapf,apphys,grireg, 5 * statcl,conser,apdiss,apdelq,saison,ecripar,fxyhypb,ysinus,hybrid,autozlevs 5 * statcl,conser,apdiss,apdelq,saison,ecripar,fxyhypb,ysinus, 6 & hybrid,autozlevs 6 7 7 8 LOGICAL purmats,physic,forward,leapf,apphys,grireg,statcl,conser, -
trunk/LMDZ.GENERIC/libf/dyn3d/test_period.F
r135 r1216 1 1 SUBROUTINE test_period ( ucov, vcov, teta, q, p, phis ) 2 3 USE infotrac, ONLY: nqtot 4 IMPLICIT NONE 2 5 c 3 6 c Auteur : P. Le Van … … 14 17 c 15 18 REAL ucov(ip1jmp1,llm), vcov(ip1jm,llm), teta(ip1jmp1,llm) , 16 , q(ip1jmp1,llm,nq mx), p(ip1jmp1,llmp1), phis(ip1jmp1)19 , q(ip1jmp1,llm,nqtot), p(ip1jmp1,llmp1), phis(ip1jmp1) 17 20 c 18 21 c ..... Variables locales ..... … … 51 54 52 55 c 53 DO nq =1, nq mx56 DO nq =1, nqtot 54 57 DO l =1, llm 55 58 DO ij = 1, ip1jmp1, iip1
Note: See TracChangeset
for help on using the changeset viewer.