Skip to content

Commit

Permalink
Modifications to 'noresm_v4_cam6_3_112-13-g7c4d42ad' for merging with…
Browse files Browse the repository at this point in the history
… CAM-Nor

- Configuration and code changes from ESCOMP between cam6_3_112 and cam6_3_123
- Adjust compsets, tests, and externals to be compatible with cam6_3_123 settings.
  • Loading branch information
Steve Goldhaber committed Aug 25, 2023
1 parent 7c4d42a commit 3fa48b2
Show file tree
Hide file tree
Showing 10 changed files with 446 additions and 112 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ src/physics/silhs
src/physics/pumas
src/physics/pumas-frozen
src/dynamics/fv3/atmos_cubed_sphere
src/hemco
libraries/FMS
libraries/mct
libraries/parallelio
Expand Down
24 changes: 12 additions & 12 deletions Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
#-----------------------------

[parallelio]
tag = pio2_5_10
protocol = git
tag = pio2_5_10
repo_url = https://github.com/NCAR/ParallelIO
local_path = libraries/parallelio
required = True

[mct]
tag = MCT_2.11.0
protocol = git
tag = MCT_2.11.0
repo_url = https://github.com/MCSclimate/MCT
local_path = libraries/mct
required = True
Expand All @@ -21,15 +21,15 @@ required = True
#-----------------------------

[ccs_config]
tag = ccs_config_noresm0.0.13
protocol = git
tag = ccs_config_noresm0.0.14
repo_url = https://github.com/NorESMhub/ccs_config_noresm.git
local_path = ccs_config
required = True

[cime]
tag = cime6.0.105_noresm_v2
protocol = git
tag = cime6.0.105_noresm_v4
repo_url = https://github.com/NorESMhub/cime.git
local_path = cime
required = True
Expand All @@ -39,8 +39,8 @@ required = True
#-----------------------------

[share]
tag = share1.0.17_noresm_v1
protocol = git
tag = share1.0.17_noresm_v1
repo_url = https://github.com/NorESMHub/NorESM_share
local_path = share
required = True
Expand All @@ -50,24 +50,24 @@ required = True
#-----------------------------

[cice6]
tag = cesm_cice6_4_1_7_noresm_v1
protocol = git
tag = cesm_cice6_4_1_7_noresm_v1
repo_url = https://github.com/NorESMhub/NorESM_CICE
local_path = components/cice
externals = Externals.cfg
required = True

[cdeps]
tag = cdeps1.0.10
protocol = git
tag = cdeps1.0.10
repo_url = https://github.com/NorESMhub/CDEPS.git
local_path = components/cdeps
externals = Externals_CDEPS.cfg
required = True

[cmeps]
tag = cmeps0.14.32_noresm_v0
protocol = git
tag = cmeps0.14.32_noresm_v2
repo_url = https://github.com/NorESMhub/CMEPS.git
local_path = components/cmeps
required = True
Expand All @@ -81,30 +81,30 @@ externals = Externals_CISM.cfg
required = True

[clm]
tag = ctsm5.1.dev124-noresm_v1
protocol = git
tag = ctsm5.1dev130-noresm_v1
repo_url = https://github.com/NorESMhub/CTSM
local_path = components/clm
externals = Externals_CLM.cfg
required = True

[mosart]
tag = mosart1_0_48_noresm_v1
protocol = git
tag = mosart1_0_48_noresm_v1
repo_url = https://github.com/NorESMhub/MOSART
local_path = components/mosart
required = True

[rtm]
tag = rtm1_0_78
protocol = git
tag = rtm1_0_78
repo_url = https://github.com/ESCOMP/RTM
local_path = components/rtm
required = True

[cam]
local_path = .
protocol = externals_only
local_path = .
externals = Externals_CAM.cfg
required = True

Expand Down
50 changes: 29 additions & 21 deletions Externals_CAM.cfg
Original file line number Diff line number Diff line change
@@ -1,72 +1,80 @@
[chem_proc]
local_path = chem_proc
protocol = git
repo_url = https://github.com/ESCOMP/CHEM_PREPROCESSOR.git
tag = chem_proc5_0_05
repo_url = https://github.com/ESCOMP/CHEM_PREPROCESSOR.git
local_path = chem_proc
required = True

[carma]
local_path = src/physics/carma/base
protocol = git
repo_url = https://github.com/ESCOMP/CARMA_base.git
tag = carma4_00
repo_url = https://github.com/ESCOMP/CARMA_base.git
local_path = src/physics/carma/base
required = True

[cosp2]
local_path = src/physics/cosp2/src
protocol = svn
repo_url = https://github.com/CFMIP/COSPv2.0/tags/
tag = v2.1.4cesm/src
repo_url = https://github.com/CFMIP/COSPv2.0/tags/
local_path = src/physics/cosp2/src
required = True

[clubb]
local_path = src/physics/clubb
protocol = svn
repo_url = https://github.com/larson-group/clubb_release/tags/
tag = clubb_4ncar_20221129_59cb19f_20230330_branchtag/src/CLUBB_core
repo_url = https://github.com/larson-group/clubb_release/tags/
local_path = src/physics/clubb
required = True

[silhs]
local_path = src/physics/silhs
protocol = svn
repo_url = https://github.com/larson-group/clubb_release/tags/
tag = clubb_4ncar_20221129_59cb19f_20230330_branchtag/src/SILHS
repo_url = https://github.com/larson-group/clubb_release/tags/
local_path = src/physics/silhs
required = True

[pumas]
local_path = src/physics/pumas
protocol = git
repo_url = https://github.com/ESCOMP/PUMAS
tag = pumas_cam-release_v1.29
repo_url = https://github.com/ESCOMP/PUMAS
local_path = src/physics/pumas
required = True

[pumas-frozen]
local_path = src/physics/pumas-frozen
protocol = git
repo_url = https://github.com/ESCOMP/PUMAS
tag = pumas_cam-release_v1.17_rename
repo_url = https://github.com/ESCOMP/PUMAS
local_path = src/physics/pumas-frozen
required = True

[ali_arms]
local_path = src/physics/ali_arms
protocol = git
tag = ALI_ARMS_v1.0.1
repo_url = https://github.com/ESCOMP/ALI-ARMS
tag = ALI_ARMS_v1.0.0
local_path = src/physics/ali_arms
required = True

[atmos_phys]
tag = atmos_phys0_00_011
protocol = git
tag = atmos_phys0_00_011
repo_url = https://github.com/NCAR/atmospheric_physics
required = True
local_path = src/atmos_phys
required = True

[camnor_phys]
tag = camnor_noresm_v0.0.1
protocol = git
tag = camnor_noresm_v0.0.3
repo_url = https://github.com/NorESMhub/CAM-Nor-physics
required = True
local_path = src/physics/camnor_phys
required = True

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

[externals_description]
schema_version = 1.0.0
schema_version = 1.0.01
12 changes: 10 additions & 2 deletions bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,22 @@ Switch to turn on analytic initial conditions for the dynamics state:
0 => no
1 => yes.
</entry>
<entry id="model_top" valid_values="none,lt,mt" value="none">
Model top specifier - set by compset definition
lt: ~ 40 km top
mt: ~ 80 km top
</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="hemco" valid_values="0,1" value="0">
Switch to turn on Harmonized Emissions Component (HEMCO) for chemistry: 0 => no, 1 => yes.
</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
46 changes: 44 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,18 @@ 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 @@ -1559,6 +1573,8 @@ $nadv = $cfg_ref->get('nadv');
if ($print>=2) { print "Total advected constituents: $nadv$eol"; }

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

##-----------------------------------------------------------------------------------------------
# Makefile configuration #######################################################################
#-----------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -1913,9 +1929,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 +2152,21 @@ 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
Loading

0 comments on commit 3fa48b2

Please sign in to comment.