Ignore:
Timestamp:
Nov 12, 2025, 2:00:58 PM (4 months ago)
Author:
debatzbr
Message:

Pluto PCM: Implementation of a microphysical model for clouds in moments.
BBT

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

Legend:

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

    r3683 r3957  
    11MODULE mp2m_calmufi
    22    use tracer_h
    3     use callkeys_mod, only : call_haze_prod_pCH4, haze_rho
     3    use comcstfi_mod, only : mugaz
     4    use callkeys_mod, only : call_haze_prod_pCH4, haze_rho,&
     5                             callmuclouds
    46   
    57    ! Microphysical model MP2M
     
    1416    !     Purpose
    1517    !     -------
    16     !     Interface subroutine to YAMMS model for LMD PCM.
     18    !     Interface subroutine to YAMMS model for LMD's PCM.
    1719    !
    1820    !     The subroutine computes the microphysics processes for a single vertical column.
     
    2931    !
    3032    !     @warning
    31     !     We suppose a given order of tracers (1. mu_m0as, 2. mu_m3as, 3. mu_m0af, 4. mu_m3af)!
     33    !     We suppose a given order of microphysical tracers in micro_indx(:):
     34    !     1. mu_m0as, 2. mu_m3as, 3. mu_m0af, 4. mu_m3af.
     35    !     If clouds are activated:
     36    !     5. mu_m0ccn, 6. mu_m3ccn, 7(+). mu_m3ices.
    3237    !
    3338    !     Authors
     
    6267        REAL(kind=8), DIMENSION(:,:,:), ALLOCATABLE :: zq    ! Local tracers updated from former processes (X.kg-1).
    6368       
     69        ! Related to aerosols:
    6470        REAL(kind=8), DIMENSION(:), ALLOCATABLE :: m0as      ! 0th order moment of the spherical mode (m-2).
    6571        REAL(kind=8), DIMENSION(:), ALLOCATABLE :: m3as      ! 3rd order moment of the spherical mode (m3.m-2).
     
    7379        REAL(kind=8), DIMENSION(:), ALLOCATABLE   :: dm0af   ! Tendency of the 0th order moment of the fractal mode distribution (m-2).
    7480        REAL(kind=8), DIMENSION(:), ALLOCATABLE   :: dm3af   ! Tendency of the 3rd order moment of the fractal mode distribution (m3.m-2).
     81
     82        ! Related to clouds:
     83        REAL(kind=8), DIMENSION(:), ALLOCATABLE   :: m0ccn   ! 0th order moment of the ccn distribution (m-2).
     84        REAL(kind=8), DIMENSION(:), ALLOCATABLE   :: m3ccn   ! 3rd order moment of the ccn distribution (m3.m-2).
     85        REAL(kind=8), DIMENSION(:,:), ALLOCATABLE :: m3ices  ! 3rd order moments of the ice components (m3.m-2).
     86        REAL(kind=8), DIMENSION(:,:), ALLOCATABLE :: mugases ! Condensible species gas molar fraction (mol.mol-1).
     87
     88        REAL(kind=8), DIMENSION(:), ALLOCATABLE   :: dm0ccn   ! Tendency of the 0th order moment of the ccn distribution (m-2).
     89        REAL(kind=8), DIMENSION(:), ALLOCATABLE   :: dm3ccn   ! Tendency of the 3rd order moment of the ccn distribution (m3.m-2).
     90        REAL(kind=8), DIMENSION(:,:), ALLOCATABLE :: dm3ices  ! Tendencies of the 3rd order moments of each ice components (m3.m-2).
     91        REAL(kind=8), DIMENSION(:,:), ALLOCATABLE :: dmugases ! Tendencies of each condensible gas species (mol.mol-1).
    7592       
    7693        ! Local variables:
     
    8097        TYPE(error) :: err
    8198       
    82         INTEGER           :: ilon,iq
     99        INTEGER           :: i,ilon,iq
    83100        INTEGER           :: nq,nlon,nlay
    84101        CHARACTER(len=10) :: tname
     
    98115        ALLOCATE(m0af(nlay))
    99116        ALLOCATE(m3af(nlay))
    100 
    101117        ALLOCATE(m3as_prod(nlay))
    102        
    103118        ALLOCATE(dm0as(nlay))
    104119        ALLOCATE(dm3as(nlay))
     
    106121        ALLOCATE(dm3af(nlay))
    107122
     123        ALLOCATE(m0ccn(nlay))
     124        ALLOCATE(m3ccn(nlay))
     125        ALLOCATE(m3ices(nlay,nmicro_ices))
     126        ALLOCATE(mugases(nlay,nmicro_ices))
     127        ALLOCATE(dm0ccn(nlay))
     128        ALLOCATE(dm3ccn(nlay))
     129        ALLOCATE(dm3ices(nlay,nmicro_ices))
     130        ALLOCATE(dmugases(nlay,nmicro_ices))
     131
    108132        ALLOCATE(int2ext(nlon,nlay)) 
    109133       
     
    129153            m0af(:) = zq(ilon,:,micro_indx(3)) * int2ext(ilon,:)
    130154            m3af(:) = zq(ilon,:,micro_indx(4)) * int2ext(ilon,:)
     155           
     156            if (callmuclouds) then
     157                m0ccn(:) = zq(ilon,:,micro_indx(5)) * int2ext(ilon,:)
     158                m3ccn(:) = zq(ilon,:,micro_indx(6)) * int2ext(ilon,:)
     159                do i = 1, nmicro_ices
     160                    m3ices(:,i)  = zq(ilon,:,micro_ice_indx(i)) * int2ext(ilon,:)
     161                    mugases(:,i) = zq(ilon,:,micro_gas_indx(i)) / (mmol(micro_gas_indx(i))/mugaz)
     162                enddo
     163            endif ! end of callmuclouds
    131164
    132165            ! Production of haze in the atmosphere by photolysis of CH4
     
    150183            ! Initialize YAMMS atmospheric column
    151184            err = mm_column_init(tmp,zlev(ilon,:),play(ilon,:),zlay(ilon,:),temp(ilon,:)) ; IF (err /= 0) call abort_program(err)
    152             ! Initialize YAMMS aerosols moments column
     185            ! Initialize YAMMS aerosol moments column
    153186            err = mm_aerosols_init(m0as,m3as,m0af,m3af) ; IF (err /= 0) call abort_program(err)
     187            ! Initialize YAMMS cloud moments column
     188            if (callmuclouds) then
     189                err = mm_clouds_init(m0ccn,m3ccn,m3ices,mugases) ; IF (err /= 0) call abort_program(err)
     190            endif ! end of callmuclouds
    154191           
    155192            ! Initializes tendencies
    156193            dm0as(:) = 0._mm_wp ; dm3as(:) = 0._mm_wp ; dm0af(:) = 0._mm_wp ; dm3af(:) = 0._mm_wp
     194            dm0ccn(:) = 0._mm_wp ; dm3ccn(:) = 0._mm_wp ; dm3ices(:,:) = 0._mm_wp ; dmugases(:,:) = 0._mm_wp
    157195           
    158196        !----------------------------
     
    161199           
    162200            ! Call microphysics
    163             IF (.NOT.mm_muphys(m3as_prod,dm0as,dm3as,dm0af,dm3af)) THEN
    164                 call abort_program(error("mm_muphys aborted -> initialization not done !",-1))
    165             ENDIF
     201            if (callmuclouds) then
     202                if(.NOT.mm_muphys(m3as_prod,dm0as,dm3as,dm0af,dm3af,dm0ccn,dm3ccn,dm3ices,dmugases)) then
     203                    call abort_program(error("mm_muphys (clouds) aborted -> initialization not done !",-1))
     204                endif
     205            else
     206                if (.NOT.mm_muphys(m3as_prod,dm0as,dm3as,dm0af,dm3af)) then
     207                    call abort_program(error("mm_muphys (no cloud) aborted -> initialization not done !",-1))
     208                endif
     209            endif ! end of callmuclouds
    166210           
    167211            ! Save diagnostics
     
    169213                                mp2m_aer_s_w(ilon,:),mp2m_aer_f_w(ilon,:),       &
    170214                                mp2m_aer_s_flux(ilon,:),mp2m_aer_f_flux(ilon,:), &
    171                                 mp2m_rc_sph(ilon,:),mp2m_rc_fra(ilon,:))
     215                                mp2m_rc_sph(ilon,:),mp2m_rc_fra(ilon,:),         &
     216                                mp2m_ccn_prec(ilon),mp2m_ice_prec(ilon,:),       &
     217                                mp2m_cld_w(ilon,:),mp2m_ccn_flux(ilon,:),        &
     218                                mp2m_ice_fluxes(ilon,:,:),mp2m_rc_cld(ilon,:),   &
     219                                mp2m_gas_sat(ilon,:,:),mp2m_nrate(ilon,:,:),mp2m_grate(ilon,:,:))
    172220       
    173221            ! Convert tracers back to intensives
     
    176224            zdqmufi(ilon,:,micro_indx(3)) = dm0af(:) / int2ext(ilon,:)
    177225            zdqmufi(ilon,:,micro_indx(4)) = dm3af(:) / int2ext(ilon,:)
     226
     227            if (callmuclouds) then
     228                zdqmufi(ilon,:,micro_indx(5)) = dm0ccn(:) / int2ext(ilon,:)
     229                zdqmufi(ilon,:,micro_indx(6)) = dm3ccn(:) / int2ext(ilon,:)
     230                do i = 1, nmicro_ices
     231                    zdqmufi(ilon,:,micro_ice_indx(i)) = dm3ices(:,i) / int2ext(ilon,:)
     232                    zdqmufi(ilon,:,micro_gas_indx(i)) = dmugases(:,i) * (mmol(micro_gas_indx(i))/mugaz)
     233                enddo
     234            endif ! End of callmuclouds
    178235           
    179236        END DO ! End loop on ilon
  • trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90

    r3955 r3957  
    15931593         !--------------------------------------------------
    15941594         pdqmuchem(:,:,:) = 0.
    1595          IF (callmufi.and.callmuclouds) THEN
     1595         IF (callmufi) THEN
    15961596            call mugas_prof(ngrid,nlayer,nq,zzlay,zzlev,pplay,pt,pdqmuchem)
    15971597         ENDIF
     
    16211621            pdq(:,:,:) = pdq(:,:,:) + pdqmufi(:,:,:)
    16221622
    1623             ! Increment Haze surface tracer tendency (aerosol precipitation)
    1624             ! Sphericals
     1623            ! Increment surface tracer tendencies through precipitation
     1624            ! Spherical aerosols
    16251625            dqsurf(:,micro_indx(2)) = dqsurf(:,micro_indx(2)) + mp2m_aer_s_prec(:)
    1626             ! Fractals
     1626            ! Fractal aerosols
    16271627            dqsurf(:,micro_indx(4)) = dqsurf(:,micro_indx(4)) + mp2m_aer_f_prec(:)
     1628            IF (callmuclouds) THEN
     1629               ! Cloud condensation nuclei
     1630               dqsurf(:,micro_indx(6)) = dqsurf(:,micro_indx(6)) + mp2m_ccn_prec(:)
     1631               ! Ices
     1632               do iq = 1, size(micro_ice_indx)
     1633                  dqsurf(:,micro_ice_indx(iq)) = dqsurf(:,micro_ice_indx(iq)) + mp2m_ice_prec(:,iq)
     1634               enddo
     1635            ENDIF ! end of callmuclouds
    16281636
    16291637         ELSE
Note: See TracChangeset for help on using the changeset viewer.