Changeset 1843 for trunk/LMDZ.TITAN/libf
- Timestamp:
- Dec 6, 2017, 4:13:14 PM (7 years ago)
- Location:
- trunk/LMDZ.TITAN/libf/phytitan
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/phytitan/dyn1d/rcm1d.F
r1826 r1843 6 6 use mod_grid_phy_lmdz, only : regular_lonlat 7 7 use infotrac, only: nqtot, tname 8 use tracer_h, only: initracer2 8 9 use surfdat_h, only: albedodat, phisfi, 9 10 & zmea, zstd, zsig, zgam, zthe, … … 727 728 ! ------------------------------- 728 729 tankCH4=2. ! default value for tankCH4 730 731 ! Initialize tracers 732 ! ------------------ 733 if(tracer) then 734 call initracer2(nq,tname) ! We need tracers infos in physdem1 735 endif 729 736 730 737 c Write a "startfi" file -
trunk/LMDZ.TITAN/libf/phytitan/inifis_mod.F90
r1822 r1843 58 58 ! declarations: 59 59 ! ------------- 60 use datafile_mod, only: datadir61 60 use ioipsl_getin_p_mod, only: getin_p 62 61 IMPLICIT NONE -
trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90
r1822 r1843 366 366 real ctimestep ! Chemistry timestep (s) 367 367 368 ! Grandeurs en moyennes zonales ------------------------ 369 real temp_eq(nlayer), press_eq(nlayer) 370 real zplev(ngrid,nlayer+1),zplay(ngrid,nlayer) 371 real ztemp(ngrid,nlayer) 368 real temp_eq(nlayer), press_eq(nlayer) ! Moyennes planétaires 372 369 373 370 real , allocatable, dimension(:,:,:),save :: ychim … … 599 596 endif 600 597 601 if (ngrid.ne.1) then ! Note : no need to create a restart file in 1d. 598 if (ngrid.ne.1) then 599 ! Note : no need to create a restart file in 1d. 602 600 call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid,nlayer,nq, & 603 601 ptimestep,pday+nday,time_phys,cell_area, & 604 602 albedo_bareground,inertiedat,zmea,zstd,zsig,zgam,zthe) 605 endif606 607 ! Sanity check for microphysics608 if ( ((.not.moyzon_mu).and.(callmufi)) ) then609 print *, "moyzon_mu=",moyzon_mu," and callmufi=",callmufi610 print *, "Please activate zonal mean to run microphysics (for now) !"611 stop612 endif 613 614 ! Sanity check for chemistry615 if ( (.not.moyzon_ch) .and. (callchim) ) then616 print *, "moyzon_ch=",moyzon_ch," and callchim=",callchim617 print *, "Please activate zonal mean to run chemistry !"618 stop619 endif 620 603 604 ! Sanity check for microphysics - useless in 1D 605 if ( ((.not.moyzon_mu).and.(callmufi)) ) then 606 print *, "moyzon_mu=",moyzon_mu," and callmufi=",callmufi 607 print *, "Please activate zonal mean to run microphysics (for now) !" 608 stop 609 endif 610 611 ! Sanity check for chemistry - useless in 1D 612 if ( (.not.moyzon_ch) .and. (callchim) ) then 613 print *, "moyzon_ch=",moyzon_ch," and callchim=",callchim 614 print *, "Please activate zonal mean to run chemistry !" 615 stop 616 endif 617 618 endif ! of ngrid.ne.1 621 619 622 620 ! XIOS outputs … … 705 703 enddo 706 704 707 ! -------------------------------Taken from old Titan --------------------------708 ! zonal averages needed705 ! Zonal averages needed for chemistry and microphysics 706 ! ~~~~~~~~~~~~~ Taken from old Titan ~~~~~~~~~~~~~~~~~ 709 707 if (moyzon_ch .or. moyzon_mu) then 710 708 … … 1044 1042 if (callchim) then 1045 1043 1046 ! Using zonal mean for calchim1047 zplev(:,:) = zplevbar(:,:)1048 zplay(:,:) = zplaybar(:,:)1049 zzlev(:,:) = zzlevbar(:,:)1050 zzlay(:,:) = zzlaybar(:,:)1051 ztemp(:,:) = ztfibar(:,:)1052 1053 1044 if (nq.gt.nmicro) then 1054 1045 do iq = nmicro+1,nq … … 1073 1064 1074 1065 print *, "We enter in the chemistry ..." 1075 call calchim(ngrid,nq-nmicro,ychim,nomqy,declin,zls,ctimestep, & 1076 ztemp,zplay,zplev,zzlay,zzlev,dycchi,nlayer+70) 1077 1078 ! JVO 2017 : NLEV = nlayer+70, en accord avec le C. Quid si nlay=/ 55 ? 1079 1066 1067 if (ngrid.eq.1) then ! We obviously don't have access to (and don't need) zonal means in 1D 1068 call calchim(ngrid,nq-nmicro,ychim,nomqy,declin,zls,ctimestep, & 1069 pt,pplay,pplev,zzlay,zzlev,dycchi,nlayer+70) 1070 else 1071 call calchim(ngrid,nq-nmicro,ychim,nomqy,declin,zls,ctimestep, & 1072 ztfibar,zplaybar,zplevbar,zzlaybar,zzlevbar,dycchi,nlayer+70) 1073 ! JVO 2017 : NLEV = nlayer+70, en accord avec le C. Quid si nlay=/ 55 ? 1074 endif 1075 1080 1076 endif 1081 1077 … … 1104 1100 if (callmufi) then 1105 1101 1106 ! Using zonal mean for microphysics1107 zplev(:,:) = zplevbar(:,:)1108 zplay(:,:) = zplaybar(:,:)1109 zzlev(:,:) = zzlevbar(:,:)1110 zzlay(:,:) = zzlaybar(:,:)1111 ztemp(:,:) = ztfibar(:,:)1112 1113 1102 ! Inside this routine we will split 2D->1D, intensive->extensive and separate different types of tracers 1114 1103 ! Should be put in phytrac 1115 1104 1116 call calmufi(zplev,zzlev,zplay,zzlay,ztemp,pq,zdqmufi) 1105 if (ngrid.eq.1) then ! We obviously don't have access to (and don't need) zonal means in 1D 1106 call calmufi(pplev,zzlev,pplay,zzlay,pt,pq,zdqmufi) 1107 else 1108 call calmufi(zplevbar,zzlevbar,zplaybar,zzlaybar,ztfibar,pq,zdqmufi) 1109 endif 1117 1110 1118 1111 pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq) + zdqmufi(1:ngrid,1:nlayer,1:nq) -
trunk/LMDZ.TITAN/libf/phytitan/tracer_h.F90
r1815 r1843 103 103 noms(:)=nametrac(:) 104 104 105 ALLOCATE(rho_q(nq)) ! Defined for all tracers, currently initialized to 0.0105 IF (.NOT.ALLOCATED(rho_q)) ALLOCATE(rho_q(nq)) ! Defined for all tracers, currently initialized to 0.0 106 106 rho_q(:) = 0.0 107 107 108 ALLOCATE(mmol(nq),rat_mmol(nq)) ! Defined for all tracers, (actually) initialized only for chemical tracers 108 ! Defined for all tracers, (actually) initialized only for chemical tracers 109 IF (.NOT.ALLOCATED(mmol)) ALLOCATE(mmol(nq)) 110 IF (.NOT.ALLOCATED(rat_mmol)) ALLOCATE(rat_mmol(nq)) 109 111 mmol(:) = 0.0 110 112 rat_mmol(:) = 1.0 … … 138 140 ENDIF 139 141 ! microphysics indexes share the same values than original tracname. 140 ALLOCATE(micro_indx(nmicro))142 IF (.NOT.ALLOCATED(micro_indx)) ALLOCATE(micro_indx(nmicro)) 141 143 j = 1 142 144 DO i=1,nq … … 148 150 ENDDO 149 151 ELSE 150 ALLOCATE(micro_indx(nmicro))152 IF (.NOT.ALLOCATED(micro_indx)) ALLOCATE(micro_indx(nmicro)) 151 153 ENDIF 152 154 … … 163 165 CALL abort_gcm("initracer2", "inconsistent number of tracers", 42) 164 166 ENDIF 165 ALLOCATE(chimi_indx(nchimi))167 IF (.NOT.ALLOCATED(chimi_indx)) ALLOCATE(chimi_indx(nchimi)) 166 168 n = 0 ! counter on chimi_indx 167 169 DO j=1,SIZE(cnames) … … 186 188 ENDIF 187 189 ELSE 188 ALLOCATE(chimi_indx(0))190 IF (.NOT.ALLOCATED(chimi_indx)) ALLOCATE(chimi_indx(0)) 189 191 ENDIF 190 192 IF (verb) THEN
Note: See TracChangeset
for help on using the changeset viewer.