@@ -2341,10 +2341,12 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dT, pbuf, fh2o )
23412341 P = map2MAM4(SM,M) ! Constituent index for GEOS-Chem
23422342 IF ( P > 0 ) K = map2GC(P) ! Index in State_Chm
23432343
2344- ! do not zero out sulfate aerosol here since aerosol distribution for sulfate
2345- ! will be prescribed (hplin, 5/9/23)
2346- call rad_cnst_get_info(0 ,M,SM,spec_name= aerName)
2347- IF ( to_upper(aerName(:3 )) == " SO4" ) CYCLE
2344+ if (usePrescribedAerDistribution) then
2345+ ! do not zero out sulfate aerosol here since aerosol distribution for sulfate
2346+ ! will be prescribed (hplin, 5/9/23)
2347+ call rad_cnst_get_info(0 ,M,SM,spec_name= aerName)
2348+ IF ( to_upper(aerName(:3 )) == " SO4" ) CYCLE
2349+ end if
23482350
23492351 IF ( K > 0 ) State_Chm(LCHNK)% Species(K)% Conc(1 ,:nY,:nZ) = 0.0e+00_fp
23502352 ENDDO
@@ -2361,10 +2363,12 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dT, pbuf, fh2o )
23612363 ! species (with cnst index P, which corresponds to index K in
23622364 ! State_Chm)
23632365
2364- ! do not zero out sulfate aerosol here since aerosol distribution for sulfate
2365- ! will be prescribed (hplin, 5/9/23)
2366- call rad_cnst_get_info(0 ,M,SM,spec_name= aerName)
2367- IF ( to_upper(aerName(:3 )) == " SO4" ) CYCLE
2366+ if (usePrescribedAerDistribution) then
2367+ ! do not zero out sulfate aerosol here since aerosol distribution for sulfate
2368+ ! will be prescribed (hplin, 5/9/23)
2369+ call rad_cnst_get_info(0 ,M,SM,spec_name= aerName)
2370+ IF ( to_upper(aerName(:3 )) == " SO4" ) CYCLE
2371+ end if
23682372
23692373 ! Multiple MAM4 bins are mapped to same GEOS-Chem species
23702374 State_Chm(LCHNK)% Species(K)% Conc(1 ,:nY,:nZ) = State_Chm(LCHNK)% Species(K)% Conc(1 ,:nY,:nZ) &
@@ -2573,9 +2577,9 @@ subroutine chem_timestep_tend( state, ptend, cam_in, cam_out, dT, pbuf, fh2o )
25732577 + REAL (state% q(:nY,nZ:1 :- 1 ,N),fp) * &
25742578 adv_mass(l_SO4) / adv_mass(mapCnst(N))
25752579 ! SO4_gasRatio is in mol/mol
2576- SO4_gasRatio(:nY,:nZ) = state% q(:nY,:nZ,N) &
2577- * adv_mass(l_SO4) / adv_mass(mapCnst(N)) &
2578- / State_Chm(LCHNK)% Species(K)% Conc(1 ,:nY,nZ:1 :- 1 )
2580+ SO4_gasRatio(:nY,:nZ) = state% q(:nY,:nZ,N) & ! kg(H2SO4) kg-1 air
2581+ * adv_mass(l_SO4) / adv_mass(mapCnst(N)) & ! g(SO4) mol(SO4)-1 / g(H2SO4) mol(H2SO4)-1
2582+ / State_Chm(LCHNK)% Species(K)% Conc(1 ,:nY,nZ:1 :- 1 ) ! kg(SO4) kg-1 air
25792583 MMR_Beg(:nY,:nZ,K) = State_Chm(LCHNK)% Species(K)% Conc(1 ,:nY,:nZ)
25802584 ENDIF
25812585#endif
0 commit comments