Skip to content

Commit 44c1893

Browse files
authored
Merge pull request ESCOMP#1262 from fvitt/waccm7
cam6_4_077: WACCM7(x) compsets
2 parents 068d59b + 6ec83e7 commit 44c1893

31 files changed

+18288
-90
lines changed

bld/build-namelist

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ my $rad_prog_bcarb = (($prog_species =~ "BC" or $aero_chem) and !($chem_rad_pa
541541
my $rad_prog_sulf = (($prog_species =~ "SO4" or $aero_chem) and !($chem_rad_passive));
542542
my $rad_prog_dust = (($prog_species =~ "DST" or $aero_chem) and !($chem_rad_passive));
543543
my $rad_prog_sslt = (($prog_species =~ "SSLT" or $aero_chem) and !($chem_rad_passive));
544-
my $rad_prog_ozone = (($chem =~ "mozart" or $chem =~ "waccm_ma" or $chem =~ "tsmlt" or $chem =~ "trop_strat" or $chem =~ /geoschem/) and !($chem_rad_passive));
544+
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));
545545

546546
# Check for eruptive volcano emissions. These will be radiatively active by default, but
547547
# only if using BAM and the camrt radiation package
@@ -881,7 +881,7 @@ my @aerosources = ();
881881
# and commas) that will be assigned to the namelist variable rad_climate.
882882
my $radval = "'A:Q:H2O'";
883883

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

914-
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 ) {
914+
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 ) {
915915
$radval .= ",'A:N2O:N2O','A:CH4:CH4','N:CFC11STAR:CFC11','A:CFC12:CFC12'";
916916
} elsif ($prog_ghg1 and $prog_ghg2 and !$chem_rad_passive ) {
917917
$radval .= ",'A:N2O:N2O','A:CH4:CH4','A:CFC11:CFC11','A:CFC12:CFC12'";
@@ -2136,7 +2136,7 @@ if ($chem =~ /geoschem/) {
21362136
}
21372137
}
21382138

2139-
if ($chem =~ /trop_mozart/ or $chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/) {
2139+
if ($chem =~ /trop_mozart/ or $chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/ or $chem =~ /_t4ma/) {
21402140

21412141
my $val;
21422142

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

21692169
my @files;
21702170
# Datasets
2171-
if ($chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/) {
2171+
if ($chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/ or $chem =~ /waccm_t4ma/) {
21722172
@files = ( 'flbc_file',
21732173
'xs_coef_file','xs_short_file','xs_long_file', 'rsf_file' );
21742174
} else {
@@ -2351,7 +2351,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
23512351
}
23522352

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

23662366
# for troposphere gas-phase chemistry
2367-
if ($chem =~ /trop_strat/ or $chem =~ /_tsmlt/) {
2367+
if ($chem =~ /trop_strat/ or $chem =~ /_tsmlt/ or $chem =~ /_t4ma/) {
23682368
%species = (%species,
23692369
'BIGALK_an_srf_file' => 'BIGALK',
23702370
'BIGALK_bb_srf_file' => 'BIGALK',
@@ -2395,9 +2395,12 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
23952395
'ISOP_bb_srf_file' => 'ISOP',
23962396
'NH3_an_srf_file' => 'NH3',
23972397
'NH3_bb_srf_file' => 'NH3',
2398-
'NH3_ot_srf_file' => 'NH3',
2398+
'NH3_ot_srf_file' => 'NH3' ) ;
2399+
if (chem_has_species($cfg, 'E90')) {
2400+
%species = (%species,
23992401
'E90_srf_file' => 'E90' );
2400-
if ($chem !~ /_ts4/) {
2402+
}
2403+
if ($chem !~ /_ts4/ and $chem !~ /_t4ma/) {
24012404
%species = (%species,
24022405
'BENZENE_an_srf_file' => 'BENZENE',
24032406
'BENZENE_bb_srf_file' => 'BENZENE',
@@ -2421,7 +2424,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
24212424
if ($chem =~ /trop_strat_mam4_ts2/ or $chem =~ /trop_strat_mam5_ts2/) {
24222425
%species = (%species,
24232426
'MTERP_bb_srf_file' => 'APIN') ;
2424-
} elsif ($chem =~ /_ts4/) {
2427+
} elsif ($chem =~ /_ts4/ or $chem =~ /_t4ma/) {
24252428
%species = (%species,
24262429
'MTERP_bb_srf_file' => 'TERP') ;
24272430
} else {
@@ -2446,7 +2449,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
24462449
'IVOC_bb_srf_file' => 'IVOCbb',
24472450
'SVOC_an_srf_file' => 'SVOCff',
24482451
'SVOC_bb_srf_file' => 'SVOCbb' );
2449-
} elsif ($chem !~ /_ts4/) {
2452+
} elsif ($chem !~ /_ts4/ and $chem !~ /_t4ma/) {
24502453
%species = (%species,
24512454
'IVOC_an_srf_file' => 'IVOC',
24522455
'IVOC_bb_srf_file' => 'IVOC',
@@ -2471,7 +2474,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
24712474
$first = 0;
24722475
}
24732476
}
2474-
if ($chem eq 'trop_mam4' or $chem eq 'waccm_sc_mam4' or $chem eq 'ghg_mam4' or $chem =~ /_ts4/) {
2477+
if ($chem eq 'trop_mam4' or $chem eq 'waccm_sc_mam4' or $chem eq 'ghg_mam4' or $chem =~ /_ts4/ or $chem =~ /_t4ma/) {
24752478
# SOA yields (used for the interactive emissions) have been calculated based on the VBS yields in CAM-chem.
24762479
# Duseong S. Jo, et al. to be submitted to GMD, 2023 -- see https://github.com/ESCOMP/CAM/pull/727 discussion for additional detail.
24772480
my %soae_fctrs = ('BENZENE_an_srf_file' => '2.5592D0',
@@ -2686,7 +2689,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
26862689
add_default($nl, 'megan_factors_file');
26872690
add_default($nl, 'megan_mapped_emisfctrs', 'val'=>'.false.');
26882691
}
2689-
if ($chem =~ /trop_strat_mam5_ts4/) {
2692+
if ($chem =~ /trop_strat_mam5_ts4/ or $chem =~ /_t4ma/) {
26902693
my $val = "'ISOP = isoprene',"
26912694
. "'TERP = carene_3 + pinene_a + thujene_a + bornene + terpineol_4 + terpineol_a + terpinyl_ACT_a +',"
26922695
. "' myrtenal + sabinene + pinene_b + camphene + fenchene_a + limonene + phellandrene_a + terpinene_a +',"
@@ -2757,7 +2760,7 @@ if ($phys =~ /cam6/ or $phys =~ /cam7/) {
27572760
add_default($nl, 'megan_mapped_emisfctrs', 'val'=>'.false.');
27582761
}
27592762
if ($chem =~ /waccm_ma/) {
2760-
my $val = "'CH2O = formaldehyde', 'CO = carbon_monoxide'";
2763+
my $val = "'CH2O = formaldehyde','CO = carbon_monoxide'";
27612764
add_default($nl, 'megan_specifier', 'val'=>$val);
27622765
add_default($nl, 'megan_factors_file');
27632766
add_default($nl, 'megan_mapped_emisfctrs', 'val'=>'.false.');
@@ -2891,12 +2894,13 @@ if ($chem eq 'trop_mam7') {
28912894
}
28922895

28932896
my $waccmx = $cfg->get('waccmx');
2897+
my $model_top = $cfg->get('model_top');
28942898

28952899
# set maximum solar zenith angle for photolysis
28962900
my $maxzen = 0.0;
28972901
if ($waccmx){
28982902
$maxzen = 116.;
2899-
} elsif ($chem =~ "trop_strat" or $chem =~ "waccm_") {
2903+
} elsif ($chem =~ "trop_strat" or $chem =~ "waccm_" or $model_top eq "ht") {
29002904
$maxzen = 97.01;
29012905
} elsif ($chem =~ "trop_mam" or $chem =~ "trop_mozart" or $chem =~ "ghg_mam") {
29022906
$maxzen = 88.85;
@@ -2907,17 +2911,17 @@ if ($maxzen>0.0) {
29072911

29082912
# upper boundary specifier
29092913
my $ubc_ver;
2910-
if (($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ ) and !$waccmx) {
2914+
if (($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ or $chem =~ /waccm_t4ma/) and !$waccmx) {
29112915
$ubc_ver = 'waccmchem';
2912-
} elsif ($chem =~ /waccm_sc/) {
2916+
} elsif ($chem =~ /waccm_sc/ or ($model_top eq "ht" and $chem =~ /ghg_mam/)) {
29132917
$ubc_ver = 'waccmsc';
29142918
}
29152919
if (defined $ubc_ver) {
29162920
add_default($nl, 'ubc_specifier', 'ver'=>$ubc_ver);
29172921
}
29182922

29192923
# WACCM options.
2920-
if ($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/) {
2924+
if ($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ or $chem =~ /waccm_t4ma/) {
29212925

29222926
# Species with fixed lower boundary
29232927
my $val = "'CCL4','CF2CLBR','CF3BR','CFC11','CFC113','CFC12','CH3BR','CH3CCL3','CH3CL','CH4','CO2'"

bld/config_files/definition.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ Switch to turn on analytic initial conditions for the dynamics state:
4646
0 => no
4747
1 => yes.
4848
</entry>
49-
<entry id="model_top" valid_values="none,lt,mt" value="none">
49+
<entry id="model_top" valid_values="none,lt,mt,ht,xt" value="none">
5050
Model top specifier - set by compset definition
5151
lt: ~ 40 km top
5252
mt: ~ 80 km top
53+
ht: ~ 140 km top
54+
xt: ~ 500 km top
5355
</entry>
5456
<entry id="waccmx" valid_values="0,1" value="0">
5557
Option to turn on waccmx thermosphere/ionosphere extension: 0 => no, 1 => yes
@@ -101,8 +103,8 @@ test_radiative (Radiatively Active Dust), test_swelling (Sea Salt), test_tracers
101103
trop_strat_soa1 (Trop Strat Aerosols SOA1),
102104
trop_strat_soa5 (Trop Strat Aerosols SOA5)
103105
</entry>
104-
<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="">
105-
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
106+
<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="">
107+
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
106108
</entry>
107109
<entry id="prog_species" valid_values="DST,SSLT,SO4,GHG,OC,BC,CARBON16" value="" list="1">
108110
Prognostic mozart species packages: list of any subset of the following: DST,SSLT,SO4,GHG,OC,BC,CARBON16

bld/configure

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ OPTIONS
8989
-max_n_rad_cnst <n> Maximum number of constituents that are either radiatively
9090
active, or in any single diagnostic list for the radiation.
9191
-microphys <name> Specify the microphysics option [mg1 | mg2 | mg3| rk | pumas].
92-
-model_top <name> Specify the model_top option for cam7 [ lt | mt ].
92+
-model_top <name> Specify the model_top option for cam7 [ lt | mt | ht | xt ].
9393
-nadv <n> Set total number of advected species to <n>.
9494
-nadv_tt <n> Set number of advected test tracers <n>.
9595
-nlev <n> Set number of levels to <n>.
@@ -685,8 +685,8 @@ $waccm_phys = $cfg_ref->get('waccm_phys');
685685

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

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

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

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

12141215
# Defaults
1215-
if ($waccmx) {
1216+
if ($phys_pkg eq 'cam7') {
1217+
if ($model_top eq 'lt') {
1218+
$nlev = 58;
1219+
} elsif ($model_top eq 'mt') {
1220+
$nlev = 93;
1221+
} elsif ($model_top eq 'ht') {
1222+
$nlev = 135;
1223+
} elsif ($model_top eq 'xt') {
1224+
$nlev = 189;
1225+
} else {
1226+
$nlev = 32; # this is for some old cam_dev tests
1227+
}
1228+
}
1229+
elsif ($waccmx) {
12161230
if ($phys_pkg eq 'cam6') {
12171231
$nlev = 130;
1218-
} elsif ($phys_pkg eq 'cam7') {
1219-
$nlev = 130;
12201232
} else {
12211233
$nlev = 126;
12221234
}
@@ -1229,9 +1241,6 @@ elsif ($chem_pkg =~ /waccm_/) {
12291241
$nlev = 70;
12301242
}
12311243
}
1232-
elsif ($phys_pkg eq 'cam7') {
1233-
$nlev = 32;
1234-
}
12351244
elsif ($phys_pkg eq 'cam6') {
12361245
$nlev = 32;
12371246
}
@@ -1242,9 +1251,9 @@ elsif ($phys_pkg eq 'cam4') {
12421251
$nlev = 26;
12431252
}
12441253
else {
1245-
# This will be used for Held-Suarez and other 'simple' physics
1246-
# We may change this to 32 once IC files are available.
1247-
$nlev = 30;
1254+
# Simple models use cam7-lt vertical grid.
1255+
# $nlev = 58; # - ERROR: No default value found for ncdata
1256+
$nlev = 30; # bit-for-bit baselines for now
12481257
}
12491258

12501259
# user override

0 commit comments

Comments
 (0)