Skip to content

Commit

Permalink
ESCOMP tag: cam6_3_147
Browse files Browse the repository at this point in the history
Merge pull request ESCOMP#484 from CESM-GC/CESM-GC_rebased_on_cam6_0_034

cam6_3_147: GEOS-Chem chemistry and four new compsets that use it

ESCOMP commit: 74018ee
  • Loading branch information
fvitt authored and Steve Goldhaber committed Apr 22, 2024
1 parent 71284a5 commit 3f1d9d2
Show file tree
Hide file tree
Showing 38 changed files with 9,945 additions and 61 deletions.
108 changes: 95 additions & 13 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ my $rad_prog_bcarb = (($prog_species =~ "BC" or $aero_chem) and !($chem_rad_pa
my $rad_prog_sulf = (($prog_species =~ "SO4" or $aero_chem) and !($chem_rad_passive));
my $rad_prog_dust = (($prog_species =~ "DST" or $aero_chem) and !($chem_rad_passive));
my $rad_prog_sslt = (($prog_species =~ "SSLT" or $aero_chem) and !($chem_rad_passive));
my $rad_prog_ozone = (($chem =~ "mozart" or $chem =~ "waccm_ma" or $chem =~ "tsmlt" or $chem =~ "trop_strat") and !($chem_rad_passive));
my $rad_prog_ozone = (($chem =~ "mozart" or $chem =~ "waccm_ma" or $chem =~ "tsmlt" or $chem =~ "trop_strat" or $chem =~ /geoschem/) and !($chem_rad_passive));

# Check for eruptive volcano emissions. These will be radiatively active by default, but
# only if using BAM and the camrt radiation package
Expand Down Expand Up @@ -576,12 +576,13 @@ if ( ($chem ne 'none') or ( $prog_species ) ){

my ( $gas_wetdep_list, $aer_wetdep_list, $aer_sol_facti, $aer_sol_factb, $aer_scav_coef,
$aer_drydep_list, $gas_drydep_list ) =
set_dep_lists( $cfgdir, $chem_proc_src, $chem_src_dir, $nl, $print );
set_dep_lists( $chem, $cfgdir, $chem_proc_src, $chem_src_dir, $nl, $print );

if (length($gas_wetdep_list)>2){
add_default($nl, 'gas_wetdep_method' );
add_default($nl, 'gas_wetdep_list', 'val'=>$gas_wetdep_list );
}

if (length($aer_wetdep_list)>2){
# determine if prescribed aerosols are not needed ...
if ($aer_wetdep_list =~ /so4/i &&
Expand Down Expand Up @@ -862,7 +863,7 @@ my $radval = "'A:Q:H2O'";
if (($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/) and !$chem_rad_passive) {
$radval .= ",'A:O2:O2','A:CO2:CO2'";
}
elsif ($chem =~ /trop_strat/ and !$chem_rad_passive) {
elsif (($chem =~ /trop_strat/ or $chem =~ /geoschem/) and !$chem_rad_passive) {
$radval .= ",'N:O2:O2','A:CO2:CO2'";
}
elsif (($co2_cycle and !$co2_cycle_rad_passive) or ($chem =~ /ghg_mam4/)) {
Expand Down Expand Up @@ -897,6 +898,8 @@ if ((($chem =~ /ghg_mam4/) or ($chem =~ /waccm_ma/) or ($chem =~ /waccm_sc_mam/)
$radval .= ",'A:N2O:N2O','A:CH4:CH4','A:CFC11:CFC11','A:CFC12:CFC12'";
} elsif ($prog_ghg1 and !$prog_ghg2 and !$chem_rad_passive ) {
$radval .= ",'A:N2O:N2O','A:CH4:CH4','N:CFC11:CFC11','N:CFC12:CFC12'";
} elsif ($chem =~ /geoschem/) {
$radval .= ",'A:N2O:N2O','A:CH4:CH4','A:CFC11:CFC11','A:CFC12:CFC12'";
} else {
$radval .= ",'N:N2O:N2O','N:CH4:CH4','N:CFC11:CFC11','N:CFC12:CFC12'";
}
Expand Down Expand Up @@ -2018,6 +2021,34 @@ if (($chem =~ /trop_mozart/ or $chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/)
}
}

if ($chem =~ /geoschem/) {

my $val;

# Species with fixed lower boundary
$val = "'CCL4','CH4','N2O','CO2','CFC11','CFC12','CH3BR','CH3CCL3','CH3CL'"
.",'HCFC22','CFC114','CFC115','HCFC141B','HCFC142B','CH2BR2','CHBR3','H2402'";

if ($chem_has_ocs) {
$val .= ",'OCS'";
}
if (chem_has_species($cfg, 'SF6')) {
$val .= ",'SF6'";
}
add_default($nl, 'flbc_list', 'val'=>$val);
unless (defined $nl->get_value('flbc_type')) {
add_default($nl, 'flbc_type', 'val'=>'CYCLICAL');
add_default($nl, 'flbc_cycle_yr', 'val'=>'2000');
}

my @files;
# Datasets
@files = ( 'soil_erod_file', 'flbc_file' );
foreach my $file (@files) {
add_default($nl, $file);
}
}

if ($chem =~ /trop_mozart/ or $chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/) {

my $val;
Expand Down Expand Up @@ -2364,10 +2395,12 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
}
}
}
add_default($nl, 'srf_emis_specifier', 'val'=>$val);
unless (defined $nl->get_value('srf_emis_type')) {
add_default($nl, 'srf_emis_type', 'val'=>'CYCLICAL');
add_default($nl, 'srf_emis_cycle_yr', 'val'=>2000);
if ($chem !~ /geoschem/) {
add_default($nl, 'srf_emis_specifier', 'val'=>$val);
unless (defined $nl->get_value('srf_emis_type')) {
add_default($nl, 'srf_emis_type', 'val'=>'CYCLICAL');
add_default($nl, 'srf_emis_cycle_yr', 'val'=>2000);
}
}

# Vertical emission datasets:
Expand Down Expand Up @@ -2433,10 +2466,12 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
$first = 0;
}
}
add_default($nl, 'ext_frc_specifier', 'val'=>$val);
unless (defined $nl->get_value('ext_frc_type')) {
add_default($nl, 'ext_frc_type', 'val'=>"'CYCLICAL'");
add_default($nl, 'ext_frc_cycle_yr', 'val'=>2000);
if ($chem !~ /geoschem/) {
add_default($nl, 'ext_frc_specifier', 'val'=>$val);
unless (defined $nl->get_value('ext_frc_type')) {
add_default($nl, 'ext_frc_type', 'val'=>"'CYCLICAL'");
add_default($nl, 'ext_frc_cycle_yr', 'val'=>2000);
}
}

# MEGAN emissions
Expand Down Expand Up @@ -2482,6 +2517,30 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
add_default($nl, 'megan_factors_file');
add_default($nl, 'megan_mapped_emisfctrs', 'val'=>'.false.');
}
if ($chem =~ /geoschem/) {
my $val = "'ISOP = isoprene',"
. "'MOH = methanol',"
. "'EOH = ethanol',"
. "'CH2O = formaldehyde',"
. "'ALD2 = acetaldehyde',"
. "'ACTA = acetic_acid',"
. "'ACET = acetone',"
. "'HCOOH = formic_acid',"
. "'HCN = hydrogen_cyanide',"
. "'CO = carbon_monoxide',"
. "'C2H6 = ethane',"
. "'C2H4 = ethene',"
. "'C3H8 = propane',"
. "'ALK4 = pentane + hexane + heptane + tricyclene',"
. "'PRPE = propene + butene',"
. "'TOLU = toluene',"
. "'LIMO = limonene',"
. "'MTPA = pinene_a + pinene_b + sabinene + carene_3',"
. "'MTPO = terpinene_g + terpinene_a + terpinolene + myrcene + ocimene_al + ocimene_t_b + ocimene_c_b + thujene_a + 2met_styrene + cymene_p + cymene_o + bornene + fenchene_a + camphene + phellandrene_a + phellandrene_b'";
add_default($nl, 'megan_specifier', 'val'=>$val);
add_default($nl, 'megan_factors_file');
add_default($nl, 'megan_mapped_emisfctrs', 'val'=>'.false.');
}
if ($chem =~ /trop_strat_mam4_vbs/ or $chem =~ /trop_strat_mam5_vbs/) {
my $val = "'ISOP = isoprene',"
. "'MTERP = carene_3 + pinene_a + thujene_a + bornene + terpineol_4 + terpineol_a + terpinyl_ACT_a "
Expand Down Expand Up @@ -2897,6 +2956,29 @@ if ($nl->get_value('use_hemco') =~ m/$TRUE/io) {
# ignored at runtime when HEMCO is used.
$nl->delete_variable('chem_inparm', 'ext_frc_specifier');
$nl->delete_variable('chem_inparm', 'srf_emis_specifier');

if ($chem =~ /geoschem/) {

# For now, HEMCO config and diagnostic configuration files are always used from
# the case directory. Exit if user has specified other paths in the user namelist
# because it will not work.
if ($nl->get_value('hemco_config_file') ne "'" . $inputdata_rootdir . "/HEMCO_Config.rc'") {
die "CAM Namelist ERROR: When running with GEOS-Chem chemistry, hemco_config_file\n".
"must not be manually set in the namelist. Instead, modify (or symlink from) the HEMCO_Config.rc\n".
"in the case directory, which will be copied to the run directory when submitting.\n".
"Then remove the hemco_config_file option from the user namelist.\n";
}

if ($nl->get_value('hemco_diagn_file') ne "'" . $inputdata_rootdir . "/HEMCO_Diagn.rc'") {
die "CAM Namelist ERROR: When running with GEOS-Chem chemistry, hemco_diagn_file\n".
"must not be manually set in the namelist. Instead, modify (or symlink from) the HEMCO_Diagn.rc\n".
"in the case directory, which will be copied to the run directory when submitting.\n".
"Then remove the hemco_diagn_file option from the user namelist.\n";
}

$nl->set_variable_value('hemco_nl', 'hemco_config_file', "'HEMCO_Config.rc'");
$nl->set_variable_value('hemco_nl', 'hemco_diagn_file', "'HEMCO_Diagn.rc'");
}
}

# Physics options
Expand Down Expand Up @@ -3025,7 +3107,7 @@ if (!$simple_phys) {
}

# tropopause level used in gas-phase / aerosol processes
if (($chem ne 'none') and ($chem ne 'terminator')) {
if (($chem ne 'none') and ($chem ne 'terminator') and !($chem =~ /geoschem/)) {
add_default($nl, 'chem_use_chemtrop');
}

Expand Down Expand Up @@ -3562,7 +3644,7 @@ if ( length($nl->get_value('soil_erod_file'))>0 ) {
add_default($nl, 'dust_emis_fact', 'tms'=>'1');
}
else {
if ($chem =~ /trop_strat/ or $chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ or $chem =~ /trop_mozart/) {
if ($chem =~ /trop_strat/ or $chem =~ /geoschem/ or $chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ or $chem =~ /trop_mozart/) {
add_default($nl, 'dust_emis_fact', 'ver'=>'chem');
}
else {
Expand Down
91 changes: 91 additions & 0 deletions bld/namelist_files/geoschem_master_aer_drydep_list.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0"?>

<drydep_list_definition>

<!-- aerosol species -->
<list id="MAM">
dst_a1
so4_a1
nh4_a1
pom_a1
pomff1_a1
pombb1_a1
soa_a1
bc_a1
ncl_a1
num_a1
so4_a2
nh4_a2
soa_a2
ncl_a2
dst_a2
num_a2
dst_a3
ncl_a3
so4_a3
pom_a3
bc_a3
num_a3
ncl_a4
so4_a4
pom_a4
pomff1_a4
pombb1_a4
bc_a4
nh4_a4
num_a4
dst_a5
so4_a5
nh4_a5
num_a5
ncl_a6
so4_a6
nh4_a6
num_a6
dst_a7
so4_a7
nh4_a7
num_a7
soa1_a1
soa1_a2
soa2_a1
soa2_a2
soa3_a1
soa3_a2
soa4_a1
soa4_a2
soa5_a1
soa5_a2
soaff1_a1
soaff2_a1
soaff3_a1
soaff4_a1
soaff5_a1
soabb1_a1
soabb2_a1
soabb3_a1
soabb4_a1
soabb5_a1
soabg1_a1
soabg2_a1
soabg3_a1
soabg4_a1
soabg5_a1
soaff1_a2
soaff2_a2
soaff3_a2
soaff4_a2
soaff5_a2
soabb1_a2
soabb2_a2
soabb3_a2
soabb4_a2
soabb5_a2
soabg1_a2
soabg2_a2
soabg3_a2
soabg4_a2
soabg5_a2
</list>

</drydep_list_definition>
89 changes: 89 additions & 0 deletions bld/namelist_files/geoschem_master_aer_wetdep_list.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<aer_wetdep_list_definition>

<!-- list of aerosol species that undergo dry deposition -->
<list id="MAM">
dst_a1
so4_a1
nh4_a1
pom_a1
pomff1_a1
pombb1_a1
soa_a1
bc_a1
ncl_a1
num_a1
so4_a2
nh4_a2
soa_a2
ncl_a2
dst_a2
num_a2
dst_a3
ncl_a3
so4_a3
pom_a3
bc_a3
num_a3
ncl_a4
so4_a4
pom_a4
pomff1_a4
pombb1_a4
bc_a4
nh4_a4
num_a4
dst_a5
so4_a5
nh4_a5
num_a5
ncl_a6
so4_a6
nh4_a6
num_a6
dst_a7
so4_a7
nh4_a7
num_a7
soa1_a1
soa1_a2
soa2_a1
soa2_a2
soa3_a1
soa3_a2
soa4_a1
soa4_a2
soa5_a1
soa5_a2
soaff1_a1
soaff2_a1
soaff3_a1
soaff4_a1
soaff5_a1
soabb1_a1
soabb2_a1
soabb3_a1
soabb4_a1
soabb5_a1
soabg1_a1
soabg2_a1
soabg3_a1
soabg4_a1
soabg5_a1
soaff1_a2
soaff2_a2
soaff3_a2
soaff4_a2
soaff5_a2
soabb1_a2
soabb2_a2
soabb3_a2
soabb4_a2
soabb5_a2
soabg1_a2
soabg2_a2
soabg3_a2
soabg4_a2
soabg5_a2
</list>

</aer_wetdep_list_definition>
Loading

0 comments on commit 3f1d9d2

Please sign in to comment.