Skip to content
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

cam6_4_023: SCAM-SE feature addition plus bugfixes and some refactoring. #958

Merged
merged 36 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
872b60e
build script mods to allow se builds
jtruesdal May 3, 2023
3006e9c
se scam update
jtruesdal Sep 20, 2023
55ab657
bfb mods
jtruesdal Sep 24, 2023
da514d3
update to cam_development (cam6_3_128)
jtruesdal Sep 25, 2023
fd265ed
se scm updates to cmeps cdeps externals
jtruesdal Sep 29, 2023
f202756
scam updates
jtruesdal Nov 26, 2023
1e56c28
update to cam6_3_136 need to update externals yet
jtruesdal Nov 26, 2023
e4f97ea
external updates for scam_dev 6_3_136
jtruesdal Nov 26, 2023
64aa11e
missed cice external update for scam
jtruesdal Nov 26, 2023
b6ee97c
scam se update
jtruesdal Nov 26, 2023
5a9159a
scam se updates
jtruesdal Jan 3, 2024
b4ed83a
scam clean and updates for derecho
jtruesdal Jan 10, 2024
b567e51
bug fix for iopTimeIdx when iop step size is smaller than model timestep
jtruesdal Jan 21, 2024
e7d33d7
PR updates for Cheryl and Jim
jtruesdal Jan 22, 2024
aac8cf6
new default initialization using config_compset and config_component,…
jtruesdal Feb 20, 2024
6e9b777
check for error with mpi_bcast calls
jtruesdal Feb 26, 2024
91af07d
PR requested updates
jtruesdal Mar 5, 2024
53300de
compile catch/fix for se_single_column_mod
jtruesdal Mar 5, 2024
36e8f4b
shorten a few long lines >132
jtruesdal Mar 5, 2024
8851ffd
bugfix for new minloc replacement for loop with exit
jtruesdal Mar 6, 2024
5f7a485
update ice external tag
jtruesdal Mar 7, 2024
bcd2ea5
dont need these cdep mods
jtruesdal Mar 13, 2024
2e344b3
PR updates for Jesse
jtruesdal Apr 19, 2024
0407135
PR updates
jtruesdal Apr 19, 2024
551612d
PR updates
jtruesdal Apr 19, 2024
6f988cd
PR updates
jtruesdal May 15, 2024
bfc7658
PR update for testing
jtruesdal Jun 25, 2024
66b6a24
merge up to cam6_4_006
jtruesdal Jul 8, 2024
6244ced
remove bfb line for testing
jtruesdal Jul 8, 2024
a972f69
merge up to cam6_4_018
jtruesdal Aug 5, 2024
dcc636d
PR updates: comments,typo, and replace hard coded length with shr_kin…
jtruesdal Aug 6, 2024
e004f55
Merge scam_dev_exp up to cam6_4_022
jtruesdal Aug 20, 2024
54a0ba9
update cice and cdeps for regression failures,Changelog for PR,scam t…
jtruesdal Aug 22, 2024
b88c67e
need scam_mandatory to set COLDSTART until CLM scam mods tagged
jtruesdal Aug 23, 2024
40f6c5c
update mpace regression test and ChangeLog
jtruesdal Aug 25, 2024
c50362c
update ChangeLog, pull hvcoord addition
jtruesdal Aug 26, 2024
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
29 changes: 27 additions & 2 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ if ($adia_mode or $ideal_mode) { $simple_phys = 1; }

# Single column mode
my $scam = $cfg->get('scam');
my $scam_iop = $cfg->get('scam_iop');

# Coupling interval
# The default is for CAM to couple to the surface components every CAM timestep.
Expand Down Expand Up @@ -2510,7 +2511,7 @@ if (($chem =~ /_mam4/ or $chem =~ /_mam5/) and ($phys =~ /cam6/ or $phys =~ /cam
}

# MEGAN emissions
if (($chem eq 'trop_mam4' or $chem eq 'waccm_sc_mam4' or $chem eq 'ghg_mam4') and !$aqua_mode and !$scam){
if (($chem eq 'trop_mam4' or $chem eq 'waccm_sc_mam4' or $chem eq 'ghg_mam4') and !$aqua_mode){
my $val = "'SOAE = 0.5954*isoprene + 5.1004*(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 + terpinene_g + terpinolene +',"
Expand Down Expand Up @@ -3226,7 +3227,7 @@ if ($cfg->get('microphys') =~ /^mg/) {
my $abs_path = quote_string(set_abs_filepath($rel_path, $cam_dir));
#overwrite the relative pathname with the absolute pathname
$nl->set_variable_value('pumas_stochastic_tau_nl', 'pumas_stochastic_tau_kernel_filename', $abs_path);

}else {
# For CESM2, the decision was made to set micro_do_sb_physics to false
# This variable is replaced with micro_mg_warm_rain in cam7 runs
Expand Down Expand Up @@ -4040,6 +4041,30 @@ if ($dyn eq 'sld') {
# Single column model
if ($cfg->get('scam')) {
add_default($nl, 'iopfile');
add_default($nl, 'nhtfrq');
add_default($nl, 'mfilt');
add_default($nl, 'scm_use_obs_uv');
add_default($nl, 'scale_dry_air_mass');
add_default($nl, 'scm_relaxation');
add_default($nl, 'scm_relax_bot_p');
add_default($nl, 'scm_relax_top_p');
add_default($nl, 'scm_relax_linear');
add_default($nl, 'scm_relax_tau_bot_sec');
add_default($nl, 'scm_relax_tau_top_sec');
if ($chem =~ /_mam/) {
add_default($nl, 'scm_relax_fincl');
}
if ($scam_iop) {
add_default($nl, 'iopfile');
}
if ($scam_iop eq 'SAS') {
add_default($nl, 'use_gw_front');
add_default($nl, 'scm_backfill_iop_w_init');
}
if ($scam_iop eq 'twp06') {
add_default($nl, 'iradsw');
add_default($nl, 'iradlw');
}
}

# CAM generates IOP file for SCAM
Expand Down
10 changes: 7 additions & 3 deletions bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,16 @@ Turn on CO2 cycle in biogeochemistry model: 0 => no, 1 => yes.
Modifications that allow perturbation growth testing: 0=off, 1=on.
</entry>
<entry id="scam" valid_values="0,1" value="0">
Configure CAM for single column mode: 0=off, 1=on. This option only
supported for the Eulerian dycore.
Configure CAM for single column mode and specify an IOP: 0=no, 1=yes.
This option only supported for the Eulerian and SE dycores.
</entry>
<entry id="scam_iop" valid_values="arm95,arm97,atex,bomex,cgilss11,cgilss12,cgilss6,dycomsrf01,dycomsrf02,gateiii,mpace,rico,sas,sparticus,togaii,twp06,camfrc,none" value="none">
Single column IOP
Supported for Eulerian and SE dycores.
</entry>
<entry id="camiop" valid_values="0,1" value="0">
Configure CAM to generate an IOP file that can be used to drive SCAM: 0=no, 1=yes.
This option only supported for the Eulerian dycore.
Supported for Eulerian and SE dycores.
</entry>
<entry id="hgrid" value="">
Horizontal grid specifier. The recognized values depend on
Expand Down
29 changes: 21 additions & 8 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ OPTIONS

-camiop Configure CAM to generate an IOP file that can be used to drive SCAM.
This switch only works with the Eulerian dycore.
-scam Compiles model in single column mode. Only works with Eulerian dycore.
-scam <iopname> Compiles model in single column mode and configures for iop
[ arm95 | arm97 | atex | bomex | cgilsS11 | cgilsS12 | cgilsS6 | dycomsRF01 |
dycomsRF02 | gateIII | mpace | rico | sparticus | togaII | twp06 | SAS | camfrc ].
Default: arm97

CAM parallelization:

Expand Down Expand Up @@ -297,7 +300,7 @@ GetOptions(
"psubcols=s" => \$opts{'psubcols'},
"rad=s" => \$opts{'rad'},
"offline_drv=s" => \$opts{'offline_drv'},
"scam" => \$opts{'scam'},
"scam=s" => \$opts{'scam'},
"silhs" => \$opts{'silhs'},
"s|silent" => \$opts{'silent'},
"smp!" => \$opts{'smp'},
Expand Down Expand Up @@ -1203,15 +1206,25 @@ if ($print>=2) { print "Perturbation growth testing: $pergro$eol"; }

#-----------------------------------------------------------------------------------------------
# Single column mode

# Set default iop
my $scam_iop;

# Allow the user to override the default via the commandline.
if (defined $opts{'scam'}) {
$scam_iop = lc($opts{'scam'});
$cfg_ref->set('scam_iop', $scam_iop);
}

if (defined $opts{'scam'}) {
$cfg_ref->set('scam', 1);
}
my $scam = $cfg_ref->get('scam') ? "ON" : "OFF";

# The only dycore supported in SCAM mode is Eulerian
if ($scam eq 'ON' and $dyn_pkg ne 'eul') {
# The only dycores supported in SCAM mode are Eulerian and Spectral Elements
if ($scam eq 'ON' and !($dyn_pkg eq 'eul' or $dyn_pkg eq 'se')) {
die <<"EOF";
** ERROR: SCAM mode only works with Eulerian dycore.
** ERROR: SCAM mode only works with Eulerian or SE dycores.
** Requested dycore is: $dyn_pkg
EOF
}
Expand All @@ -1225,10 +1238,10 @@ if (defined $opts{'camiop'}) {
}
my $camiop = $cfg_ref->get('camiop') ? "ON" : "OFF";

# The only dycore supported in CAMIOP mode is Eulerian
if ($camiop eq 'ON' and $dyn_pkg ne 'eul') {
# The only dycores supported in SCAM mode are Eulerian and Spectral Elements
if ($camiop eq 'ON' and !($dyn_pkg eq 'eul' or $dyn_pkg eq 'se')) {
die <<"EOF";
** ERROR: CAMIOP mode only works with Eulerian dycore.
** ERROR: CAMIOP mode only works with the Eulerian or Spectral Element dycores.
** Requested dycore is: $dyn_pkg
EOF
}
Expand Down
Loading