Ignore:
Timestamp:
Jul 6, 2018, 12:12:47 PM (6 years ago)
Author:
jvatant
Message:

Improve computation of saturation profiles that was done in planetary average
-> Now done for every grid point ( enables sensitivity to winter low temps )
-> firstcall "inicondens.F90" replaced by every-step-call-to "calc_ysat.F90"
--JVO

Location:
trunk/LMDZ.TITAN/libf/phytitan
Files:
1 added
1 deleted
1 edited

Legend:

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

    r1960 r1966  
    3535      use time_phylmdz_mod, only: daysec
    3636      use logic_mod, only: moyzon_ch
    37       use moyzon_mod, only: tmoy, playmoy, zphibar, zphisbar, zplevbar, &
    38                             zplaybar, zzlevbar, zzlaybar, ztfibar, zqfibar
     37      use moyzon_mod, only:  zphibar, zphisbar, zplevbar, zplaybar, &
     38                            zzlevbar, zzlaybar, ztfibar, zqfibar
    3939      use callkeys_mod
    4040      use vertical_layers_mod, only: presnivs, pseudoalt
     
    383383
    384384      ! Saturation profiles
    385       real, dimension(:,:), allocatable, save     :: qysat ! (mol/mol)
    386 !$OMP THREADPRIVATE(qysat)
    387       real temp_eq(nlayer), press_eq(nlayer) ! Planetary averages for the init. of saturation profiles (K,mbar)
     385      real, dimension(ngrid,nlayer,nkim)          :: ysat ! (mol/mol)
    388386
    389387      ! Surface methane
    390       real, dimension(:), allocatable, save :: tankCH4    ! Depth of surface methane tank (m)
     388      real, dimension(:), allocatable, save       :: tankCH4    ! Depth of surface methane tank (m)
    391389!$OMP THREADPRIVATE(tankCH4)
    392390
     
    510508         endif
    511509
    512 !        Initialize names, timestep and saturation profiles for chemistry
    513 !        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     510!        Initialize names and timestep for chemistry
     511!        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    514512
    515513         if ( callchim ) then
     
    522520
    523521            allocate(dycchi(ngrid,nlayer,nkim)) ! only for chemical tracers
    524             allocate(qysat(nlayer,nkim))
    525522           
    526523            ! Chemistry timestep
    527524            ctimestep = ptimestep*REAL(ichim)
    528525
    529             ! qysat is taken at the equator ( small variations of t,p )
    530             if (ngrid.ne.1) then ! TODO : a patcher (lecture d'un profil?) si jamais on a plus acces a moyzon_mod !
    531               temp_eq(:)  = tmoy(:)
    532               press_eq(:) = playmoy(:)/100. ! in mbar
    533             else
    534               temp_eq(:)  = pt(1,:)
    535               press_eq(:) = pplay(1,:)/100.
    536             endif
    537            
    538             call inicondens(press_eq,temp_eq,qysat)
    539          
    540526            zdqchi(:,:,:)  = 0.0
    541527
     
    11461132            ! i. Condensation of the 3D tracers after the transport
    11471133            ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1134           
     1135            call calc_ysat(ngrid,nlayer,pplay,pt,ysat) ! Compute saturation profiles for every grid point
     1136
     1137            dyccond(:,:,:) = 0.0 ! Default value -> no condensation
     1138
    11481139            do iq=1,nkim
    1149                do l=1,nlayer
    1150                   do ig=1,ngrid
    1151                      if ( ychim(ig,l,iq).gt.qysat(l,iq) ) then
    1152                         dyccond(ig,l,iq+nmicro) = ( -ychim(ig,l,iq)+qysat(l,iq) ) / ptimestep
    1153                      else
    1154                         dyccond(ig,l,iq+nmicro) = 0.0
    1155                      endif
    1156                   enddo
    1157                enddo
     1140               where ( ychim(:,:,iq).gt.ysat(:,:,iq) )   &
     1141                     dyccond(:,:,iq+nmicro) = ( -ychim(:,:,iq)+ysat(:,:,iq) ) / ptimestep
    11581142            enddo
    11591143
     
    11711155            if ( moyzon_ch .and. mod(icount-1,ichim).eq. 0 ) then
    11721156
     1157              call calc_ysat(ngrid,nlayer,zzlaybar,ztfibar,ysat) ! Compute saturation profiles for every grid point for the zon-ave fields
     1158
     1159              dyccondbar(:,:,:) = 0.0 ! Default value -> no condensation
     1160             
    11731161              do iq = 1,nkim
    1174                 do l=1,nlayer
    1175                   do ig=1,ngrid
    1176                     if ( ychimbar(ig,l,iq).gt.qysat(l,iq) ) then
    1177                        dyccondbar(ig,l,iq+nmicro) = ( -ychimbar(ig,l,iq)+qysat(l,iq) ) / ptimestep
    1178                     else
    1179                        dyccondbar(ig,l,iq+nmicro) = 0.0
    1180                     endif
    1181                   enddo
    1182                 enddo
     1162                 where ( ychimbar(:,:,iq).gt.ysat(:,:,iq) )  &
     1163                       dyccondbar(:,:,iq+nmicro) = ( -ychimbar(:,:,iq)+ysat(:,:,iq) ) / ptimestep
    11831164              enddo
    11841165
Note: See TracChangeset for help on using the changeset viewer.