Changeset 2332 for trunk/LMDZ.MARS/libf/phymars
- Timestamp:
- May 26, 2020, 12:17:13 PM (5 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/callsedim_mod.F
r2323 r2332 23 23 & igcm_stormdust_number,igcm_topdust_mass, 24 24 & igcm_topdust_number, 25 & iqfils,nqfils,qperemin,masseqmin ! MVals: variables isotopes25 & nqfils,qperemin,masseqmin ! MVals: variables isotopes 26 26 USE newsedim_mod, ONLY: newsedim 27 27 USE comcstfi_h, ONLY: g … … 536 536 !MVals: Loop over the sons ("fils") 537 537 if (nqfils(iq).gt.0) then 538 iq2=iqfils(nqfils(iq),iq) ! for now always nqfils(iq)=1 (special case of HDO only son of H2O) 538 if (iq.eq.igcm_h2o_ice) then 539 iq2=igcm_hdo_ice 540 else 541 call abort_physic("callsedim_mod","invalid isotope",1) 542 endif 539 543 !MVals: input paramters in vlz_fi for hdo 540 544 do l=1,nlay … … 595 599 !MVals: Special case of isotopes: for now only HDO 596 600 if (nqfils(iq).gt.0) then 597 iq2=iqfils(nqfils(iq),iq) 601 if (iq.eq.igcm_h2o_ice) then 602 iq2=igcm_hdo_ice 603 else 604 call abort_physic("callsedim_mod","invalid isotope",1) 605 endif 598 606 pdqsed(ig,l,iq2)=(zqi(ig,l,iq2)- 599 607 $ (pq(ig,l,iq2) + pdqfi(ig,l,iq2)*ptimestep))/ptimestep -
trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F
r2322 r2332 16 16 $ zdtcloudco2,pdqsc) 17 17 18 use tracer_mod, only: noms, igcm_h2o_ice, 18 use tracer_mod, only: noms, igcm_h2o_ice, igcm_h2o_vap, 19 19 & igcm_dust_mass, igcm_dust_number, 20 20 & igcm_ccn_mass, igcm_ccn_number, 21 & iqfils,nqperes,nqfils, ! MVals: variables isotopes 21 & igcm_hdo_ice, igcm_hdo_vap, 22 & nqperes,nqfils, ! MVals: variables isotopes 22 23 & qperemin,masseqmin 23 24 use surfdat_h, only: emissiv, phisfi … … 557 558 ! MVals: loop over the sons ("fils") 558 559 if (nqfils(iq).gt.0) then 559 iq2=iqfils(nqfils(iq),iq) ! for now it is always nqfils(iq)=1 (special case of HDO only son of H2O) 560 if (iq.eq.igcm_h2o_ice) then 561 iq2=igcm_hdo_ice 562 else if (iq.eq.igcm_h2o_vap) then 563 iq2=igcm_hdo_vap 564 else 565 call abort_physic("co2condens_mod","invalid isotope",1) 566 endif 560 567 do l=1,nlayer 561 568 if (zqc(l,iq).gt.qperemin) then -
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F
r2322 r2332 5 5 use dimphy, only : init_dimphy 6 6 use mod_grid_phy_lmdz, only : regular_lonlat 7 use infotrac, only: nqtot, tname, nqperes,nqdesc,iqfils,nqfils, 8 & iqpere, nqdesc_tot 7 use infotrac, only: nqtot, tname, nqperes,nqfils 9 8 use comsoil_h, only: volcapa, layer, mlayer, inertiedat, nsoilmx 10 9 use comgeomfi_h, only: sinlat, ini_fillgeom … … 268 267 269 268 ! Isotopes: as in the 3D case we have to determine father/son relations for isotopes and carrying fluid 270 ALLOCATE(nqfils(nqtot),nqdesc(nqtot)) 271 ALLOCATE(iqfils(nqtot,nqtot)) 272 ALLOCATE(iqpere(nqtot)) 269 ALLOCATE(nqfils(nqtot)) 273 270 nqperes=0 274 nqfils(:)=0 275 nqdesc(:)=0 276 iqfils(:,:)=0 277 iqpere(:)=0 278 nqdesc_tot=0 271 nqfils(:)=0 279 272 DO iq=1,nqtot 280 273 if (tnom_transp(iq) == 'air') then … … 283 276 & trim(tname(iq)),', est un pere' 284 277 nqperes=nqperes+1 285 iqpere(iq)=0286 278 else !if (tnom_transp(iq) == 'air') then 287 279 ! ceci est un fils. Qui est son père? … … 296 288 & trim(tname(iq)),' est le fils de ', 297 289 & ipere,'appele ',trim(tname(ipere)) 298 nqfils(ipere)=nqfils(ipere)+1 299 iqfils(nqfils(ipere),ipere)=iq 300 iqpere(iq)=ipere 290 nqfils(ipere)=nqfils(ipere)+1 301 291 continu=.false. 302 292 else !if (tnom_transp(iq) == tnom_0(ipere)) then … … 314 304 WRITE(*,*) 'nqperes=',nqperes 315 305 WRITE(*,*) 'nqfils=',nqfils 316 WRITE(*,*) 'iqpere=',iqpere317 WRITE(*,*) 'iqfils=',iqfils318 ! Calculer le nombre de descendants à partir de iqfils et de nbfils319 DO iq=1,nqtot320 generation=0321 continu=.true.322 ifils=iq323 do while (continu)324 ipere=iqpere(ifils)325 if (ipere.gt.0) then326 nqdesc(ipere)=nqdesc(ipere)+1327 nqdesc_tot=nqdesc_tot+1328 iqfils(nqdesc(ipere),ipere)=iq329 ifils=ipere330 generation=generation+1331 else !if (ipere.gt.0) then332 continu=.false.333 endif !if (ipere.gt.0) then334 enddo !do while (continu)335 WRITE(*,*) 'Le traceur ',iq,', appele ',trim(tname(iq)),336 & ' est un traceur de generation: ',generation337 ENDDO !DO iq=1,nqtot338 WRITE(*,*) 'infotrac: nqdesc=',nqdesc339 WRITE(*,*) 'iqfils=',iqfils340 WRITE(*,*) 'nqdesc_tot=',nqdesc_tot341 306 342 307 ! initialize tracers here: … … 673 638 call phys_state_var_init(1,llm,nq,tname, 674 639 . day0,time,daysec,dtphys,rad,g,r,cpp, 675 . nq desc,iqfils,nqperes,nqfils)! MVals: variables isotopes640 . nqperes,nqfils)! MVals: variables isotopes 676 641 call ini_fillgeom(1,latitude,longitude,(/1.0/)) 677 642 call conf_phys(1,llm,nq) -
trunk/LMDZ.MARS/libf/phymars/phys_state_var_init_mod.F90
r2322 r2332 6 6 day_ini,hour_ini,pdaysec,ptimestep, & 7 7 prad,pg,pr,pcpp, & 8 dyn_nq desc,dyn_iqfils,dyn_nqperes,dyn_nqfils)! MVals: variables isotopes8 dyn_nqperes,dyn_nqfils)! MVals: variables isotopes 9 9 10 10 !======================================================================= … … 71 71 INTEGER,INTENT(in) :: dyn_nqperes 72 72 INTEGER,INTENT(in) :: dyn_nqfils(nq) 73 INTEGER,INTENT(in) :: dyn_nqdesc(nq)74 INTEGER,INTENT(in) :: dyn_iqfils(nq,nq)75 73 76 74 ! set dimension and allocate arrays in tracer_mod 77 75 call end_tracer_mod 78 call ini_tracer_mod(nq,tname,dyn_nq desc,dyn_iqfils,dyn_nqperes,dyn_nqfils)! MVals: variables isotopes76 call ini_tracer_mod(nq,tname,dyn_nqperes,dyn_nqfils)! MVals: variables isotopes 79 77 80 78 -
trunk/LMDZ.MARS/libf/phymars/tracer_mod.F90
r2322 r2332 98 98 integer, save :: nqperes ! numbers of tracers defined as "peres" 99 99 integer, allocatable, save :: nqfils(:) ! numbers of sons ("fils") of the considered tracer 100 integer, allocatable, save :: iqfils(:,:) ! indice of a son, ex: iqfils(nqfils(ipere),ipere)101 100 real, parameter :: qperemin=1.e-16 ! threschold for the "pere" mixing ratio qpere to calculate Ratio=qfils/qpere 102 real, parameter :: masseqmin=1.e-16 ! threschold for the "pere" transporting masse 103 !integer, allocatable, save :: nqdesc(:) ! number of sons + all gran-sons over all generations: not useful for now in the martian case as there are no gran-sons 101 real, parameter :: masseqmin=1.e-16 ! threschold for the "pere" transporting masse martian case as there are no gran-sons 104 102 105 103 !----------------------------------------------------------------------- … … 107 105 contains 108 106 109 subroutine ini_tracer_mod(nq,tname,dyn_nq desc,dyn_iqfils,dyn_nqperes,dyn_nqfils)! MVals: variables isotopes107 subroutine ini_tracer_mod(nq,tname,dyn_nqperes,dyn_nqfils)! MVals: variables isotopes 110 108 implicit none 111 109 … … 115 113 integer,intent(in) :: dyn_nqperes 116 114 integer,intent(in) :: dyn_nqfils(nq) 117 integer,intent(in) :: dyn_nqdesc(nq)118 integer,intent(in) :: dyn_iqfils(nq,nq)119 115 120 116 integer :: iq, count … … 130 126 131 127 !MVals: isotopes variables initialisation 132 do iq=1,nq 133 if (dyn_nqfils(iq).ne.dyn_nqdesc(iq)) then 134 write(*,*) ' for now all descendants must be sons: check the', & 135 ' relations between tracers in traceur.def !' 136 call abort_physic("ini_tracer_mod","relatives pattern between tracers not accepted",1) 137 endif 138 enddo 139 allocate(nqfils(nq))!,nqdesc(nq)) 140 allocate(iqfils(nq,nq)) 128 allocate(nqfils(nq)) 141 129 nqperes=dyn_nqperes 142 130 nqfils(:)=dyn_nqfils(:) 143 iqfils(:,:)=dyn_iqfils(:,:)144 131 145 132 #ifndef MESOSCALE
Note: See TracChangeset
for help on using the changeset viewer.