Changeset 1904 for trunk/LMDZ.TITAN/libf/phytitan
- Timestamp:
- Feb 25, 2018, 7:44:55 PM (7 years ago)
- Location:
- trunk/LMDZ.TITAN/libf/phytitan
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/phytitan/calmufi.F90
r1902 r1904 103 103 do i=1,nices 104 104 m3i(:,nices) = pq(ilon,:,6+i) * int2ext(:) 105 gazs(:,i) = pq(ilon,:,ices_indx(i)) *rat_mmol(ices_indx(i)) ! For gazs we work on the full tracer array !!105 gazs(:,i) = pq(ilon,:,ices_indx(i)) / rat_mmol(ices_indx(i)) ! For gazs we work on the full tracer array !! 106 106 ! We use the molar mass ratio from GCM in case there is discrepancy with the mm one 107 107 enddo … … 147 147 do i=1,nices 148 148 zdq(ilon,:,6+i) = dm3i(:,nices) / int2ext(:) 149 zdq(ilon,:,ices_indx(i)) = dgazs(:,i) /rat_mmol(ices_indx(i)) ! For gazs we work on the full tracer array !!149 zdq(ilon,:,ices_indx(i)) = dgazs(:,i) * rat_mmol(ices_indx(i)) ! For gazs we work on the full tracer array !! 150 150 ! We use the molar mass ratio from GCM in case there is discrepancy with the mm one 151 151 enddo -
trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90
r1903 r1904 38 38 use logic_mod, only: moyzon_ch, moyzon_mu 39 39 use moyzon_mod, only: tmoy, playmoy, zphibar, zphisbar, zplevbar, & 40 zplaybar, zzlevbar, zzlaybar, ztfibar 40 zplaybar, zzlevbar, zzlaybar, ztfibar, zqfibar 41 41 use callkeys_mod 42 42 use vertical_layers_mod, only: presnivs, pseudoalt … … 624 624 ptimestep,pday+nday,time_phys,cell_area, & 625 625 albedo_bareground,inertiedat,zmea,zstd,zsig,zgam,zthe) 626 627 ! Sanity check for microphysics - useless in 1D 628 if ( ((.not.moyzon_mu).and.(callmufi)) ) then 629 print *, "moyzon_mu=",moyzon_mu," and callmufi=",callmufi 630 print *, "Please activate zonal mean to run microphysics (for now) !" 631 stop 632 endif 633 634 ! Sanity check for chemistry - useless in 1D 635 if ( (.not.moyzon_ch) .and. (callchim) ) then 636 print *, "moyzon_ch=",moyzon_ch," and callchim=",callchim 637 print *, "Please activate zonal mean to run chemistry !" 638 stop 639 endif 640 641 endif ! of ngrid.ne.1 626 endif 642 627 643 628 ! XIOS outputs … … 731 716 if (moyzon_ch .or. moyzon_mu) then 732 717 718 print *, "------------------------------ </CRITICAL ALERT> -------------------------------" 719 print *, "WARNING : YOU ARE USING ZONAL MEANS THAT SEEM TO LEAD TO CRASHES (-infinity) ..." 720 print *, "------------------------------ <CRITICAL ALERT/> -------------------------------" 721 733 722 zzlaybar(1,:)=(zphibar(1,:)+zphisbar(1))/g 734 723 ! SI ON TIENT COMPTE DE LA VARIATION DE G AVEC L'ALTITUDE: … … 1078 1067 if (callchim) then 1079 1068 1080 do iq = 1,nkim 1081 ychim(:,:,iq) = pq(:,:,iq+nmicro) * rat_mmol(iq+nmicro) ! convert to molar fraction 1082 enddo 1069 ! Convert to molar fraction 1070 if (moyzon_ch) then 1071 do iq = 1,nkim 1072 ychim(:,:,iq) = zqfibar(:,:,iq+nmicro) / rat_mmol(iq+nmicro) 1073 enddo 1074 else 1075 do iq = 1,nkim 1076 ychim(:,:,iq) = pq(:,:,iq+nmicro) / rat_mmol(iq+nmicro) 1077 enddo 1078 endif 1083 1079 1084 1080 ! Condensation tendency after the transport … … 1099 1095 print *, "We enter in the chemistry ..." 1100 1096 1101 if ( ngrid.eq.1) then ! We obviously don't have access to (and don't need) zonal means in 1D1102 call calchim(ngrid,ychim,declin,zls,ctimestep, &1103 pt,pplay,pplev,zzlay,zzlev,dycchi)1104 else 1105 call calchim(ngrid,ychim,declin,zls,ctimestep, &1106 ztfibar,zplaybar,zplevbar,zzlaybar,zzlevbar,dycchi)1097 if (moyzon_ch.and.(ngrid.ne.1)) then ! 2D zonally averaged chemistry !! SEEMS TO CRASH DON'T USE IT !! 1098 call calchim(ngrid,ychim,declin,zls,ctimestep,ztfibar,zphibar, & 1099 zplaybar,zplevbar,zzlaybar,zzlevbar,dycchi) 1100 else ! 3D chemistry (or 1D run) 1101 call calchim(ngrid,ychim,declin,zls,ctimestep,pt,pphi, & 1102 pplay,pplev,zzlay,zzlev,dycchi) 1107 1103 endif 1108 1104 … … 1115 1111 ! We convert tendencies to mass mixing ratio 1116 1112 do iq=1,nkim 1117 zdqchi(:,:,iq+nmicro) = dycchi(:,:,iq) /rat_mmol(iq+nmicro)1118 zdqcond(:,:,iq+nmicro) = dyccond(:,:,iq+nmicro) /rat_mmol(iq+nmicro)1113 zdqchi(:,:,iq+nmicro) = dycchi(:,:,iq) * rat_mmol(iq+nmicro) 1114 zdqcond(:,:,iq+nmicro) = dyccond(:,:,iq+nmicro) * rat_mmol(iq+nmicro) 1119 1115 enddo 1120 1116 … … 1131 1127 if (callmufi) then 1132 1128 #ifdef USE_QTEST 1133 if (ngrid.eq.1) then ! We obviously don't have access to (and don't need) zonal means in 1D 1134 call calmufi(ptimestep,pplev,zzlev,pplay,zzlay,pt,tpq,zdqmufi) 1135 else 1136 call calmufi(ptimestep,zplevbar,zzlevbar,zplaybar,zzlaybar,ztfibar,tpq,zdqmufi) 1137 endif 1138 tpq(:,:,:) = tpq(:,:,:) + zdqmufi(1:ngrid,1:nlayer,1:nq)*ptimestep ! only manipulation of tpq->*ptimesep here 1129 call calmufi(ptimestep,pplev,zzlev,pplay,zzlay,pt,tpq,zdqmufi) 1130 tpq(:,:,:) = tpq(:,:,:) + zdqmufi(:,:,:)*ptimestep ! only manipulation of tpq->*ptimesep here 1139 1131 #else 1140 1132 ! Inside this routine we will split 2D->1D, intensive->extensive and separate different types of tracers 1141 1133 ! Should be put in phytrac 1142 1134 1143 if (ngrid.eq.1) then ! We obviously don't have access to (and don't need) zonal means in 1D 1135 if (moyzon_mu.and.(ngrid.ne.1)) then ! 2D zonally averaged microphysics !! SEEMS TO CRASH DON'T USE IT !! 1136 call calmufi(ptimestep,zplevbar,zzlevbar,zplaybar,zzlaybar,ztfibar,zqfibar,zdqmufi) 1137 else ! 3D microphysics (or 1D run) 1144 1138 call calmufi(ptimestep,pplev,zzlev,pplay,zzlay,pt,pq,zdqmufi) 1145 else1146 call calmufi(ptimestep,zplevbar,zzlevbar,zplaybar,zzlaybar,ztfibar,pq,zdqmufi)1147 1139 endif 1148 1140
Note: See TracChangeset
for help on using the changeset viewer.