Skip to content

Commit

Permalink
Merge pull request #1400 from slevisconsulting/incl_cwd_in_hr
Browse files Browse the repository at this point in the history
Include coarse woody debris (CWD) in heterotrophic respiration (HR)
  • Loading branch information
ekluzek authored Jun 30, 2021
2 parents 2925a39 + 78f66d7 commit eb345c4
Show file tree
Hide file tree
Showing 13 changed files with 242 additions and 119 deletions.
2 changes: 1 addition & 1 deletion bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4159,7 +4159,7 @@ sub add_default {
} else {
if ($is_input_pathname eq 'abs') {
$val = set_abs_filepath($val, $inputdata_rootdir);
if ( $test_files and ($val !~ /null/) and (! -f "$val") ) {
if ( $test_files and ($val !~ /null|none/) and (! -f "$val") ) {
$log->fatal_error("file not found: $var = $val");
}
}
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 @@ -271,6 +271,14 @@
<option name="wallclock">00:20:00</option>
</options>
</test>
<test name="ERS_Ld3" grid="f10_f10_mg37" compset="I2000Clm51Bgc" testmods="clm/ciso_cwd_hr">
<machines>
<machine name="cheyenne" compiler="intel" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
</options>
</test>
<test name="ERP_Ld9" grid="f45_g37" compset="I2000Clm51Bgc" testmods="clm/default">
<machines>
<machine name="cheyenne" compiler="intel" category="aux_clm"/>
Expand Down
8 changes: 8 additions & 0 deletions cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This points to an alternate params file with
rf_cwdl2_bgc = 0.5
rf_cwdl3_bgc = 0.5
while by default these parameters equal zero.

The test outputs inactive history fields that would contain zeros
when running with the default params file and should be greater than zero
when running with the alternate params file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../ciso
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paramfile = '/glade/p/cesm/cseg/inputdata/lnd/clm2/paramdata/ctsm51_params.c210624.nc'
hist_fincl1 = 'CWDC_HR','C13_CWDC_HR','C14_CWDC_HR','CWD_HR_L2','CWD_HR_L2_vr','CWD_HR_L3','CWD_HR_L3_vr'
96 changes: 96 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,100 @@
===============================================================
Tag name: ctsm5.1.dev045
Originator(s): slevis (Samuel Levis,SLevis Consulting,303-665-1310)
Date: Tue Jun 29 20:05:21 MDT 2021
One-line Summary: Include CWD in heterotrophic respiration (HR)

Purpose and description of changes
----------------------------------

Params file sets the respiration fractions for CWD to zero:
rf_cwdl2_bgc = 0
rf_cwdl3_bgc = 0
The model has no code to handle rf_cwd* > 0. So...
- I have introduced cwdhr_col to track this HR the same way that we track
lithr_col for litter.
- I have removed if-statements that prevented CWD HR pools and decomposition
from writing to history.
- I have introduced a new test to the cheyenne test-suite that makes active
seven history fields pertaining to CWD HR and points to a params file with
rf_cwd* > 0. I have confirmed that the new test returns the new active
variables as greater than 0 when pointing to the new params file and equal
to 0 when pointing to the default params file.


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_1

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5


Bugs fixed or introduced
------------------------
Issues fixed (include CTSM Issue #): #1361 #1417
Fixes #1361 -- HR fluxes don't include CWD
Fixes #1417 -- NoAnthro build-namelist test fails

Notes of particular relevance for users
---------------------------------------
Substantial timing or memory changes: None
Total 17 MEMCOMP non-passes with the same warning as this one:
FAIL PFS_Ld20.f09_g17.I2000Clm50BgcCrop.cheyenne_intel MEMCOMP Error:
Memory usage increase > 10% from baseline

Total 5 TPUTCOMP non-passes with this warning:
TPUTCOMP: Computation time increase > 25% from baseline

Notes of particular relevance for developers:
---------------------------------------------
NOTE: Be sure to review the steps in README.CHECKLIST.master_tags as well as the coding style in the Developers Guide

Changes to tests or testing:
New test added to cheyenne test-suite:
ERS_Ld3.f10_f10_mg37.I2000Clm51Bgc.cheyenne_intel.clm-ciso_cwd_hr
Details in "Purpose and description of changes"

Testing summary:
----------------

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

build-namelist tests (if CLMBuildNamelist.pm has changed):

cheyenne - OK (2 tests fail compare because of fix in #1417)

python testing (if python code has changed; see instructions in python/README.md; document testing done):

cheyenne - PASS

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

cheyenne ---- OK
izumi ------- OK


Answer changes
--------------
Changes answers relative to baseline: No


Other details
-------------
Pull Requests that document the changes (include PR ids):
https://github.com/ESCOMP/ctsm/pull/1400

===============================================================
===============================================================
Tag name: ctsm5.1.dev044
Originator(s): mvertens (Mariana Vertenstein)
Date: Thu Jun 24 15:59:08 MDT 2021
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
============================================================================================================================
ctsm5.1.dev045 slevis 06/29/2021 Include CWD in heterotrophic respiration
ctsm5.1.dev044 mvertens 06/24/2021 New stream functionality when using NUOPC or LILAC
ctsm5.1.dev043 slevis 06/03/2021 Refactor of CascadeBGC code in preparation for MIMICS
ctsm5.1.dev042 erik 05/28/2021 Small answer changes for double precision constants and soil limits
Expand Down
3 changes: 3 additions & 0 deletions src/biogeochem/CNDriverMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,7 @@ subroutine CNDriverSummarizeFluxes(bounds, &
call cnveg_carbonflux_inst%Summary(bounds, num_soilc, filter_soilc, num_soilp, filter_soilp, &
isotope='bulk', &
soilbiogeochem_hr_col=soilbiogeochem_carbonflux_inst%hr_col(begc:endc), &
soilbiogeochem_cwdhr_col=soilbiogeochem_carbonflux_inst%cwdhr_col(begc:endc), &
soilbiogeochem_lithr_col=soilbiogeochem_carbonflux_inst%lithr_col(begc:endc), &
soilbiogeochem_decomp_cascade_ctransfer_col=&
soilbiogeochem_carbonflux_inst%decomp_cascade_ctransfer_col(begc:endc,1:ndecomp_cascade_transitions), &
Expand All @@ -1045,6 +1046,7 @@ subroutine CNDriverSummarizeFluxes(bounds, &
call c13_cnveg_carbonflux_inst%Summary(bounds, num_soilc, filter_soilc, num_soilp, filter_soilp, &
isotope='c13', &
soilbiogeochem_hr_col=c13_soilbiogeochem_carbonflux_inst%hr_col(begc:endc), &
soilbiogeochem_cwdhr_col=c13_soilbiogeochem_carbonflux_inst%cwdhr_col(begc:endc), &
soilbiogeochem_lithr_col=c13_soilbiogeochem_carbonflux_inst%lithr_col(begc:endc), &
soilbiogeochem_decomp_cascade_ctransfer_col=&
c13_soilbiogeochem_carbonflux_inst%decomp_cascade_ctransfer_col(begc:endc,1:ndecomp_cascade_transitions), &
Expand All @@ -1055,6 +1057,7 @@ subroutine CNDriverSummarizeFluxes(bounds, &
call c14_cnveg_carbonflux_inst%Summary(bounds, num_soilc, filter_soilc, num_soilp, filter_soilp, &
isotope='c14', &
soilbiogeochem_hr_col=c14_soilbiogeochem_carbonflux_inst%hr_col(begc:endc), &
soilbiogeochem_cwdhr_col=c14_soilbiogeochem_carbonflux_inst%cwdhr_col(begc:endc), &
soilbiogeochem_lithr_col=c14_soilbiogeochem_carbonflux_inst%lithr_col(begc:endc), &
soilbiogeochem_decomp_cascade_ctransfer_col=&
c14_soilbiogeochem_carbonflux_inst%decomp_cascade_ctransfer_col(begc:endc,1:ndecomp_cascade_transitions), &
Expand Down
13 changes: 4 additions & 9 deletions src/biogeochem/CNVegCarbonFluxType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ module CNVegCarbonFluxType
real(r8), pointer :: xsmrpool_recover_patch (:) ! (gC/m2/s) C flux assigned to recovery of negative cpool
real(r8), pointer :: xsmrpool_c13ratio_patch (:) ! C13/C(12+13) ratio for xsmrpool (proportion)

real(r8), pointer :: cwdc_hr_col (:) ! (gC/m2/s) col-level coarse woody debris C heterotrophic respiration
real(r8), pointer :: cwdc_loss_col (:) ! (gC/m2/s) col-level coarse woody debris C loss
real(r8), pointer :: litterc_loss_col (:) ! (gC/m2/s) col-level litter C loss
real(r8), pointer :: frootc_alloc_patch (:) ! (gC/m2/s) patch-level fine root C alloc
Expand Down Expand Up @@ -643,7 +642,6 @@ subroutine InitAllocate(this, bounds, carbon_type)

allocate(this%crop_seedc_to_leaf_patch (begp:endp)) ; this%crop_seedc_to_leaf_patch (:) =nan

allocate(this%cwdc_hr_col (begc:endc)) ; this%cwdc_hr_col (:) =nan
allocate(this%cwdc_loss_col (begc:endc)) ; this%cwdc_loss_col (:) =nan
allocate(this%litterc_loss_col (begc:endc)) ; this%litterc_loss_col (:) =nan

Expand Down Expand Up @@ -3890,7 +3888,6 @@ subroutine SetValues ( this, &
i = filter_column(fi)

this%grainc_to_cropprodc_col(i) = value_column
this%cwdc_hr_col(i) = value_column
this%cwdc_loss_col(i) = value_column
this%litterc_loss_col(i) = value_column

Expand Down Expand Up @@ -3997,8 +3994,8 @@ end subroutine ZeroDwt

!-----------------------------------------------------------------------
subroutine Summary_carbonflux(this, &
bounds, num_soilc, filter_soilc, num_soilp, filter_soilp, &
isotope, soilbiogeochem_hr_col, soilbiogeochem_lithr_col, &
bounds, num_soilc, filter_soilc, num_soilp, filter_soilp, isotope, &
soilbiogeochem_hr_col, soilbiogeochem_cwdhr_col, soilbiogeochem_lithr_col, &
soilbiogeochem_decomp_cascade_ctransfer_col, &
product_closs_grc)
!
Expand All @@ -4022,6 +4019,7 @@ subroutine Summary_carbonflux(this, &
integer , intent(in) :: filter_soilp(:) ! filter for soil patches
character(len=*) , intent(in) :: isotope
real(r8) , intent(in) :: soilbiogeochem_hr_col(bounds%begc:)
real(r8) , intent(in) :: soilbiogeochem_cwdhr_col(bounds%begc:)
real(r8) , intent(in) :: soilbiogeochem_lithr_col(bounds%begc:)
real(r8) , intent(in) :: soilbiogeochem_decomp_cascade_ctransfer_col(bounds%begc:,1:)
real(r8) , intent(in) :: product_closs_grc(bounds%begg:)
Expand Down Expand Up @@ -4512,9 +4510,6 @@ subroutine Summary_carbonflux(this, &
this%ar_col(c) + &
soilbiogeochem_hr_col(c)

! coarse woody debris heterotrophic respiration
this%cwdc_hr_col(c) = 0._r8

! net ecosystem production, excludes fire flux, landcover change,
! and loss from wood products, positive for sink (NEP)
this%nep_col(c) = &
Expand Down Expand Up @@ -4576,7 +4571,7 @@ subroutine Summary_carbonflux(this, &
! coarse woody debris C loss
do fc = 1,num_soilc
c = filter_soilc(fc)
this%cwdc_loss_col(c) = 0._r8
this%cwdc_loss_col(c) = soilbiogeochem_cwdhr_col(c)
end do
associate(is_cwd => decomp_cascade_con%is_cwd) ! TRUE => pool is a cwd pool
do l = 1, ndecomp_pools
Expand Down
Loading

0 comments on commit eb345c4

Please sign in to comment.