Skip to content

Commit a61da18

Browse files
authored
Merge pull request #1481 from jimmielin/hplin/fix_gc_so4_presc
cam6_4_151: GEOS-Chem within CESM: fix MAM4 mapping for SO4 in default configuration
2 parents ec4517a + 83a2529 commit a61da18

File tree

2 files changed

+71
-11
lines changed

2 files changed

+71
-11
lines changed

doc/ChangeLog

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1+
===============================================================
2+
3+
Tag name: cam6_4_151
4+
Originator(s): Haipeng Lin
5+
Date: Feb 12, 2026
6+
One-line Summary: GEOS-Chem within CESM: fix MAM4 mapping for SO4 in default configuration
7+
Github PR URL: https://github.com/ESCOMP/CAM/pull/1481
8+
9+
Purpose of changes (include the issue number and title text for each relevant GitHub issue):
10+
- Fixes #1480 - incorrect sulfate mapping from MAM4 to GEOS-Chem chemistry
11+
12+
Describe any changes made to build system: N/A
13+
14+
Describe any changes made to the namelist: N/A
15+
16+
List any changes to the defaults for the boundary datasets: N/A
17+
18+
Describe any substantial timing or memory changes: N/A
19+
20+
Code reviewed by: lizziel, cacraig
21+
22+
List all files eliminated: N/A
23+
24+
List all files added and what they do: N/A
25+
26+
List all existing files that have been modified, and describe the changes:
27+
M src/chemistry/geoschem/chemistry.F90
28+
- fixes #1480 (incorrect sulfate mapping from MAM4 to GEOS-Chem chemistry)
29+
30+
If there were any failures reported from running test_driver.sh on any test
31+
platform, and checkin with these failures has been OK'd by the gatekeeper,
32+
then copy the lines from the td.*.status files for the failed tests to the
33+
appropriate machine below. All failed tests must be justified.
34+
35+
derecho/intel/aux_cam:
36+
ERI_D_Ln18.ne16pg3_ne16pg3_mt232.FHIST_C4.derecho_intel.cam-outfrq3s_eri (Overall: FAIL) details:
37+
- pre-existing failure
38+
- ERI test discovered a bug in CICE: See: https://github.com/ESCOMP/CESM_CICE/issues/34
39+
40+
SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d (Overall: DIFF) details:
41+
- expected baseline change due to change in GEOS-Chem chemistry interface for bug-fix.
42+
43+
derecho/nvhpc/aux_cam: All PASS
44+
45+
izumi/nag/aux_cam: All PASS
46+
47+
izumi/gnu/aux_cam: All PASS
48+
49+
CAM tag used for the baseline comparison tests if different than previous
50+
tag:
51+
52+
Summarize any changes to answers:
53+
Answer differences in GEOS-Chem compset only due to bug fix.
54+
55+
If bitwise differences were observed, how did you show they were no worse
56+
than roundoff?
157

258
===============================================================
359

src/chemistry/geoschem/chemistry.F90

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)