Skip to content

Commit

Permalink
Merge branch 'bioenergy_ctsm1.0.dev080'
Browse files Browse the repository at this point in the history
Add two bioenergy crops (switchgrass and miscanthus)

Main change is from Yanyan Cheng: adding parameters and code for two
bioenergy crops, switchgrass and miscanthus. Along with this, there is a
new potential flux from crop leaves and stems to the crop product pool
at harvest, representing biofuel products; a new pft-specific parameter
controls this flux (biofuel_harvfrac). Currently, the out-of-the-box
surface datasets do not specify any area for these crops, but the new
parameter file will allow them to be present if specified on the surface
dataset or landuse_timeseries file. Note that this is only an option for
CLM5.0, NOT for CLM4.5. (See #884 for
details.)

Also, some minor fixes from Bill Sacks:
- Resolves #203 - Fixes creation of harvest-related variables
  on surface datasets created with the all_veg option - smallville,
  PTCLM, etc. (documented in #1019)
- Resolves #930 - Makes gindex_ocn intent(inout) rather than
  intent(out)
- Resolves #1021 - Changes SSP test to only do symlink if
  needed
  • Loading branch information
billsacks committed May 25, 2020
2 parents e39e9f3 + 0e3aa2b commit 6ec6e0a
Show file tree
Hide file tree
Showing 30 changed files with 632 additions and 137 deletions.
6 changes: 3 additions & 3 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- The default filenames are given relative to the root directory
for the CLM2 data in the CESM distribution -->
<!-- Plant function types (relative to {csmdata}) -->
<paramfile phys="clm5_0">lnd/clm2/paramdata/clm5_params.c200402.nc</paramfile>
<paramfile phys="clm4_5">lnd/clm2/paramdata/clm_params.c200402.nc</paramfile>
<paramfile phys="clm5_0">lnd/clm2/paramdata/clm5_params.c200519.nc</paramfile>
<paramfile phys="clm4_5">lnd/clm2/paramdata/clm_params.c200519.nc</paramfile>

<!-- ================================================================== -->
<!-- FATES default parameter file -->
Expand Down Expand Up @@ -781,7 +781,7 @@ lnd/clm2/surfdata_map/release-clm5.0.18/surfdata_4x5_hist_78pfts_CMIP6_simyr2000
<fsurdat hgrid="1x1_numaIA" sim_year="2000" use_crop=".true." >
lnd/clm2/surfdata_map/release-clm5.0.18/surfdata_1x1_numaIA_hist_78pfts_CMIP6_simyr2000_c190214.nc</fsurdat>
<fsurdat hgrid="1x1_smallvilleIA" sim_year="2000" use_crop=".true." >
lnd/clm2/surfdata_map/release-clm5.0.18/surfdata_1x1_smallvilleIA_hist_78pfts_CMIP6_simyr2000_c190214.nc</fsurdat>
lnd/clm2/surfdata_map/ctsm1.0.dev094-2-g633be0eb/surfdata_1x1_smallvilleIA_hist_78pfts_CMIP6_simyr2000_c200521.nc</fsurdat>

<fsurdat hgrid="ne30np4" sim_year="2000" use_crop=".true.">
lnd/clm2/surfdata_map/release-clm5.0.18/surfdata_ne30np4_hist_78pfts_CMIP6_simyr2000_c190303.nc</fsurdat>
Expand Down
9 changes: 8 additions & 1 deletion cime_config/SystemTests/ssp.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ def run_phase(self):
rest_path = os.path.join(dout_sr, "rest", "{}-{}".format(refdate, refsec))

for item in glob.glob("{}/*{}*".format(rest_path, refdate)):
os.symlink(item, os.path.join(rundir, os.path.basename(item)))
link_name = os.path.join(rundir, os.path.basename(item))
if os.path.islink(link_name) and os.readlink(link_name) == item:
# Link is already set up correctly: do nothing
# (os.symlink raises an exception if you try to replace an
# existing file)
pass
else:
os.symlink(item, link_name)

for item in glob.glob("{}/*rpointer*".format(rest_path)):
shutil.copy(item, rundir)
Expand Down
2 changes: 1 addition & 1 deletion cime_config/testdefs/ExpectedTestFails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<test name="ERS_Lm20_Mmpi-serial.1x1_smallvilleIA.I2000Clm50BgcCropQianGs.cheyenne_gnu.clm-monthly">
<phase name="RUN">
<status>FAIL</status>
<issue>#158</issue>
<issue>#203</issue>
</phase>
</test>

Expand Down
15 changes: 12 additions & 3 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
<option name="wallclock">00:20:00</option>
</options>
</test>
<test name="ERP_D_P36x2_Ld3" grid="f10_f10_musgs" compset="I2000Clm50BgcCrop" testmods="clm/cropColdStart">
<test name="ERP_D_P36x2_Ld3" grid="f10_f10_musgs" compset="I2000Clm50BgcCrop" testmods="clm/coldStart">
<machines>
<machine name="cheyenne" compiler="intel" category="aux_clm"/>
</machines>
Expand Down Expand Up @@ -905,13 +905,22 @@
<option name="wallclock">00:20:00</option>
</options>
</test>
<test name="ERS_Lm20_Mmpi-serial" grid="1x1_smallvilleIA" compset="I2000Clm50BgcCropQianGs" testmods="clm/monthly">
<test name="ERS_Lm20_Mmpi-serial" grid="1x1_smallvilleIA" compset="I2000Clm50BgcCropQianGs" testmods="clm/monthly_noinitial">
<machines>
<machine name="cheyenne" compiler="gnu" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">01:20:00</option>
<option name="comment" >tests mid-year restart, with the restart file being written in the middle of the first year; 12-15-2017: now that we generally use init_interp, this test needs to be changed to point to a blank finidat file to truly test mid-year restart in the first year; 4-19-2019: should change this to use Qian forcing to speed it up (but I'm waiting to make this change until this test starts passing again)</option>
<option name="comment" >tests mid-year restart, with the restart file being written in the middle of the first year after cold start initialization</option>
</options>
</test>
<test name="ERS_Ly5_Mmpi-serial" grid="1x1_smallvilleIA" compset="I2000Clm50BgcCropQianGs" testmods="clm/ciso_monthly">
<machines>
<machine name="cheyenne" compiler="gnu" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">02:00:00</option>
<option name="comment" >multi-year test with crops and isotopes that includes all crop types; added (2020-05-21) in order to test the new switchgrass and miscanthus crops (which otherwise aren't currently tested)</option>
</options>
</test>
<test name="ERS_Lm40_Mmpi-serial" grid="1x1_numaIA" compset="I2000Clm50BgcCropQianGs" testmods="clm/monthly">
Expand Down

This file was deleted.

This file was deleted.

189 changes: 189 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,193 @@
===============================================================
Tag name: ctsm1.0.dev097
Originator(s): ycheng (Yanyan Cheng)
Date: Mon May 25 15:14:56 MDT 2020
One-line Summary: Add two bioenergy crops (switchgrass and miscanthus)

Purpose of changes
------------------

Main change is from Yanyan Cheng: adding parameters and code for two
bioenergy crops, switchgrass and miscanthus. Along with this, there is a
new potential flux from crop leaves and stems to the crop product pool
at harvest, representing biofuel products; a new pft-specific parameter
controls this flux (biofuel_harvfrac). Currently, the out-of-the-box
surface datasets do not specify any area for these crops, but the new
parameter file will allow them to be present if specified on the surface
dataset or landuse_timeseries file. Note that this is only an option for
CLM5.0, NOT for CLM4.5. (See https://github.com/ESCOMP/CTSM/pull/884 for
details.)

Also, some minor fixes from Bill Sacks: See notes under "bugs fixed"
below.

Bugs fixed or introduced
------------------------

Issues fixed (include CTSM Issue #):
- Resolves ESCOMP/CTSM#203 - Fixes creation of harvest-related variables
on surface datasets created with the all_veg option - smallville,
PTCLM, etc. (documented in https://github.com/ESCOMP/CTSM/pull/1019)
- Resolves ESCOMP/CTSM#930 - Makes gindex_ocn intent(inout) rather than
intent(out)
- Resolves ESCOMP/CTSM#1021 - Changes SSP test to only do symlink if
needed

Significant changes to scientifically-supported configurations
--------------------------------------------------------------

Does this tag change answers significantly for any of the following physics configurations?
(Details of any changes will be given in the "Answer changes" section below.)

[Put an [X] in the box for any configuration with significant answer changes.]

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5

Notes of particular relevance for users
---------------------------------------

Caveats for users (e.g., need to interpolate initial conditions):
- For transient crop cases, now more crops in memory. This creates a
need for interpolation of initial conditions for initial conditions
generated from a transient case.

Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): none

Changes made to namelist defaults (e.g., changed parameter values):
- Changed parameter values for switchgrass and miscanthus (only for clm5.0)
- New pft-specific parameter, biofuel_harvfrac (for both clm4.5 and clm5.0)

Changes to the datasets (e.g., parameter, surface or initial files):
- New parameter files with the above changes

Substantial timing or memory changes: none

Notes of particular relevance for developers: (including Code reviews and testing)
---------------------------------------------
NOTE: Be sure to review the steps in README.CHECKLIST.master_tags as well as the coding style in the Developers Guide

Caveats for developers (e.g., code that is duplicated that requires double maintenance): none

Changes to tests or testing:
- Changed smallville ERS_Lm20 test to be cold start (see comment in
commit 8368f222 for details)
- Added a multi-year smallville test that includes these new crops

Code reviewed by: Bill Sacks, Danica Lombardozzi


CTSM testing:

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

build-namelist tests:

cheyenne - not run

tools-tests (test/tools):

cheyenne - ok

Pass except for expected baseline failures

Ran on 633be0eb, with comparison against ctsm1.0.dev095; tests pass
except these expected baseline failures:

030 blf84 TBLscript_tools.sh PTCLM PTCLMmkdata PTCLM_USUMB_clm4_5^buildtools ....................\c
rc=7 FAIL

032 blfc4 TBLscript_tools.sh PTCLM PTCLMmkdata PTCLM_USUMB_Cycle_clm4_5^buildtools ..............\c
rc=7 FAIL

Diffs for these are just in the harvest-related fields on the surface dataset, as expected.

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

cheyenne - not run

python testing (see instructions in python/README.md; document testing done):

(any machine) - not run

regular tests (aux_clm):

cheyenne ---- ok
izumi ------- pass

For cheyenne testing: a few tests had baseline failures. The
differences just arise in the h1 (vector) files, due to differences
in dimension sizes. These differences are expected. See below for
details.

Ran most testing on 8309c213. Reran two SSP tests on 4665c9ce

If the tag used for baseline comparisons was NOT the previous tag, note that here:


Answer changes
--------------

Changes answers relative to baseline: YES, but diagnostic only due to
change in dimension sizes - does not change answers in any meaningful
way

If a tag changes answers relative to baseline comparison the
following should be filled in (otherwise remove this section):

Summarize any changes to answers, i.e.,
- what code configurations: Transient CLM50 cases with crops; just
changes dimensions on vector (h1) history files
- what platforms/compilers: All
- nature of change (roundoff; larger than roundoff/same climate; new climate):
diagnostic change only

Differences were observed in the following tests:

ERS_Ly3_Mmpi-serial.1x1_smallvilleIA.IHistClm50BgcCropQianGs.cheyenne_gnu.clm-cropMonthOutput
SMS_Ld5.f10_f10_musgs.ISSP245Clm50BgcCrop.cheyenne_gnu.clm-ciso_dec2050Start
SMS_Ld5.f10_f10_musgs.ISSP370Clm50BgcCrop.cheyenne_gnu.clm-ciso_dec2050Start
ERP_D_Ld10_P36x2.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-ciso_decStart
ERP_D_Ld5.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-allActive
ERP_Ly3_P72x2.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-cropMonthOutput
ERS_D_Ld7_Mmpi-serial.1x1_smallvilleIA.IHistClm50BgcCropGs.cheyenne_intel.clm-decStart1851_noinitial
ERS_Ly3_P72x2.f10_f10_musgs.IHistClm50BgcCropG.cheyenne_intel.clm-cropMonthOutput
ERS_Ly5_P144x1.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-cropMonthOutput
ERS_Ly6_Mmpi-serial.1x1_smallvilleIA.IHistClm50BgcCropQianGs.cheyenne_intel.clm-cropMonthOutput
LCISO_Lm13.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-ciso_monthly
SMS_Ld5.f10_f10_musgs.ISSP585Clm50BgcCrop.cheyenne_intel.clm-ciso_dec2050Start

The differences just arise in the h1 files, due to differences in
dimension sizes. I reran these tests with a paramfile where I
reverted the mergeToPft variable; then they were all bfb with
master.

Other than this, there were FIELDLIST differences, as expected.

If bitwise differences were observed, how did you show they were no worse
than roundoff? N/A

If this tag changes climate describe the run(s) done to evaluate the new
climate (put details of the simulations in the experiment database)
- casename: N/A

URL for LMWG diagnostics output used to validate new climate: N/A


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

List any externals directories updated (cime, rtm, mosart, cism, fates, etc.): none

Pull Requests that document the changes (include PR ids):
- https://github.com/ESCOMP/CTSM/pull/884
- https://github.com/ESCOMP/CTSM/pull/1019

===============================================================
===============================================================
Tag name: ctsm1.0.dev096
Originator(s): slevis (Samuel Levis,SLevis Consulting LLC,303-665-1310)
Date: Thu May 21 19:18:24 MDT 2020
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
============================================================================================================================
ctsm1.0.dev097 ycheng 05/25/2020 Add two bioenergy crops (switchgrass and miscanthus)
ctsm1.0.dev096 slevis 05/21/2020 Gridcell-level balance checks for carbon and nitrogen
ctsm1.0.dev095 sacks 05/21/2020 Update cime and cmeps externals; rework initialization of CNFire object
ctsm1.0.dev094 sacks 05/15/2020 Minor bug fixes needed for latest cime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,15 @@ favorable growth environments (Allen et al., 2005; Vanninen and Makela,
+----------------------------------+-----------------------+-----------------------+-----------------------+-----------------------+---------------------------+-------------------------+-------------------------+-------------------------+
| Soybean I | 2 | 0 | 0 | 1 | 25 | 42 | 50 | 500 |
+----------------------------------+-----------------------+-----------------------+-----------------------+-----------------------+---------------------------+-------------------------+-------------------------+-------------------------+

| Miscanthus R | 2 | 0 | 0 | 1 | 25 | 42 | 50 | 500 |
+----------------------------------+-----------------------+-----------------------+-----------------------+-----------------------+---------------------------+-------------------------+-------------------------+-------------------------+
| Miscanthus I | 2 | 0 | 0 | 1 | 25 | 42 | 50 | 500 |
+----------------------------------+-----------------------+-----------------------+-----------------------+-----------------------+---------------------------+-------------------------+-------------------------+-------------------------+
| Switchgrass R | 2 | 0 | 0 | 1 | 25 | 42 | 50 | 500 |
+----------------------------------+-----------------------+-----------------------+-----------------------+-----------------------+---------------------------+-------------------------+-------------------------+-------------------------+
| Switchgrass I | 2 | 0 | 0 | 1 | 25 | 42 | 50 | 500 |
+----------------------------------+-----------------------+-----------------------+-----------------------+-----------------------+---------------------------+-------------------------+-------------------------+-------------------------+

Carbon to nitrogen ratios are defined for different tissue types as
follows:

Expand Down
5 changes: 4 additions & 1 deletion doc/source/tech_note/CN_Pools/CLM50_Tech_Note_CN_Pools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,8 @@ stoichiometry are described in Chapter :numref:`rst_CN Allocation`.
+----------------------------------+-------------------+
| Tropical Soybean | 20.00 |
+----------------------------------+-------------------+

| Miscanthus | 25.00 |
+----------------------------------+-------------------+
| Switchgrass | 25.00 |
+----------------------------------+-------------------+

Loading

0 comments on commit 6ec6e0a

Please sign in to comment.