Ignore:
Timestamp:
Mar 18, 2019, 4:27:59 PM (6 years ago)
Author:
jvatant
Message:

Follow-up of r2116, fix errors for runs mufi+chem in tracer gestion
--JVO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90

    r2109 r2117  
    522522            ctimestep = ptimestep*REAL(ichim)
    523523
    524             zdqchi(:,:,:)  = 0.0
    525 
    526524         endif
    527525
     
    10941092            ! Microphysics condensation for 2D fields to sent non-saturated fields to photochem
    10951093            if ( callclouds .and. moyzon_ch .and. mod(icount-1,ichim).eq.0 ) then
    1096               zdqfibar(:,:,:) = 0.0 ! We work in zonal average -> forget processes other than condensation
     1094              zdqfibar(:,:,:) = 0.D0 ! We work in zonal average -> forget processes other than condensation
    10971095              call calmufi(ptimestep,zplevbar,zzlevbar,zplaybar,zzlaybar, &
    10981096                           gzlat,ztfibar,zqfibar,zdqfibar,zdqmufibar)
     
    11351133            call calc_ysat(ngrid,nlayer,pplay/100.0,pt,ysat) ! Compute saturation profiles for every grid point
    11361134
    1137             dyccond(:,:,:) = 0.0 ! Default value -> no condensation
     1135            dyccond(:,:,:) = 0.D0 ! Default value -> no condensation
    11381136
    11391137            do iq=1,nkim
     
    11421140            enddo
    11431141
    1144             if ( callclouds ) dyccond(:,:,ices_indx) = 0.0 ! Condensation have been calculated in the cloud microphysics
     1142            if ( callclouds ) dyccond(:,:,ices_indx) = 0.D0 ! Condensation have been calculated in the cloud microphysics
    11451143
    11461144            do iq=1,nkim
     
    11571155              call calc_ysat(ngrid,nlayer,zplaybar/100.0,ztfibar,ysat) ! Compute saturation profiles for every grid point for the zon-ave fields
    11581156
    1159               dyccondbar(:,:,:) = 0.0 ! Default value -> no condensation
     1157              dyccondbar(:,:,:) = 0.D0 ! Default value -> no condensation
    11601158             
    11611159              do iq = 1,nkim
     
    11641162              enddo
    11651163
    1166               if ( callclouds ) dyccondbar(:,:,ices_indx) = 0.0 ! Condensation have been calculated in the cloud microphysics
     1164              if ( callclouds ) dyccondbar(:,:,ices_indx) = 0.D0 ! Condensation have been calculated in the cloud microphysics
    11671165
    11681166              do iq=1,nkim
     
    11721170              ! Pseudo-evap ( forcing constant surface humidity )
    11731171              do ig=1,ngrid
    1174                  if ( ychimbar(ig,1,7+nmicro) .lt. botCH4 ) ychimbar(ig,1,7+nmicro) = botCH4
     1172                 if ( ychimbar(ig,1,7) .lt. botCH4 ) ychimbar(ig,1,7) = botCH4
    11751173              enddo
    11761174
     
    11981196            ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    11991197            do ig=1,ngrid
    1200                if ( (ychim(ig,1,7+nmicro)+dycchi(ig,1,7+nmicro)*ptimestep) .lt. botCH4 ) then ! +dycchi because ychim not yet updated
    1201                   dycevapCH4(ig) = ( -ychim(ig,1,7+nmicro)+botCH4 ) / ptimestep - dycchi(ig,1,7+nmicro)
     1198               if ( (ychim(ig,1,7)+dycchi(ig,1,7)*ptimestep) .lt. botCH4 ) then ! +dycchi because ychim not yet updated
     1199                  dycevapCH4(ig) = ( -ychim(ig,1,7)+botCH4 ) / ptimestep - dycchi(ig,1,7)
    12021200               else
    1203                   dycevapCH4(ig) = 0.0
     1201                  dycevapCH4(ig) = 0.D0
    12041202               endif
    12051203            enddo
     
    12091207            ! v. Updates and positivity check
    12101208            ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1209            zdqchi(:,:,:)  = 0.D0 ! -> for the microphysical tracers we need to update to 0 each time ;-)
     1210
    12111211            do iq=1,nkim
    12121212              zdqchi(:,:,iq+nmicro) = dycchi(:,:,iq)*rat_mmol(iq+nmicro) ! convert tendencies to mass mixing ratio
    12131213
    12141214              where( (pq(:,:,iq+nmicro) + ( pdq(:,:,iq+nmicro)+zdqchi(:,:,iq+nmicro) )*ptimestep ) .LT. 0.)  & ! When using zonal means we set the same tendency
    1215                       zdqchi(:,:,iq+nmicro) = 1.e-30 - pdq(:,:,iq+nmicro) - pq(:,:,iq+nmicro)/ptimestep        ! everywhere in longitude -> could lead to negs !
     1215                      zdqchi(:,:,iq+nmicro) = 1.D-30 - pdq(:,:,iq+nmicro) - pq(:,:,iq+nmicro)/ptimestep        ! everywhere in longitude -> could lead to negs !
    12161216            enddo
    12171217
Note: See TracChangeset for help on using the changeset viewer.