Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

CESM2.1.5-CAM6: Changes in mo_usrrxt.F90 in SourceMod are not working for turning OFF ozone->sulfate reactions

srathod

Sagar Rathod
New Member
Hi all,
I am trying to run a simulation in CESM2.1.5-CAM6 with trop_mam4 chem and MERRA2 offline_dyn to see the impact of turning off H2O2->Sulfate and Ozone->Sulfate aqueous reactions. I am trying this by copying the mo_usrrxt.F90 (found in $MODELROOT/components/cam/src/chemistry/mozart) in my $CASEROOT's SourceMod/src.cam and then multiplying the reaction rates with zero (example below).
However, the model is not considering these changes and my model runs as if I did not make these changes.

Case: /glade/u/home/srathod/cases/F2000_42months_CESM2.1.5_nudging_2000USA_2000ROW_OZONEOFF_H2O2OFF

Example change (in red):
!-----------------------------------------------------------------------
! ... SO2 + O3 --> S(VI)
!-----------------------------------------------------------------------
if (aq_so2_o3_ndx >0) then
rxt(:,k,aq_so2_o3_ndx) = [B][COLOR=rgb(226, 80, 65)]0.00_r8 [/COLOR][/B]* lwc(:) * 1.0e-03_r8 * avo * &
HENRY298_SO2 * exp((H298_SO2 / R_CAL) * &
((1.0e+00_r8 / 298.0e+00_r8) - tinv(:))) * &
(K0_AQ * exp(ER0_AQ * &
((1.0e+00_r8 / 298.0e+00_r8) - tinv(:))) + &
K298_SO2_HSO3 * exp((H298_SO2_HSO3 / R_CAL) * &
((1.0e+00_r8 / 298.0e+00_r8) - tinv(:))) * &
(K1_AQ * exp(ER1_AQ * &
((1.0e+00_r8 / 298.0e+00_r8) - tinv(:))) / &
10.0e+00_r8**(-pH) + K2_AQ * exp(ER2_AQ * &
((1.0e+00_r8 / 298.0e+00_r8) - tinv(:))) * &
K298_HSO3_SO3 * exp((H298_HSO3_SO3 / R_CAL) * &
((1.0e+00_r8 / 298.0e+00_r8) - tinv(:))) / &
(10.0e+00_r8**(-pH))**2.0e+00_r8) ) * &
HENRY298_O3 * exp((H298_O3 / R_CAL) * &
((1.0e+00_r8 / 298.0e+00_r8) - tinv(:))) * &
(R_CONC * temp(:ncol,k))**2.0e+00_r8
endif
endif

Thanks so much!
Sagar
 

sacks

Bill Sacks
CSEG and Liaisons
Staff member
Let's start by determining whether (1) the build isn't picking up your SourceMods at all, or (2) the build is picking up your SourceMods, but the modifications you made don't have any impact in the case you're running. To confirm that (1) isn't the issue, can you try introducing some compilation error in your SourceMods file (e.g., an obvious typo on some line) and then rerunning case.build? You should see a build error. Then try changing it back and redoing case.build and case.submit. If you still aren't seeing a difference, then that points to (2); in that case, we should move this to the CAM-chemistry forum where people with more expertise in this code could see it.
 
Vote Upvote 0 Downvote

srathod

Sagar Rathod
New Member
Thank you for the idea! It indeed does seem to read the SourceMods. It didn't build when I added a random line and built when I removed it.

I would also like to know a cleaner way to turn H2O2->Sulfate and O3->Sulfate reactions OFF than what I have been trying (below). The idea is to estimate how much aqueous production occurs via these two pathways, with the ultimate goal of modifying these rates to match observations in certain areas. We are also interested in knowing how much conversion of aqueous-formed sulfate to interstitial sulfate happens via evaporation and are trying to diagnose that by turning off the aqueous pathway altogether. Thank you!

if ( aq_so2_h2o2_ndx > 0 .or. aq_so2_o3_ndx > 0 ) then
lwc(:) = cwat(:ncol,k) * invariants(:ncol,k,inv_m_ndx) * mbar(:ncol,k) /avo !PJC convert kg/kg to g/cm3
!-----------------------------------------------------------------------
! ... SO2 + H2O2 --> S(VI)
!-----------------------------------------------------------------------
if ( aq_so2_h2o2_ndx > 0 ) then
rxt(:,k,aq_so2_h2o2_ndx) = 0.00_r8
endif
!-----------------------------------------------------------------------
! ... SO2 + O3 --> S(VI)
!-----------------------------------------------------------------------
if (aq_so2_o3_ndx >0) then
rxt(:,k,aq_so2_o3_ndx) = 0.00_r8
endif
endif
 
Vote Upvote 0 Downvote
Top