Skip to content

Commit

Permalink
Merge branch 'woodCN_fixes'
Browse files Browse the repository at this point in the history
Allow for resorbtion in transition from live to dead wood N

This PR allows for resorbtion in transition from live to dead wood N,
which also moves to NPOOL for free.

Resolves #443
  • Loading branch information
billsacks committed Aug 20, 2020
2 parents 32964a8 + 14bc289 commit 6c99904
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 8 deletions.
7 changes: 7 additions & 0 deletions cime_config/testdefs/ExpectedTestFails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
</phase>
</test>

<test name="ERS_Ln9.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.IHistClm50SpGs.cheyenne_intel.clm-clm50cam6LndTuningMode_1979Start">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
<issue>#1117</issue>
</phase>
</test>

<!-- fates test suite failures -->

<test name="ERS_Ld60.f45_f45_mg37.I2000Clm45Fates.hobart_nag.clm-Fates">
Expand Down
121 changes: 121 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,125 @@
===============================================================
Tag name: ctsm1.0.dev109
Originator(s): negins (Negin Sobhani,UCAR/TSS,303-497-1224)
Date: Thu Aug 20 11:40:07 MDT 2020
One-line Summary: Allow for resorbtion in transition from live to dead wood N

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

This PR allows for resorbtion in transition from live to dead wood N, which also move
to NPOOL for free.

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

Issues fixed (include CTSM Issue #): Issue #443


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.)

[x] clm5_0

[x] ctsm5_0-nwp

[ ] clm4_5

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

Caveats for users (e.g., need to interpolate initial conditions): None

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): None

Changes to the datasets (e.g., parameter, surface or initial files): None

Substantial timing or memory changes: [For timing changes, can check PFS test(s) in the test suite]

Notes of particular relevance for developers: None
---------------------------------------------
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):

Changes to tests or testing: None

Code reviewed by: Erik Kluzek


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 - not run

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 ---- PASS
izumi ------- PASS

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


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

Changes answers relative to baseline: YES


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: Clm50 with Bgc or Cn
- what platforms/compilers: all
- nature of change (roundoff; larger than roundoff/same climate; new
climate): larger than roundoff/same climate

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

If this tag changes climate describe the run(s) done to evaluate the new
climate (put details of the simulations in the experiment database)

Will Wieder thought the changes were small enough that we didn't need to do
a long simulation. Erik Kluzek thinks the changes were verified with single
point simulations.


URL for LMWG diagnostics output used to validate new climate:


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

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

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

===============================================================
===============================================================
Tag name: ctsm1.0.dev108
Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326)
Date: Wed Aug 19 17:23:47 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.dev109 negins 08/20/2020 Allow for resorbtion in transition from live to dead wood N
ctsm1.0.dev108 erik 08/19/2020 Update default PE layouts for new SE/FV3 grids
ctsm1.0.dev107 erik 08/10/2020 Answer changes needed for CESM2.2.0
ctsm1.0.dev106 erik 08/06/2020 Bit-for-bit updates for the CESM2.2.0 release
Expand Down
10 changes: 9 additions & 1 deletion src/biogeochem/CNNStateUpdate1Mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ end subroutine NStateUpdateDynPatch
!-----------------------------------------------------------------------
subroutine NStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp, &
cnveg_nitrogenflux_inst, cnveg_nitrogenstate_inst, soilbiogeochem_nitrogenflux_inst)
use CNSharedParamsMod , only : use_fun
!
! !DESCRIPTION:
! On the radiation time step, update all the prognostic nitrogen state
Expand All @@ -98,7 +99,7 @@ subroutine NStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp, &
integer , intent(in) :: filter_soilc(:) ! filter for soil columns
integer , intent(in) :: num_soilp ! number of soil patches in filter
integer , intent(in) :: filter_soilp(:) ! filter for soil patches
type(cnveg_nitrogenflux_type) , intent(in) :: cnveg_nitrogenflux_inst
type(cnveg_nitrogenflux_type) , intent(inout) :: cnveg_nitrogenflux_inst
type(cnveg_nitrogenstate_type) , intent(inout) :: cnveg_nitrogenstate_inst
type(soilbiogeochem_nitrogenflux_type) , intent(inout) :: soilbiogeochem_nitrogenflux_inst
!
Expand Down Expand Up @@ -189,6 +190,13 @@ subroutine NStateUpdate1(num_soilc, filter_soilc, num_soilp, filter_soilp, &
ns_veg%deadcrootn_patch(p) = ns_veg%deadcrootn_patch(p) + nf_veg%livecrootn_to_deadcrootn_patch(p)*dt
ns_veg%livecrootn_patch(p) = ns_veg%livecrootn_patch(p) - nf_veg%livecrootn_to_retransn_patch(p)*dt
ns_veg%retransn_patch(p) = ns_veg%retransn_patch(p) + nf_veg%livecrootn_to_retransn_patch(p)*dt
! WW change logic so livestem_retrans goes to npool (via free_retrans flux)
! this should likely be done more cleanly if it works, i.e. not update fluxes w/ states
! additional considerations for crop?
if (use_fun ) then
nf_veg%free_retransn_to_npool_patch(p) = nf_veg%free_retransn_to_npool_patch(p) + nf_veg%livestemn_to_retransn_patch(p)
nf_veg%free_retransn_to_npool_patch(p) = nf_veg%free_retransn_to_npool_patch(p) + nf_veg%livecrootn_to_retransn_patch(p)
end if
end if
if (ivt(p) >= npcropmin) then ! Beth adds retrans from froot
ns_veg%frootn_patch(p) = ns_veg%frootn_patch(p) - nf_veg%frootn_to_retransn_patch(p)*dt
Expand Down
11 changes: 4 additions & 7 deletions src/biogeochem/CNPhenologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2751,11 +2751,12 @@ subroutine CNLivewoodTurnover (num_soilp, filter_soilp, &
if (CNratio_floating .eqv. .true.) then
if (livestemc(p) == 0.0_r8) then
ntovr = 0.0_r8
livestemn_to_deadstemn(p) = 0.0_r8
else
ntovr = ctovr * (livestemn(p) / livestemc(p))
livestemn_to_deadstemn(p) = ctovr / deadwdcn(ivt(p))
end if

livestemn_to_deadstemn(p) = 0.5_r8 * ntovr ! assuming 50% goes to deadstemn
end if

livestemn_to_retransn(p) = ntovr - livestemn_to_deadstemn(p)
Expand All @@ -2770,19 +2771,15 @@ subroutine CNLivewoodTurnover (num_soilp, filter_soilp, &
if (CNratio_floating .eqv. .true.) then
if (livecrootc(p) == 0.0_r8) then
ntovr = 0.0_r8
livecrootn_to_deadcrootn(p) = 0.0_r8
else
ntovr = ctovr * (livecrootn(p) / livecrootc(p))
livecrootn_to_deadcrootn(p) = ctovr / deadwdcn(ivt(p))
end if

livecrootn_to_deadcrootn(p) = 0.5_r8 * ntovr ! assuming 50% goes to deadstemn
end if

livecrootn_to_retransn(p) = ntovr - livecrootn_to_deadcrootn(p)
if(use_fun)then
!TURNED OFF FLUXES TO CORRECT N ACCUMULATION ISSUE. RF. Oct 2015.
livecrootn_to_retransn(p) = 0.0_r8
livestemn_to_retransn(p) = 0.0_r8
endif

end if

Expand Down

0 comments on commit 6c99904

Please sign in to comment.