Changeset 1036 for trunk/LMDZ.MARS/libf/phymars
- Timestamp:
- Sep 11, 2013, 2:34:44 PM (12 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 1 added
- 1 deleted
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/aeropacity.F
r677 r1036 4 4 5 5 ! to use 'getin' 6 USE ioipsl_getincom 6 USE ioipsl_getincom, only: getin 7 use tracer_mod, only: noms, igcm_h2o_ice, igcm_dust_mass, 8 & igcm_dust_submicron, rho_dust, rho_ice 7 9 IMPLICIT NONE 8 10 c======================================================================= … … 53 55 #include "dimradmars.h" 54 56 #include "yomaer.h" 55 #include "tracer.h"57 !#include "tracer.h" 56 58 #include "planete.h" 57 59 #include "aerkind.h" … … 119 121 120 122 ! indexes of water ice and dust tracers: 121 INTEGER, SAVE :: nqdust(nqmx) ! to store the indexes of dust tracers123 INTEGER,ALLOCATABLE,SAVE :: nqdust(:) ! to store the indexes of dust tracers 122 124 INTEGER,SAVE :: i_ice=0 ! water ice 123 125 real,parameter :: odpref=610. ! DOD reference pressure (Pa) … … 143 145 ENDDO 144 146 ! identify tracers which are dust 147 allocate(nqdust(nq)) 145 148 i=0 146 149 DO iq=1,nq -
trunk/LMDZ.MARS/libf/phymars/callradite.F
r740 r1036 272 272 name_iaer(1) = "dust_conrath" !! default choice is good old Conrath profile 273 273 IF (doubleq.AND.active) name_iaer(1) = "dust_doubleq" !! two-moment scheme 274 if (nq mx.gt.1) then274 if (nq.gt.1) then 275 275 ! trick to avoid problems compiling with 1 tracer 276 276 ! and picky compilers who know name_iaer(2) is out of bounds … … 278 278 IF (water.AND.activice) name_iaer(j) = "h2o_ice" !! radiatively-active clouds 279 279 IF (submicron.AND.active) name_iaer(j) = "dust_submicron" !! JBM experimental stuff 280 endif ! of if (nq mx.gt.1)280 endif ! of if (nq.gt.1) 281 281 c ---------------------------------------------------------- 282 282 -
trunk/LMDZ.MARS/libf/phymars/callsedim.F
r1005 r1036 5 5 & tau,tauscaling) 6 6 ! to use 'getin' 7 USE ioipsl_getincom 8 USE updaterad,only: updaterdust,updaterice_micro,updaterice_typ 7 USE ioipsl_getincom, only: getin 8 USE updaterad, only: updaterdust,updaterice_micro,updaterice_typ 9 USE tracer_mod, only: noms, igcm_dust_mass, igcm_dust_number, 10 & rho_dust, rho_q, radius, varian, 11 & igcm_ccn_mass, igcm_ccn_number, 12 & igcm_h2o_ice, nuice_sed, nuice_ref 9 13 IMPLICIT NONE 10 14 … … 28 32 #include "dimphys.h" 29 33 #include "comcstfi.h" 30 #include "tracer.h"34 !#include "tracer.h" 31 35 #include "callkeys.h" 32 36 -
trunk/LMDZ.MARS/libf/phymars/calltherm_interface.F90
r1033 r1036 45 45 46 46 use comtherm_h 47 use tracer_mod, only: nqmx,noms 47 48 implicit none 48 49 -
trunk/LMDZ.MARS/libf/phymars/convadj.F
r161 r1036 6 6 & pdqadj) 7 7 8 use tracer_mod, only: noms, ! tracer names 9 & igcm_h2o_vap ! index of water vapor tracer 8 10 implicit none 9 11 … … 33 35 #include "comcstfi.h" 34 36 #include "callkeys.h" 35 #include "tracer.h"37 !#include "tracer.h" 36 38 37 39 … … 73 75 INTEGER iq,ico2 74 76 save ico2 75 REAL zq(ngridmx,nlayermx,nq mx), zq2(ngridmx,nlayermx,nqmx)76 REAL zqm(nq mx),zqco2m77 REAL zq(ngridmx,nlayermx,nq), zq2(ngridmx,nlayermx,nq) 78 REAL zqm(nq),zqco2m 77 79 real m_co2, m_noco2, A , B 78 80 save A, B … … 101 103 if (tracer) then 102 104 ! Prepare Special treatment if one of the tracers is CO2 gas 103 do iq=1,nq mx105 do iq=1,nq 104 106 if (noms(iq).eq."co2") then 105 107 ico2=iq -
trunk/LMDZ.MARS/libf/phymars/dustdevil.F
r224 r1036 1 1 SUBROUTINE dustdevil(ngrid,nlay,nq, pplev,pu,pv,pt, ptsurf,pq2, 2 2 & pdqdev,pdqs_dev) 3 4 use tracer_mod, only: alpha_devil 3 5 IMPLICIT NONE 4 6 … … 32 34 #include "surfdat.h" 33 35 #include "comgeomfi.h" 34 #include "tracer.h"36 !#include "tracer.h" 35 37 c arguments: 36 38 c ---------- -
trunk/LMDZ.MARS/libf/phymars/dustlift.F
r310 r1036 2 2 $ pcdh_true,pcdh,co2ice, 3 3 $ dqslift) 4 5 use tracer_mod, only: alpha_lift, radius 4 6 IMPLICIT NONE 5 7 … … 19 21 #include "dimphys.h" 20 22 #include "comcstfi.h" 21 #include "tracer.h"23 !#include "tracer.h" 22 24 23 25 c -
trunk/LMDZ.MARS/libf/phymars/growthrate.F
r633 r1036 1 1 subroutine growthrate(temp,pmid,psat,rcrystal,res) 2 2 3 use tracer_mod, only: rho_ice 3 4 IMPLICIT NONE 4 5 … … 21 22 #include "dimphys.h" 22 23 #include "comcstfi.h" 23 #include "tracer.h"24 !#include "tracer.h" 24 25 #include "microphys.h" 25 26 -
trunk/LMDZ.MARS/libf/phymars/improvedclouds.F
r1020 r1036 6 6 USE ioipsl_getincom 7 7 USE updaterad 8 use tracer_mod, only: rho_ice, nuice_sed, igcm_h2o_vap, 9 & igcm_h2o_ice, igcm_dust_mass, 10 & igcm_dust_number, igcm_ccn_mass, 11 & igcm_ccn_number 8 12 implicit none 9 13 … … 33 37 #include "comcstfi.h" 34 38 #include "callkeys.h" 35 #include "tracer.h"39 !#include "tracer.h" 36 40 #include "comgeomfi.h" 37 41 #include "dimradmars.h" … … 73 77 INTEGER ig,l,i 74 78 75 REAL zq(ngridmx,nlayermx,nq mx) ! local value of tracers76 REAL zq0(ngridmx,nlayermx,nq mx) ! local initial value of tracers79 REAL zq(ngridmx,nlayermx,nq) ! local value of tracers 80 REAL zq0(ngridmx,nlayermx,nq) ! local initial value of tracers 77 81 REAL zt(ngridmx,nlayermx) ! local value of temperature 78 82 REAL zqsat(ngridmx,nlayermx) ! saturation -
trunk/LMDZ.MARS/libf/phymars/inifis.F
r1028 r1036 1 1 SUBROUTINE inifis( 2 $ ngrid,nlayer 2 $ ngrid,nlayer,nq 3 3 $ ,day_ini,pdaysec,ptimestep 4 4 $ ,plat,plon,parea … … 46 46 ! ------------- 47 47 ! to use 'getin' 48 USE ioipsl_getincom 48 USE ioipsl_getincom, only : getin 49 use tracer_mod, only : nqmx, nuice_sed, ccn_factor 50 49 51 IMPLICIT NONE 50 52 #include "dimensions.h" … … 62 64 #include "slope.h" 63 65 #include "microphys.h" 64 #include "tracer.h"66 !#include "tracer.h" 65 67 #ifdef MESOSCALE 66 68 #include "comsoil.h" !!MESOSCALE -- needed to fill volcapa 67 69 #include "meso_inc/meso_inc_inifisvar.F" 68 70 #endif 69 REAL prad,pg,pr,pcpp,pdaysec70 71 REAL ptimestep72 INTEGER day_ini73 74 INTEGER ngrid,nlayer75 REAL plat(ngrid),plon(ngrid),parea(ngridmx)71 REAL,INTENT(IN) :: prad,pg,pr,pcpp,pdaysec 72 73 REAL,INTENT(IN) :: ptimestep 74 INTEGER,INTENT(IN) :: day_ini 75 76 INTEGER,INTENT(IN) :: ngrid,nlayer,nq 77 REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid) 76 78 INTEGER ig,ierr 77 79 … … 95 97 daysec=pdaysec 96 98 dtphys=ptimestep 99 100 nqmx=nq 101 97 102 #ifdef MESOSCALE 98 103 #include "meso_inc/meso_inc_inifisini.F" … … 375 380 stop 376 381 endif 377 if (doubleq.and.submicron.and.(nq mx.LT.3)) then382 if (doubleq.and.submicron.and.(nq.LT.3)) then 378 383 print*,'If doubleq is used with a submicron tracer,' 379 384 print*,' then the number of tracers has to be' … … 804 809 ! print*,' 1 water vapour tracer' 805 810 ! print*,' 1 water ice tracer' 806 ! print*,nq mx-4,' chemistry tracers'811 ! print*,nq-4,' chemistry tracers' 807 812 ! endif 808 813 ! … … 812 817 ! print*,' 1 water vapour tracer' 813 818 ! print*,' 1 water ice tracer' 814 ! if (nq mx.LT.4) then815 ! print*,'nq mxshould be at least equal to'819 ! if (nq.LT.4) then 820 ! print*,'nq should be at least equal to' 816 821 ! print*,'4 with these options.' 817 822 ! stop … … 824 829 ! print*,dustbin,' dust bins' 825 830 ! endif 826 ! print*,nq mx-2-dustbin,' chemistry tracers'831 ! print*,nq-2-dustbin,' chemistry tracers' 827 832 ! print*,' 1 water vapour tracer' 828 833 ! print*,' 1 water ice tracer' … … 836 841 ! print*,' 1 water vapour tracer' 837 842 ! print*,' 1 water ice tracer' 838 ! if (nq mx.gt.(dustbin+2)) then839 ! print*,'nq mxshould be ',(dustbin+2),843 ! if (nq.gt.(dustbin+2)) then 844 ! print*,'nq should be ',(dustbin+2), 840 845 ! $ ' with these options...' 841 846 ! print*,'(or check callphys.def)' 842 847 ! endif 843 ! if (nq mx.lt.(dustbin+2)) then844 ! write(*,*) "inifis: nq mx.lt.(dustbin+2)"848 ! if (nq.lt.(dustbin+2)) then 849 ! write(*,*) "inifis: nq.lt.(dustbin+2)" 845 850 ! stop 846 851 ! endif -
trunk/LMDZ.MARS/libf/phymars/initracer.F
r1005 r1036 1 SUBROUTINE initracer(qsurf,co2ice) 2 1 SUBROUTINE initracer(ngrid,nq,qsurf,co2ice) 2 3 use infotrac, only: tnom 4 use tracer_mod 3 5 IMPLICIT NONE 4 6 c======================================================================= … … 11 13 c 12 14 c Test of dimension : 13 c Initialize COMMON tracer in tracer.h, using tracer names provided14 c by the dynamics in " advtrac.h"15 c Initialize tracer related data in tracer_mod, using tracer names provided 16 c by the dynamics in "infotrac" 15 17 c 16 18 c … … 26 28 #include "comcstfi.h" 27 29 #include "callkeys.h" 28 #include "tracer.h"29 #include "advtrac.h"30 !#include "tracer.h" 31 !#include "advtrac.h" 30 32 #include "comgeomfi.h" 31 33 32 34 #include "surfdat.h" 33 35 34 real qsurf(ngridmx,nqmx) ! tracer on surface (e.g. kg.m-2) 35 real co2ice(ngridmx) ! co2 ice mass on surface (e.g. kg.m-2) 36 integer,intent(in) :: ngrid ! number of atmospheric columns 37 integer,intent(in) :: nq ! number of tracers 38 real,intent(out) :: qsurf(ngrid,nq) ! tracer on surface (e.g. kg.m-2) 39 real,intent(out) :: co2ice(ngrid) ! co2 ice mass on surface (e.g. kg.m-2) 40 36 41 integer iq,ig,count 37 42 real r0_lift , reff_lift, nueff_lift … … 43 48 44 49 c----------------------------------------------------------------------- 45 c radius(nq mx) ! aerosol particle radius (m)46 c rho_q(nq mx) ! tracer densities (kg.m-3)47 c alpha_lift(nq mx) ! saltation vertical flux/horiz flux ratio (m-1)48 c alpha_devil(nq mx) ! lifting coeeficient by dust devil50 c radius(nq) ! aerosol particle radius (m) 51 c rho_q(nq) ! tracer densities (kg.m-3) 52 c alpha_lift(nq) ! saltation vertical flux/horiz flux ratio (m-1) 53 c alpha_devil(nq) ! lifting coeeficient by dust devil 49 54 c rho_dust ! Mars dust density 50 55 c rho_ice ! Water ice density … … 55 60 c----------------------------------------------------------------------- 56 61 62 ! Initialization: allocate arrays in tracer_mod 63 allocate(noms(nq)) 64 allocate(mmol(nq)) 65 allocate(radius(nq)) 66 allocate(rho_q(nq)) 67 allocate(alpha_lift(nq)) 68 allocate(alpha_devil(nq)) 69 allocate(dryness(ngridmx)) 70 allocate(igcm_dustbin(nq)) 71 57 72 ! Initialization: get tracer names from the dynamics and check if we are 58 73 ! using 'old' tracer convention ('q01',q02',...) … … 60 75 ! check if tracers have 'old' names 61 76 count=0 62 do iq=1,nq mx77 do iq=1,nq 63 78 txt=" " 64 79 write(txt,'(a1,i2.2)') 'q',iq … … 66 81 count=count+1 67 82 endif 68 enddo ! of do iq=1,nq mx83 enddo ! of do iq=1,nq 69 84 70 if (count.eq.nq mx) then85 if (count.eq.nq) then 71 86 write(*,*) "initracer: tracers seem to follow old naming ", 72 87 & "convention (q01,q02,...)" … … 76 91 77 92 ! copy tracer names from dynamics 78 do iq=1,nq mx93 do iq=1,nq 79 94 noms(iq)=tnom(iq) 80 95 enddo … … 86 101 ! Identify tracers by their names: (and set corresponding values of mmol) 87 102 ! 0. initialize tracer indexes to zero: 88 do iq=1,nqmx 89 igcm_dustbin(iq)=0 90 enddo 103 igcm_dustbin(1:nq)=0 104 91 105 igcm_dust_mass=0 92 106 igcm_dust_number=0 … … 130 144 count=0 131 145 if (dustbin.gt.0) then 132 do iq=1,nq mx146 do iq=1,nq 133 147 txt=" " 134 148 write(txt,'(a4,i2.2)')'dust',count+1 … … 138 152 mmol(iq)=100. 139 153 endif 140 enddo !do iq=1,nq mx154 enddo !do iq=1,nq 141 155 endif ! of if (dustbin.gt.0) 142 156 if (doubleq) then 143 do iq=1,nq mx157 do iq=1,nq 144 158 if (noms(iq).eq."dust_mass") then 145 159 igcm_dust_mass=iq … … 153 167 endif ! of if (doubleq) 154 168 if (microphys) then 155 do iq=1,nq mx169 do iq=1,nq 156 170 if (noms(iq).eq."ccn_mass") then 157 171 igcm_ccn_mass=iq … … 165 179 endif ! of if (microphys) 166 180 if (submicron) then 167 do iq=1,nq mx181 do iq=1,nq 168 182 if (noms(iq).eq."dust_submicron") then 169 183 igcm_dust_submicron=iq … … 174 188 endif ! of if (submicron) 175 189 ! 2. find chemistry and water tracers 176 do iq=1,nq mx190 do iq=1,nq 177 191 if (noms(iq).eq."co2") then 178 192 igcm_co2=iq … … 337 351 endif 338 352 339 enddo ! of do iq=1,nq mx353 enddo ! of do iq=1,nq 340 354 341 355 ! check that we identified all tracers: 342 if (count.ne.nq mx) then356 if (count.ne.nq) then 343 357 write(*,*) "initracer: found only ",count," tracers" 344 write(*,*) " expected ",nq mx358 write(*,*) " expected ",nq 345 359 do iq=1,count 346 360 write(*,*)' ',iq,' ',trim(noms(iq)) … … 349 363 else 350 364 write(*,*) "initracer: found all expected tracers, namely:" 351 do iq=1,nq mx365 do iq=1,nq 352 366 write(*,*)' ',iq,' ',trim(noms(iq)) 353 367 enddo … … 365 379 ! as qsurf(i_h2o_vap) & as qsurf(i_h2o_ice), so to be clean: 366 380 if (igcm_h2o_vap.ne.0) then 367 qsurf(1:ngrid mx,igcm_h2o_vap)=0381 qsurf(1:ngrid,igcm_h2o_vap)=0 368 382 endif 369 383 endif 370 384 371 385 c------------------------------------------------------------ 372 c Initialize tracers .... (in tracer .h)386 c Initialize tracers .... (in tracer_mod) 373 387 c------------------------------------------------------------ 374 388 ! start by setting everything to (default) zero 375 rho_q(1:nq mx)=0 ! tracer density (kg.m-3)376 radius(1:nq mx)=0. ! tracer particle radius (m)377 alpha_lift(1:nq mx) =0. ! tracer saltation vertical flux/horiz flux ratio (m-1)378 alpha_devil(1:nq mx)=0. ! tracer lifting coefficient by dust devils389 rho_q(1:nq)=0 ! tracer density (kg.m-3) 390 radius(1:nq)=0. ! tracer particle radius (m) 391 alpha_lift(1:nq) =0. ! tracer saltation vertical flux/horiz flux ratio (m-1) 392 alpha_devil(1:nq)=0. ! tracer lifting coefficient by dust devils 379 393 380 394 … … 393 407 c iq=1: Q mass mixing ratio, iq=2: N number mixing ratio 394 408 395 if( (nq mx.lt.2).or.(water.and.(nqmx.lt.4)) ) then396 write(*,*)'initracer: nq mx is too low : nqmx=', nqmx409 if( (nq.lt.2).or.(water.and.(nq.lt.4)) ) then 410 write(*,*)'initracer: nq is too low : nq=', nq 397 411 write(*,*)'water= ',water,' doubleq= ',doubleq 398 412 end if … … 499 513 alpha_lift(igcm_h2o_vap) =0. 500 514 alpha_devil(igcm_h2o_vap)=0. 501 if(water.and.(nq mx.ge.2)) then515 if(water.and.(nq.ge.2)) then 502 516 radius(igcm_h2o_ice)=3.e-6 503 517 rho_q(igcm_h2o_ice)=rho_ice 504 518 alpha_lift(igcm_h2o_ice) =0. 505 519 alpha_devil(igcm_h2o_ice)=0. 506 elseif(water.and.(nq mx.lt.2)) then507 write(*,*) 'nq mx is too low : nqmx=', nqmx520 elseif(water.and.(nq.lt.2)) then 521 write(*,*) 'nq is too low : nq=', nq 508 522 write(*,*) 'water= ',water 509 523 endif -
trunk/LMDZ.MARS/libf/phymars/newcondens.F
r890 r1036 6 6 $ fluxsurf_sw,zls) 7 7 8 use tracer_mod, only: noms 8 9 IMPLICIT NONE 9 10 c======================================================================= … … 61 62 #include "paramet.h" 62 63 #include "callkeys.h" 63 #include "tracer.h"64 !#include "tracer.h" 64 65 65 66 c----------------------------------------------------------------------- … … 195 196 if (tracer) then 196 197 c Prepare Special treatment if one of the tracer is CO2 gas 197 do iq=1,nq mx198 do iq=1,nq 198 199 if (noms(iq).eq."co2") then 199 200 ico2=iq … … 238 239 END DO 239 240 240 DO iq=1,nq mx241 DO iq=1,nq 241 242 DO l=1,nlayer 242 243 DO ig=1,ngrid … … 531 532 zu(l) =pu(ig,l) +pdu( ig,l) *ptimestep 532 533 zv(l) =pv(ig,l) +pdv( ig,l) *ptimestep 533 do iq=1,nq mx534 do iq=1,nq 534 535 zq(l,iq)=pq(ig,l,iq)+pdq(ig,l,iq)*ptimestep 535 536 enddo … … 564 565 zum(1) = 0 565 566 zvm(1) = 0 566 do iq=1,nq mx567 do iq=1,nq 567 568 zqm(1,iq)=0. ! most tracer do not condense ! 568 569 enddo … … 577 578 call vl1d(zu ,2.,masse,w,zum) 578 579 call vl1d(zv ,2.,masse,w,zvm) 579 do iq=1,nq mx580 do iq=1,nq 580 581 do l=1,nlayer 581 582 zq1(l)=zq(l,iq) … … 602 603 zum(nlayer+1)= zu(nlayer) ! should not be used, but... 603 604 zvm(nlayer+1)= zv(nlayer) ! should not be used, but... 604 do iq=1,nq mx605 do iq=1,nq 605 606 zqm(nlayer+1,iq)= zq(nlayer,iq) 606 607 enddo … … 637 638 638 639 c Tendencies on Q 639 do iq=1,nq mx640 do iq=1,nq 640 641 ! if (noms(iq).eq.'co2') then 641 642 if (iq.eq.ico2) then … … 668 669 if(pq(ig,1,ico2)+(pdq(ig,1,ico2)+pdqc(ig,1,ico2))*ptimestep 669 670 & .lt.qco2min) then 670 do iq=1,nq mx671 do iq=1,nq 671 672 zq(1,iq)=pq(ig,1,iq) 672 673 & +(pdq(ig,1,iq)+pdqc(ig,1,iq))*ptimestep … … 675 676 Sm(1) = masse(1) 676 677 do l =2,nlayermx 677 do iq=1,nq mx678 do iq=1,nq 678 679 zq(l,iq)=pq(ig,l,iq) 679 680 & +(pdq(ig,l,iq)+pdqc(ig,l,iq))*ptimestep … … 693 694 end do 694 695 99 continue 695 do iq=1,nq mx696 do iq=1,nq 696 697 qmix=zq(nmix,iq) 697 698 & +(Smq(nmix-1,iq)-zq(nmix,iq)*Sm(nmix-1))/mixmas -
trunk/LMDZ.MARS/libf/phymars/nirco2abs.F
r690 r1036 2 2 $ mu0,fract,declin,pdtnirco2) 3 3 4 use tracer_mod, only: igcm_co2, igcm_o 4 5 IMPLICIT NONE 5 6 c======================================================================= … … 50 51 #include "comdiurn.h" 51 52 #include "nirdata.h" 52 #include "tracer.h"53 !#include "tracer.h" 53 54 54 55 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/nltecool.F
r472 r1036 30 30 c*************************************************************************** 31 31 32 use tracer_mod, only: igcm_co2, igcm_co, igcm_o, igcm_n2, mmol 32 33 implicit none 33 34 … … 37 38 #include "chimiedata.h" 38 39 #include "conc.h" !Added to have "dynamic composition" in the scheme 39 #include "tracer.h" !"40 !#include "tracer.h" !" 40 41 #include "callkeys.h" 41 42 -
trunk/LMDZ.MARS/libf/phymars/nuclea.F
r706 r1036 17 17 #include "dimphys.h" 18 18 #include "comcstfi.h" 19 #include "tracer.h"19 !#include "tracer.h" 20 20 #include "microphys.h" 21 21 -
trunk/LMDZ.MARS/libf/phymars/phyetat0.F
r999 r1036 4 4 5 5 use netcdf 6 use infotrac, only: nqtot, tnom 6 7 7 8 implicit none … … 25 26 #include "comcstfi.h" 26 27 !#include "tracer.h" 27 #include "advtrac.h"28 !#include "advtrac.h" 28 29 #include "control.h" 29 30 c====================================================================== … … 96 97 ! qsurf02, ...) 97 98 count=0 98 do iq=1,nq mx99 do iq=1,nqtot 99 100 txt= " " 100 101 write(txt,'(a5,i2.2)')'qsurf',iq … … 108 109 endif 109 110 enddo 110 if (count.eq.nq mx) then111 if (count.eq.nqtot) then 111 112 write(*,*) "phyetat0:tracers seem to follow old naming ", 112 113 & "convention (qsurf01,qsurf02,...)" … … 650 651 c case when new tracer are added in addition to old ones 651 652 write(*,*)'qsurf 1 to ', nqold,'were already present' 652 write(*,*)'qsurf ', nqold+1,' to ', nq mx,'are new'653 write(*,*)'qsurf ', nqold+1,' to ', nqtot,'are new' 653 654 ! yes=' ' 654 655 ! do while ((yes.ne.'y').and.(yes.ne.'n')) 655 656 ! write(*,*) 'Would you like to reindex qsurf # 1 ->',nqold 656 ! write(*,*) 'to #',nq mx-nqold+1,'->', nqmx,' (y or n) ?'657 ! write(*,*) 'to #',nqtot-nqold+1,'->', nqtot,' (y or n) ?' 657 658 ! read(*,fmt='(a)') yes 658 659 ! end do … … 660 661 ! write(*,*) 'OK, let s reindex qsurf' 661 662 ! do ig=1,ngridmx 662 ! do iq=nq mx,nqmx-nqold+1,-1663 ! qsurf(ig,iq)=qsurf(ig,iq-nq mx+nqold)663 ! do iq=nqtot,nqtot-nqold+1,-1 664 ! qsurf(ig,iq)=qsurf(ig,iq-nqtot+nqold) 664 665 ! end do 665 ! do iq=nq mx-nqold,1,-1666 ! do iq=nqtot-nqold,1,-1 666 667 ! qsurf(ig,iq)= 0. 667 668 ! end do -
trunk/LMDZ.MARS/libf/phymars/physdem.F
r999 r1036 3 3 . alb,ith,pzmea,pzstd,pzsig,pzgam,pzthe) 4 4 5 use infotrac, only: nqtot, tnom 5 6 implicit none 6 7 c … … 32 33 #include "netcdf.inc" 33 34 #include "dimphys.h" 34 #include "advtrac.h"35 !#include "advtrac.h" 35 36 #include "callkeys.h" 36 37 c … … 585 586 ! qsurf02, ...) 586 587 count=0 587 do iq=1,nq mx588 do iq=1,nqtot 588 589 txt= " " 589 590 write(txt,'(a1,i2.2)')'q',iq … … 596 597 endif 597 598 enddo 598 if (count.eq.nq mx) then599 if (count.eq.nqtot) then 599 600 write(*,*) "physdem0:tracers seem to follow old naming ", 600 601 & "convention (qsurf01,qsurf02,...)" … … 602 603 write(*,*) " but you should run newstart to rename them" 603 604 oldtracernames=.true. 604 endif ! of if (count.eq.nq mx)605 endif ! of if (count.eq.nqtot) 605 606 606 607 IF(nq.GE.1) THEN … … 693 694 . phystep,time, 694 695 . tsurf,tsoil,co2ice,emis,q2,qsurf) 696 use infotrac, only: nqtot, tnom 695 697 implicit none 696 698 c … … 720 722 #include "netcdf.inc" 721 723 #include "dimphys.h" 722 #include "advtrac.h"724 !#include "advtrac.h" 723 725 #include "callkeys.h" 724 726 c … … 918 920 IF (firstcall) THEN 919 921 count=0 920 do iq=1,nq mx922 do iq=1,nqtot 921 923 txt= " " 922 924 write(txt,'(a1,i2.2)')'q',iq … … 929 931 endif 930 932 enddo 931 if (count.eq.nq mx) then933 if (count.eq.nqtot) then 932 934 write(*,*) "physdem1:tracers seem to follow old naming ", 933 935 & "convention (qsurf01,qsurf02,...)" … … 935 937 write(*,*) " but you should run newstart to rename them" 936 938 oldtracernames=.true. 937 endif ! of if (count.eq.nq mx)939 endif ! of if (count.eq.nqtot) 938 940 ENDIF ! of if(firstcall) 939 941 940 942 ! If computing water cycle with ice, move surface ice 941 ! back to qsurf(nq mx)943 ! back to qsurf(nqtot) 942 944 IF (oldtracernames .and. water) THEN 943 945 !"loop" to avoid potential out-of-bounds on arrays 944 write(*,*)'physdem1: moving surface water ice to index ',nq mx945 do iq=nq mx,nqmx946 write(*,*)'physdem1: moving surface water ice to index ',nqtot 947 do iq=nqtot,nqtot 946 948 qsurf(1:ngridmx,iq)=qsurf(1:ngridmx,iq-1) 947 949 qsurf(1:ngridmx,iq-1)=0 -
trunk/LMDZ.MARS/libf/phymars/physiq.F
r1032 r1036 12 12 $ ) 13 13 14 14 use tracer_mod, only: noms, mmol, igcm_co2, igcm_n2, 15 & igcm_co, igcm_o, igcm_h2o_vap, igcm_h2o_ice, 16 & igcm_ccn_mass, igcm_ccn_number, 17 & igcm_dust_mass, igcm_dust_number, igcm_h2o2, 18 & nuice_ref, rho_ice, rho_dust, ref_r0 19 20 #ifdef MESOSCALE 21 use infotrac !!! this is necessary for tracers 22 #endif 15 23 IMPLICIT NONE 16 24 c======================================================================= … … 103 111 c pdv(ngrid,nlayermx) | Temporal derivative of the corresponding 104 112 c pdt(ngrid,nlayermx) | variables due to physical processes. 105 c pdq(ngrid,nlayermx,nq mx)|113 c pdq(ngrid,nlayermx,nq) | 106 114 c pdpsrf(ngrid) | 107 115 c tracerdyn call tracer in dynamical part of GCM ? … … 126 134 #include "dimradmars.h" 127 135 #include "comg1d.h" 128 #include "tracer.h"136 !#include "tracer.h" 129 137 #include "nlteparams.h" 130 138 #include "comvert.h" … … 142 150 #include "wrf_output_2d.h" 143 151 #include "wrf_output_3d.h" 144 #include "advtrac.h" !!! this is necessary for tracers (in dyn3d)152 !#include "advtrac.h" !!! this is necessary for tracers (in dyn3d) 145 153 #include "meso_inc/meso_inc_var.F" 146 154 #endif … … 192 200 REAL capcal(ngridmx) ! surface heat capacity (J m-2 K-1) 193 201 REAL fluxgrd(ngridmx) ! surface conduction flux (W.m-2) 194 REAL qsurf(ngridmx,nqmx)! tracer on surface (e.g. kg.m-2)202 REAL,ALLOCATABLE,SAVE :: qsurf(:,:) ! tracer on surface (e.g. kg.m-2) 195 203 REAL q2(ngridmx,nlayermx+1) ! Turbulent Kinetic Energy 196 204 … … 217 225 SAVE aerosol, tsurf,tsoil 218 226 SAVE co2ice,albedo,emis, q2 219 SAVE capcal,fluxgrd,dtrad,fluxrad,fluxrad_sky ,qsurf227 SAVE capcal,fluxgrd,dtrad,fluxrad,fluxrad_sky 220 228 221 229 REAL stephan … … 229 237 EXTERNAL CBRT 230 238 231 CHARACTER*80 fichier232 INTEGER l,ig,ierr,igout,iq, i,tapphys239 ! CHARACTER*80 fichier 240 INTEGER l,ig,ierr,igout,iq,tapphys 233 241 234 242 REAL fluxsurf_lw(ngridmx) !incident LW (IR) surface flux (W.m-2) … … 243 251 REAL zzlay(ngridmx,nlayermx) ! altitude at the middle of the layers 244 252 REAL zzlev(ngridmx,nlayermx+1) ! altitude at layer boundaries 245 REAL latvl1,lonvl1 ! Viking Lander 1 point (for diagnostic)253 ! REAL latvl1,lonvl1 ! Viking Lander 1 point (for diagnostic) 246 254 247 255 c Tendancies due to various processes: 248 REAL dqsurf(ngridmx,nq mx)256 REAL dqsurf(ngridmx,nq) 249 257 REAL zdtlw(ngridmx,nlayermx) ! (K/s) 250 258 REAL zdtsw(ngridmx,nlayermx) ! (K/s) 251 REAL cldtlw(ngridmx,nlayermx) ! (K/s) LW heating rate for clear area252 REAL cldtsw(ngridmx,nlayermx) ! (K/s) SW heating rate for clear area259 ! REAL cldtlw(ngridmx,nlayermx) ! (K/s) LW heating rate for clear area 260 ! REAL cldtsw(ngridmx,nlayermx) ! (K/s) SW heating rate for clear area 253 261 REAL zdtnirco2(ngridmx,nlayermx) ! (K/s) 254 262 REAL zdtnlte(ngridmx,nlayermx) ! (K/s) … … 264 272 REAL zdvc(ngridmx,nlayermx),zduc(ngridmx,nlayermx) 265 273 266 REAL zdqdif(ngridmx,nlayermx,nq mx), zdqsdif(ngridmx,nqmx)267 REAL zdqsed(ngridmx,nlayermx,nq mx), zdqssed(ngridmx,nqmx)268 REAL zdqdev(ngridmx,nlayermx,nq mx), zdqsdev(ngridmx,nqmx)269 REAL zdqadj(ngridmx,nlayermx,nq mx)270 REAL zdqc(ngridmx,nlayermx,nq mx)271 REAL zdqcloud(ngridmx,nlayermx,nq mx)272 REAL zdqscloud(ngridmx,nq mx)273 REAL zdqchim(ngridmx,nlayermx,nq mx)274 REAL zdqschim(ngridmx,nq mx)274 REAL zdqdif(ngridmx,nlayermx,nq), zdqsdif(ngridmx,nq) 275 REAL zdqsed(ngridmx,nlayermx,nq), zdqssed(ngridmx,nq) 276 REAL zdqdev(ngridmx,nlayermx,nq), zdqsdev(ngridmx,nq) 277 REAL zdqadj(ngridmx,nlayermx,nq) 278 REAL zdqc(ngridmx,nlayermx,nq) 279 REAL zdqcloud(ngridmx,nlayermx,nq) 280 REAL zdqscloud(ngridmx,nq) 281 REAL zdqchim(ngridmx,nlayermx,nq) 282 REAL zdqschim(ngridmx,nq) 275 283 276 284 REAL zdteuv(ngridmx,nlayermx) ! (K/s) … … 278 286 REAL zdumolvis(ngridmx,nlayermx) 279 287 REAL zdvmolvis(ngridmx,nlayermx) 280 real zdqmoldiff(ngridmx,nlayermx,nq mx)288 real zdqmoldiff(ngridmx,nlayermx,nq) 281 289 282 290 c Local variable for local intermediate calcul: … … 295 303 REAL ps(ngridmx), zt(ngridmx,nlayermx) 296 304 REAL zu(ngridmx,nlayermx),zv(ngridmx,nlayermx) 297 REAL zq(ngridmx,nlayermx,nq mx)305 REAL zq(ngridmx,nlayermx,nq) 298 306 REAL fluxtop_sw_tot(ngridmx), fluxsurf_sw_tot(ngridmx) 299 307 character*2 str2 300 character*5 str5308 ! character*5 str5 301 309 real zdtdif(ngridmx,nlayermx), zdtadj(ngridmx,nlayermx) 302 310 REAL tauscaling(ngridmx) ! Convertion factor for qdust and Ndust … … 310 318 ! instead, use zplay and zplev : 311 319 REAL zplev(ngrid,nlayermx+1),zplay(ngrid,nlayermx) 312 REAL zstress(ngrid),cd313 real hco2(nqmx),tmean, zlocal(nlayermx)320 ! REAL zstress(ngrid),cd 321 real tmean, zlocal(nlayermx) 314 322 real rho(ngridmx,nlayermx) ! density 315 323 real vmr(ngridmx,nlayermx) ! volume mixing ratio 316 324 real rhopart(ngridmx,nlayermx) ! number density of a given species 317 real colden(ngridmx,nq mx)! vertical column of tracers325 real colden(ngridmx,nq) ! vertical column of tracers 318 326 REAL mtot(ngridmx) ! Total mass of water vapor (kg/m2) 319 327 REAL icetot(ngridmx) ! Total mass of water ice (kg/m2) … … 357 365 REAL, SAVE :: hfmax_th(ngridmx) 358 366 REAL pdu_th(ngridmx,nlayermx),pdv_th(ngridmx,nlayermx) 359 REAL pdt_th(ngridmx,nlayermx),pdq_th(ngridmx,nlayermx,nq mx)367 REAL pdt_th(ngridmx,nlayermx),pdq_th(ngridmx,nlayermx,nq) 360 368 INTEGER lmax_th(ngridmx),dimout,n_out,n 361 369 CHARACTER(50) zstring … … 364 372 REAL, ALLOCATABLE, DIMENSION(:,:) :: T_out 365 373 REAL, ALLOCATABLE, DIMENSION(:,:) :: u_out ! Interpolated teta and u at z_out 366 REAL u_out1(ngridmx), T_out1(ngridmx) 374 ! REAL u_out1(ngridmx) 375 REAL T_out1(ngridmx) 367 376 REAL, ALLOCATABLE, DIMENSION(:) :: z_out ! height of interpolation between z0 and z1 [meters] 368 377 REAL ustar(ngridmx),tstar(ngridmx) ! friction velocity and friction potential temp 369 378 REAL L_mo(ngridmx),vhf(ngridmx),vvv(ngridmx) 370 REAL zu2(ngridmx),sensibFlux(ngridmx) 379 ! REAL zu2(ngridmx) 380 REAL sensibFlux(ngridmx) 371 381 372 382 c======================================================================= … … 379 389 IF (firstcall) THEN 380 390 391 ! allocate local (saved) arrays: 392 allocate(qsurf(ngrid,nq)) 393 381 394 c variables set to 0 382 395 c ~~~~~~~~~~~~~~~~~~ … … 417 430 tracerdyn=tracer 418 431 IF (tracer) THEN 419 CALL initracer( qsurf,co2ice)432 CALL initracer(ngrid,nq,qsurf,co2ice) 420 433 ENDIF ! end tracer 421 434 … … 570 583 571 584 if(photochem.or.callthermos) then 572 call concentrations( zplay,pt,pdt,pq,pdq,ptimestep)585 call concentrations(nq,zplay,pt,pdt,pq,pdq,ptimestep) 573 586 endif 574 587 #endif … … 1214 1227 $ surfdust, surfice) 1215 1228 ! call photochemistry 1216 call calchim(ptimestep,zplay,zplev,pt,pdt,dist_sol,mu0, 1229 call calchim(nq, 1230 & ptimestep,zplay,zplev,pt,pdt,dist_sol,mu0, 1217 1231 $ zzlev,zzlay,zday,pq,pdq,zdqchim,zdqschim, 1218 1232 $ zdqcloud,zdqscloud,tauref,co2ice, -
trunk/LMDZ.MARS/libf/phymars/simpleclouds.F
r740 r1036 4 4 & nq,tau,rice) 5 5 USE updaterad 6 use tracer_mod, only: igcm_h2o_vap, igcm_h2o_ice 6 7 implicit none 7 8 c------------------------------------------------------------------ … … 32 33 #include "comcstfi.h" 33 34 #include "callkeys.h" 34 #include "tracer.h"35 !#include "tracer.h" 35 36 #include "comgeomfi.h" 36 37 #include "dimradmars.h" … … 73 74 INTEGER ig,l 74 75 75 REAL zq(ngridmx,nlayermx,nq mx)! local value of tracers76 REAL zq0(ngridmx,nlayermx,nq mx)! local initial value of tracers76 REAL zq(ngridmx,nlayermx,nq) ! local value of tracers 77 REAL zq0(ngridmx,nlayermx,nq) ! local initial value of tracers 77 78 REAL zt(ngridmx,nlayermx) ! local value of temperature 78 79 REAL zqsat(ngridmx,nlayermx) ! saturation … … 91 92 c ----------------- 92 93 93 c On "update" la valeur de q(nq mx) (water vapor) et temperature.94 c On "update" la valeur de q(nq) (water vapor) et temperature. 94 95 c On effectue qqes calculs preliminaires sur les couches : 95 96 -
trunk/LMDZ.MARS/libf/phymars/soil_tifeedback.F
r857 r1036 1 1 SUBROUTINE soil_tifeedback(ngrid,nsoil,icecover,newtherm_i) 2 3 use tracer_mod, only: nqmx, igcm_h2o_ice, rho_ice 2 4 IMPLICIT NONE 3 5 … … 24 26 #include "dimphys.h" 25 27 #include "comsoil.h" 26 #include "tracer.h"28 !#include "tracer.h" 27 29 #include "surfdat.h" 28 30 … … 41 43 42 44 REAL icecover(ngrid,nqmx) ! tracer on the surface (kg.m-2) 43 ! last one (iq=nqmx) is surface45 ! (iq=igcm_h2o_ice) is surface 44 46 ! water ice 45 47 c Outputs -
trunk/LMDZ.MARS/libf/phymars/surfini.F
r740 r1036 3 3 USE ioipsl_getincom 4 4 use netcdf 5 use tracer_mod, only: nqmx, noms, dryness 5 6 IMPLICIT NONE 6 7 c======================================================================= … … 16 17 #include "surfdat.h" 17 18 #include "callkeys.h" 18 #include "tracer.h"19 !#include "tracer.h" 19 20 #include "comgeomfi.h" 20 21 #include "comcstfi.h" -
trunk/LMDZ.MARS/libf/phymars/testphys1d.F
r999 r1036 2 2 PROGRAM testphys1d 3 3 ! to use 'getin' 4 USE ioipsl_getincom 4 USE ioipsl_getincom, only: getin 5 use infotrac, only: nqtot, tnom 5 6 IMPLICIT NONE 6 7 … … 42 43 #include "comg1d.h" 43 44 #include "logic.h" 44 #include "advtrac.h"45 !#include "advtrac.h" 45 46 46 47 c -------------------------------------------------------------- … … 64 65 REAL gru,grv ! prescribed "geostrophic" background wind 65 66 REAL temp(nlayermx) ! temperature at the middle of the layers 66 REAL q(nlayermx,nqmx) ! tracer mixing ratio (e.g. kg/kg)67 REAL qsurf(nqmx)! tracer surface budget (e.g. kg.m-2)67 REAL,ALLOCATABLE :: q(:,:) ! tracer mixing ratio (e.g. kg/kg) 68 REAL,ALLOCATABLE :: qsurf(:) ! tracer surface budget (e.g. kg.m-2) 68 69 REAL tsoil(nsoilmx) ! subsurface soik temperature (K) 69 70 REAL co2ice ! co2ice layer (kg.m-2) … … 76 77 REAL dudyn(nlayermx),dvdyn(nlayermx),dtempdyn(nlayermx) 77 78 REAL dpsurf 78 REAL dq(nlayermx,nqmx)79 REAL dqdyn(nlayermx,nqmx)79 REAL,ALLOCATABLE :: dq(:,:) 80 REAL,ALLOCATABLE :: dqdyn(:,:) 80 81 81 82 c Various intermediate variables … … 84 85 REAL phi(nlayermx),h(nlayermx),s(nlayermx) 85 86 REAL pks, ptif, w(nlayermx) 86 REAL qtotinit, mqtot(nqmx),qtot 87 REAL qtotinit,qtot 88 real,allocatable :: mqtot(:) 87 89 INTEGER ierr, aslun 88 90 REAL tmp1(0:nlayermx),tmp2(0:nlayermx) … … 169 171 170 172 ! while we're at it, check if there is a 'traceur.def' file 171 ! and pr eocess it, if necessary. Otherwise initialize tracer names173 ! and process it. 172 174 if (tracer) then 173 175 ! load tracer names from file 'traceur.def' … … 183 185 ! read number of tracers: 184 186 read(90,*,iostat=ierr) nq 187 nqtot=nq ! set value of nqtot (in infotrac module) as nq 185 188 if (ierr.ne.0) then 186 189 write(*,*) "testphys1d: error reading number of tracers" 187 190 write(*,*) " (first line of traceur.def) " 188 191 stop 189 else190 ! check that the number of tracers is indeed nqmx191 if (nq.ne.nqmx) then192 write(*,*) "testphys1d: error, wrong number of tracers:"193 write(*,*) "nq=",nq," whereas nqmx=",nqmx194 stop195 endif196 192 endif 197 193 endif 194 ! allocate arrays: 195 allocate(tnom(nq)) 196 allocate(q(nlayermx,nq)) 197 allocate(qsurf(nq)) 198 allocate(dq(nlayermx,nq)) 199 allocate(dqdyn(nlayermx,nq)) 200 allocate(mqtot(nq)) 201 198 202 ! read tracer names from file traceur.def 199 do iq=1,nq mx203 do iq=1,nq 200 204 read(90,*,iostat=ierr) tnom(iq) 201 205 if (ierr.ne.0) then … … 212 216 ! "smarter" initialization of some tracers 213 217 ! (get values from "profile_*" files, if these are available) 214 do iq=1,nq mx218 do iq=1,nq 215 219 txt="" 216 220 write(txt,"(a)") tnom(iq) … … 346 350 close(91) 347 351 endif ! of if (txt.eq."ccn_number") 348 enddo ! of do iq=1,nq mx352 enddo ! of do iq=1,nq 349 353 350 354 else 351 ! we still need to set (dummy) tracer names for physdem1 352 nq=nqmx 355 ! we still need to set (dummy) tracer number and names for physdem1 356 nq=1 357 ! allocate arrays: 358 allocate(tnom(nq)) 359 allocate(q(nlayermx,nq)) 360 allocate(qsurf(nq)) 361 allocate(dq(nlayermx,nq)) 362 allocate(dqdyn(nlayermx,nq)) 363 allocate(mqtot(nq)) 353 364 do iq=1,nq 354 365 write(str7,'(a1,i2.2)')'q',iq … … 496 507 497 508 !Mars possible matter with dtphys in input and include!!! 498 CALL inifis(1,llm, day0,daysec,dtphys,509 CALL inifis(1,llm,nq,day0,daysec,dtphys, 499 510 . lati,long,area,rad,g,r,cpp) 500 511 … … 612 623 ! thermo=0: initialize over all atmospheric layers 613 624 thermo=0 614 call inichim_newstart(q,psurf,sig,nq mx,lati,long,area,625 call inichim_newstart(q,psurf,sig,nq,lati,long,area, 615 626 $ thermo,qsurf) 616 627 endif … … 641 652 c It is needed to transfert physics variables to "physiq"... 642 653 643 call physdem0("startfi.nc",long,lati,nsoilmx,nq mx,654 call physdem0("startfi.nc",long,lati,nsoilmx,nq, 644 655 . dtphys,float(day0),time,area, 645 656 . albedodat,inertiedat,zmea,zstd,zsig,zgam,zthe) 646 call physdem1("startfi.nc",nsoilmx,nq mx,657 call physdem1("startfi.nc",nsoilmx,nq, 647 658 . dtphys,time, 648 659 . tsurf,tsoil,co2ice,emis,q2,qsurf) … … 688 699 c -------------------- 689 700 ! write(*,*) "testphys1d avant q", q(1,:) 690 CALL physiq (1,llm,nq mx,701 CALL physiq (1,llm,nq, 691 702 , firstcall,lastcall, 692 703 , day,time,dtphys, … … 749 760 750 761 ! increment tracers 751 DO iq = 1, nq mx762 DO iq = 1, nq 752 763 DO ilayer=1,nlayer 753 764 q(ilayer,iq)=q(ilayer,iq)+dtphys*dq(ilayer,iq) -
trunk/LMDZ.MARS/libf/phymars/updaterad.F90
r882 r1036 62 62 ! Update ice radius if microphys == true 63 63 subroutine updaterice_micro(qice,qccn,nccn,coeff,rice,rhocloud) 64 implicit none 65 66 #include "dimensions.h" 67 #include "dimphys.h" 68 #include "comcstfi.h" 69 #include "tracer.h" 64 use tracer_mod, only: rho_dust, rho_ice 65 implicit none 66 67 #include "dimensions.h" 68 #include "dimphys.h" 69 #include "comcstfi.h" 70 !#include "tracer.h" 70 71 71 72 real, intent(in) :: qice,qccn,nccn … … 118 119 ! Update ice radius from a typical profile if microphys == false 119 120 subroutine updaterice_typ(qice,tau,pzlay,rice) 120 implicit none 121 122 #include "dimensions.h" 123 #include "dimphys.h" 124 #include "comcstfi.h" 125 #include "tracer.h" 121 use tracer_mod, only: rho_ice 122 implicit none 123 124 #include "dimensions.h" 125 #include "dimphys.h" 126 #include "comcstfi.h" 127 !#include "tracer.h" 126 128 127 129 real, intent(in) :: qice … … 175 177 ! To be used with doubleq == true. otherwise, rdust is constant !!! 176 178 subroutine updaterdust(qdust,ndust,rdust,tauscaling) 177 implicit none 178 179 #include "dimensions.h" 180 #include "dimphys.h" 181 #include "comcstfi.h" 182 #include "tracer.h" 179 use tracer_mod, only: r3n_q 180 implicit none 181 182 #include "dimensions.h" 183 #include "dimphys.h" 184 #include "comcstfi.h" 185 !#include "tracer.h" 183 186 184 187 real, intent(in) :: qdust,ndust ! needed if doubleq … … 230 233 ! geometric mean radius = mass mean radius x exp(-1.5 sigma0^2) 231 234 subroutine updaterccn(qccn,nccn,rccn,tauscaling) 232 implicit none 233 234 #include "dimensions.h" 235 #include "dimphys.h" 236 #include "comcstfi.h" 237 #include "tracer.h" 235 use tracer_mod, only: rho_dust 236 implicit none 237 238 #include "dimensions.h" 239 #include "dimphys.h" 240 #include "comcstfi.h" 241 !#include "tracer.h" 238 242 239 243 real, intent(in) :: qccn,nccn ! needed if doubleq -
trunk/LMDZ.MARS/libf/phymars/updatereffrad.F
r744 r1036 4 4 & pq,tauscaling,tau,pplay) 5 5 USE updaterad 6 use tracer_mod, only: nqmx, igcm_dust_mass, igcm_dust_number, 7 & igcm_h2o_ice, igcm_ccn_mass, radius, 8 & igcm_ccn_number, nuice_ref, varian, 9 & ref_r0, igcm_dust_submicron 6 10 IMPLICIT NONE 7 11 c======================================================================= … … 31 35 #include "callkeys.h" 32 36 #include "dimradmars.h" 33 #include "tracer.h"37 !#include "tracer.h" 34 38 #include "aerkind.h" 35 39 #include "yomaer.h" -
trunk/LMDZ.MARS/libf/phymars/vdif_kc.F
r325 r1036 1 1 SUBROUTINE vdif_kc(dt,g,zlev,zlay,u,v,teta,cd,q2,km,kn,zq) 2 3 use tracer_mod, only: nqmx, noms 2 4 IMPLICIT NONE 3 5 c....................................................................... 4 6 #include "dimensions.h" 5 7 #include "dimphys.h" 6 #include "tracer.h"8 !#include "tracer.h" 7 9 #include "callkeys.h" 8 10 c....................................................................... -
trunk/LMDZ.MARS/libf/phymars/vdifc.F
r1035 r1036 11 11 #endif 12 12 & ) 13 use tracer_mod, only: noms, igcm_dust_mass, igcm_dust_number, 14 & igcm_dust_submicron, igcm_h2o_vap, 15 & igcm_h2o_ice, dryness, alpha_lift, nqmx 13 16 IMPLICIT NONE 14 17 … … 39 42 #include "surfdat.h" 40 43 #include "comgeomfi.h" 41 #include "tracer.h"44 !#include "tracer.h" 42 45 #include "microphys.h" 43 46 … … 46 49 c ---------- 47 50 48 INTEGER ngrid,nlay 49 REAL ptimestep 50 REAL pplay(ngrid,nlay),pplev(ngrid,nlay+1) 51 REAL pzlay(ngrid,nlay),pzlev(ngrid,nlay+1) 52 REAL pu(ngrid,nlay),pv(ngrid,nlay),ph(ngrid,nlay),pt(ngrid,nlay) 53 REAL ptsrf(ngrid),pemis(ngrid) 54 REAL pdufi(ngrid,nlay),pdvfi(ngrid,nlay),pdhfi(ngrid,nlay) 55 REAL pfluxsrf(ngrid) 56 REAL pdudif(ngrid,nlay),pdvdif(ngrid,nlay),pdhdif(ngrid,nlay) 57 REAL pdtsrf(ngrid),pcapcal(ngrid) 51 INTEGER,INTENT(IN) :: ngrid,nlay 52 REAL,INTENT(IN) :: ptimestep 53 REAL,INTENT(IN) :: pplay(ngrid,nlay),pplev(ngrid,nlay+1) 54 REAL,INTENT(IN) :: pzlay(ngrid,nlay),pzlev(ngrid,nlay+1) 55 REAL,INTENT(IN) :: pu(ngrid,nlay),pv(ngrid,nlay) 56 REAL,INTENT(IN) :: ph(ngrid,nlay) 57 REAL :: pt(ngrid,nlay) 58 REAL,INTENT(IN) :: ptsrf(ngrid),pemis(ngrid) 59 REAL,INTENT(IN) :: pdufi(ngrid,nlay),pdvfi(ngrid,nlay) 60 REAL,INTENT(IN) :: pdhfi(ngrid,nlay) 61 REAL,INTENT(IN) :: pfluxsrf(ngrid) 62 REAL,INTENT(OUT) :: pdudif(ngrid,nlay),pdvdif(ngrid,nlay) 63 REAL,INTENT(OUT) :: pdtsrf(ngrid),pdhdif(ngrid,nlay) 64 REAL,INTENT(IN) ::pcapcal(ngrid) 58 65 REAL pq2(ngrid,nlay+1) 59 66 60 67 c Argument added for condensation: 61 REAL co2ice (ngrid), ppopsk(ngrid,nlay)62 logical lecrit63 64 REAL pz0(ngridmx) ! surface roughness length (m)68 REAL,INTENT(IN) :: co2ice (ngrid), ppopsk(ngrid,nlay) 69 logical,INTENT(IN) :: lecrit 70 71 REAL,INTENT(IN) :: pz0(ngrid) ! surface roughness length (m) 65 72 66 73 c Argument added to account for subgrid gustiness : 67 74 68 REAL wstar(ngrid mx), hfmax(ngridmx), zi(ngridmx)75 REAL wstar(ngrid), hfmax(ngrid)!, zi(ngrid) 69 76 70 77 c Traceurs : 71 integer nq72 REAL pqsurf(ngrid,nq)73 real pq(ngrid,nlay,nq), pdqfi(ngrid,nlay,nq)74 real pdqdif(ngrid,nlay,nq)75 real pdqsdif(ngrid,nq)78 integer,intent(in) :: nq 79 REAL,INTENT(IN) :: pqsurf(ngrid,nq) 80 real,intent(in) :: pq(ngrid,nlay,nq), pdqfi(ngrid,nlay,nq) 81 real,intent(out) :: pdqdif(ngrid,nlay,nq) 82 real,intent(out) :: pdqsdif(ngrid,nq) 76 83 77 84 c local: … … 99 106 EXTERNAL SSUM,SCOPY 100 107 REAL SSUM 101 LOGICAL firstcall 102 SAVE firstcall 108 LOGICAL,SAVE :: firstcall=.true. 103 109 104 110 … … 112 118 113 119 c For latent heat release from ground ice sublimation 114 REAL tsrf_lw(ngridmx)115 REAL alpha120 ! REAL tsrf_lw(ngridmx) 121 ! REAL alpha 116 122 REAL T1,T2 117 123 SAVE T1,T2 … … 125 131 REAL rho(ngridmx) ! near surface air density 126 132 REAL qsat(ngridmx) 127 DATA firstcall/.true./128 133 129 134 REAL kmixmin … … 179 184 if (tracer) then 180 185 c Prepare Special treatment if one of the tracer is CO2 gas 181 do iq=1,nq mx186 do iq=1,nq 182 187 if (noms(iq).eq."co2") then 183 188 ico2=iq … … 196 201 firstcall=.false. 197 202 ENDIF 198 199 200 201 203 202 204 … … 398 400 399 401 pt(:,:)=ph(:,:)*ppopsk(:,:) 400 CALL yamada4(ngrid,nlay, ptimestep,g,r,pplev,pt402 CALL yamada4(ngrid,nlay,nq,ptimestep,g,r,pplev,pt 401 403 s ,pzlev,pzlay,pu,pv,ph,pq,zcdv_true,pq2,zkv,zkh,zkq,ust 402 404 s ,9) 403 404 405 ENDIF 405 406 … … 900 901 901 902 RETURN 902 END 903 END SUBROUTINE vdifc -
trunk/LMDZ.MARS/libf/phymars/watercloud.F
r951 r1036 7 7 USE ioipsl_getincom 8 8 USE updaterad 9 use tracer_mod, only: nqmx, igcm_h2o_vap, igcm_h2o_ice, 10 & igcm_dust_mass, igcm_dust_number, 11 & igcm_ccn_mass, igcm_ccn_number, 12 & rho_dust, nuice_sed, nuice_ref 9 13 IMPLICIT NONE 10 14 … … 34 38 #include "comcstfi.h" 35 39 #include "callkeys.h" 36 #include "tracer.h"40 !#include "tracer.h" 37 41 #include "comgeomfi.h" 38 42 #include "dimradmars.h" -
trunk/LMDZ.MARS/libf/phymars/yamada4.F
r690 r1036 8 8 !************************************************************ 9 9 !************************************************************ 10 SUBROUTINE yamada4(ngrid,nlay, dt,g,rconst,plev,temp10 SUBROUTINE yamada4(ngrid,nlay,nq,dt,g,rconst,plev,temp 11 11 s ,zlev,zlay,u,v,phc,pq,cd,q2,km,kn,kq,ustar 12 12 s ,iflag_pbl) 13 use tracer_mod, only: noms 13 14 IMPLICIT NONE 14 15 !....................................................................... … … 16 17 #include "dimensions.h" 17 18 #include "dimphys.h" 18 #include "tracer.h"19 !#include "tracer.h" 19 20 #include "callkeys.h" 20 21 !....................................................................... … … 61 62 INTEGER, INTENT(IN) :: iflag_pbl,ngrid 62 63 INTEGER, INTENT(IN) :: nlay 64 INTEGER, INTENT(IN) :: nq 63 65 REAL, INTENT(INOUT) :: q2(ngrid,nlay+1) 64 66 REAL, INTENT(OUT) :: km(ngrid,nlay+1) … … 119 121 SAVE A, B 120 122 REAL teta(ngrid,nlay) 121 REAL pq(ngrid,nlay,nq mx)123 REAL pq(ngrid,nlay,nq) 122 124 REAL kminfact 123 125 INTEGER i … … 135 137 if (tracer) then 136 138 ! Prepare Special treatment if one of the tracers is CO2 gas 137 do iq=1,nq mx139 do iq=1,nq 138 140 if (noms(iq).eq."co2") then 139 141 ico2=iq … … 603 605 #include "dimensions.h" 604 606 #include "dimphys.h" 605 #include "tracer.h"607 !#include "tracer.h" 606 608 #include "callkeys.h" 607 609 !....................................................................... … … 684 686 #include "dimensions.h" 685 687 #include "dimphys.h" 686 #include "tracer.h"688 !#include "tracer.h" 687 689 #include "callkeys.h" 688 690 !.......................................................................
Note: See TracChangeset
for help on using the changeset viewer.