diff --git a/doc/ChangeLog b/doc/ChangeLog index 8e8a99b868..1fa5bc6a80 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,78 @@ =============================================================== +Tag name: ctsm5.1.dev143 +Originator(s): rgknox (Ryan Knox,LAWRENCE BERKELEY NATIONAL LABORATORY,510-495-) +Date: Fri Oct 13 08:53:38 MDT 2023 +One-line Summary: Zeroing of wood product fluxes on fates columns + +Purpose and description of changes +---------------------------------- + +This is a small change that initializes wood product fluxes on fates columns to zero. These +products are otherwise zero'd in a p2c() routine that is incompatible with fates. When +wood product fluxes become available via fates, these routines will be updated. These fluxes +were previously left as uninitialized, which was causing math issues on some compilers. + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +There are no changes to scientifically-supported configurations. + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed or introduced +------------------------ + +Fixes CTSM issue 2165 + + +Notes of particular relevance for users +--------------------------------------- + + +No caveats, no bugs, no issues of relevance. + +No noticable timing changes. + + +Notes of particular relevance for developers: +--------------------------------------------- + +None + + +Testing summary: +---------------- + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + cheyenne ---- OK + izumi ------- PASS + + Compared against baseline: ctsm5.1.dev142 + + +Answer changes +-------------- + +Answer changes only on FATES tests, and only on the specific wood product fluxes modified. These values +are now zeros, instead of being uninitialized. Everything else is b4b. + + +Other details +------------- + +No other details. + +=============================================================== +=============================================================== Tag name: ctsm5.1.dev142 Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) Date: Tue Sep 19 11:30:22 MDT 2023 diff --git a/doc/ChangeSum b/doc/ChangeSum index e11f439658..b6a5cdd29c 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.1.dev143 rgknox 10/13/2023 Zeroing of wood product fluxes on fates columns ctsm5.1.dev142 samrabin 09/19/2023 Merge 5 bit-for-bit pull requests ctsm5.1.dev141 slevis 09/13/2023 Change small snocan to zero ctsm5.1.dev140 afoster 09/12/2023 add lai_streams capability for FATES diff --git a/src/biogeochem/CNProductsMod.F90 b/src/biogeochem/CNProductsMod.F90 index 4ef5c7c86f..a5f69696b0 100644 --- a/src/biogeochem/CNProductsMod.F90 +++ b/src/biogeochem/CNProductsMod.F90 @@ -13,6 +13,7 @@ module CNProductsMod use clm_time_manager , only : get_step_size_real use SpeciesBaseType , only : species_base_type use PatchType , only : patch + use clm_varctl , only : use_fates_bgc ! implicit none private @@ -346,6 +347,17 @@ subroutine InitCold(this, bounds) this%tot_woodprod_grc(g) = 0._r8 end do + ! We don't call the woodproduct fluxes routine if + ! no veg patches are active. This is what happens + ! when fates is on. Woodproduct fluxes use a p2g + ! upscaling for the gru_ pools. Must zero it here then. + if(use_fates_bgc)then + do g = bounds%begg, bounds%endg + this%gru_prod10_gain_grc(g) = 0._r8 + this%gru_prod100_gain_grc(g) = 0._r8 + end do + end if + ! Need to set these patch-level fluxes to 0 everywhere for the sake of special ! landunits (because they don't get set over special landunits in the run loop) do p = bounds%begp, bounds%endp @@ -387,6 +399,7 @@ subroutine Restart(this, bounds, ncid, flag, & ! !LOCAL VARIABLES: logical :: template_provided logical :: readvar + integer :: g character(len=*), parameter :: subname = 'Restart' !----------------------------------------------------------------------- @@ -485,7 +498,20 @@ subroutine Restart(this, bounds, ncid, flag, & end if if (flag == 'read') then + + ! We don't call the woodproduct fluxes routine if + ! no veg patches are active. This is what happens + ! when fates is on. Woodproduct fluxes use a p2g + ! upscaling for the gru_ pools. Must zero it here then. + if(use_fates_bgc)then + do g = bounds%begg, bounds%endg + this%gru_prod10_gain_grc(g) = 0._r8 + this%gru_prod100_gain_grc(g) = 0._r8 + end do + end if + call this%ComputeSummaryVars(bounds) + end if end subroutine Restart @@ -789,6 +815,7 @@ subroutine ComputeProductSummaryVars(this, bounds) ! fluxes into wood & crop product pools, from landcover change this%cropprod1_grc(g) = this%cropprod1_grc(g) + this%dwt_cropprod1_gain_grc(g)*dt + this%prod10_grc(g) = this%prod10_grc(g) + this%dwt_prod10_gain_grc(g)*dt this%prod100_grc(g) = this%prod100_grc(g) + this%dwt_prod100_gain_grc(g)*dt @@ -834,7 +861,7 @@ subroutine ComputeSummaryVars(this, bounds) this%tot_woodprod_grc(g) = & this%prod10_grc(g) + & this%prod100_grc(g) - + ! total loss from wood products this%tot_woodprod_loss_grc(g) = & this%prod10_loss_grc(g) + &