Changeset 3652 for trunk


Ignore:
Timestamp:
Feb 26, 2025, 8:51:12 PM (5 months ago)
Author:
tbertrand
Message:

Pluto : for fast (nogcm) option only : adding possibility to run the CH4 cycle without any formation of CH4 frost (sublimation/condensation active over perenne reservoirs only)
TB

Location:
trunk/LMDZ.PLUTO/libf/phypluto
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/libf/phypluto/callkeys_mod.F90

    r3572 r3652  
    7373      logical,save :: condmetsurf,condcosurf,vertdiff
    7474!$OMP THREADPRIVATE(condmetsurf,condcosurf,vertdiff)
    75       logical,save :: convergeps,conservn2,condensn2,no_n2frost
    76 !$OMP THREADPRIVATE(convergeps,conservn2,condensn2,no_n2frost)
     75      logical,save :: convergeps,conservn2,condensn2,no_n2frost,no_ch4frost
     76!$OMP THREADPRIVATE(convergeps,conservn2,condensn2,no_n2frost,no_ch4frost)
    7777      logical,save :: conservch4
    7878!$OMP THREADPRIVATE(conservch4)
  • trunk/LMDZ.PLUTO/libf/phypluto/ch4surf.F

    r3539 r3652  
    22     &   pdtsurf,pplev,pdpsurf,pq,pdq,pqsurf,pdqsurf,pdqch4,pdqsch4)
    33 
    4       use callkeys_mod, only: dayfrac, thresh_non2
     4      use callkeys_mod, only: dayfrac, thresh_non2, no_ch4frost
    55      use comcstfi_mod, only: g, r
    66      use comgeomfi_h
     
    9393      DO ig=1,ngrid
    9494
    95          !! Take into account activity coefficient
    96          gamm(ig)=499.9-21.8*ztsurf(ig)+0.249*ztsurf(ig)**2
    97      &             -1.3*(zq_ch4(ig)*
    98      &             mmol(igcm_n2)/mmol(igcm_ch4_gas)*100.-0.6)/0.3
    99          gamm(ig)=max(gamm(ig),1.)
    100          !qsat(ig)=qsat(ig)*gamm(ig)
     95          !! Take into account activity coefficient
     96!         gamm(ig)=499.9-21.8*ztsurf(ig)+0.249*ztsurf(ig)**2
     97!     &             -1.3*(zq_ch4(ig)*
     98!     &             mmol(igcm_n2)/mmol(igcm_ch4_gas)*100.-0.6)/0.3
     99!         gamm(ig)=max(gamm(ig),1.)
     100!         qsat(ig)=qsat(ig)*gamm(ig)
    101101
    102          rho = zpsrf(ig) / (r *  tsurf(ig) )
    103          !! Condensation Flux
    104          pdqsch4(ig)=(-rho*uv*cdrag*(qsat(ig)-zq_ch4(ig)))
     102         !! option to not form any CH4 frost
     103         if (no_ch4frost.and.pqsurf(ig,igcm_ch4_ice).lt.5000.) then
    105104
    106          if (dayfrac.gt.0.and.zq_n2surf(ig).gt.thresh_non2) then
     105           pdqch4(ig)=0.
     106           pdqsch4(ig)=0.
     107
     108         else
     109
     110           rho = zpsrf(ig) / (r *  tsurf(ig) )
     111           !! Condensation Flux
     112           pdqsch4(ig)=(-rho*uv*cdrag*(qsat(ig)-zq_ch4(ig)))
     113
     114           if (dayfrac.gt.0.and.zq_n2surf(ig).gt.thresh_non2) then
    107115            if (dayfrac.gt.1.) then
    108116               pdqsch4(ig)=min(pdqsch4(ig),0.)
     
    112120               endif
    113121            endif
    114          endif
     122           endif
    115123                     
    116          !! Conserve mass if reservoir depleted                   
    117          if ((-pdqsch4(ig)*ptimestep).gt.
     124           !! Conserve mass if reservoir depleted                   
     125           if ((-pdqsch4(ig)*ptimestep).gt.
    118126     &                          (pqsurf(ig,igcm_ch4_ice))) then
    119127            pdqsch4(ig)=-pqsurf(ig,igcm_ch4_ice)/ptimestep
     128           endif
     129
     130           if (pdqsch4(ig)*ptimestep.gt.zq_ch4(ig)*zpsrf(ig)/g) then
     131            pdqsch4(ig)=zq_ch4(ig)/ptimestep*zpsrf(ig)/g
     132           endif
     133
     134           !! Security to avoid large changes in temperatures due to
     135           !latent heat                   
     136           if (lw_ch4*pdqsch4(ig)*ptimestep/capcal(ig).gt.1.) then
     137            pdqsch4(ig)=1./(lw_ch4*ptimestep)*capcal(ig)
     138           endif
     139           if (lw_ch4*pdqsch4(ig)*ptimestep/capcal(ig).lt.-1.) then
     140            pdqsch4(ig)=-1./(lw_ch4*ptimestep)*capcal(ig)
     141           endif
     142           !if (pdqsch4(ig)*ptimestep.gt.0.25) then
     143           !   pdqsch4(ig)=0.25/ptimestep
     144           !endif
     145           !if (pdqsch4(ig)*ptimestep.lt.-0.25) then
     146           !   pdqsch4(ig)=-0.25/ptimestep
     147           !endif
     148
     149           !! Atm tendency
     150           pdqch4(ig)=-pdqsch4(ig)*g/zpsrf(ig)
     151
    120152         endif
    121 
    122          if (pdqsch4(ig)*ptimestep.gt.zq_ch4(ig)*zpsrf(ig)/g) then
    123             pdqsch4(ig)=zq_ch4(ig)/ptimestep*zpsrf(ig)/g
    124          endif
    125 
    126          !! Security to avoid large changes in temperatures due to
    127          !latent heat                   
    128          if (lw_ch4*pdqsch4(ig)*ptimestep/capcal(ig).gt.1.) then
    129             pdqsch4(ig)=1./(lw_ch4*ptimestep)*capcal(ig)
    130          endif
    131          if (lw_ch4*pdqsch4(ig)*ptimestep/capcal(ig).lt.-1.) then
    132             pdqsch4(ig)=-1./(lw_ch4*ptimestep)*capcal(ig)
    133          endif
    134          !if (pdqsch4(ig)*ptimestep.gt.0.25) then
    135          !   pdqsch4(ig)=0.25/ptimestep
    136          !endif
    137          !if (pdqsch4(ig)*ptimestep.lt.-0.25) then
    138          !   pdqsch4(ig)=-0.25/ptimestep
    139          !endif
    140 
    141          !! Atm tendency
    142          pdqch4(ig)=-pdqsch4(ig)*g/zpsrf(ig)
    143153
    144154      ENDDO
  • trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90

    r3650 r3652  
    599599     if (is_master)write(*,*)trim(rname)//&
    600600      " condmetsurf = ",condmetsurf
     601     if (is_master)write(*,*)trim(rname)//&
     602      "call no CH4 frost formation?"
     603     no_ch4frost=.false. ! default value
     604     call getin_p("no_ch4frost",no_ch4frost)
     605     if (is_master)write(*,*)trim(rname)//&
     606      "no_ch4frost = ",no_ch4frost
    601607
    602608     if (is_master)write(*,*)trim(rname)//&
Note: See TracChangeset for help on using the changeset viewer.