Skip to content

Commit a01a051

Browse files
authored
Merge pull request #1217 from brian-eaton/rm-spcam
cam6_4_067: Remove SPCAM
2 parents 1ba445b + db2371f commit a01a051

File tree

202 files changed

+249
-100114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+249
-100114
lines changed

bld/build-namelist

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3686,7 +3686,7 @@ if ($cfg->get('microphys') eq 'rk') {
36863686
}
36873687

36883688
# Eddy Diffusivity Adjustments
3689-
if ($cfg->get('pbl') eq "uw" or $cfg->get('pbl') eq "spcam_m2005") {
3689+
if ($cfg->get('pbl') eq "uw") {
36903690
add_default($nl, 'kv_top_pressure');
36913691
add_default($nl, 'kv_top_scale');
36923692
add_default($nl, 'kv_freetrop_scale');
@@ -4369,11 +4369,6 @@ if ($offline_drv ne 'stub') {
43694369
}
43704370
}
43714371

4372-
if ($phys eq 'spcam_sam1mom' or $phys eq 'spcam_m2005') {
4373-
add_default($nl, 'iradsw', 'val'=>'1');
4374-
add_default($nl, 'iradlw', 'val'=>'1');
4375-
}
4376-
43774372
#-----------------------------------------------------------------------------------------------
43784373
# Rename component logfiles.
43794374
#

bld/config_files/definition.xml

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ Option to turn on waccmx thermosphere/ionosphere extension: 0 => no, 1 => yes
5757
<entry id="ionosphere" valid_values="none,wxie" value="none">
5858
Ionosphere model used in WACCMX.
5959
</entry>
60-
<entry id="phys" valid_values="cam4,cam5,cam6,cam7,held_suarez,adiabatic,kessler,tj2016,grayrad,spcam_sam1mom,spcam_m2005" value="">
61-
Physics package: cam4, cam5, cam6, cam7, held_suarez, adiabatic, kessler, tj2016, grayrad, spcam_sam1mom, spcam_m2005.
60+
<entry id="phys" valid_values="cam4,cam5,cam6,cam7,held_suarez,adiabatic,kessler,tj2016,grayrad" value="">
61+
Physics package: cam4, cam5, cam6, cam7, held_suarez, adiabatic, kessler, tj2016, grayrad.
6262
</entry>
6363
<entry id="hemco" valid_values="0,1" value="0">
6464
Switch to turn on Harmonized Emissions Component (HEMCO) for chemistry: 0 => no, 1 => yes.
6565
</entry>
66-
<entry id="microphys" valid_values="rk,mg1,mg2,mg3,pumas,spcam_m2005,spcam_sam1mom,none" value="">
66+
<entry id="microphys" valid_values="rk,mg1,mg2,mg3,pumas,none" value="">
6767
Microphysics package: rk (Rasch and Kristjansson), mg1 (Morrison and
6868
Gettelman two moment scheme CAM5.1), mg2 (Morrison and Gettelman second
69-
version CAM6), mg3 (MG scheme 3rd version, graupel), PUMAS, SPCAM_m2005, SPCAM_sam1mom.
69+
version CAM6), mg3 (MG scheme 3rd version, graupel), PUMAS.
7070
</entry>
71-
<entry id="macrophys" valid_values="rk,park,clubb_sgs,spcam_sam1mom,spcam_m2005,none" value="">
72-
Macrophysics package: RK, Park, CLUBB_SGS, SPCAM_sam1mom, SPCAM_m2005.
71+
<entry id="macrophys" valid_values="rk,park,clubb_sgs,none" value="">
72+
Macrophysics package: RK, Park, CLUBB_SGS.
7373
</entry>
7474
<entry id="clubb_sgs" valid_values="0,1" value="0">
7575
Switch to turn on CLUBB_SGS package: 0 => no, 1 => yes
@@ -83,9 +83,9 @@ Switch to turn on UNICON package: 0 => off, 1 => on
8383
<entry id="clubb_do_adv" valid_values="0,1" value="0">
8484
Switch to turn on/off advecting CLUBB moments: 0 => no, 1 => yes
8585
</entry>
86-
<entry id="pbl" valid_values="uw,hb,hbr,clubb_sgs,spcam_sam1mom,spcam_m2005,none" value="">
86+
<entry id="pbl" valid_values="uw,hb,hbr,clubb_sgs,none" value="">
8787
PBL package: uw (University of Washington), hb (Holtslag and Boville), hbr
88-
(Holtslag, Boville, and Rasch), clubb_sgs, spcam_sam1om, spcam_m2005, none.
88+
(Holtslag, Boville, and Rasch), clubb_sgs, none.
8989
</entry>
9090
<entry id="rad" valid_values="rrtmgp,rrtmg,camrt,none" value="">
9191
Radiative transfer calculation:
@@ -310,23 +310,5 @@ that setting to allow for cross-compilation, and for instances where the
310310
$OSNAME value is too generic. For example, currently on both cray-xt and
311311
bluegene systems $OSNAME has the value "linux".
312312
</entry>
313-
<entry id="spcam_clubb_sgs" valid_values="0,1" value="0">
314-
Switch to turn on SPCAM version of CLUBB_SGS package: 0 => no, 1 => yes
315-
</entry>
316-
<entry id="spcam_nx" value="4">
317-
SPCAM number of grid points in x
318-
</entry>
319-
<entry id="spcam_ny" value="1">
320-
SPCAM number of grid points in y
321-
</entry>
322-
<entry id="spcam_nz" value="1">
323-
SPCAM number of grid points in z
324-
</entry>
325-
<entry id="spcam_dx" value="1">
326-
SPCAM horizontal grid spacing, m
327-
</entry>
328-
<entry id="spcam_dt" value="1">
329-
SPCAM time step, s
330-
</entry>
331313

332314
</config_definition>

bld/configure

Lines changed: 13 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,12 @@ OPTIONS
9898
-pcols <n> Set maximum number of columns in a chunk to <n>.
9999
-pergro Switch enables building CAM for perturbation growth tests.
100100
-phys <name> Physics option [cam4 | cam5 | cam6 | cam7 |
101-
held_suarez | adiabatic | kessler | tj2016 | grayrad
102-
spcam_sam1mom | spcam_m2005]. Default: cam6
101+
held_suarez | adiabatic | kessler | tj2016 | grayrad].
103102
-prog_species <list>Comma-separate list of prognostic mozart species packages.
104103
Currently available: DST,SSLT,SO4,GHG,OC,BC,CARBON16
105104
-psubcols <n> Maximum number of sub-columns in a run - set to 1 if not using sub-columns (default)
106105
-rad <name> Specify the radiation package [rrtmg | rrtmgp | rrtmgp_gpu | camrt]
107106
-silhs Switch on SILHS.
108-
-spcam_clubb_sgs Turn on the SPCAM version of CLUBB
109-
-spcam_nx <n> SPCAM x-grid. - defaults to 4 (note the CRM requires spcam_nx to be greater than or equal to 4)
110-
-spcam_ny <n> SPCAM y-grid. - defaults to 1
111-
-spcam_dx <n> SPCAM horizontal grid spacing.
112-
-spcam_dt <n> SPCAM timestep.
113107
-unicon Switch to turn on the UNICON scheme. Default: off.
114108
-usr_mech_infile Path and file name of the user supplied chemistry mechanism file.
115109
-waccm_phys Switch enables the use of WACCM physics in any chemistry configuration.
@@ -253,7 +247,6 @@ GetOptions(
253247
"cosp_libdir=s" => \$opts{'cosp_libdir'},
254248
"cppdefs=s" => \$opts{'cppdefs'},
255249
"cpl=s" => \$opts{'cpl'},
256-
"spcam_clubb_sgs" => \$opts{'spcam_clubb_sgs'},
257250
"debug" => \$opts{'debug'},
258251
"dyn=s" => \$opts{'dyn'},
259252
"edit_chem_mech" => \$opts{'edit_chem_mech'},
@@ -302,10 +295,6 @@ GetOptions(
302295
"silhs" => \$opts{'silhs'},
303296
"s|silent" => \$opts{'silent'},
304297
"smp!" => \$opts{'smp'},
305-
"spcam_nx=s" => \$opts{'spcam_nx'},
306-
"spcam_ny=s" => \$opts{'spcam_ny'},
307-
"spcam_dx=s" => \$opts{'spcam_dx'},
308-
"spcam_dt=s" => \$opts{'spcam_dt'},
309298
"spmd!" => \$opts{'spmd'},
310299
"target_os=s" => \$opts{'target_os'},
311300
"unicon" => \$opts{'unicon'},
@@ -565,10 +554,10 @@ if ($phys_pkg =~ m/^adiabatic$|^held_suarez$|^kessler$|^tj2016$|^grayrad$/) {
565554
my $chem_pkg = 'not_set';
566555

567556
# defaults based on physics package
568-
if ($simple_phys or $phys_pkg =~ m/^cam[34]$/ or $phys_pkg eq 'spcam_sam1mom') {
557+
if ($simple_phys or $phys_pkg =~ m/^cam[34]$/) {
569558
$chem_pkg = 'none';
570559
}
571-
elsif ($phys_pkg eq 'cam5' or $phys_pkg eq 'spcam_m2005') {
560+
elsif ($phys_pkg eq 'cam5') {
572561
$chem_pkg = 'trop_mam3';
573562
}
574563
elsif ($phys_pkg eq 'cam6') {
@@ -599,7 +588,7 @@ if (defined $opts{'chem'}) {
599588
" -chem can only be set to 'none' or 'terminator'.\n";
600589
}
601590
}
602-
elsif ($phys_pkg =~ m/^cam4$|^spcam_sam1mom$/) {
591+
elsif ($phys_pkg =~ m/cam4/) {
603592
# The modal aerosols are not valid with cam4 physics
604593
if ($chem_pkg =~ /_mam/) {
605594
die "configure ERROR: -phys=$phys_pkg -chem=$chem_pkg\n".
@@ -764,46 +753,6 @@ my $co2_cycle = $cfg_ref->get('co2_cycle');
764753

765754
if ($co2_cycle and $print>=2) { print "co2_cycle option: ON$eol"; }
766755

767-
#-----------------------------------------------------------------------------------------------
768-
# Superparameterization mode (SPCAM)
769-
#
770-
# These values all default to 1 unless specified by the user during configure
771-
772-
if ($phys_pkg eq 'spcam_sam1mom' or $phys_pkg eq 'spcam_m2005') {
773-
774-
if ($smp eq 'ON') {
775-
die "ERROR: SPCAM may not be used with threading $eol";
776-
}
777-
778-
if ($print>=2) {print "Configure CAM for SPCAM (superparameterization) mode: $phys_pkg.$eol"; }
779-
780-
if (defined $opts{'spcam_nx'}) {
781-
$cfg_ref->set('spcam_nx', $opts{'spcam_nx'});
782-
my $spcam_nx = $cfg_ref->get('spcam_nx');
783-
if ($spcam_nx < 4) {
784-
die "configure ERROR: spcam_nx must be greater than or equal to 4\n";
785-
}
786-
if ($print>=2) {print "spcam_nx= $spcam_nx $eol"; }
787-
}
788-
if (defined $opts{'spcam_ny'}) {
789-
$cfg_ref->set('spcam_ny', $opts{'spcam_ny'});
790-
my $spcam_ny = $cfg_ref->get('spcam_ny');
791-
if ($print>=2) {print "spcam_ny= $spcam_ny $eol"; }
792-
}
793-
if (defined $opts{'spcam_dx'}) {
794-
$cfg_ref->set('spcam_dx', $opts{'spcam_dx'});
795-
my $spcam_dx = $cfg_ref->get('spcam_dx');
796-
if ($print>=2) {print "spcam_nx= $spcam_dx $eol"; }
797-
}
798-
if (defined $opts{'spcam_dt'}) {
799-
$cfg_ref->set('spcam_dt', $opts{'spcam_dt'});
800-
my $spcam_dt = $cfg_ref->get('spcam_dt');
801-
if ($print>=2) {print "spcam_nt= $spcam_dt $eol"; }
802-
}
803-
804-
}
805-
806-
807756
#-----------------------------------------------------------------------------------------------
808757
# Micro-physics package
809758

@@ -821,12 +770,6 @@ elsif ($phys_pkg eq 'cam6') {
821770
elsif ($phys_pkg eq 'cam7') {
822771
$microphys_pkg = 'mg3';
823772
}
824-
elsif ($phys_pkg eq 'spcam_sam1mom') {
825-
$microphys_pkg = 'spcam_sam1mom';
826-
}
827-
elsif ($phys_pkg eq 'spcam_m2005') {
828-
$microphys_pkg = 'spcam_m2005';
829-
}
830773

831774
# Allow the user to override the default via the commandline.
832775
if (defined $opts{'microphys'}) {
@@ -916,14 +859,6 @@ $cfg_ref->set('silhs', $silhs);
916859

917860
if ($print>=2) { print "silhs: $silhs$eol"; }
918861

919-
#-----------------------------------------------------------------------------------------------
920-
# SPCAM version of CLUBB
921-
if (defined $opts{'spcam_clubb_sgs'}) {
922-
$cfg_ref->set('spcam_clubb_sgs', $opts{'spcam_clubb_sgs'});
923-
}
924-
my $spcam_clubb_sgs = $cfg_ref->get('spcam_clubb_sgs');
925-
926-
927862
#-----------------------------------------------------------------------------------------------
928863
# Break apart CLUBB options into separate fields
929864

@@ -955,18 +890,12 @@ elsif ($phys_pkg =~ /cam6/) {
955890
$macrophys_pkg = 'park';
956891
}
957892
}
958-
elsif ($phys_pkg =~ /cam7/ and $clubb_sgs) {
893+
elsif ($phys_pkg =~ /cam7/) {
959894
$macrophys_pkg = 'clubb_sgs';
960895
}
961-
elsif ($phys_pkg eq 'spcam_sam1mom') {
962-
$macrophys_pkg = 'spcam_sam1mom';
963-
}
964-
elsif ($phys_pkg eq 'spcam_m2005') {
965-
$macrophys_pkg = 'spcam_m2005';
966-
}
967896

968897
# user overrides
969-
if ($clubb_sgs or $spcam_clubb_sgs) {
898+
if ($clubb_sgs) {
970899
$macrophys_pkg = 'clubb_sgs';
971900
}
972901

@@ -998,15 +927,9 @@ elsif ($phys_pkg =~ /cam6/) {
998927
$pbl_pkg = 'uw';
999928
}
1000929
}
1001-
elsif ($phys_pkg =~ /cam7/ and $clubb_sgs) {
930+
elsif ($phys_pkg =~ /cam7/) {
1002931
$pbl_pkg = 'clubb_sgs';
1003932
}
1004-
elsif ($phys_pkg eq 'spcam_sam1mom') {
1005-
$pbl_pkg = 'spcam_sam1mom';
1006-
}
1007-
elsif ($phys_pkg eq 'spcam_m2005') {
1008-
$pbl_pkg = 'spcam_m2005';
1009-
}
1010933

1011934
# Allow the user to override the default via the commandline.
1012935
if ($clubb_sgs == 1) {
@@ -1058,10 +981,10 @@ if ($unicon and $print>=2) { print "Using UNICON scheme.$eol"; }
1058981

1059982
# Set default
1060983
my $rad_pkg = 'none';
1061-
if ($phys_pkg =~ m/cam4|spcam_sam1mom/) {
984+
if ($phys_pkg =~ m/cam4/) {
1062985
$rad_pkg = 'camrt';
1063986
}
1064-
elsif ($phys_pkg =~ m/cam5|cam6|spcam_m2005/) {
987+
elsif ($phys_pkg =~ m/cam5|cam6/) {
1065988
$rad_pkg = 'rrtmg';
1066989
}
1067990
elsif ($phys_pkg =~ m/cam7/) {
@@ -1116,31 +1039,6 @@ if ($cosp and ($phys_pkg ne 'cam5' and $phys_pkg ne 'cam6' and $phys_pkg ne 'cam
11161039

11171040
if ($cosp and $print>=2) { print "COSP simulator enabled$eol"; }
11181041

1119-
#-----------------------------------------------------------------------------------------------
1120-
# Checks for SPCAM compatability
1121-
1122-
if ($phys_pkg eq 'spcam_sam1mom') {
1123-
if ($rad_pkg ne 'camrt') {
1124-
die "configure ERROR: radiation package: $rad_pkg is not compatible\n".
1125-
" with sam1mom -- it should be camrt\n";
1126-
}
1127-
if ($chem_pkg ne 'none') {
1128-
die "configure ERROR: chemistry package: $chem_pkg is not compatible\n".
1129-
" with sam1mom -- it should be none\n";
1130-
}
1131-
}
1132-
1133-
if ($phys_pkg eq 'spcam_m2005') {
1134-
if ($rad_pkg !~ m/rrtmg/) {
1135-
die "configure ERROR: radiation package: $rad_pkg is not compatible\n".
1136-
" with m2005 -- it should be rrtmg\n";
1137-
}
1138-
if ($chem_pkg ne 'trop_mam3') {
1139-
die "configure ERROR: chemistry package: $chem_pkg is not compatible\n".
1140-
" with m2005 -- it should be trop_mam3\n";
1141-
}
1142-
}
1143-
11441042
#-----------------------------------------------------------------------------------------------
11451043
# offline unit driver
11461044
if (defined $opts{'offline_drv'}) {
@@ -1349,10 +1247,10 @@ elsif ($phys_pkg eq 'cam7') {
13491247
elsif ($phys_pkg eq 'cam6') {
13501248
$nlev = 32;
13511249
}
1352-
elsif ($phys_pkg eq 'cam5' or $phys_pkg eq 'spcam_m2005') {
1250+
elsif ($phys_pkg eq 'cam5') {
13531251
$nlev = 30;
13541252
}
1355-
elsif ($phys_pkg eq 'cam4' or $phys_pkg eq 'spcam_sam1mom') {
1253+
elsif ($phys_pkg eq 'cam4') {
13561254
$nlev = 26;
13571255
}
13581256
else {
@@ -1377,10 +1275,6 @@ $cfg_ref->set('nlev', $nlev);
13771275

13781276
if ($print>=2) { print "Number of vertical levels: $nlev$eol"; }
13791277

1380-
if ($phys_pkg eq 'spcam_sam1mom' or $phys_pkg eq 'spcam_m2005') {
1381-
$cfg_ref->set('spcam_nz', $nlev-2);
1382-
}
1383-
13841278
#------------------------------------------------------------------------------------------------
13851279
# chemistry preprocessor....
13861280
# -- avoid using the chem_preprocessor unless it's required
@@ -1539,11 +1433,11 @@ else {
15391433
unless ($simple_phys) {
15401434

15411435
# Microphysics parameterization
1542-
if ($microphys_pkg eq 'rk' or $microphys_pkg eq 'spcam_sam1mom') {
1436+
if ($microphys_pkg eq 'rk') {
15431437
$nadv += 2;
15441438
if ($print>=2) { print "Advected constituents added by $microphys_pkg microphysics: 2$eol"; }
15451439
}
1546-
elsif ($microphys_pkg =~ /^mg1/ or $microphys_pkg eq 'spcam_m2005') {
1440+
elsif ($microphys_pkg =~ /^mg1/) {
15471441
$nadv += 4;
15481442
if ($print>=2) { print "Advected constituents added by $microphys_pkg microphysics: 4$eol"; }
15491443
}
@@ -1843,28 +1737,6 @@ my $cfg_cppdefs = ' ';
18431737
# Building for perturbation growth tests
18441738
if ($pergro eq "ON") { $cfg_cppdefs .= " -DPERGRO"; }
18451739

1846-
# Building for superparameterization
1847-
my $spcam_clubb_sgs = $cfg_ref->get('spcam_clubb_sgs');
1848-
my $spcam_nx = $cfg_ref->get('spcam_nx');
1849-
my $spcam_ny = $cfg_ref->get('spcam_ny');
1850-
my $spcam_nz = $cfg_ref->get('spcam_nz');
1851-
my $spcam_dx = $cfg_ref->get('spcam_dx');
1852-
my $spcam_dt = $cfg_ref->get('spcam_dt');
1853-
1854-
my $yes3Dval = 1; # default to 3D for spcam
1855-
if ($spcam_ny eq 1) {$yes3Dval = 0;} #Turn off if not using 3D
1856-
1857-
if ($phys_pkg eq 'spcam_m2005' or $phys_pkg eq 'spcam_sam1mom') {
1858-
$cfg_cppdefs .= " -DSPCAM_NX=$spcam_nx -DSPCAM_NY=$spcam_ny -DSPCAM_NZ=$spcam_nz -DSPCAM_DX=$spcam_dx -DSPCAM_DT=$spcam_dt -DYES3DVAL=$yes3Dval -DCRM ";
1859-
if ( $spcam_clubb_sgs == 1 ) {
1860-
$cfg_cppdefs .= "-DSPCAM_CLUBB_SGS -DCLUBB_CRM -DCLUBB_REAL_TYPE=dp -DCLUBB_SAM"; ## -DNO_LAPACK_ISNAN";
1861-
}
1862-
}
1863-
1864-
if ($phys_pkg eq 'spcam_m2005') {$cfg_cppdefs .= " -DECPP -Dm2005";}
1865-
1866-
if ($phys_pkg eq 'spcam_sam1mom') {$cfg_cppdefs .= " -Dsam1mom";}
1867-
18681740
# Configure CAM to produce IOP files for SCAM
18691741
if ($camiop eq 'ON') { $cfg_cppdefs .= " -DBFB_CAM_SCAM_IOP"; }
18701742

@@ -2289,29 +2161,6 @@ sub write_filepath
22892161
print $fh "$camsrcdir/src/physics/pumas-frozen\n";
22902162
}
22912163

2292-
# Superparameterization
2293-
if ($phys_pkg eq 'spcam_m2005' or $phys_pkg eq 'spcam_sam1mom') {
2294-
print $fh "$camsrcdir/src/physics/spcam\n";
2295-
print $fh "$camsrcdir/src/physics/spcam/crm\n";
2296-
2297-
# add additional directories for sam6.10.4
2298-
print $fh "$camsrcdir/src/physics/spcam/crm/ADV_MPDATA\n";
2299-
if ($phys_pkg eq 'spcam_sam1mom') {
2300-
print $fh "$camsrcdir/src/physics/spcam/crm/MICRO_SAM1MOM\n";
2301-
}
2302-
if ($phys_pkg eq 'spcam_m2005') {
2303-
print $fh "$camsrcdir/src/physics/spcam/crm/MICRO_M2005\n";
2304-
print $fh "$camsrcdir/src/physics/spcam/ecpp\n";
2305-
}
2306-
if ( $spcam_clubb_sgs == 1 ) {
2307-
print $fh "$camsrcdir/src/physics/spcam/crm/CLUBB\n";
2308-
print $fh "$camsrcdir/src/physics/spcam/crm/SGS_CLUBBkvhkvm\n"
2309-
}
2310-
else {
2311-
print $fh "$camsrcdir/src/physics/spcam/crm/SGS_TKE\n";
2312-
}
2313-
}
2314-
23152164
# This directory contains much of the code for physics packages,
23162165
# as well as the cam specific interface modules that may need to
23172166
# be overridden by modules from directories that occur earlier

0 commit comments

Comments
 (0)