Changeset 3957 for trunk/LMDZ.PLUTO/libf/phypluto
- Timestamp:
- Nov 12, 2025, 2:00:58 PM (4 months ago)
- Location:
- trunk/LMDZ.PLUTO/libf/phypluto
- Files:
-
- 2 edited
-
mp2m_calmufi.F90 (modified) (13 diffs)
-
physiq_mod.F90 (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/mp2m_calmufi.F90
r3683 r3957 1 1 MODULE mp2m_calmufi 2 2 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 4 6 5 7 ! Microphysical model MP2M … … 14 16 ! Purpose 15 17 ! ------- 16 ! Interface subroutine to YAMMS model for LMD PCM.18 ! Interface subroutine to YAMMS model for LMD's PCM. 17 19 ! 18 20 ! The subroutine computes the microphysics processes for a single vertical column. … … 29 31 ! 30 32 ! @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. 32 37 ! 33 38 ! Authors … … 62 67 REAL(kind=8), DIMENSION(:,:,:), ALLOCATABLE :: zq ! Local tracers updated from former processes (X.kg-1). 63 68 69 ! Related to aerosols: 64 70 REAL(kind=8), DIMENSION(:), ALLOCATABLE :: m0as ! 0th order moment of the spherical mode (m-2). 65 71 REAL(kind=8), DIMENSION(:), ALLOCATABLE :: m3as ! 3rd order moment of the spherical mode (m3.m-2). … … 73 79 REAL(kind=8), DIMENSION(:), ALLOCATABLE :: dm0af ! Tendency of the 0th order moment of the fractal mode distribution (m-2). 74 80 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). 75 92 76 93 ! Local variables: … … 80 97 TYPE(error) :: err 81 98 82 INTEGER :: i lon,iq99 INTEGER :: i,ilon,iq 83 100 INTEGER :: nq,nlon,nlay 84 101 CHARACTER(len=10) :: tname … … 98 115 ALLOCATE(m0af(nlay)) 99 116 ALLOCATE(m3af(nlay)) 100 101 117 ALLOCATE(m3as_prod(nlay)) 102 103 118 ALLOCATE(dm0as(nlay)) 104 119 ALLOCATE(dm3as(nlay)) … … 106 121 ALLOCATE(dm3af(nlay)) 107 122 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 108 132 ALLOCATE(int2ext(nlon,nlay)) 109 133 … … 129 153 m0af(:) = zq(ilon,:,micro_indx(3)) * int2ext(ilon,:) 130 154 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 131 164 132 165 ! Production of haze in the atmosphere by photolysis of CH4 … … 150 183 ! Initialize YAMMS atmospheric column 151 184 err = mm_column_init(tmp,zlev(ilon,:),play(ilon,:),zlay(ilon,:),temp(ilon,:)) ; IF (err /= 0) call abort_program(err) 152 ! Initialize YAMMS aerosol smoments column185 ! Initialize YAMMS aerosol moments column 153 186 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 154 191 155 192 ! Initializes tendencies 156 193 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 157 195 158 196 !---------------------------- … … 161 199 162 200 ! 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 166 210 167 211 ! Save diagnostics … … 169 213 mp2m_aer_s_w(ilon,:),mp2m_aer_f_w(ilon,:), & 170 214 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,:,:)) 172 220 173 221 ! Convert tracers back to intensives … … 176 224 zdqmufi(ilon,:,micro_indx(3)) = dm0af(:) / int2ext(ilon,:) 177 225 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 178 235 179 236 END DO ! End loop on ilon -
trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
r3955 r3957 1593 1593 !-------------------------------------------------- 1594 1594 pdqmuchem(:,:,:) = 0. 1595 IF (callmufi .and.callmuclouds) THEN1595 IF (callmufi) THEN 1596 1596 call mugas_prof(ngrid,nlayer,nq,zzlay,zzlev,pplay,pt,pdqmuchem) 1597 1597 ENDIF … … 1621 1621 pdq(:,:,:) = pdq(:,:,:) + pdqmufi(:,:,:) 1622 1622 1623 ! Increment Haze surface tracer tendency (aerosol precipitation)1624 ! Spherical s1623 ! Increment surface tracer tendencies through precipitation 1624 ! Spherical aerosols 1625 1625 dqsurf(:,micro_indx(2)) = dqsurf(:,micro_indx(2)) + mp2m_aer_s_prec(:) 1626 ! Fractal s1626 ! Fractal aerosols 1627 1627 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 1628 1636 1629 1637 ELSE
Note: See TracChangeset
for help on using the changeset viewer.
