Changeset 635 for trunk/LMDZ.MARS/libf/phymars
- Timestamp:
- Apr 26, 2012, 3:22:19 PM (13 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/callkeys.h
r552 r635 16 16 17 17 COMMON/callkeys_i/iradia,iaervar,iddist,ilwd,ilwb,ilwn,ncouche & 18 & ,dustbin,n qchem_min,nltemodel,nircorr18 & ,dustbin,nltemodel,nircorr 19 19 20 20 COMMON/callkeys_r/topdustref,solarcondate,semi,alphan,euveff, & … … 54 54 logical sedimentation,activice,water,microphys,caps 55 55 logical photochem 56 integer nqchem_min57 56 integer nltemodel 58 57 integer nircorr -
trunk/LMDZ.MARS/libf/phymars/callsedim.F
r626 r635 434 434 c Update the dust particle size "rdust" 435 435 c ------------------------------------- 436 DO l = 1, nlay 436 if (doubleq) then 437 DO l = 1, nlay 437 438 DO ig=1,ngrid 438 439 rdust(ig,l)= … … 441 442 rdust(ig,l)=min(max(rdust(ig,l),1.e-10),500.e-6) 442 443 ENDDO 443 ENDDO 444 ENDDO 445 endif ! of if (doubleq) 444 446 445 447 c Update the ice particle size "rice" 446 448 c ------------------------------------- 447 IF(scavenging) THEN 449 if (water) then 450 IF(scavenging) THEN 448 451 DO l = 1, nlay 449 452 DO ig=1,ngrid … … 464 467 ENDDO 465 468 ENDDO 466 ELSE469 ELSE 467 470 DO l = 1, nlay 468 471 DO ig=1,ngrid … … 475 478 ENDDO 476 479 ENDDO 477 ENDIF 480 ENDIF ! of IF(scavenging) 481 endif ! of if (water) 478 482 479 483 RETURN -
trunk/LMDZ.MARS/libf/phymars/initracer.F
r459 r635 24 24 c q(iq=2) is the dust number mixing ratio 25 25 26 c If (photochem.or.thermochem) there is "ncomp" chemical species (ncomp27 c is set in aeronomars/chimiedata.h) using the ncomp iq values starting at28 c iq=nqchem_min = dustbin+1 (nqchem_min is defined in inifis.F)29 c30 26 c 31 27 c author: F.Forget … … 43 39 #include "advtrac.h" 44 40 #include "comgeomfi.h" 45 #include "chimiedata.h"46 41 47 42 #include "surfdat.h" … … 55 50 c et al. (2002), a value of 25 has been deduced; 56 51 real, parameter :: popratio = 25. 57 logical :: oldnames ! =.true. if old tracer naming convention (q01,...)58 52 character(len=20) :: txt ! to store some text 59 53 … … 71 65 c----------------------------------------------------------------------- 72 66 73 integer :: nqchem_start74 75 67 ! Initialization: get tracer names from the dynamics and check if we are 76 68 ! using 'old' tracer convention ('q01',q02',...) 77 69 ! or new convention (full tracer names) 78 70 ! check if tracers have 'old' names 79 oldnames=.false.80 71 count=0 81 72 do iq=1,nqmx … … 90 81 write(*,*) "initracer: tracers seem to follow old naming ", 91 82 & "convention (q01,q02,...)" 92 write(*,*) " => will work for now ... " 93 write(*,*) " but you should run newstart to rename them" 94 oldnames=.true. 83 write(*,*) "you should run newstart to rename them" 84 stop 95 85 endif 96 86 97 ! copy/set tracer names 98 if (oldnames) then ! old names (derived from iq & option values) 99 ! 1. dust: 100 if (dustbin.ne.0) then ! transported dust 101 do iq=1,dustbin 102 txt=" " 103 write(txt,'(a4,i2.2)') 'dust',iq 104 noms(iq)=txt 105 mmol(iq)=100. 106 enddo 107 ! special case if doubleq 108 if (doubleq) then 109 if (dustbin.ne.2) then 110 write(*,*) 'initracer: error expected dustbin=2' 111 else 112 ! noms(1)='dust_mass' ! dust mass mixing ratio 113 ! noms(2)='dust_number' ! dust number mixing ratio 114 ! same as above, but avoid explict possible out-of-bounds on array 115 noms(1)='dust_mass' ! dust mass mixing ratio 116 do iq=2,2 117 noms(iq)='dust_number' ! dust number mixing ratio 118 enddo 119 endif 120 endif 121 endif 122 ! 2. water & ice 123 if (water) then 124 noms(nqmx)='h2o_vap' 125 mmol(nqmx)=18. 126 ! noms(nqmx-1)='h2o_ice' 127 ! mmol(nqmx-1)=18. 128 !"loop" to avoid potential out-of-bounds in array 129 do iq=nqmx-1,nqmx-1 130 noms(iq)='h2o_ice' 131 mmol(iq)=18. 132 enddo 133 endif 134 ! 3. Chemistry 135 if (photochem .or. callthermos) then 136 if (doubleq) then 137 nqchem_start=3 138 else 139 nqchem_start=dustbin+1 140 end if 141 do iq=nqchem_start,nqchem_start+ncomp-2 142 noms(iq)=nomchem(iq-nqchem_start+1) 143 mmol(iq)=mmolchem(iq-nqchem_start+1) 144 enddo 145 endif ! of if (photochem .or. callthermos) 146 ! 4. Other tracers ???? 147 if ((dustbin.eq.0).and.(.not.water)) then 148 noms(1)='co2' 149 mmol(1)=44 150 if (nqmx.eq.2) then 151 noms(nqmx)='Ar_N2' 152 mmol(nqmx)=30 153 endif 154 endif 155 else 156 ! copy tracer names from dynamics 157 do iq=1,nqmx 158 noms(iq)=tnom(iq) 159 enddo 160 ! mmol(:) array is initialized later (see below) 161 endif ! of if (oldnames) 162 163 ! special modification when using 'old' tracers: 164 ! qsurf(nqmx) was h2o ice whereas q(nqmx) was water vapour 165 ! and (if iceparty) q(nqmx-1) was null whereas q(nqmx-1) was water ice 166 if (oldnames.and.water) then 167 write(*,*)'initracer: moving surface water ice to index ',nqmx-1 168 ! "loop" to avoid potential out-of-bounds on arrays 169 do iq=nqmx-1,nqmx-1 170 qsurf(1:ngridmx,iq)=qsurf(1:ngridmx,iq+1) 171 enddo 172 qsurf(1:ngridmx,nqmx)=0 173 endif 174 175 c------------------------------------------------------------ 176 c Test Dimensions tracers 177 c------------------------------------------------------------ 178 179 ! Ehouarn: testing number of tracers is obsolete... 180 ! if(photochem.or.thermochem) then 181 ! if (water) then 182 ! if ((dustbin+ncomp+2).ne.nqmx) then 183 ! print*,'initracer: tracer dimension problem:' 184 ! print*,"(dustbin+ncomp+2).ne.nqmx" 185 ! print*,"ncomp: ",ncomp 186 ! print*,"dustbin: ",dustbin 187 ! print*,"nqmx: ",nqmx 188 ! print*,'Change ncomp in chimiedata.h' 189 ! endif 190 ! else 191 ! if ((dustbin+ncomp+1).ne.nqmx) then 192 ! print*,'initracer: tracer dimension problem:' 193 ! print*,"(dustbin+ncomp+1).ne.nqmx" 194 ! print*,"ncomp: ",ncomp 195 ! print*,"dustbin: ",dustbin 196 ! print*,"nqmx: ",nqmx 197 ! print*,'Change ncomp in chimiedata.h' 198 ! STOP 199 ! endif 200 ! endif 201 ! endif 87 ! copy tracer names from dynamics 88 do iq=1,nqmx 89 noms(iq)=tnom(iq) 90 enddo 202 91 203 92 c------------------------------------------------------------ 204 93 c NAME and molar mass of the tracer 205 94 c------------------------------------------------------------ 206 207 95 208 96 ! Identify tracers by their names: (and set corresponding values of mmol) … … 246 134 igcm_n2plus=0 247 135 igcm_hplus=0 136 igcm_hco2plus=0 248 137 igcm_elec=0 249 250 138 251 139 ! 1. find dust tracers … … 432 320 count=count+1 433 321 endif 322 if (noms(iq).eq."hco2plus") then 323 igcm_hco2plus=iq 324 mmol(igcm_hco2plus)=45. 325 count=count+1 326 endif 434 327 if (noms(iq).eq."elec") then 435 328 igcm_elec=iq … … 454 347 endif 455 348 456 457 349 enddo ! of do iq=1,nqmx 458 ! count=count+nbqchem459 350 460 351 ! check that we identified all tracers: -
trunk/LMDZ.MARS/libf/phymars/physiq.F
r633 r635 131 131 #include "chimiedata.h" 132 132 #include "param.h" 133 #include "param_v 3.h"133 #include "param_v4.h" 134 134 #include "conc.h" 135 135 -
trunk/LMDZ.MARS/libf/phymars/tracer.h
r420 r635 66 66 integer :: igcm_n2plus 67 67 integer :: igcm_hplus 68 integer :: igcm_hco2plus 68 69 integer :: igcm_elec 69 70 ! other tracers … … 85 86 & igcm_co2plus,igcm_oplus,igcm_o2plus,igcm_coplus,igcm_cplus, & 86 87 & igcm_nplus,igcm_noplus,igcm_n2plus,igcm_hplus,igcm_elec, & 87 & igcm_ ar_n2!,nbqchem,niqchem88 & igcm_hco2plus,igcm_ar_n2!,nbqchem,niqchem 88 89 COMMON/tracer3/noms 89 90 !-----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.