Skip to content

Commit

Permalink
Merge branch 'wlin/atm/ssp_tentativefix' into next (PR #5965)
Browse files Browse the repository at this point in the history
Implemented a tentative fix for SSP tests

Future scenario forcing files for new species introduced by v3atm are not ready.
The cime SSP tests using default v3 configuration therefore failed to be created.

The tentative fix uses config that mixes v3 physics with v2 chemistry.

Also fixed a couple misuses of eqv operator in linoz-related code that do not
properly consider the precedence relative to AND/OR operators. The misuses have
no impact on default v3 configuration, but would cause fatal runtime error when using
the hybrid configuration as implemented here.

[BFB] for existing tests.
  • Loading branch information
wlin7 committed Oct 12, 2023
2 parents a14b58c + ce46a5f commit 9592686
Show file tree
Hide file tree
Showing 5 changed files with 169 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0"?>
<namelist_defaults>

<!-- Set default output options for CMIP6 simulations -->
<cosp_lite>.true.</cosp_lite>

<!-- Solar constant from CMIP6 input4MIPS -->
<solar_data_file>atm/cam/solar/Solar_1850-2299_input4MIPS_c20181106.nc</solar_data_file>
<solar_data_type>SERIAL</solar_data_type>

<!-- GHG values from CMIP6 input4MIPS -->
<bndtvghg>atm/cam/ggas/GHG_CMIP_SSP370-1-2-1_Annual_Global_2015-2500_c20210509.nc</bndtvghg>
<scenario_ghg>RAMPED</scenario_ghg>

<!-- Stratospheric aerosols from CMIP6 input4MIPS -->
<prescribed_volcaero_datapath>atm/cam/volc </prescribed_volcaero_datapath>
<prescribed_volcaero_file >CMIP_DOE-ACME_radiation_average_1850-2014_v3_c20171204.nc</prescribed_volcaero_file >
<prescribed_volcaero_filetype>VOLC_CMIP6 </prescribed_volcaero_filetype>
<prescribed_volcaero_type >CYCLICAL </prescribed_volcaero_type >
<prescribed_volcaero_cycle_yr>1 </prescribed_volcaero_cycle_yr>

<!-- For comprehensive history -->
<history_amwg>.true.</history_amwg>
<history_aerosol>.true.</history_aerosol>
<history_aero_optics>.true.</history_aero_optics>

<!-- External forcing for BAM or MAM. CMIP6 input4mips data -->
<ext_frc_type>INTERP_MISSING_MONTHS</ext_frc_type>
<so2_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_so2_elev_2015-2100_c210216.nc </so2_ext_file>
<soag_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_soag_elev_2015-2100_c210216.nc </soag_ext_file>
<bc_a4_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_bc_a4_elev_2015-2100_c210216.nc </bc_a4_ext_file>
<mam7_num_a1_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_num_a1_elev_2015-2100_c210216.nc </mam7_num_a1_ext_file>
<num_a2_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_num_a2_elev_2015-2100_c210216.nc </num_a2_ext_file>
<mam7_num_a3_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_num_a4_elev_2015-2100_c210216.nc </mam7_num_a3_ext_file> <!-- This is to set num_a4 emissions -->
<pom_a4_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_pom_a4_elev_2015-2100_c210216.nc </pom_a4_ext_file>
<so4_a1_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_so4_a1_elev_2015-2100_c210216.nc </so4_a1_ext_file>
<so4_a2_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_so4_a2_elev_2015-2100_c210216.nc </so4_a2_ext_file>

<!-- Surface emissions for MAM4. CMIP6 input4mips data -->
<srf_emis_type>INTERP_MISSING_MONTHS</srf_emis_type>
<dms_emis_file >atm/cam/chem/trop_mozart_aero/emis/DMSflux.1850-2100.1deg_latlon_conserv.POPmonthlyClimFromACES4BGC_c20160727.nc</dms_emis_file>
<so2_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_so2_surf_2015-2100_c210216.nc </so2_emis_file>
<bc_a4_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_bc_a4_surf_2015-2100_c210216.nc </bc_a4_emis_file>
<mam7_num_a1_emis_file>atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_num_a1_surf_2015-2100_c210216.nc </mam7_num_a1_emis_file>
<num_a2_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_num_a2_surf_2015-2100_c210216.nc </num_a2_emis_file>
<mam7_num_a3_emis_file>atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_num_a4_surf_2015-2100_c210216.nc </mam7_num_a3_emis_file> <!-- This is to set num_a4 emissions -->
<pom_a4_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_pom_a4_surf_2015-2100_c210216.nc </pom_a4_emis_file>
<so4_a1_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_so4_a1_surf_2015-2100_c210216.nc </so4_a1_emis_file>
<so4_a2_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP370_ne30/cmip6_ssp370_mam4_so4_a2_surf_2015-2100_c210216.nc </so4_a2_emis_file>

<!-- Prescribed oxidants for aerosol chemistry. Ozone is from CMIP6 input4MIPS file -->
<tracer_cnst_type >INTERP_MISSING_MONTHS</tracer_cnst_type>
<tracer_cnst_datapath>atm/cam/chem/trop_mozart_aero/oxid</tracer_cnst_datapath>
<tracer_cnst_file >oxid_SSP370_1.9x2.5_L70_2015-2100_c20211006.nc</tracer_cnst_file>
<tracer_cnst_filelist>''</tracer_cnst_filelist>

<!-- <tracer_cnst_filelist>this_field_is_not_used</tracer_cnst_filelist> -->

<!-- Marine organic aerosol namelist settings -->
<mam_mom_mixing_state>3</mam_mom_mixing_state>
<mam_mom_cycle_yr >1 </mam_mom_cycle_yr >
<mam_mom_datapath >'atm/cam/chem/trop_mam/marine_BGC/' </mam_mom_datapath >
<mam_mom_datatype >'CYCLICAL' </mam_mom_datatype >
<mam_mom_filename >'monthly_macromolecules_0.1deg_bilinear_latlon_year01_merge_date.nc' </mam_mom_filename > <!-- Using the 2000 file, for now -->
<mam_mom_fixed_tod >0 </mam_mom_fixed_tod >
<mam_mom_fixed_ymd >0 </mam_mom_fixed_ymd >
<mam_mom_specifier >'chla:CHL1','mpoly:TRUEPOLYC','mprot:TRUEPROTC','mlip:TRUELIPC' </mam_mom_specifier >

<!-- Stratospheric ozone (Linoz) updated using CMIP6 input4MIPS GHG concentrations -->
<chlorine_loading_file >atm/cam/chem/trop_mozart/ub/Linoz_Chlorine_Loading_CMIP6_Hist_SSP370_0003-2503_c20210202.nc</chlorine_loading_file>
<chlorine_loading_type >SERIAL</chlorine_loading_type>
<linoz_data_file >linv3_1849-2101_CMIP6_Hist_SSP370_10deg_58km_c20230705.nc</linoz_data_file>
<linoz_data_path >atm/cam/chem/trop_mozart/ub</linoz_data_path>
<linoz_data_type >INTERP_MISSING_MONTHS</linoz_data_type>

<!-- Turn off ozone dry deposition, as Linoz O3v2 and ozone are not separated for now. Need to turn on ozone dry deposition when interactive tropospheric chemistry is implemented -->
<drydep_list >'H2O2', 'H2SO4', 'SO2'</drydep_list>

<!-- sim_year used for CLM datasets and SSTs forcings -->
<sim_year>2015-2100</sim_year>

</namelist_defaults>
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0"?>
<namelist_defaults>

<!-- Set default output options for CMIP6 simulations -->
<cosp_lite>.true.</cosp_lite>

<!-- Solar constant from CMIP6 input4MIPS -->
<solar_data_file>atm/cam/solar/Solar_1850-2299_input4MIPS_c20181106.nc</solar_data_file>
<solar_data_type>SERIAL</solar_data_type>

<!-- GHG values from CMIP6 input4MIPS -->
<bndtvghg>atm/cam/ggas/GHG_CMIP_SSP585-1-2-1_Annual_Global_2015-2500_c20190310.nc</bndtvghg>
<scenario_ghg>RAMPED</scenario_ghg>

<!-- Stratospheric aerosols from CMIP6 input4MIPS -->
<prescribed_volcaero_datapath>atm/cam/volc </prescribed_volcaero_datapath>
<prescribed_volcaero_file >CMIP_DOE-ACME_radiation_average_1850-2014_v3_c20171204.nc</prescribed_volcaero_file >
<prescribed_volcaero_filetype>VOLC_CMIP6 </prescribed_volcaero_filetype>
<prescribed_volcaero_type >CYCLICAL </prescribed_volcaero_type >
<prescribed_volcaero_cycle_yr>1 </prescribed_volcaero_cycle_yr>

<!-- For comprehensive history -->
<history_amwg>.true.</history_amwg>
<history_aerosol>.true.</history_aerosol>
<history_aero_optics>.true.</history_aero_optics>

<!-- External forcing for BAM or MAM. CMIP6 input4mips data -->
<ext_frc_type>INTERP_MISSING_MONTHS</ext_frc_type>
<so2_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_so2_elev_2015-2100_c190828.nc </so2_ext_file>
<soag_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_soag_elev_2015-2100_c190828.nc </soag_ext_file>
<bc_a4_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_bc_a4_elev_2015-2100_c190828.nc </bc_a4_ext_file>
<mam7_num_a1_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_num_a1_elev_2015-2100_c190828.nc </mam7_num_a1_ext_file>
<num_a2_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_num_a2_elev_2015-2100_c190828.nc </num_a2_ext_file>
<mam7_num_a3_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_num_a4_elev_2015-2100_c190828.nc </mam7_num_a3_ext_file> <!-- This is to set num_a4 emissions -->
<pom_a4_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_pom_a4_elev_2015-2100_c190828.nc </pom_a4_ext_file>
<so4_a1_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_so4_a1_elev_2015-2100_c190828.nc </so4_a1_ext_file>
<so4_a2_ext_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_so4_a2_elev_2015-2100_c190828.nc </so4_a2_ext_file>

<!-- Surface emissions for MAM4. CMIP6 input4mips data -->
<srf_emis_type>INTERP_MISSING_MONTHS</srf_emis_type>
<dms_emis_file >atm/cam/chem/trop_mozart_aero/emis/DMSflux.1850-2100.1deg_latlon_conserv.POPmonthlyClimFromACES4BGC_c20160727.nc</dms_emis_file>
<so2_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_so2_surf_2015-2100_c190828.nc </so2_emis_file>
<bc_a4_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_bc_a4_surf_2015-2100_c190828.nc </bc_a4_emis_file>
<mam7_num_a1_emis_file>atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_num_a1_surf_2015-2100_c190828.nc </mam7_num_a1_emis_file>
<num_a2_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_num_a2_surf_2015-2100_c190828.nc </num_a2_emis_file>
<mam7_num_a3_emis_file>atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_num_a4_surf_2015-2100_c190828.nc </mam7_num_a3_emis_file> <!-- This is to set num_a4 emissions -->
<pom_a4_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_pom_a4_surf_2015-2100_c190828.nc </pom_a4_emis_file>
<so4_a1_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_so4_a1_surf_2015-2100_c190828.nc </so4_a1_emis_file>
<so4_a2_emis_file >atm/cam/chem/trop_mozart_aero/emis/CMIP6_SSP585_ne30/cmip6_ssp585_mam4_so4_a2_surf_2015-2100_c190828.nc </so4_a2_emis_file>

<!-- Prescribed oxidants for aerosol chemistry. Ozone is from CMIP6 input4MIPS file -->
<tracer_cnst_type >INTERP_MISSING_MONTHS</tracer_cnst_type>
<tracer_cnst_datapath>atm/cam/chem/trop_mozart_aero/oxid</tracer_cnst_datapath>
<tracer_cnst_file >oxid_1.9x2.5_L70_2015-2100_c20190421.nc</tracer_cnst_file>
<tracer_cnst_filelist>''</tracer_cnst_filelist>

<!-- <tracer_cnst_filelist>this_field_is_not_used</tracer_cnst_filelist> -->

<!-- Marine organic aerosol namelist settings -->
<mam_mom_mixing_state>3</mam_mom_mixing_state>
<mam_mom_cycle_yr >1 </mam_mom_cycle_yr >
<mam_mom_datapath >'atm/cam/chem/trop_mam/marine_BGC/' </mam_mom_datapath >
<mam_mom_datatype >'CYCLICAL' </mam_mom_datatype >
<mam_mom_filename >'monthly_macromolecules_0.1deg_bilinear_latlon_year01_merge_date.nc' </mam_mom_filename > <!-- Using the 2000 file, for now -->
<mam_mom_fixed_tod >0 </mam_mom_fixed_tod >
<mam_mom_fixed_ymd >0 </mam_mom_fixed_ymd >
<mam_mom_specifier >'chla:CHL1','mpoly:TRUEPOLYC','mprot:TRUEPROTC','mlip:TRUELIPC' </mam_mom_specifier >

<!-- Stratospheric ozone (Linoz) updated using CMIP6 input4MIPS GHG concentrations -->
<chlorine_loading_file >atm/cam/chem/trop_mozart/ub/Linoz_Chlorine_Loading_CMIP6_Hist_SSP585_0003-2503_c20190414.nc</chlorine_loading_file>
<chlorine_loading_type >SERIAL</chlorine_loading_type>
<linoz_data_file >linv3_1849-2101_CMIP6_Hist_SSP585_10deg_58km_c20230705.nc</linoz_data_file>
<linoz_data_path >atm/cam/chem/trop_mozart/ub</linoz_data_path>
<linoz_data_type >INTERP_MISSING_MONTHS</linoz_data_type>

<!-- Turn off ozone dry deposition, as Linoz O3v2 and ozone are not separated for now. Need to turn on ozone dry deposition when interactive tropospheric chemistry is implemented -->
<drydep_list >'H2O2', 'H2SO4', 'SO2'</drydep_list>

<!-- sim_year used for CLM datasets and SSTs forcings -->
<sim_year>2015-2100</sim_year>

</namelist_defaults>
3 changes: 2 additions & 1 deletion components/eam/cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@
<values modifier='additive'>
<value compset="" >-mach $MACH</value>
<value compset="_EAM" >-phys default</value>
<value compset="_EAM%CMIP6_" >&eam_phys_defaults; &eam_chem_defaults;</value>
<value compset="^((?!SSP).)*_EAM%CMIP6_" >&eam_phys_defaults; &eam_chem_defaults;</value>
<value compset="_EAM%CMIP6-1pctCO2" >&eam_phys_defaults; &eam_chem_defaults;</value>
<value compset="_EAM%CMIP6-4xCO2" >&eam_phys_defaults; &eam_chem_defaults;</value>
<value compset="SSP.*_EAM%CMIP6_" >&eam_phys_defaults; -chem linoz_mam4_resus_mom_soag -rain_evap_to_coarse_aero</value>
<value compset="_EAM%AR5sf" >&eam_phys_defaults; -chem superfast_mam4_resus_mom_soag -rain_evap_to_coarse_aero</value>
<value compset="_EAM%CHEMUCI-LINOZV2" >-clubb_sgs -microphys mg2 -chem superfast_mam4_resus_mom_soag -rain_evap_to_coarse_aero -nlev 72 -usr_mech_infile $SRCROOT/components/eam/chem_proc/inputs/pp_chemUCI_mam4_resus_mom_soag_tag.in</value>
<value compset="_EAM%CHEMUCI-LINOZV3" >-clubb_sgs -microphys mg2 -chem superfast_mam4_resus_mom_soag -rain_evap_to_coarse_aero -nlev 72 -usr_mech_infile $SRCROOT/components/eam/chem_proc/inputs/pp_chemUCI_linozv3_mam4_resus_mom_soag_tag.in</value>
Expand Down
4 changes: 2 additions & 2 deletions components/eam/src/chemistry/mozart/lin_strat_chem.F90
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ subroutine lin_strat_chem_inti(phys_state)
if (linoz_v3) file%linoz_v3=.true.
if (linoz_v2) file%linoz_v2=.true.
!!
if (linoz_v2.eqv..true. .and.linoz_v3.eqv..true. ) then
if (linoz_v2 .and. linoz_v3 ) then
write(iulog,*) 'linoz_readnl, linoz: Both linoz_v2 and linoz_v3 are true. This is wrong! please check.'
return
elseif (linoz_v2.eqv..false..and.linoz_v3.eqv..false.) then
elseif (.not. linoz_v2 .and. .not. linoz_v3) then
write(iulog,*) 'linoz_readnl, linoz: Both linoz_v2 and linoz_v3 are false, which can be correct, but be sure that is intended!'
endif
!!
Expand Down
2 changes: 1 addition & 1 deletion components/eam/src/chemistry/utils/tracer_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ subroutine read_next_trcdata(state, flds, file )
cnt3(flds(f)%coords(ZA_TIMDIM)) = 1
strt3(flds(f)%coords(ZA_TIMDIM)) = recnos(i)
!!
if (file%linoz_v3.eqv..true..or.file%linoz_v2.eqv..true.) then
if (file%linoz_v3 .or. file%linoz_v2) then
!!check if these are the surface variables
!!no need to do interpolate since only used
!!in preprocessing,
Expand Down

0 comments on commit 9592686

Please sign in to comment.