Skip to content

Commit

Permalink
updates that are consistent with noresm2_1 branch goldy/fix_ice_delim…
Browse files Browse the repository at this point in the history
…iter_bug_fix
  • Loading branch information
mvertens committed Jan 3, 2024
1 parent 199858c commit 3cf4116
Show file tree
Hide file tree
Showing 23 changed files with 548 additions and 2,992 deletions.
3 changes: 3 additions & 0 deletions bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -310,5 +310,8 @@ SPCAM horizontal grid spacing, m
<entry id="spcam_dt" value="1">
SPCAM time step, s
</entry>
<entry id="aerocom" valid_values="0,1" value="0">
Turns on aerocom
</entry>

</config_definition>
11 changes: 10 additions & 1 deletion bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ OPTIONS
Options used to determine the CAM model configuration. These options will have an
effect whether running CAM as part of CCSM or running in a CAM standalone mode:
-aerocom Enable AEROCOM cpp-def for OSLO_AERO
-[no]age_of_air_trcs Switch on [off] age of air tracers. Default: on for waccm_phys, otherwise off.
-analytic_ic Enables the (namelist controlled) dycore testing infrastructure
-aquaplanet Switch on aqua-planet mode.
Expand Down Expand Up @@ -290,6 +291,7 @@ my %opts = (
cache => "config_cache.xml",
);
GetOptions(
"aerocom!" => \$opts{'aerocom'},
"age_of_air_trcs!" => \$opts{'age_of_air_trcs'},
"analytic_ic" => \$opts{'analytic_ic'},
"aquaplanet" => \$opts{'aquaplanet'},
Expand Down Expand Up @@ -1437,7 +1439,6 @@ if ($chem_pkg =~ '_mam3') {
}

if ($chem_pkg =~ '_oslo') {
#$chem_cppdefs = ' -DOSLO_AERO -DAEROCOM'
$chem_cppdefs = ' -DOSLO_AERO'
}

Expand Down Expand Up @@ -1974,6 +1975,14 @@ if ($clubb_sgs == 1) {
$cfg_cppdefs .= " -DCLUBB_REAL_TYPE=dp";
}

# Turn on aerocom
my $aerocom_opt = (defined $opts{'aerocom'}) ? 1 : 0;
$cfg_ref->set('aerocom', $aerocom_opt);
my $aerocom = $cfg_ref->get('aerocom');
if ($aerocom eq 1) {
$cfg_cppdefs .= ' -DAEROCOM';
}

# UNICON
if ($unicon) { $cfg_cppdefs .= ' -DUSE_UNICON'; }

Expand Down
5 changes: 5 additions & 0 deletions cime_config/buildcpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def buildcpp(case):
compiler = case.get_value("COMPILER") # for chem preprocessor
nthrds_atm = case.get_value("NTHRDS_ATM")
cam_config_opts = case.get_value("CAM_CONFIG_OPTS")
cam_aerocom = case.get_value("CAM_AEROCOM")

# level information for CAM is part of the atm grid name - and must be stripped out
nlev = ''
Expand Down Expand Up @@ -99,6 +100,10 @@ def buildcpp(case):
if "-cosp" in config_opts:
config_opts += ["-cosp_libdir", os.path.join(exeroot, "atm", "obj", "cosp")]

print(f"cam_aerocom is {cam_aerocom}")
if cam_aerocom:
config_opts += [" -aerocom"]

camconf = os.path.join(caseroot, "Buildconf", "camconf")
if not os.path.isdir(camconf):
os.makedirs(camconf)
Expand Down
8 changes: 8 additions & 0 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@
<desc>CAM dynamical core</desc>
</entry>

<entry id="CAM_AEROCOM">
<type>logical</type>
<default_value>FALSE</default_value>
<group>build_component_cam</group>
<file>env_build.xml</file>
<desc>If true, turn on aerocom diagnostics for oslo-aerosol package</desc>
</entry>

<entry id="CAM_CONFIG_OPTS">
<type>char</type>
<valid_values></valid_values>
Expand Down
Loading

0 comments on commit 3cf4116

Please sign in to comment.