Skip to content

Commit

Permalink
Merge pull request #81 from gold2718/camnor_phys
Browse files Browse the repository at this point in the history
noresm_v4_cam6_3_112: Add NF compsets

NF (CAM-Nor) compsets are CAM%DEV (prototype CAM7) F compsets with NorESM modifications.

NF compsets introduce the %NORESM option in config_compsets and use it to turn on CAM-Nor changes to baseline CAM6 or CAM%DEV configurations. CAM-Nor physics is included from a separate repository in src/physics/camnor_phys.

- Bring externals up to noresm_develop_v6 levels
- Set up six initial NF compsets
- Only the compsets using CAM%DEV (NF2000dev, NFLT1850_TESTINGONLY_v0c, and NFLTHIST_v0c) are currently supported.
- Introduce a new aux_cam_noresm testlist testing a few CAM (F) and CAM-Nor (NF) compsets at low resolution.
- Introduce a new script, test/system/run_noresm_tests.sh, to aid in running CAM-Nor tests.

All tests "passed", however, there were no previous baselines for these tests so no comparisons could be made.
  • Loading branch information
gold2718 authored Jul 21, 2023
2 parents 2428042 + 20600fe commit af86788
Show file tree
Hide file tree
Showing 11 changed files with 554 additions and 3,291 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ cime
components
manage_externals.log
src/physics/ali_arms/
src/physics/camnor_phys
src/physics/carma/base
src/physics/clubb
src/physics/cosp2/src
Expand Down
12 changes: 6 additions & 6 deletions Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ required = True
#-----------------------------

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

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

[share]
tag = share1.0.17_noresm_v0
tag = share1.0.17_noresm_v1
protocol = git
repo_url = https://github.com/NorESMHub/NorESM_share
local_path = share
Expand All @@ -66,7 +66,7 @@ externals = Externals_CDEPS.cfg
required = True

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

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

[mosart]
tag = mosart1_0_48_noresm_v0
tag = mosart1_0_48_noresm_v1
protocol = git
repo_url = https://github.com/NorESMhub/MOSART
local_path = components/mosart
Expand Down
7 changes: 7 additions & 0 deletions Externals_CAM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,12 @@ repo_url = https://github.com/NCAR/atmospheric_physics
required = True
local_path = src/atmos_phys

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

[externals_description]
schema_version = 1.0.0
3 changes: 3 additions & 0 deletions bld/config_files/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ Ionosphere model used in WACCMX.
<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>
<entry id="camnor" valid_values="0,1" value="0">
Option to turn on NorESM modifications to baseline CESM/CAM physics and dynamics
</entry>
<entry id="microphys" valid_values="rk,mg1,mg2,mg3,spcam_m2005,spcam_sam1mom,none" value="">
Microphysics package: rk (Rasch and Kristjansson), mg1 (Morrison and
Gettelman two moment scheme CAM5.1), mg2 (Morrison and Gettelman second
Expand Down
41 changes: 39 additions & 2 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ OPTIONS
-analytic_ic Enables the (namelist controlled) dycore testing infrastructure
-aquaplanet Switch on aqua-planet mode.
-build_chem_proc Switch forces the build of the chemistry preprocessor (primarily for testing).
-camnor Build CAM with CAM-Nor modifications
-carma <name> Build CAM with specified CARMA microphysics model
[ none | bc_strat | cirrus | cirrus_dust | dust | meteor_impact |
meteor_smoke | mixed_sulfate | pmc | pmc_sulfate | sea_salt | sulfate | tholin |
Expand Down Expand Up @@ -238,6 +239,7 @@ GetOptions(
"cam_exe=s" => \$opts{'cam_exe'},
"cam_exedir=s" => \$opts{'cam_exedir'},
"camiop" => \$opts{'camiop'},
"camnor!" => \$opts{'camnor'},
"cc=s" => \$opts{'cc'},
"cflags=s" => \$opts{'cflags'},
"chem=s" => \$opts{'chem'},
Expand Down Expand Up @@ -545,11 +547,30 @@ if (defined $opts{'phys'}) {
$phys_pkg = lc($opts{'phys'});
}

# Special configuration for CAM-Nor options
# Currently, each CAM-Nor selection only works with the CAM6 or CAM_DEV
# ESCOMP/CAM physics suites
my $camnor = 0;
# user or compset override is only way to turn on this feature
if (defined $opts{'camnor'}) {
$camnor = $opts{'camnor'};
}
# Check supported physics suite
if ($phys_pkg ne 'cam6' and $phys_pkg ne 'cam_dev') {
die "ERROR: CAM-Nor (-camnor) is only available for CAM6 and cam_dev.$eol";
}

# Add to the config object.
$cfg_ref->set('phys', $phys_pkg);
$cfg_ref->set('camnor', $camnor);

if ($print>=2) { print "Physics package: $phys_pkg$eol"; }

if ($print>=2) {
if ($camnor) {
print "Physics package: $phys_pkg with CAM-Nor modifications$eol";
} else {
print "Physics package: $phys_pkg$eol";
}
}

# Set flag to indicate a simple physics option
my $simple_phys = 0;
Expand Down Expand Up @@ -2010,6 +2031,7 @@ sub write_filepath
my $spmd = $cfg_ref->get('spmd');
my $offline_drv = $cfg_ref->get('offline_drv');
my $inic_val = $cfg_ref->get('analytic_ic');
my $camnor = $cfg_ref->get('camnor');

# Root directory
my $camsrcdir = $cfg_ref->get('cam_dir');
Expand All @@ -2030,6 +2052,21 @@ sub write_filepath
my $CASEROOT = "$ENV{'CASEROOT'}";
print $fh "$CASEROOT/SourceMods/src.cam\n";

# CAM-Nor has precedence over everything except SourceMods
# Only active in NF or NB compsets
if ($camnor) {
if ($phys_pkg eq 'cam_dev') {
print $fh "$camsrcdir/src/physics/camnor_phys/physics\n";
} else {
print $fh "$camsrcdir/src/physics/camnor_phys/physics_cam6\n";
die "CAM6 not currently supported for NorESM configurations.\n";
}
print $fh "$camsrcdir/src/physics/camnor_phys/control\n";
if ($dyn eq 'fv') {
print $fh "$camsrcdir/src/physics/camnor_phys/fv\n";
}
}

# offline unit driver (defaults to stub)
print $fh "$camsrcdir/src/unit_drivers\n";
print $fh "$camsrcdir/src/unit_drivers/${offline_drv}\n";
Expand Down
20 changes: 12 additions & 8 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@
<ncdata dyn="fv" hgrid="0.47x0.63" nlev="130" waccmx="1">atm/waccm/ic/FC6X2000_f05_spinup01.cam.i.0002-01-01-00000_c190711.nc</ncdata>
<ncdata dyn="fv" hgrid="4x5" nlev="130" waccmx="1" ic_ymd="101" aquaplanet="1">atm/waccm/ic/waccmx_mam4_aqua_4x5_L130_c180803.nc</ncdata>
<ncdata dyn="fv" hgrid="1.9x2.5" nlev="130" waccmx="1" ic_ymd="101" aquaplanet="1">atm/waccm/ic/waccmx_mam4_aqua_1.9x2.5_L130_c180803.nc</ncdata>
<ncdata dyn="se" hgrid="ne3np4" nlev="32" npg="3" aquaplanet="1" >atm/cam/inic/se/cam6_QPC6_aqua_ne3pg3_mg37_L32_01-01-31_c221214.nc</ncdata>
<ncdata dyn="se" hgrid="ne3np4" nlev="58" npg="3" aquaplanet="1" >atm/cam/inic/se/cam6_QPC6_aqua_ne3pg3_mg37_L58_01-01-31_c221214.nc</ncdata>
<ncdata dyn="se" hgrid="ne3np4" nlev="32" npg="3" >atm/cam/inic/se/cam6_QPC6_topo_ne3pg3_mg37_L32_01-01-31_c221214.nc</ncdata>
<ncdata dyn="se" hgrid="ne3np4" nlev="58" npg="3" >atm/cam/inic/se/cam6_QPC6_topo_ne3pg3_mg37_L58_01-01-31_c221214.nc</ncdata>
<ncdata dyn="se" hgrid="ne5np4" nlev="126" waccmx="1" >atm/waccm/ic/waccmx_aqua_ne5np4_126L_c210304.nc</ncdata>
<ncdata dyn="se" hgrid="ne16np4" nlev="126" waccmx="1" >atm/waccm/ic/waccmx_ne16np4_126L_c200108.nc</ncdata>
<ncdata dyn="se" hgrid="ne16np4" nlev="130" waccmx="1" >atm/waccm/ic/fx2000_phys-ionos-cpl_ne16_spinup03.cam.i.0002-01-01-00000_c201005.nc</ncdata>
Expand Down Expand Up @@ -297,6 +301,7 @@
<bnd_topo hgrid="ne120np4" >atm/cam/topo/se/ne120np4_nc3000_Co015_Fi001_PF_nullRR_Nsw010_20171011.nc</bnd_topo>
<bnd_topo hgrid="ne240np4" >atm/cam/topo/se/ne240np4_nc3000_Co008_Fi001_PF_nullRR_Nsw005_20171014.nc</bnd_topo>

<bnd_topo hgrid="ne3np4" npg="3">atm/cam/topo/se/ne3pg3_gmted2010_modis_bedmachine_nc0540_Laplace1000_noleak_20230209.nc</bnd_topo>
<bnd_topo hgrid="ne5np4" npg="2">atm/cam/topo/se/ne5pg2_nc3000_Co360_Fi001_MulG_PF_nullRR_Nsw060_20170706.nc</bnd_topo>
<bnd_topo hgrid="ne30np4" npg="2">atm/cam/topo/se/ne30pg2_nc3000_Co060_Fi001_PF_nullRR_Nsw042_20171014.nc</bnd_topo>
<bnd_topo hgrid="ne60np4" npg="2">atm/cam/topo/se/ne60pg2_nc3000_Co030_Fi001_PF_nullRR_Nsw021_20171014.nc</bnd_topo>
Expand Down Expand Up @@ -1853,15 +1858,14 @@
<gas_wetdep_method phys="spcam_m2005" >OFF</gas_wetdep_method>

<!-- Dry Dep surface data file needed by prognostic MAM on unstructured grid only. -->
<drydep_srf_file hgrid="ne5np4" >atm/cam/chem/trop_mam/atmsrf_ne5np4_110920.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne16np4" >atm/cam/chem/trop_mam/atmsrf_ne16np4_110920.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne30np4" >atm/cam/chem/trop_mam/atmsrf_ne30np4_110920.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne30np4" npg="2">atm/cam/chem/trop_mam/atmsrf_ne30np4.pg2_200108.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne30np4" npg="3">atm/cam/chem/trop_mam/atmsrf_ne30pg3_180522.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne3np4" npg="3">atm/cam/chem/trop_mam/atmsrf_ne3np4.pg3_cdf5_c221214.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne5np4" >atm/cam/chem/trop_mam/atmsrf_ne5np4_cdf5_110920.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne16np4" >atm/cam/chem/trop_mam/atmsrf_ne16np4_cdf5_110920.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne30np4" >atm/cam/chem/trop_mam/atmsrf_ne30np4_cdf5_110920.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne30np4" npg="3">atm/cam/chem/trop_mam/atmsrf_ne30pg3_cdf5_180522.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne60np4" >atm/cam/chem/trop_mam/atmsrf_ne60np4_110920.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne120np4" >atm/cam/chem/trop_mam/atmsrf_ne120np4_110920.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne120np4" npg="2">atm/cam/chem/trop_mam/atmsrf_ne120np4.pg2_200109.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne240np4" >atm/cam/chem/trop_mam/atmsrf_ne240np4_110920.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne120np4" >atm/cam/chem/trop_mam/atmsrf_ne120np4_cdf5_110920.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne240np4" >atm/cam/chem/trop_mam/atmsrf_ne240np4_cdf5_110920.nc</drydep_srf_file>

<drydep_srf_file hgrid="ne0np4CONUS.ne30x8" >atm/cam/chem/trop_mam/atmsrf_ne0np4conus30x8_161116.nc</drydep_srf_file>
<drydep_srf_file hgrid="ne0np4.ARCTIC.ne30x4" >atm/cam/chem/trop_mam/atmsrf_ne30x4_ARCTIC_191011.nc</drydep_srf_file>
Expand Down
16 changes: 12 additions & 4 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@
CAM
===============
-->
<desc atm="CAM60[%1PCT][%4xCO2][%CCTS1]][%CCTS2][%CFIRE][%CVBSX][%NUDG][%PORT][%RCO2][%SCAM][%SDYN][%WCCM][%WCMD][%WCSC][%WCTS][%WXIE][%WXIED]">CAM cam6 physics:</desc>
<desc atm="CAM60[%1PCT][%4xCO2][%CCTS1]][%CCTS2][%CFIRE][%CVBSX][%NUDG][%PORT][%RCO2][%SCAM][%SDYN][%WCCM][%WCMD][%WCSC][%WCTS][%NORESM][%WXIE][%WXIED]">CAM cam6 physics:</desc>
<desc atm="CAM50[%CCTS1][%CLB][%PORT][%RCO2][%MAM7][%SCAM][%SDYN][%WCSC][%WCTS]" >CAM cam5 physics:</desc>
<desc atm="CAM40[%PORT][%RCO2][%SCAM][%SDYN][%TMOZ][%WX][%WXIE][%WXIED][%WCCM][%WCMD]" >CAM cam4 physics:</desc>
<desc atm="CAM30" >CAM cam3 physics:</desc>
<desc atm="CAM[%ADIAB][%DABIP04][%TJ16][%HS94][%KESSLER][%RCO2][%SPCAMS][%SPCAMCLBS][%SPCAMM][%SPCAMCLBM]" >CAM simplified and non-versioned physics :</desc>
<desc atm="CAM%DEV[%LT][%MT][%CCTS1][%GHGMAM4]" >CAM7 development physics:</desc>
<desc atm="CAM%DEV[%LT][%MT][%CCTS1][%GHGMAM4][%NORESM]" >CAM7 development physics:</desc>

<!--
=================
NorESM (CAM-Nor)
=================
-->
<desc option="NORESM" >CAM-Nor physics and dynamics differences :</desc>

<!--
===============
Expand Down Expand Up @@ -130,6 +137,7 @@
<value compset="_CAM%DEV">-phys cam_dev</value>
<value compset="_CAM.*(%GHGMAM4)">-chem ghg_mam4</value>
<value compset="_CAM.*(%CCTS1|%CFIRE)">-chem trop_strat_mam5_vbs</value>
<value compset="%NORESM">-camnor</value>

<value compset="%MAM7">-chem trop_mam7</value>
<value compset="CAM60%CVBSX">-chem trop_strat_mam5_vbsext</value>
Expand Down Expand Up @@ -166,8 +174,8 @@
<value compset="_CAM\d0%CC.*%SDYN">-nlev 56</value>
<value compset="_CAM\d0%WC.*%SDYN">-nlev 88</value>
<value compset="_CAM\d0%WX.*%SDYN">-nlev 145</value>
<value compset="_CAM.*%LT">-nlev 58</value>
<value compset="_CAM.*%MT">-nlev 93</value>
<value compset="_CAM.*%L58">-nlev 58</value>
<value compset="_CAM.*%L93">-nlev 93</value>

<!-- Simple models -->
<value compset="_CAM%ADIAB">-phys adiabatic</value>
Expand Down
Loading

0 comments on commit af86788

Please sign in to comment.