Changeset 4173 for trunk


Ignore:
Timestamp:
Apr 7, 2026, 4:13:35 PM (4 weeks ago)
Author:
cpetetin
Message:

TITAN PCM : evaporation and small conservation correction CP

Location:
trunk/LMDZ.TITAN/libf
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/libf/muphytitan/mm_clouds.f90

    r4171 r4173  
    391391    ! compute tendencies:
    392392    ! all of these tendencies are in X.m-3 !
    393     dm0aer = (zm0a - sm0a)*mm_rhoair
    394     dm3aer = (zm3a - sm3a)*mm_rhoair
     393    !dm0aer = (zm0a - sm0a)*mm_rhoair
     394    !dm3aer = (zm3a - sm3a)*mm_rhoair
    395395    dm0ccn = (zm0n - sm0n)*mm_rhoair
    396396    dm3ccn = (zm3n - sm3n)*mm_rhoair
     397    dm0aer = -dm0ccn
     398    dm3aer = -dm3ccn
    397399
    398400    dm3iX  = (zm3iX - sm3iX)                    ! this one in X.kg-1 (temporary) !
  • trunk/LMDZ.TITAN/libf/muphytitan/mm_globals.f90

    r4172 r4173  
    184184  LOGICAL, SAVE :: mm_var_prod = .false. !! Time variation of production rate control flag.
    185185
    186   LOGICAL, SAVE :: mm_use_effg = .true. !! Enable/Disable effective G for computations.
     186  LOGICAL, SAVE :: mm_use_effg = .false. !! Enable/Disable effective G for computations.
    187187
    188188  !> Enable/Disable __Fiadero__'s correction.
  • trunk/LMDZ.TITAN/libf/muphytitan/mm_haze.F90

    r3700 r4173  
    773773    REAL(kind=mm_wp), INTENT(out), DIMENSION(:) :: dm3s !! Tendency of M3 (\(m^{3}.m^{-3}\)).
    774774    INTEGER                     :: i
    775     REAL(kind=mm_wp)            :: zprod,cprod,timefact
     775    REAL(kind=mm_wp)            :: zprod,cprod,timefact,prod_eff
    776776    REAL(kind=mm_wp), PARAMETER :: sigz  = 20e3_mm_wp, &
    777777                                   fnorm = 1._mm_wp/(dsqrt(2._mm_wp*mm_pi)*sigz), &
     
    812812    ENDIF
    813813
     814    ! Correctif guassian loses when zprod is too close to border
     815    prod_eff = SUM(dm3s(:)*mm_dzlev(1:mm_nla))/(mm_tx_prod*0.75_mm_wp/mm_pi * mm_dt/mm_rhoaer)
     816    dm3s(:) = dm3s(:)/prod_eff
     817    dm0s(:) = dm0s(:)/prod_eff
     818
    814819  END SUBROUTINE mm_haze_production
    815820
  • trunk/LMDZ.TITAN/libf/muphytitan/mm_microphysic.f90

    r4171 r4173  
    205205    REAL(kind=mm_wp), INTENT(out), OPTIONAL, DIMENSION(:,:)   :: grate     !! Growth rate (\(m^{2}.s^{-1}\)).
    206206
    207     IF (PRESENT(aer_prec))   aer_prec   = ABS(mm_aer_prec) / dt
     207    IF (PRESENT(aer_prec))   aer_prec   = -mm_aer_prec / dt
    208208    IF (PRESENT(aer_s_w))    aer_s_w    = -mm_m3as_vsed(mm_nla:1:-1)
    209209    IF (PRESENT(aer_f_w))    aer_f_w    = -mm_m3af_vsed(mm_nla:1:-1)
     
    212212
    213213    IF (mm_w_clouds) THEN
    214       IF (PRESENT(ccn_prec))   ccn_prec   = ABS(mm_ccn_prec) / dt
    215       IF (PRESENT(ice_prec))   ice_prec   = ABS(mm_ice_prec) / dt
     214      IF (PRESENT(ccn_prec))   ccn_prec   = -mm_ccn_prec / dt
     215      IF (PRESENT(ice_prec))   ice_prec   = -mm_ice_prec / dt
    216216      IF (PRESENT(ccn_w))      ccn_w      = mm_ccn_vsed(mm_nla:1:-1)
    217217      IF (PRESENT(ccn_flux))   ccn_flux   = mm_ccn_flux(mm_nla:1:-1)
  • trunk/LMDZ.TITAN/libf/phytitan/calchim.F90

    r4101 r4173  
    6868  USE comcstfi_mod, ONLY: g, rad, pi, r, kbol
    6969  USE geometry_mod, ONLY: latitude
     70  USE mod_phys_lmdz_para, only : is_master
    7071#ifndef MESOSCALE 
    7172  USE logic_mod, ONLY: moyzon_ch
     
    166167  IF (firstcall) THEN
    167168
    168      PRINT*, 'CHIMIE, premier appel'
     169     if(is_master) PRINT*, 'CHIMIE, premier appel'
    169170
    170171     if (ngrid .eq. 1) then ! if 1D no dynamic mixing, we set the kedd in all column
     
    224225     ! a. For GCM layers we just copy-paste ( assuming that physiq always send correct altitudes ! )
    225226
    226      PRINT*,'Init chemistry : pressure, density, temperature ... :'
    227      PRINT*,'level, press_c (mbar), nb (cm-3), temp_c (K)'
     227     if(is_master) then
     228         PRINT*,'Init chemistry : pressure, density, temperature ... :'
     229         PRINT*,'level, press_c (mbar), nb (cm-3), temp_c (K)'
     230     endif
    228231
    229232#ifndef MESOSCALE
  • trunk/LMDZ.TITAN/libf/phytitan/comchem_h.F90

    r4049 r4173  
    5252   REAL, DIMENSION(nkim), PARAMETER               :: cmmol = (/ &
    5353       1.01        , 2.0158      , 13.02       , 14.03       , 14.03       , 15.03       , &
    54        16.04       , 24.02       , 25.03       , 26.04       , 27.05       , 28.05       , &
    55        29.06       , 30.07       , 39.06       , 41.07       , 42.08       , 43.09       , &
     54       16.042      , 24.02       , 25.03       , 26.036      , 27.05       , 28.05       , &
     55       29.06       , 30.068      , 39.06       , 41.07       , 42.08       , 43.09       , &
    5656       49.05       , 51.07       , 52.08       , 40.07       , 40.07       , 44.11       , &
    5757       50.06       , 54.09       , 58.13       , 78.1136     , 38.05       , 53.07       , &
    58        77.1136     , 28.0134     , 14.01       , 26.02       , 27.04       , 28.05       , &
    59        39.05       , 40.04       , 41.05       , 50.04       , 51.05       , 52.04       , &
     58       77.1136     , 28.0134     , 14.01       , 26.02       , 27.028      , 28.05       , &
     59       39.05       , 40.04       , 41.05       , 50.04       , 51.048      , 52.04       , &
    6060       76.1        /)
    6161
  • trunk/LMDZ.TITAN/libf/phytitan/evapCH4.F90

    r4013 r4173  
    7777!-------------
    7878real, parameter :: karman = 0.4 ! Karman constant [-]
    79 real, parameter :: humCH4 = 0.4 ! Imposed surface humidity for CH4 [-]
     79real, parameter :: humCH4 = 1. ! Imposed surface humidity for CH4 [-]
    8080
    8181real, parameter :: Flnp = 0.07  ! Fraction occupied by lakes (North Pole)
     
    129129
    130130  ! Saturation profile of CH4 [mol.mol-1] (Fray and Schmidt 2009) :
    131   Tlake = tsurf(ig) - 7 ! Lakes are 2-7K less than surface.
     131  Tlake = tsurf(ig) ! Lakes are 2-7K less than surface.
    132132  qsatCH4 = (1.0e5 / pplev(ig,1)) * exp(1.051e1 - 1.110e3/Tlake - 4.341e3/Tlake**2 + 1.035e5/Tlake**3 - 7.910e5/Tlake**4)
    133133  ! CH4 : 0.70 * qsat because of dissolution in N2
    134134  qsatCH4 = 0.70 * qsatCH4
    135135
     136  ! Surface humidity :
     137  qsatCH4 = humCH4 * qsatCH4
     138
    136139  ! Flux at the surface [kg.m-2.s-1] :
    137140  flux = rhoair * Cd * ws
    138141 
    139   ! Surface humidity :
    140   qsatCH4 = humCH4 * qsatCH4
    141 
    142142  ! <North Pole>
    143143  if (REAL(latitude_deg(ig)) .ge. 70.0) then
  • trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90

    r4171 r4173  
    360360      ! Temporary fraction of CH4 [mol/mol]
    361361      real, dimension(ngrid,nlayer) :: tpq_CH4
     362      ! Temporary tracers tendencie [(X)/kg/s]
     363      real, dimension(ngrid,nlayer,nq) :: tpdq
    362364
    363365      real :: i2e(ngrid,nlayer) ! int 2 ext factor (X.kg-1 -> X.m-3)
     
    683685      taux(:)        = 0.D0
    684686      tauy(:)        = 0.D0
    685       ychimbar(:,:,:)  = 0.D0
     687      ychimbar(:,:,:)   = 0.D0
     688      zdqmufibar(:,:,:) = 0.D0
    686689
    687690      zday=pday+ptime ! Compute time, in sols (and fraction thereof).
     
    11461149            !        - Weird unphysical ratio of m0 and m3, ok for now, but take care of them if
    11471150            !          you want to compute optics from radii.
     1151            tpdq(:,:,:) = pdq(:,:,:)
     1152            i2e(:,:) = ( pplev(:,1:nlayer)-pplev(:,2:nlayer+1) ) / gzlat(:,1:nlayer)
    11481153            WHERE ((pq(:,:,1)+pdq(:,:,1)*ptimestep < 0.D0) .OR. (pq(:,:,2)+pdq(:,:,2)*ptimestep < 0.D0))
    11491154               pdq(:,:,1) = (epsilon(1.0)-1.D0)*pq(:,:,1)/ptimestep
     
    11541159               pdq(:,:,4) = (epsilon(1.0)-1.D0)*pq(:,:,4)/ptimestep
    11551160            ENDWHERE
     1161            DO ig=1,ngrid    ! Add the small production to the aer loss for diagnostic balance CP
     1162                DO l=1, nlayer ! be carfull the rho of aerosol hardcoded
     1163                        mmd_aer_prec(ig) = mmd_aer_prec(ig) - ((pdq(ig,l,2) - tpdq(ig,l,2)) + (pdq(ig,l,4) - tpdq(ig,l,4)))*i2e(g,l)*600.
     1164                ENDDO
     1165            ENDDO
    11561166            IF (callclouds) THEN
    11571167               WHERE ((pq(:,:,5)+pdq(:,:,5)*ptimestep < 0.D0) .OR. (pq(:,:,6)+pdq(:,:,6)*ptimestep < 0.D0))
     
    11591169                  pdq(:,:,6) = (epsilon(1.0)-1.D0)*pq(:,:,6)/ptimestep
    11601170               ENDWHERE
     1171               DO ig=1,ngrid    ! Add the small production to the ccn loss for diagnostic balance CP
     1172                  DO l=1, nlayer ! be carfull the rho of ccn is hardcorded
     1173                     mmd_ccn_prec(ig) = mmd_ccn_prec(ig) - (pdq(ig,l,6) - tpdq(ig,l,6))*i2e(ig,l)*600.
     1174                  ENDDO
     1175               ENDDO
    11611176               DO iq = 1, size(ices_indx)
    11621177                  ! For ices :
     
    12201235            ! processes ( convadj ... ) we miss them in any case as we work in zonally/diurnal
    12211236            ! mean -> no fine diurnal/short time evolution, only seasonal evolution only.
    1222             if (moyzon_ch .and. mod(icount-1,ichim).eq. 0) then
     1237            if (moyzon_ch) then
    12231238              do iq = 1,nkim
    12241239                ychimbar(:,:,iq) =  zqfibar(:,:,iq+nmicro) / rat_mmol(iq+nmicro)
    1225                   if ( callclouds ) then
     1240                  if ( callclouds .and. mod(icount-1,ichim).eq.0 ) then
    12261241                    ychimbar(:,:,iq) =  ychimbar(:,:,iq) + ( zdqmufibar(:,:,iq+nmicro)*ptimestep / rat_mmol(iq+nmicro) )
    12271242                  endif
     
    13191334             
    13201335               ! Evaporation of lakes :
    1321                if (moyzon_ch) then
    1322                  tpq_CH4(:,:) = ychimbar(:,:,7) + dycchi(:,:,7)*ptimestep ! + dycchi because ychim not yet updated [mol/mol]
    1323                else
    1324                  tpq_CH4(:,:) = ychim(:,:,7) + dycchi(:,:,7)*ptimestep    ! + dycchi because ychim not yet updated [mol/mol]
    1325                endif
     1336               
     1337               tpq_CH4(:,:) = ychim(:,:,7) + dycchi(:,:,7)*ptimestep    ! + dycchi because ychim not yet updated [mol/mol]
     1338               
    13261339               call evapCH4(ngrid,nlayer,ptimestep,pplev,zzlay,zzlev,&
    13271340                            pu,pv,tsurf,tpq_CH4,tankCH4,dycevapCH4,zdtsurfevap)
Note: See TracChangeset for help on using the changeset viewer.