Skip to content

cam6_4_077: WACCM7(x) compsets #1262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,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" or $chem =~ /geoschem/) and !($chem_rad_passive));
my $rad_prog_ozone = (($chem =~ "mozart" or $chem =~ "waccm_ma" or $chem =~ "tsmlt" or $chem =~ "_t4ma" 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 @@ -881,7 +881,7 @@ my @aerosources = ();
# and commas) that will be assigned to the namelist variable rad_climate.
my $radval = "'A:Q:H2O'";

if (($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/) and !$chem_rad_passive) {
if (($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ or $chem =~ /waccm_t4ma/) and !$chem_rad_passive) {
$radval .= ",'A:O2:O2','A:CO2:CO2'";
}
elsif (($chem =~ /trop_strat/ or $chem =~ /geoschem/) and !$chem_rad_passive) {
Expand Down Expand Up @@ -911,7 +911,7 @@ if ($rad_prog_ozone) {
die "ERROR: can not set ozone rad_climate specification\n";
}

if ((($chem =~ /ghg_mam4/) or ($chem =~ /waccm_ma/) or ($chem =~ /waccm_sc_mam/) or ($chem =~ /waccm_tsmlt/) or ($chem =~ /trop_strat/)) and !$chem_rad_passive ) {
if ((($chem =~ /ghg_mam4/) or ($chem =~ /waccm_ma/) or ($chem =~ /waccm_t4ma/) or ($chem =~ /waccm_sc_mam/) or ($chem =~ /waccm_tsmlt/) or ($chem =~ /trop_strat/)) and !$chem_rad_passive ) {
$radval .= ",'A:N2O:N2O','A:CH4:CH4','N:CFC11STAR:CFC11','A:CFC12:CFC12'";
} elsif ($prog_ghg1 and $prog_ghg2 and !$chem_rad_passive ) {
$radval .= ",'A:N2O:N2O','A:CH4:CH4','A:CFC11:CFC11','A:CFC12:CFC12'";
Expand Down Expand Up @@ -2136,7 +2136,7 @@ if ($chem =~ /geoschem/) {
}
}

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

my $val;

Expand Down Expand Up @@ -2168,7 +2168,7 @@ if ($chem =~ /trop_mozart/ or $chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/) {

my @files;
# Datasets
if ($chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/) {
if ($chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/ or $chem =~ /waccm_t4ma/) {
@files = ( 'flbc_file',
'xs_coef_file','xs_short_file','xs_long_file', 'rsf_file' );
} else {
Expand Down Expand Up @@ -2351,7 +2351,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
}

# for mid-atmos gas-phase chemistry
if ($chem =~ /trop_strat/ or $chem =~ /_tsmlt/ or $chem =~ /waccm_ma/) {
if ($chem =~ /trop_strat/ or $chem =~ /_tsmlt/ or $chem =~ /waccm_ma/ or $chem =~ /waccm_t4ma/) {
%species = (%species,
'NO_an_srf_file' => 'NO',
'NO_bb_srf_file' => 'NO',
Expand All @@ -2364,7 +2364,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
}

# for troposphere gas-phase chemistry
if ($chem =~ /trop_strat/ or $chem =~ /_tsmlt/) {
if ($chem =~ /trop_strat/ or $chem =~ /_tsmlt/ or $chem =~ /_t4ma/) {
%species = (%species,
'BIGALK_an_srf_file' => 'BIGALK',
'BIGALK_bb_srf_file' => 'BIGALK',
Expand Down Expand Up @@ -2395,9 +2395,12 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
'ISOP_bb_srf_file' => 'ISOP',
'NH3_an_srf_file' => 'NH3',
'NH3_bb_srf_file' => 'NH3',
'NH3_ot_srf_file' => 'NH3',
'NH3_ot_srf_file' => 'NH3' ) ;
if (chem_has_species($cfg, 'E90')) {
%species = (%species,
'E90_srf_file' => 'E90' );
if ($chem !~ /_ts4/) {
}
if ($chem !~ /_ts4/ and $chem !~ /_t4ma/) {
%species = (%species,
'BENZENE_an_srf_file' => 'BENZENE',
'BENZENE_bb_srf_file' => 'BENZENE',
Expand All @@ -2421,7 +2424,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
if ($chem =~ /trop_strat_mam4_ts2/ or $chem =~ /trop_strat_mam5_ts2/) {
%species = (%species,
'MTERP_bb_srf_file' => 'APIN') ;
} elsif ($chem =~ /_ts4/) {
} elsif ($chem =~ /_ts4/ or $chem =~ /_t4ma/) {
%species = (%species,
'MTERP_bb_srf_file' => 'TERP') ;
} else {
Expand All @@ -2446,7 +2449,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
'IVOC_bb_srf_file' => 'IVOCbb',
'SVOC_an_srf_file' => 'SVOCff',
'SVOC_bb_srf_file' => 'SVOCbb' );
} elsif ($chem !~ /_ts4/) {
} elsif ($chem !~ /_ts4/ and $chem !~ /_t4ma/) {
%species = (%species,
'IVOC_an_srf_file' => 'IVOC',
'IVOC_bb_srf_file' => 'IVOC',
Expand All @@ -2471,7 +2474,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
$first = 0;
}
}
if ($chem eq 'trop_mam4' or $chem eq 'waccm_sc_mam4' or $chem eq 'ghg_mam4' or $chem =~ /_ts4/) {
if ($chem eq 'trop_mam4' or $chem eq 'waccm_sc_mam4' or $chem eq 'ghg_mam4' or $chem =~ /_ts4/ or $chem =~ /_t4ma/) {
# SOA yields (used for the interactive emissions) have been calculated based on the VBS yields in CAM-chem.
# Duseong S. Jo, et al. to be submitted to GMD, 2023 -- see https://github.com/ESCOMP/CAM/pull/727 discussion for additional detail.
my %soae_fctrs = ('BENZENE_an_srf_file' => '2.5592D0',
Expand Down Expand Up @@ -2686,7 +2689,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
add_default($nl, 'megan_factors_file');
add_default($nl, 'megan_mapped_emisfctrs', 'val'=>'.false.');
}
if ($chem =~ /trop_strat_mam5_ts4/) {
if ($chem =~ /trop_strat_mam5_ts4/ or $chem =~ /_t4ma/) {
my $val = "'ISOP = isoprene',"
. "'TERP = carene_3 + pinene_a + thujene_a + bornene + terpineol_4 + terpineol_a + terpinyl_ACT_a +',"
. "' myrtenal + sabinene + pinene_b + camphene + fenchene_a + limonene + phellandrene_a + terpinene_a +',"
Expand Down Expand Up @@ -2757,7 +2760,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
add_default($nl, 'megan_mapped_emisfctrs', 'val'=>'.false.');
}
if ($chem =~ /waccm_ma/) {
my $val = "'CH2O = formaldehyde', 'CO = carbon_monoxide'";
my $val = "'CH2O = formaldehyde','CO = carbon_monoxide'";
add_default($nl, 'megan_specifier', 'val'=>$val);
add_default($nl, 'megan_factors_file');
add_default($nl, 'megan_mapped_emisfctrs', 'val'=>'.false.');
Expand Down Expand Up @@ -2891,12 +2894,13 @@ if ($chem eq 'trop_mam7') {
}

my $waccmx = $cfg->get('waccmx');
my $model_top = $cfg->get('model_top');

# set maximum solar zenith angle for photolysis
my $maxzen = 0.0;
if ($waccmx){
$maxzen = 116.;
} elsif ($chem =~ "trop_strat" or $chem =~ "waccm_") {
} elsif ($chem =~ "trop_strat" or $chem =~ "waccm_" or $model_top eq "ht") {
$maxzen = 97.01;
} elsif ($chem =~ "trop_mam" or $chem =~ "trop_mozart" or $chem =~ "ghg_mam") {
$maxzen = 88.85;
Expand All @@ -2907,17 +2911,17 @@ if ($maxzen>0.0) {

# upper boundary specifier
my $ubc_ver;
if (($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ ) and !$waccmx) {
if (($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ or $chem =~ /waccm_t4ma/) and !$waccmx) {
$ubc_ver = 'waccmchem';
} elsif ($chem =~ /waccm_sc/) {
} elsif ($chem =~ /waccm_sc/ or ($model_top eq "ht" and $chem =~ /ghg_mam/)) {
$ubc_ver = 'waccmsc';
}
if (defined $ubc_ver) {
add_default($nl, 'ubc_specifier', 'ver'=>$ubc_ver);
}

# WACCM options.
if ($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/) {
if ($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ or $chem =~ /waccm_t4ma/) {

# Species with fixed lower boundary
my $val = "'CCL4','CF2CLBR','CF3BR','CFC11','CFC113','CFC12','CH3BR','CH3CCL3','CH3CL','CH4','CO2'"
Expand Down
8 changes: 5 additions & 3 deletions bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ Switch to turn on analytic initial conditions for the dynamics state:
0 => no
1 => yes.
</entry>
<entry id="model_top" valid_values="none,lt,mt" value="none">
<entry id="model_top" valid_values="none,lt,mt,ht,xt" value="none">
Model top specifier - set by compset definition
lt: ~ 40 km top
mt: ~ 80 km top
ht: ~ 140 km top
xt: ~ 500 km top
</entry>
<entry id="waccmx" valid_values="0,1" value="0">
Option to turn on waccmx thermosphere/ionosphere extension: 0 => no, 1 => yes
Expand Down Expand Up @@ -101,8 +103,8 @@ test_radiative (Radiatively Active Dust), test_swelling (Sea Salt), test_tracers
trop_strat_soa1 (Trop Strat Aerosols SOA1),
trop_strat_soa5 (Trop Strat Aerosols SOA5)
</entry>
<entry id="chem" valid_values="none,ghg_mam4,terminator,trop_mam3,trop_mam4,trop_mam7,trop_mozart,trop_strat_mam4_ts2,trop_strat_mam4_vbs,trop_strat_mam4_vbsext,trop_strat_mam5_ts2,trop_strat_mam5_ts4,trop_strat_mam5_vbs,trop_strat_mam5_vbsext,trop_strat_noaero,waccm_ma,waccm_mad,waccm_ma_sulfur,waccm_sc,waccm_sc_mam4,waccm_mad_mam4,waccm_ma_mam4,waccm_tsmlt_mam4,waccm_tsmlt_mam4_vbsext,waccm_mad_mam5,waccm_ma_mam5,waccm_tsmlt_mam5,waccm_tsmlt_mam5_vbsext,waccm_ma_noaero,geoschem_mam4" value="">
Chemistry package: none,ghg_mam4,terminator,trop_mam3,trop_mam4,trop_mam7,trop_mozart,trop_strat_mam4_ts2,trop_strat_mam4_vbs,trop_strat_mam4_vbsext,trop_strat_mam5_ts2,trop_strat_mam5_ts4,trop_strat_mam5_vbs,trop_strat_mam5_vbsext,trop_strat_noaero,waccm_ma,waccm_mad,waccm_ma_sulfur,waccm_sc,waccm_sc_mam4,waccm_mad_mam4,waccm_ma_mam4,waccm_tsmlt_mam4,waccm_tsmlt_mam4_vbsext,waccm_mad_mam5,waccm_ma_mam5,waccm_tsmlt_mam5,waccm_tsmlt_mam5_vbsext,waccm_ma_noaero,geoschem_mam4
<entry id="chem" valid_values="none,ghg_mam4,terminator,trop_mam3,trop_mam4,trop_mam7,trop_mozart,trop_strat_mam4_ts2,trop_strat_mam4_vbs,trop_strat_mam4_vbsext,trop_strat_mam5_ts2,trop_strat_mam5_ts4,trop_strat_mam5_vbs,trop_strat_mam5_vbsext,trop_strat_noaero,waccm_ma,waccm_mad,waccm_ma_sulfur,waccm_sc,waccm_sc_mam4,waccm_mad_mam4,waccm_ma_mam4,waccm_tsmlt_mam4,waccm_tsmlt_mam4_vbsext,waccm_mad_mam5,waccm_ma_mam5,waccm_tsmlt_mam5,waccm_tsmlt_mam5_vbsext,waccm_t4ma_mam5,waccm_ma_noaero,geoschem_mam4" value="">
Chemistry package: none,ghg_mam4,terminator,trop_mam3,trop_mam4,trop_mam7,trop_mozart,trop_strat_mam4_ts2,trop_strat_mam4_vbs,trop_strat_mam4_vbsext,trop_strat_mam5_ts2,trop_strat_mam5_ts4,trop_strat_mam5_vbs,trop_strat_mam5_vbsext,trop_strat_noaero,waccm_ma,waccm_mad,waccm_ma_sulfur,waccm_sc,waccm_sc_mam4,waccm_mad_mam4,waccm_ma_mam4,waccm_tsmlt_mam4,waccm_tsmlt_mam4_vbsext,waccm_mad_mam5,waccm_ma_mam5,waccm_tsmlt_mam5,waccm_tsmlt_mam5_vbsext,waccm_t4ma_mam5,waccm_ma_noaero,geoschem_mam4
</entry>
<entry id="prog_species" valid_values="DST,SSLT,SO4,GHG,OC,BC,CARBON16" value="" list="1">
Prognostic mozart species packages: list of any subset of the following: DST,SSLT,SO4,GHG,OC,BC,CARBON16
Expand Down
33 changes: 21 additions & 12 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ OPTIONS
-max_n_rad_cnst <n> Maximum number of constituents that are either radiatively
active, or in any single diagnostic list for the radiation.
-microphys <name> Specify the microphysics option [mg1 | mg2 | mg3| rk | pumas].
-model_top <name> Specify the model_top option for cam7 [ lt | mt ].
-model_top <name> Specify the model_top option for cam7 [ lt | mt | ht | xt ].
-nadv <n> Set total number of advected species to <n>.
-nadv_tt <n> Set number of advected test tracers <n>.
-nlev <n> Set number of levels to <n>.
Expand Down Expand Up @@ -685,8 +685,8 @@ $waccm_phys = $cfg_ref->get('waccm_phys');

if ($print>=2) { print "WACCM physics: $waccm_phys$eol"; }

# WACCM includes 4 age of air tracers by default
if ($chem_pkg =~ /waccm_ma/ or $chem_pkg =~ /waccm_tsmlt/) {
# WACCM includes 3 age of air tracers by default
if ($chem_pkg =~ /waccm_ma/ or $chem_pkg =~ /waccm_tsmlt/ or $chem_pkg =~ /waccm_t4ma/) {
$cfg_ref->set('age_of_air_trcs', 1);
}

Expand Down Expand Up @@ -1199,6 +1199,7 @@ $cfg_ref->set('model_top', $model_top);

# user override
if (defined $opts{'model_top'} and $opts{'model_top'} ne 'none') {
$model_top = lc($opts{'model_top'});
if ($phys_pkg eq 'cam7') {
$cfg_ref->set('model_top', $opts{'model_top'});
} else {
Expand All @@ -1212,11 +1213,22 @@ if ($print>=2) { print "model_top: $model_top$eol"; }
my $nlev = 0;

# Defaults
if ($waccmx) {
if ($phys_pkg eq 'cam7') {
if ($model_top eq 'lt') {
$nlev = 58;
} elsif ($model_top eq 'mt') {
$nlev = 93;
} elsif ($model_top eq 'ht') {
$nlev = 135;
} elsif ($model_top eq 'xt') {
$nlev = 189;
} else {
$nlev = 32; # this is for some old cam_dev tests
}
}
elsif ($waccmx) {
if ($phys_pkg eq 'cam6') {
$nlev = 130;
} elsif ($phys_pkg eq 'cam7') {
$nlev = 130;
} else {
$nlev = 126;
}
Expand All @@ -1229,9 +1241,6 @@ elsif ($chem_pkg =~ /waccm_/) {
$nlev = 70;
}
}
elsif ($phys_pkg eq 'cam7') {
$nlev = 32;
}
elsif ($phys_pkg eq 'cam6') {
$nlev = 32;
}
Expand All @@ -1242,9 +1251,9 @@ elsif ($phys_pkg eq 'cam4') {
$nlev = 26;
}
else {
# This will be used for Held-Suarez and other 'simple' physics
# We may change this to 32 once IC files are available.
$nlev = 30;
# Simple models use cam7-lt vertical grid.
# $nlev = 58; # - ERROR: No default value found for ncdata
$nlev = 30; # bit-for-bit baselines for now
}

# user override
Expand Down
Loading
Loading