Changeset 3957 for trunk/LMDZ.PLUTO/libf
- Timestamp:
- Nov 12, 2025, 2:00:58 PM (4 weeks ago)
- Location:
- trunk/LMDZ.PLUTO/libf
- Files:
-
- 2 added
- 4 edited
-
muphypluto/mp2m_clouds.F90 (added)
-
muphypluto/mp2m_clouds_methods.F90 (added)
-
muphypluto/mp2m_globals.F90 (modified) (3 diffs)
-
muphypluto/mp2m_microphysics.F90 (modified) (7 diffs)
-
phypluto/mp2m_calmufi.F90 (modified) (13 diffs)
-
phypluto/physiq_mod.F90 (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/muphypluto/mp2m_globals.F90
r3952 r3957 292 292 REAL(kind=mm_wp), PUBLIC, SAVE, DIMENSION(5) :: mm_bt3 = (/1._mm_wp,1._mm_wp,1._mm_wp,1._mm_wp,1._mm_wp/) 293 293 294 ! Chemical specie properties (Cloud model)295 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 294 ! Chemical species properties (Cloud model) 295 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 296 296 TYPE, PUBLIC :: mm_esp 297 !! Cloud related chemical specie properties.297 !! Cloud related chemical species properties. 298 298 !! This derived type is used in thermodynamic methods related to cloud microphysics. 299 299 !! … … 1069 1069 1070 1070 IF (.NOT.mm_call_clouds) THEN 1071 IF (mm_debug) WRITE(*,'(a)') "[MM_DEBUG - mm_clouds_init] :Cloud microphysic is not enabled..."1071 IF (mm_debug) WRITE(*,'(a)') "[MM_DEBUG - mm_clouds_init] Cloud microphysic is not enabled..." 1072 1072 RETURN 1073 1073 ENDIF … … 1320 1320 !! 1321 1321 TYPE(cfgparser), INTENT(in) :: parser ! Configuration parser. 1322 CHARACTER(len=*), INTENT(in) :: sec ! Name of the specie .1322 CHARACTER(len=*), INTENT(in) :: sec ! Name of the species. 1323 1323 TYPE(mm_esp), INTENT(out) :: pp ! [[mm_esp(type)]] object that stores the parameters. 1324 1324 -
trunk/LMDZ.PLUTO/libf/muphypluto/mp2m_microphysics.F90
r3951 r3957 8 8 ! 9 9 ! The module contains two methods: 10 ! - mm_muphys (m3as_prod,dm0a_s,dm3a_s,dm0a_f,dm3a_f)11 ! - mm_diagnostics (dt,aer_prec,aer_s_w,aer_f_w,aer_s_flux,aer_f_flux,rc_sph,rc_fra)10 ! - mm_muphys 11 ! - mm_diagnostics 12 12 ! 13 13 ! Authors … … 20 20 USE MP2M_GLOBALS 21 21 USE MP2M_HAZE 22 USE MP2M_CLOUDS 22 23 USE MP2M_METHODS 23 24 IMPLICIT NONE 24 25 25 26 PUBLIC :: mm_muphys, mm_diagnostics 27 28 !! Interface to main microphysics subroutine: 29 !! Computes either all the microphysics processes [[muphys_all]] 30 !! or only aerosols microphysics [[muphys_nocld]] in a single call. 31 INTERFACE mm_muphys 32 MODULE PROCEDURE muphys_all,muphys_nocld 33 END INTERFACE mm_muphys 26 34 27 35 CONTAINS 28 36 29 FUNCTION m m_muphys(m3as_prod,dm0a_s,dm3a_s,dm0a_f,dm3a_f) RESULT(ret)37 FUNCTION muphys_all(m3as_prod,dm0as,dm3as,dm0af,dm3af,dm0ccn,dm3ccn,dm3ices,dmugases) RESULT(ret) 30 38 !! Compute the evolution of moments tracers through haze microphysics processes. 31 39 !! … … 44 52 REAL(kind=mm_wp), INTENT(in), DIMENSION(:) :: m3as_prod 45 53 ! Tendency of the 0th order moment of the spherical mode distribution (m-2). 46 REAL(kind=mm_wp), INTENT( out), DIMENSION(:) :: dm0a_s54 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:) :: dm0as 47 55 ! Tendency of the 3rd order moment of the spherical mode distribution (m3.m-2). 48 REAL(kind=mm_wp), INTENT( out), DIMENSION(:) :: dm3a_s56 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:) :: dm3as 49 57 ! Tendency of the 0th order moment of the fractal mode distribution (m-2). 50 REAL(kind=mm_wp), INTENT( out), DIMENSION(:) :: dm0a_f58 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:) :: dm0af 51 59 ! Tendency of the 3rd order moment of the fractal mode distribution (m3.m-2). 52 REAL(kind=mm_wp), INTENT(out), DIMENSION(:) :: dm3a_f 60 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:) :: dm3af 61 ! Tendency of the 0th order moment of the CCN distribution (m-2). 62 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:) :: dm0ccn 63 ! Tendency of the 3rd order moment of the CCN distribution (m3.m-2). 64 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:) :: dm3ccn 65 ! Tendency of the 3rd order moment of each ice components (m3.m-2). 66 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:,:) :: dm3ices 67 ! Tendencies of each condensible gaz species (mol.mol-1). 68 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:,:) :: dmugases 69 70 ! .true. on succes (i.e. model has been initialized at least once previously), .false. otherwise. 71 LOGICAL :: ret 72 73 ! Local variables. 74 INTEGER :: i 75 ! Production of the spherical aerosols (m3.m-3). 76 REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: m3a_s_prod 77 ! Tendencies related to haze model (X/m3). 78 REAL(kind=mm_wp), DIMENSION(SIZE(dm0as)) :: Hdm0as,Hdm3as,Hdm0af,Hdm3af 79 ! Tendencies related to cloud model (X/m3). 80 REAL(kind=mm_wp), DIMENSION(SIZE(dm0as)) :: Cdm0as,Cdm3as,Cdm0af,Cdm3af 81 82 ALLOCATE(m3a_s_prod(mm_nla)) 83 84 ! Sanity check for initialization 85 ret = (mm_ini_col.AND.mm_ini_aer) 86 if (.NOT.ret) then 87 return 88 endif 89 if (mm_call_clouds.AND.mm_debug) then 90 write(*,'(a)') "[MM_DEBUG - muphys_nocld] Clouds microphysics enabled but will not be computed... (wrong interface)" 91 endif 92 93 ! Reverse vectors so they go from top to ground 94 ! @note: mm_dzlev is already from top to ground 95 m3a_s_prod = m3as_prod(mm_nla:1:-1) / mm_dzlev(:) 96 97 ! Calls haze microphysics (/!\ tendencies in X/m-3) 98 call mm_haze_microphysics(m3a_s_prod,Hdm0as,Hdm3as,Hdm0af,Hdm3af) 99 100 ! Calls cloud microphysics (/!\ tendencies in X/m-3) 101 if (mm_call_clouds) then 102 call mm_cloud_microphysics(Hdm0as,Hdm3as,Hdm0af,Hdm3af,& 103 Cdm0as,Cdm3as,Cdm0af,Cdm3af,& 104 dm0ccn,dm3ccn,dm3ices,dmugases) 105 106 ! Multiply by altitude thickness and reverse vectors so they go from ground to top (--> m-2) 107 dm0ccn = dm0ccn(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 108 dm3ccn = dm3ccn(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 109 do i = 1, mm_nesp 110 dm3ices(:,i) = dm3ices(mm_nla:1:-1,i) * mm_dzlev(mm_nla:1:-1) 111 dmugases(:,i) = dmugases(mm_nla:1:-1,i) 112 enddo 113 114 else 115 Cdm0as(:) = 0._mm_wp ; Cdm3as(:) = 0._mm_wp ; Cdm0af(:) = 0._mm_wp ; Cdm3af(:) = 0._mm_wp 116 dm0ccn(:) = 0._mm_wp ; dm3ccn(:) = 0._mm_wp ; dm3ices(:,:) = 0._mm_wp ; dmugases(:,:) = 0._mm_wp 117 endif ! end of mm_call_clouds 118 119 ! Multiply by altitude thickness and reverse vectors so they go from ground to top (--> m-2) 120 dm0as = (Hdm0as(mm_nla:1:-1) + Cdm0as(mm_nla:1:-1)) * mm_dzlev(mm_nla:1:-1) 121 dm3as = (Hdm3as(mm_nla:1:-1) + Cdm3as(mm_nla:1:-1)) * mm_dzlev(mm_nla:1:-1) 122 dm0af = (Hdm0af(mm_nla:1:-1) + Cdm0af(mm_nla:1:-1)) * mm_dzlev(mm_nla:1:-1) 123 dm3af = (Hdm3af(mm_nla:1:-1) + Cdm3af(mm_nla:1:-1)) * mm_dzlev(mm_nla:1:-1) 124 125 RETURN 126 END FUNCTION muphys_all 127 128 129 FUNCTION muphys_nocld(m3as_prod,dm0as,dm3as,dm0af,dm3af) RESULT(ret) 130 !! Compute the evolution of moments tracers through haze microphysics processes. 131 !! 132 !! This method computes the evolution of all the microphysics tracers, given under the form 133 !! of moments during a time step. 134 !! 135 !! The method requires that global variables of the model (i.e. variables declared in mm_globals 136 !! module) are initialized/updated correctly (see mm_global_init, mm_column_init, and mm_aerosols_init). 137 !! 138 !! The tendencies returned by the method are defined on the vertical __layers__ of the model from the __GROUND__ to 139 !! the __TOP__ of the atmosphere. They should be added to the input variables used in the initialization methods 140 !! before the latter are called to initialize a new step. 141 !! 142 143 ! Production of the 3rd order moment of the spherical mode distribution (m3.m-2). 144 REAL(kind=mm_wp), INTENT(in), DIMENSION(:) :: m3as_prod 145 ! Tendency of the 0th order moment of the spherical mode distribution (m-2). 146 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:) :: dm0as 147 ! Tendency of the 3rd order moment of the spherical mode distribution (m3.m-2). 148 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:) :: dm3as 149 ! Tendency of the 0th order moment of the fractal mode distribution (m-2). 150 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:) :: dm0af 151 ! Tendency of the 3rd order moment of the fractal mode distribution (m3.m-2). 152 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:) :: dm3af 53 153 54 154 ! .true. on succes (i.e. model has been initialized at least once previously), .false. otherwise. … … 60 160 ALLOCATE(m3a_s_prod(mm_nla)) 61 161 162 ! Sanity check for initialization 62 163 ret = (mm_ini_col.AND.mm_ini_aer) 63 64 IF (.NOT.ret) RETURN 164 if (.NOT.ret) then 165 return 166 endif 167 if (mm_call_clouds.AND.mm_debug) then 168 write(*,'(a)') "[MM_DEBUG - muphys_nocld] Clouds microphysics enabled but will not be computed... (wrong interface)" 169 endif 65 170 66 171 ! Reverse vectors so they go from top to ground … … 69 174 70 175 ! Calls haze microphysics 71 call mm_haze_microphysics(m3a_s_prod,dm0a _s,dm3a_s,dm0a_f,dm3a_f)72 73 ! Reverse vectors so they go from ground to top74 dm0a _s = dm0a_s(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)75 dm3a _s = dm3a_s(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)76 dm0a _f = dm0a_f(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)77 dm3a _f = dm3a_f(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)176 call mm_haze_microphysics(m3a_s_prod,dm0as,dm3as,dm0af,dm3af) 177 178 ! Multiply by altitude thickness and reverse vectors so they go from ground to top (--> m-2) 179 dm0as = dm0as(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 180 dm3as = dm3as(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 181 dm0af = dm0af(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 182 dm3af = dm3af(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 78 183 79 184 RETURN 80 END FUNCTION mm_muphys 81 82 83 SUBROUTINE mm_diagnostics(dt,aer_s_prec,aer_f_prec,aer_s_w,aer_f_w,aer_s_flux,aer_f_flux,rc_sph,rc_fra) 185 END FUNCTION muphys_nocld 186 187 188 SUBROUTINE mm_diagnostics(dt,aer_s_prec,aer_f_prec,aer_s_w,aer_f_w,aer_s_flux,aer_f_flux,rc_sph,rc_fra,& 189 ccn_prec,ice_prec,cld_w,ccn_flux,ice_fluxes,rcld,gas_sat,n_rate,g_rate) 84 190 !! Get various diagnostic fields of the microphysics. 85 191 !! … … 91 197 !! Precipitation are always positive and defined in kg.m-2.s-1. 92 198 !! 93 94 199 ! Physics timestep (s). 95 200 REAL(kind=8), INTENT(IN) :: dt 96 201 202 ! Haze related: 203 !~~~~~~~~~~~~~~ 97 204 ! Aerosol precipitation (kg.m-2.s-1). 98 REAL(kind=mm_wp), INTENT(out), OPTIONAL :: aer_s_prec 99 REAL(kind=mm_wp), INTENT(out), OPTIONAL :: aer_f_prec 100 205 REAL(kind=mm_wp), INTENT(inout), OPTIONAL :: aer_s_prec 206 REAL(kind=mm_wp), INTENT(inout), OPTIONAL :: aer_f_prec 101 207 ! Aerosol settling velocity (m.s-1). 102 REAL(kind=mm_wp), INTENT(out), DIMENSION(:), OPTIONAL :: aer_s_w 103 REAL(kind=mm_wp), INTENT(out), DIMENSION(:), OPTIONAL :: aer_f_w 104 208 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:), OPTIONAL :: aer_s_w 209 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:), OPTIONAL :: aer_f_w 105 210 ! Aerosol mass flux (kg.m-2.s-1). 106 REAL(kind=mm_wp), INTENT(out), DIMENSION(:), OPTIONAL :: aer_s_flux 107 REAL(kind=mm_wp), INTENT(out), DIMENSION(:), OPTIONAL :: aer_f_flux 108 211 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:), OPTIONAL :: aer_s_flux 212 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:), OPTIONAL :: aer_f_flux 109 213 ! Aerosol characteristic radius (m). 110 REAL(kind=mm_wp), INTENT(out), DIMENSION(:), OPTIONAL :: rc_sph 111 REAL(kind=mm_wp), INTENT(out), DIMENSION(:), OPTIONAL :: rc_fra 112 214 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:), OPTIONAL :: rc_sph 215 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:), OPTIONAL :: rc_fra 216 217 ! Clouds related: 218 !~~~~~~~~~~~~~~~~ 219 ! Cloud condensation nuclei precipitation (kg.m-2.s-1). 220 REAL(kind=mm_wp), INTENT(inout), OPTIONAL :: ccn_prec 221 ! Ice precipitation (kg.m-2.s-1). 222 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:), OPTIONAL :: ice_prec 223 ! Cloud drop (CCN + ices) settling velocity (m.s-1). 224 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:), OPTIONAL :: cld_w 225 ! Cloud condensation nuclei mass flux (kg.m-2.s-1). 226 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:), OPTIONAL :: ccn_flux 227 ! Ice mass fluxes (kg.m-2.s-1). 228 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:,:), OPTIONAL :: ice_fluxes 229 ! Cloud drop (CCN + ices) radius (m). 230 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:), OPTIONAL :: rcld 231 ! Cloud related diagnostics. 232 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:,:), OPTIONAL :: gas_sat ! Condensible gaz saturation ratios. 233 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:,:), OPTIONAL :: n_rate ! Condensible gaz nucleation rates (m-2.s-1). 234 REAL(kind=mm_wp), INTENT(inout), DIMENSION(:,:), OPTIONAL :: g_rate ! Ice growth rates (m2.s-1). 235 236 ! Haze related: 237 !~~~~~~~~~~~~~~ 113 238 IF (PRESENT(aer_s_prec)) aer_s_prec = ABS(mm_aers_prec) / dt 114 239 IF (PRESENT(aer_f_prec)) aer_f_prec = ABS(mm_aerf_prec) / dt … … 124 249 IF (PRESENT(rc_sph)) rc_sph = 0._mm_wp 125 250 IF (PRESENT(rc_fra)) rc_fra = 0._mm_wp 126 ENDIF 251 ENDIF 252 253 ! Clouds related: 254 !~~~~~~~~~~~~~~~~ 255 IF (mm_call_clouds) THEN 256 IF (PRESENT(ccn_prec)) ccn_prec = ABS(mm_ccn_prec) / dt 257 IF (PRESENT(ice_prec)) ice_prec = ABS(mm_ice_prec) / dt 258 IF (PRESENT(cld_w)) cld_w = mm_cld_vsed(mm_nla:1:-1) 259 IF (PRESENT(ccn_flux)) ccn_flux = mm_ccn_flux(mm_nla:1:-1) 260 IF (PRESENT(ice_fluxes)) ice_fluxes = mm_ice_fluxes(mm_nla:1:-1,:) 261 IF (PRESENT(rcld)) rcld = mm_drad(mm_nla:1:-1) 262 IF (PRESENT(gas_sat)) gas_sat = mm_gas_sat(mm_nla:1:-1,:) 263 IF (PRESENT(n_rate)) n_rate = mm_nrate(mm_nla:1:-1,:) 264 IF (PRESENT(g_rate)) g_rate = mm_grate(mm_nla:1:-1,:) 265 ELSE 266 IF (PRESENT(ccn_prec)) ccn_prec = 0._mm_wp 267 IF (PRESENT(ice_prec)) ice_prec = 0._mm_wp 268 IF (PRESENT(cld_w)) cld_w = 0._mm_wp 269 IF (PRESENT(ccn_flux)) ccn_flux = 0._mm_wp 270 IF (PRESENT(ice_fluxes)) ice_fluxes = 0._mm_wp 271 IF (PRESENT(rcld)) rcld = 0._mm_wp 272 IF (PRESENT(gas_sat)) gas_sat = 0._mm_wp 273 IF (PRESENT(n_rate)) n_rate = 0._mm_wp 274 IF (PRESENT(g_rate)) g_rate = 0._mm_wp 275 ENDIF ! end of mm_call_clouds 276 127 277 END SUBROUTINE mm_diagnostics 128 278 -
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.
