Skip to content

Short-lived halogen chemistry#1470

Open
fvitt wants to merge 4 commits intoESCOMP:cam_developmentfrom
fvitt:short_lived_halogens
Open

Short-lived halogen chemistry#1470
fvitt wants to merge 4 commits intoESCOMP:cam_developmentfrom
fvitt:short_lived_halogens

Conversation

@fvitt
Copy link
Collaborator

@fvitt fvitt commented Jan 7, 2026

Closes #1469

fvitt added 2 commits January 6, 2026 16:06
	new file:   cime_config/testdefs/testmods_dirs/cam/ts_slh_mam4_outfrq9s/shell_commands
	new file:   cime_config/testdefs/testmods_dirs/cam/ts_slh_mam4_outfrq9s/user_nl_cam
	new file:   cime_config/testdefs/testmods_dirs/cam/ts_slh_mam4_outfrq9s/user_nl_clm
	new file:   cime_config/testdefs/testmods_dirs/cam/wa_slh_mam4_outfrq9s/shell_commands
	new file:   cime_config/testdefs/testmods_dirs/cam/wa_slh_mam4_outfrq9s/user_nl_cam
	new file:   cime_config/testdefs/testmods_dirs/cam/wa_slh_mam4_outfrq9s/user_nl_clm
@fvitt fvitt self-assigned this Jan 7, 2026
@fvitt fvitt marked this pull request as draft January 8, 2026 00:09
@fvitt
Copy link
Collaborator Author

fvitt commented Jan 9, 2026

From @RafaPedroFernandez (CC'd @CAlbertoCuevas):

Please note that I have just made a push for 2 F90 routines in my following GIT:
https://github.com/RafaPedroFernandez/CAM/tree/slh_chemistry_n04_cam6_4_097_rpf

Which is also updated local in derecho:
/glade/u/home/rpfernan/cesm_versions_rpf/derecho_cesm/git_fetch/cesm3_cam6dev_francis/slh_chemistry_n04_cam6_4_097_rpf

Routines are
chemistry.F90:
For SLH, we must call iodine_emissions_srf before the loop to outfld( sflxnam(m), cam_in%cflx(:ncol,m), ncol,lchnk ) in order for SFHOI and SFI2 to be properly written in the output file. If we do not so, the SFHOI and SFI2 are zero in the output file but are somehow included in cam_in%cflx array that is passed to other routines

mo_gas_phase_chmdr.F90
For Iodine washout ... we have always used SAD_ICETROP, which is computed based on CLDICE. This CLDICE was before computed as only ice
cldice(:ncol,k) = q(:ncol,k,cldice_ndx)
and now considers also SNOW
cldice(:ncol,k) = q(:ncol,k,cldice_ndx) + q(:ncol,k,snow_ndx)

Including snow in the variable makes the iodine deposition too efficient, and then we created a new array (ONLYICE) just to compute iodine wet-depositions without affecting other model developments.

	modified:   src/chemistry/mozart/chemistry.F90
	modified:   src/chemistry/mozart/mo_gas_phase_chemdr.F90
@fvitt fvitt marked this pull request as ready for review January 13, 2026 23:11
	modified:   src/chemistry/mozart/mo_usrrxt.F90
Copy link
Collaborator

@cacraigucar cacraigucar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review - @jimmielin will be reviewing the chemistry section of this PR. My review was on the setup side.

I noticed that there are testing use_cases setup, but I do not see any regression tests being added. Is this an oversight?

Comment on lines +2064 to +2065
<xs_short_file>atm/waccm/phot/xs_short_c221005mm_slh_c250930.nc</xs_short_file>
<xs_long_file >atm/waccm/phot/temp_prs_GT200nm_c221005mm_slh_c250930.nc</xs_long_file>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two file still need to be "rimport"ed

Comment on lines +6312 to +6340
<entry id="SSAhno3_ScalingFactor" type="real" category="cam_chem"
group="slh_nl" valid_values="" >
Scaling-factor for SLH Halocarbon surface emissions
Default: set by build-namelist
</entry>

<entry id="SSAn2o5_ScalingFactor" type="real" category="cam_chem"
group="slh_nl" valid_values="" >
Scaling-factor for SLH Halocarbon surface emissions
Default: set by build-namelist
</entry>

<entry id="LIQfraprx_ScalingFactor_I" type="real" category="cam_chem"
group="slh_nl" valid_values="" >
Scaling-factor for SLH Halocarbon surface emissions
Default: set by build-namelist
</entry>

<entry id="ICEfraprx_ScalingFactor_I" type="real" category="cam_chem"
group="slh_nl" valid_values="" >
Scaling-factor for SLH Halocarbon surface emissions
Default: set by build-namelist
</entry>

<entry id="ICEfraprx_ScalingFactor_Br" type="real" category="cam_chem"
group="slh_nl" valid_values="" >
Scaling-factor for SLH Halocarbon surface emissions
Default: set by build-namelist
</entry>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments probably need updating (since they are all the same)

<value compset="HIST_CAM60%CFIRE">1995-01-01</value>
<value compset="RCP[2468]_CAM\d+">2005-01-01</value>
<value compset="_CAM.*%NUDG" >2010-01-01</value>
<value compset="_CAM.*%NUDG" >2000-01-01</value>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this PR changing the date for nudging runs?

Copy link
Member

@jimmielin jimmielin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fvitt, I have a few suggested changes but nothing major.

Comment on lines +229 to +231
wrk(:,:) = cloy( mmr, pcols, ncol )

factor(:ncol,:) = mmr(:ncol,:,id_cly) / wrk(:ncol,:)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a safeguard against divide by zero here if wrk(:ncol,:) are close to zero (when cloy initial conditions are very low?)

Comment on lines +102 to +104
! call mpibcast (SLHemiss_ScalingFactor, 1, mpir8, 0, mpicom)
! call mpibcast (ICEfraprx_ScalingFactor, 1, mpir8, 0, mpicom)
! call mpibcast (LIQfraprx_ScalingFactor, 1, mpir8, 0, mpicom)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these also need to be broadcast?

Comment on lines +216 to +221
!rpf_CESM2_SLH
!rpf and cac: This threshold is required to aviod huge iodine emissions for low wind peed
where ( ws_mask(:ncol) < 3._r8 )
ws_mask(:ncol) = 3._r8
endwhere
!rpf_CESM2_SLH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe clean up this comment a bit and fix typos:

Suggested change
!rpf_CESM2_SLH
!rpf and cac: This threshold is required to aviod huge iodine emissions for low wind peed
where ( ws_mask(:ncol) < 3._r8 )
ws_mask(:ncol) = 3._r8
endwhere
!rpf_CESM2_SLH
!rpf and cac: This threshold is required to avoid huge iodine emissions for low wind speeds
where ( ws_mask(:ncol) < 3._r8 )
ws_mask(:ncol) = 3._r8
endwhere

Comment on lines +268 to +274
!!! Be CAREFULL that if SST = 0 then the division is not possible. Should it be forced to zero?
if (ocnfrac(i) == 0) then ! Actually it should be landfrac = 1 ... but we do not want to bring landfrac as an additional agrument
iodide_aq(i) = 0
else
! iodide_aq(i) = 1.46e6_r8 * exp( -9134._r8 / sst(i) ) * ocnfrac(i)
iodide_aq(i) = 1.46e6_r8 * exp( -9134._r8 / sst(i) )
end if
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since SST is in Kelvin it shouldn't get close to zero but I would check if it is intended that iodine_aq is computed when sst is below freezing? This may be a science question

Comment on lines +246 to +248
!rpf_CESM2_SLH
implicit none
!rpf_CESM2_SLH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed since module is declared implicit none

Comment on lines +171 to +173
!rpf_CESM2_SLH
! I do not include the new rid_# into ids(:) so has_strato_chem condition is not afected
!rpf_CESM2_SLH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The meaning of "new rid_#" will become unclear after the code is merged in, I would suggest something like

Suggested change
!rpf_CESM2_SLH
! I do not include the new rid_# into ids(:) so has_strato_chem condition is not afected
!rpf_CESM2_SLH
! Short-lived halogen chemistry rid_# (rid_het5_hbr to rid_nat_str_i_4) are not included into ids(:)
! so has_strato_chem condition is not affected.

Comment on lines +914 to +918
if ( rid_slf_str_i_2 > 0 ) then
if( hclvmr > small_div .and. hoivmr > small_div ) then
! CAC 2020 RPF START OF implmentation of the HOI + HCl(liq) = ICl + H2O Sulfate Aerosol Reaction
! NOTE: gprob for HOI species is mapped to gprob_hobr_hcl
if ( rid_slf_str_i_2 > 0 ) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check in line 918 is a duplicate of the check in line 914 for rid_slf_str_i_2 > 0.

Comment on lines +928 to +932
if ( rid_slf_str_i_3 > 0 ) then
if( hbrvmr > small_div .and. hoivmr > small_div ) then
! CAC 2020 RPF START OF implmentation of the HOI + HBr(liq) = IBr + H2O Sulfate Aerosol Reaction
! NOTE: gprob for HOI species is mapped to gprob_hobr_hcl
if ( rid_slf_str_i_3 > 0 ) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same duplicate checks here

Comment on lines +944 to +948
if ( rid_slf_str_i_4 > 0 ) then
if( hivmr > small_div .and. hoivmr > small_div ) then
! CAC 2020 RPF START OF implmentation of the HOI + HI (liq) = I2 + H2O Sulfate Aerosol Reaction
! NOTE: gprob for HOI species is mapped to gprob_hobr_hcl
if ( rid_slf_str_i_4 > 0 ) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same duplicate checks here

Comment on lines +1281 to +1284
! Is there a typo in the pre-exponential factor? (1.72 instead of 1.73?) Which one is correct?
! rxt(:,k,usr_NO2XNO3_M_ndx) = rxt(:,k,tag_NO2_NO3_ndx) * 1.734138e26_r8 * exp_fac(:)
rxt(:,k,usr_NO2XNO3_M_ndx) = rxt(:,k,tag_NO2_NO3_ndx) * 1.724138e26_r8 * exp_fac(:)
!rpf_CESM2_SLH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is leftover and should be checked for correctness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants