Skip to content

Commit

Permalink
Added diffs from protected files
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Goldhaber committed Jul 27, 2023
1 parent 684ab3a commit 81fc446
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 4 deletions.
8 changes: 8 additions & 0 deletions Externals_CAM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ repo_url = https://github.com/NCAR/atmospheric_physics
required = True
local_path = src/atmos_phys

[hemco]
local_path = src/hemco
tag = hemco-cesm1_2_0_hemco3_6_2_cesm
protocol = git
repo_url = https://github.com/ESCOMP/HEMCO_CESM.git
required = True
externals = Externals_HCO.cfg

[camnor_phys]
tag = camnor_noresm_v0.0.1
protocol = git
Expand Down
7 changes: 5 additions & 2 deletions bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,17 @@ Switch to turn on analytic initial conditions for the dynamics state:
0 => no
1 => yes.
</entry>
<entry id="hemco" valid_values="0,1" value="0">
Switch to turn on Harmonized Emissions Component (HEMCO) for chemistry: 0 => no, 1 => yes.
</entry>
<entry id="waccmx" valid_values="0,1" value="0">
Option to turn on waccmx thermosphere/ionosphere extension: 0 => no, 1 => yes
</entry>
<entry id="ionosphere" valid_values="none,wxie" value="none">
Ionosphere model used in WACCMX.
</entry>
<entry id="phys" valid_values="cam3,cam4,cam5,cam6,cam_dev,held_suarez,adiabatic,kessler,tj2016,spcam_sam1mom,spcam_m2005" value="">
Physics package: cam3, cam4, cam5, cam6, cam_dev, held_suarez, adiabatic, kessler, tj2016, spcam_sam1mom, spcam_m2005.
<entry id="phys" valid_values="cam3,cam4,cam5,cam6,cam_dev,held_suarez,adiabatic,kessler,tj2016,grayrad,spcam_sam1mom,spcam_m2005" value="">
Physics package: cam3, cam4, cam5, cam6, cam_dev, held_suarez, adiabatic, kessler, tj2016, grayrad, spcam_sam1mom, spcam_m2005.
</entry>
<entry id="camnor" valid_values="0,1" value="0">
Option to turn on NorESM modifications to baseline CESM/CAM physics and dynamics
Expand Down
43 changes: 41 additions & 2 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,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].
-model_top <name> Specify the model_top option [ lt | mt ].
-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 All @@ -98,7 +99,7 @@ OPTIONS
-pcols <n> Set maximum number of columns in a chunk to <n>.
-pergro Switch enables building CAM for perturbation growth tests.
-phys <name> Physics option [cam3 | cam4 | cam5 | cam6 | cam_dev |
held_suarez | adiabatic | kessler | tj2016 |
held_suarez | adiabatic | kessler | tj2016 | grayrad
spcam_sam1mom | spcam_m2005]. Default: cam6
-prog_species <list>Comma-separate list of prognostic mozart species packages.
Currently available: DST,SSLT,SO4,GHG,OC,BC,CARBON16
Expand Down Expand Up @@ -270,6 +271,7 @@ GetOptions(
"max_n_rad_cnst=s" => \$opts{'max_n_rad_cnst'},
"mct_libdir=s" => \$opts{'mct_libdir'},
"microphys=s" => \$opts{'microphys'},
"model_top=s" => \$opts{'model_top'},
"mpi_inc=s" => \$opts{'mpi_inc'},
"mpi_lib=s" => \$opts{'mpi_lib'},
"nadv=s" => \$opts{'nadv'},
Expand Down Expand Up @@ -574,7 +576,7 @@ if ($print>=2) {

# Set flag to indicate a simple physics option
my $simple_phys = 0;
if ($phys_pkg =~ m/^adiabatic$|^held_suarez$|^kessler$|^tj2016$/) {
if ($phys_pkg =~ m/^adiabatic$|^held_suarez$|^kessler$|^tj2016$|^grayrad$/) {
$simple_phys = 1;
}

Expand Down Expand Up @@ -687,6 +689,17 @@ my $max_n_rad_cnst = $cfg_ref->get('max_n_rad_cnst');

if ($print>=2) { print "Maximum radiatively active tracers: $max_n_rad_cnst$eol"; }

#-----------------------------------------------------------------------------------------------
# model_top - not set by default
my $model_top = 'none';
$cfg_ref->set('model_top', $model_top);

# user override
if (defined $opts{'model_top'}) {
$cfg_ref->set('model_top', $opts{'model_top'});
}
if ($print>=2) { print "model_top: $model_top$eol"; }

#-----------------------------------------------------------------------------------------------
# waccm physics
my $waccm_phys = 0;
Expand Down Expand Up @@ -1913,9 +1926,20 @@ if ($silhs == 1) {
$cfg_cppdefs .= ' -DSILHS';
}

# Simple Models
if ($simple_phys) { $cfg_cppdefs .= ' -DSIMPLE'; }

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

# Harmonized Emissions Component (HEMCO)
# These CPP definitions are used by HEMCO to recognize -
# MODEL_ - HEMCO/GEOS-Chem components running in model environment
# MODEL_CESM - ...within CESM
# USE_REAL8 - HEMCO/GEOS-Chem should use real8 internal precision
# HEMCO_CESM - indicates CESM model environment. Deprecated, will be removed soon.
$cfg_cppdefs .= ' -DMODEL_ -DMODEL_CESM -DHEMCO_CESM -DUSE_REAL8 ';

#-----------------------------------------------------------------------------------------------
# CPP defines to put on Makefile

Expand Down Expand Up @@ -2125,6 +2149,20 @@ sub write_filepath
print $fh "$camsrcdir/src/ionosphere\n";

print $fh "$camsrcdir/src/chemistry/mozart\n";

print $fh "$camsrcdir/src/hemco\n";

# shared dependencies for HEMCO (Harmonized Emissions Component)
print $fh "$camsrcdir/src/hemco/HEMCO/src/Shared\n";
print $fh "$camsrcdir/src/hemco/HEMCO/src/Shared/Headers\n";
print $fh "$camsrcdir/src/hemco/HEMCO/src/Shared/GeosUtil\n";
print $fh "$camsrcdir/src/hemco/HEMCO/src/Shared/NcdfUtil\n";

# HEMCO source code directory paths from HEMCO external
print $fh "$camsrcdir/src/hemco/HEMCO/src/Core\n";
print $fh "$camsrcdir/src/hemco/HEMCO/src/Extensions\n";
print $fh "$camsrcdir/src/hemco/HEMCO/src/Interfaces/Shared\n";

print $fh "$camsrcdir/src/chemistry/utils\n";

if ($rad eq 'rrtmg') {
Expand Down Expand Up @@ -2284,6 +2322,7 @@ EOF
$fh_in->close;
}


#-------------------------------------------------------------------------------

sub write_config_h
Expand Down

0 comments on commit 81fc446

Please sign in to comment.