Skip to content

Commit

Permalink
Merge pull request #620 from ekluzek/noanthrocompset
Browse files Browse the repository at this point in the history
Add in NoAnthro compsets and tests
  • Loading branch information
ekluzek authored Feb 14, 2019
2 parents b623c0c + 7b67ac4 commit 24515c5
Show file tree
Hide file tree
Showing 13 changed files with 4,262 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ required = True
local_path = cime
protocol = git
repo_url = https://github.com/ESMCI/cime
tag = cime_cesm2_1_rel_06
tag = cime5.6.11
required = True

[externals_description]
Expand Down
7 changes: 6 additions & 1 deletion bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2428,7 +2428,12 @@ sub setup_logic_initial_conditions {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, "init_interp_how_close" );
my $close = $nl->get_value("init_interp_how_close");
foreach my $sim_yr ( split( /,/, $nl->get_value("init_interp_sim_years") )) {
my $how_close = abs($st_year - $sim_yr);
my $how_close = undef;
if ( $nl_flags->{'sim_year'} eq "PtVg" ) {
$how_close = abs(1850 - $sim_yr);
} else {
$how_close = abs($st_year - $sim_yr);
}
if ( ($how_close < $nl->get_value("init_interp_how_close")) && ($how_close < $close) ) {
$close = $how_close;
$settings{'sim_year'} = $sim_yr;
Expand Down
12 changes: 6 additions & 6 deletions bld/namelist_files/createMkSrfEntry.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
class mksrfDataEntry_prog:

# Class data
year_start = 2016
year_end = 2100
ssp_rcp = "SSP4-6.0"
subdir = "pftcftdynharv.0.25x0.25.SSP4-6.0.simyr2016-2100.c181217"
cdate = 181217
desc = "SSP4RCP60_clm5"
year_start = 850
year_end = 1849
ssp_rcp = "hist"
subdir = "pftcftdynharv.0.25x0.25.LUH2.histsimyr0850-1849.c171012"
cdate = 171012
desc = "histclm50_LUH2"

def parse_cmdline_args( self ):
"Parse the command line arguments for create data entry list"
Expand Down
5 changes: 5 additions & 0 deletions bld/namelist_files/namelist_defaults_clm4_5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<co2_ppmv sim_year="2000" >379.0</co2_ppmv>
<co2_ppmv sim_year="2010" >388.8</co2_ppmv>
<co2_ppmv sim_year="1850" >284.7</co2_ppmv>
<co2_ppmv sim_year="PtVg" >284.7</co2_ppmv>

<!-- CO2 type -->
<co2_type>constant</co2_type>
Expand Down Expand Up @@ -828,6 +829,10 @@ lnd/clm2/surfdata_map/surfdata_ne120np4_78pfts_CMIP6_simyr1850_c170824.nc</fsurd
<fsurdat hgrid="conus_30_x8" sim_year="1850" use_crop=".true." >
lnd/clm2/surfdata_map/surfdata_conus_30_x8_78pfts_CMIP6_simyr1850_c181003.nc</fsurdat>

<!-- Potential vegetation land use dataset, crop is off, and zeroed, all areas are natural vegetation without human disturbance -->
<fsurdat hgrid="0.9x1.25" sim_year="PtVg" use_crop=".false." irrigate=".false."
>lnd/clm2/surfdata_map/surfdata_0.9x1.25_hist_16pfts_nourb_CMIP6_simyrPtVg_c181114.nc</fsurdat>

<!-- Dynamic PFT surface datasets (relative to {csmdata}) -->

<!-- Note that, to reduce the number of necessary datasets, we use an RCP
Expand Down
4,020 changes: 4,020 additions & 0 deletions bld/namelist_files/namelist_defaults_clm4_5_tools.xml

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions bld/namelist_files/use_cases/1850_noanthro_control.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0"?>

<namelist_defaults>

<use_case_desc>Simulate current conditions without ANY anthropogenic influnces</use_case_desc>

<sim_year>PtVg</sim_year>

<sim_year_range>constant</sim_year_range>

<irrigate>.false.</irrigate>

<stream_year_first_ndep phys="clm4_0" bgc="cn" >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm4_0" bgc="cn" >1850</stream_year_last_ndep>

<stream_year_first_ndep phys="clm4_0" bgc="cndv" >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm4_0" bgc="cndv" >1850</stream_year_last_ndep>

<stream_year_first_ndep phys="clm4_5" use_cn=".true." >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm4_5" use_cn=".true." >1850</stream_year_last_ndep>

<stream_year_first_ndep phys="clm5_0" use_cn=".true." >1850</stream_year_first_ndep>
<stream_year_last_ndep phys="clm5_0" use_cn=".true." >1850</stream_year_last_ndep>

<ndep_taxmode phys="clm5_0" use_cn=".true." >cycle</ndep_taxmode>
<ndep_varlist phys="clm5_0" use_cn=".true." >NDEP_month</ndep_varlist>

<stream_year_first_popdens phys="clm4_0" cnfireson=".true." >1925</stream_year_first_popdens>
<stream_year_last_popdens phys="clm4_0" cnfireson=".true." >1925</stream_year_last_popdens>

<stream_year_first_popdens phys="clm4_5" cnfireson=".true." >1925</stream_year_first_popdens>
<stream_year_last_popdens phys="clm4_5" cnfireson=".true." >1925</stream_year_last_popdens>

<stream_year_first_popdens phys="clm5_0" cnfireson=".true." >1925</stream_year_first_popdens>
<stream_year_last_popdens phys="clm5_0" cnfireson=".true." >1925</stream_year_last_popdens>

<!-- zero population density file -->
<stream_fldfilename_popdens hgrid="0.5x0.5" use_cn=".true."
>lnd/clm2/firedata/clmforc.no_anthro_zero_hdm_1x1_simyr1925_181113.nc</stream_fldfilename_popdens>
<popdensmapalgo use_cn=".true.">nn</popdensmapalgo>

<stream_year_first_urbantv phys="clm5_0" >1850</stream_year_first_urbantv>
<stream_year_last_urbantv phys="clm5_0" >1850</stream_year_last_urbantv>

<!-- Turn calculation of human stress indices all the way off to save some CPU -->
<calc_human_stress_indices >NONE</calc_human_stress_indices>

<!-- Turn off URBAN heating and A/C, and turn off harvesting of forests -->
<urban_hac >OFF</urban_hac>
<do_harvest >.false.</do_harvest>

<!-- Set contants having to do with fire due to human influences to zero (human ignition counts, and crop fires -->
<pot_hmn_ign_counts_alpha >0.0</pot_hmn_ign_counts_alpha>
<cropfire_a1 >0.0</cropfire_a1>

</namelist_defaults>
15 changes: 13 additions & 2 deletions bld/unit_testers/build-namelist_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ sub make_env_run {
#
# Figure out number of tests that will run
#
my $ntests = 950;
my $ntests = 956;
if ( defined($opts{'compare'}) ) {
$ntests += 600;
$ntests += 603;
}
plan( tests=>$ntests );

Expand Down Expand Up @@ -317,6 +317,7 @@ sub make_env_run {
"-bgc fates -use_case 2000_control -no-megan",
"-bgc cn -use_case 1850-2100_rcp8.5_transient -namelist '&a start_ymd=19201023/'",
"-bgc bgc -use_case 2000_control -namelist \"&a fire_method='nofire'/\" -crop",
"-res 0.9x1.25 -bgc bgc -use_case 1850_noanthro_control -drydep -fire_emis -light_res 360x720",
) {
my $file = $startfile;
&make_env_run();
Expand Down Expand Up @@ -863,6 +864,16 @@ sub make_env_run {
GLC_TWO_WAY_COUPLING=>"FALSE",
conopts=>"-phys clm5_0",
},
"noanthro_w_crop" =>{ options=>"-envxml_dir . -res 0.9x1.25 -bgc bgc -crop -use_case 1850_noanthro_control",
namelst=>"",
GLC_TWO_WAY_COUPLING=>"FALSE",
conopts=>"-phys clm5_0",
},
"noanthro_w_irrig" =>{ options=>"-envxml_dir . -res 0.9x1.25 -bgc bgc -use_case 1850_noanthro_control",
namelst=>"irrigate=T",
GLC_TWO_WAY_COUPLING=>"FALSE",
conopts=>"-phys clm5_0",
},
"spdotransconflict" =>{ options=>"-envxml_dir . -bgc sp -use_case 20thC_transient",
namelst=>"do_transient_pfts=T,do_transient_crops=.false.",
GLC_TWO_WAY_COUPLING=>"FALSE",
Expand Down
25 changes: 14 additions & 11 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@
<description modifier_mode="1">
<desc lnd="CLM40[%SP][%CN][%CNDV][%CN-CROP][%CNDV-CROP]" >clm4.0:</desc>
<desc lnd="CLM45[%SP][%SP-VIC][%CN][%CNDV][%CN-CROP][%CNDV-CROP][%BGC][%BGC-CROP][%FATES][%BGCDV][%BGCDV-CROP]" >clm4.5:</desc>
<desc lnd="CLM50[%SP][%SP-VIC][%CN][%BGC][%BGC-CROP][%FATES][%BGCDV][%BGCDV-CROP][%BGC-CROP-CMIP6DECK][%BGC-CROP-CMIP6WACCMDECK]">clm5.0:</desc>
<desc lnd="CLM50[%SP][%SP-VIC][%SP-NOANTHRO][%BGC-NOANTHRO][%CN][%BGC][%BGC-CROP][%FATES][%BGCDV][%BGCDV-CROP][%BGC-CROP-CMIP6DECK][%BGC-CROP-CMIP6WACCMDECK]">clm5.0:</desc>
<desc option="SP" >Satellite phenology:</desc>
<desc option="CN" >CN: Carbon Nitrogen model</desc>
<desc option="CNDV" >CNDV: CN with Dynamic Vegetation</desc>
<desc option="CN-CROP" >CN with prognostic crop:</desc>
<desc option="CNDV-CROP" >CNDV with prognostic crop:</desc>

<desc option="SP-VIC" >Satellite phenology with VIC hydrology:</desc>
<desc option="SP-NOANTHRO" >Satellite phenology without anthropomorphic influences</desc>
<desc option="BGC" >BGC (vert. resol. CN and methane):</desc>
<desc option="BGC-CROP" >BGC (vert. resol. CN and methane) with prognostic crop:</desc>
<desc option="BGC-NOANTHRO" >BGC (vert. resol. CN and methane) without anthropomorphic influences:</desc>
<desc option="FATES" >FATES (Functionally Assembled Terrestrial Ecosystem Simulator) Ecosystem Demography model: (experimental)</desc>
<desc option="BGCDV" >BGC (vert. resol. CN and methane) with dynamic vegetation:</desc>
<desc option="BGCDV-CROP" >BGC (vert. resol. CN and methane) with dynamic vegetation and prognostic crop:</desc>
Expand Down Expand Up @@ -102,16 +104,17 @@
<default_value>UNSET</default_value>
<values>
<!-- Use rcp4.5 for PI to PDAY so will have data up to the current year available (for WACCM compsets that use PDAY) -->
<value compset="^2010_" >2010_control</value>
<value compset="^2000_" >2000_control</value>
<value compset="^1850_" >1850_control</value>
<value compset="^HIST_" >20thC_transient</value>
<value compset="^RCP6_" >1850-2100_rcp6_transient</value>
<value compset="^RCP4_" >1850-2100_rcp4.5_transient</value>
<value compset="^RCP2_" >1850-2100_rcp2.6_transient</value>
<value compset="^RCP8_" >1850-2100_rcp8.5_transient</value>
<value compset="^AMIP_" >20thC_transient</value>
<value compset="^PIPD_" >1850-2100_rcp4.5_transient</value>
<value compset="^2010_" >2010_control</value>
<value compset="^2000_" >2000_control</value>
<value compset="^1850_" >1850_control</value>
<value compset="^1850_.*_CLM50%[^_]*NOANTHRO" >1850_noanthro_control</value>
<value compset="^HIST_" >20thC_transient</value>
<value compset="^RCP6_" >1850-2100_rcp6_transient</value>
<value compset="^RCP4_" >1850-2100_rcp4.5_transient</value>
<value compset="^RCP2_" >1850-2100_rcp2.6_transient</value>
<value compset="^RCP8_" >1850-2100_rcp8.5_transient</value>
<value compset="^AMIP_" >20thC_transient</value>
<value compset="^PIPD_" >1850-2100_rcp4.5_transient</value>
</values>
<group>run_component_clm</group>
<file>env_run.xml</file>
Expand Down
10 changes: 10 additions & 0 deletions cime_config/config_compsets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@
<lname>1850_DATM%GSWP3v1_CLM50%BGC_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV</lname>
</compset>

<compset>
<alias>I1850Clm50BgcNoAnthro</alias>
<lname>1850_DATM%GSWP3v1_CLM50%BGC-NOANTHRO_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV</lname>
</compset>

<compset>
<alias>I1850Clm50SpNoAnthro</alias>
<lname>1850_DATM%GSWP3v1_CLM50%SP-NOANTHRO_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV</lname>
</compset>

<compset>
<alias>IHistClm50BgcCrop</alias>
<lname>HIST_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV</lname>
Expand Down
8 changes: 8 additions & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
<option name="wallclock">00:20:00</option>
</options>
</test>
<test name="SMS_D_Ld9" grid="f09_g17_gl4" compset="I1850Clm50BgcNoAnthro" testmods="clm/decStart1851_noinitial">
<machines>
<machine name="cheyenne" compiler="intel" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
</options>
</test>
<test name="ERI_D_Ld9" grid="1x1_camdenNJ" compset="I2000Clm50BgcCruGs" testmods="clm/default">
<machines>
<machine name="cheyenne" compiler="intel" category="prebeta"/>
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
release-clm5.0.18 erik 02/13/2019 Add NoAnthro compset, reduce fields on fsurdat in mksurfdata_map, initial add of tools/contrib directory
release-clm5.0.17 sacks 01/23/2019 History fields for vertically-resolved sums of soil C and N, and minor fixes
ctsm1.0.dev025 sacks 01/23/2019 History fields for vertically-resolved sums of soil C and N, and minor fixes
release-clm5.0.16 erik 01/15/2019 PtVg and ssp_rcp future scenario options and Antarctica wetlands fix to mksurfdata, and option to dribble crop harvest XSMRPOOL flux to atmosphere
Expand Down
121 changes: 121 additions & 0 deletions doc/release-clm5.0.ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,125 @@
===============================================================
Tag name: release-clm5.0.18
Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326)
Date: Wed Feb 13 19:01:26 MST 2019
One-line Summary: Add NoAnthro compset, reduce fields on fsurdat in mksurfdata_map, initial add of tools/contrib directory

Purpose of this version:
------------------------

New NoAnthro compsets: I1850Clm50BgcNoAnthro, I1850Clm50SpNoAnthro and tests for it.
More updates to surface dataset generation, to reduce the fields that are output, removing ones
that aren't used.

New tools/contrib directory with initial add of some useful scripts for users. Currently unsupported
and only expected to run on cheyenne. The following scripts are added:

run_clm_historical ---- does all the setup and submission required to do a 1850-2010 CLM historical
subset_surfdata ------- create regional domain, surface data, and rtm directional files by
extracting data from global datasets
singlept -------------- create single point domain, surface data, and datm forcing files by
extracting data from global datasets
SpinupStability.ncl --- This script assesses the equilibrium state of a spinup run
run_clmtowers --------- This script will run any number of flux tower sites.

Add new default f09 Potential Vegetation (PtVg) surface dataset. For mksurfdata new high resolution
PFT datasets (at 3x3min) for 2005. New rawdata PFT files from 0850-1849.

CTSM Master Tag This Corresponds To: ctsm1.0.dev025 (with many changes missing)

Summary of changes:
-------------------

Issues fixed (include CTSM Issue #): Fixes #629 #557 #262
#629 -- Unused fields from fsurdat files
#557 -- No anthro compset
#262 -- hirespft option doesn't work for mksurfdata.pl

Science changes since: release-clm5.0.17
None

Software changes since: release-clm5.0.17
PtVg and pre-millenial raw PFT datasets
reduce fields created on fsurdat files

Changes to User Interface since: release-clm5.0.17
New NoAnthro compsets: I1850Clm50BgcNoAnthro, I1850Clm50SpNoAnthro
Add new option "-vic" to mksurfdata.pl to output fields needed for VIC (only have a few resolutions with VIC on by default)
Add 2005 high resolution datasets that can be used for the -hirespft option to mksrfdata.pl

Testing:
--------

[PASS means all tests PASS and OK means tests PASS other than expected fails.]

build-namelist tests:

cheyenne - PASS

unit-tests (components/clm/src):

cheyenne - PASS
hobart --- PASS

tools-tests (components/clm/test/tools):

cheyenne - OK
hobart --- OK

PTCLM testing (components/clm/tools/shared/PTCLM/test):

cheyenne - OK

regular tests (aux_clm):

cheyenne_intel ---- OK
cheyenne_gnu ------ OK
hobart_nag -------- OK
hobart_pgi -------- OK
hobart_intel ------ OK

regular tests (prealpha):

cheyenne_intel - OK
cheyenne_gnu --- OK
hobart_nag ----- OK

regular tests (prebeta):

cheyenne_intel - OK
cheyenne_gnu --- OK

Summary of Answer changes:
-------------------------

Baseline version for comparison: release-clm5.0.17

Changes answers relative to baseline: No (bit-for-bit)

Detailed list of changes:
------------------------

Externals being used: Change cime to cime5.6.11 (just a name change)

cism: release-cesm2.0.04
rtm: release-cesm2.0.02
mosart: release-cesm2.0.03
cime: cime5.6.11
FATES: fates_s1.8.1_a3.0.0
PTCLM: PTCLM2_180611

CTSM Tag versions pulled over from master development branch: None

Pull Requests that document the changes (include PR ids): #619 #620 #634
(https://github.com/ESCOMP/ctsm/pull)

#619 -- Begin adding "contrib" tools directory
#620 -- Add NoAnthro compset and tests
#634 -- Remove some of the fields added to fsurdat files in mksurfdata_map


===============================================================
===============================================================
Tag name: release-clm5.0.17
Originator(s): Keith Oleson, Bill Sacks
Date: Wed Jan 23 11:03:22 MST 2019
Expand Down
2 changes: 1 addition & 1 deletion tools/mksurfdata_map/mksurfdata.pl
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ sub write_namelist_file {
my @years = split( ",", $opts{'years'} );
# Check that resolutions are valid
foreach my $sim_year ( @years ) {
if ("-" eq substr($sim_year, 4, 1)) {
if ( ("-" eq substr($sim_year, 4, 1)) || ("-" eq substr($sim_year, 3, 1)) ) {
# range of years for transient run
if ( ! $definition->is_valid_value( "sim_year_range", "'$sim_year'" ) ) {
print "** Invalid simulation simulation year range: $sim_year\n";
Expand Down

0 comments on commit 24515c5

Please sign in to comment.