Skip to content

Commit

Permalink
Merge clm4_5_8_r176, commit '997ff5a1', into andre-ed-clm-16x.
Browse files Browse the repository at this point in the history
  • Loading branch information
bandre-ucar committed Jun 13, 2016
2 parents 06f4619 + 997ff5a commit f40a5e8
Show file tree
Hide file tree
Showing 15 changed files with 306 additions and 61 deletions.
108 changes: 108 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,112 @@
===============================================================
Tag name: clm4_5_8_r176
Originator(s): sacks (Bill Sacks)
Date: Wed Apr 13 09:32:56 MDT 2016
One-line Summary: Calculate active flags and filters earlier in initialization

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

Main purpose is to compute the active flags and filters (via reweight_wrapup)
earlier in initialization. These are now computed initially before the restart
file is read, and tehn updated as soon as possible in the midst of the restart
file read. This is useful in case any of the clm_instMod restart routines want
to use the active flags or filters, directly or indirectly (e.g., via a call to
subgridAveMod) - e.g., for the sake of backwards compatibility. This is
something that's needed in an upcoming tag.

Also: change some CN product history fields, so that they are more consistent -
so totals just give totals for wood:

- Renamed TOTPROD to TOT_WOODPROD

- Removed PRODUCT_CLOSS and similar fields, added TOT_WOODPRODC_LOSS and similar
fields: now just include losses from wood product pools


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

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

Changes to CLM's user interface (e.g., new/renamed XML or namelist variables):
- renamed CN product history fields: see above

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: none


Code reviews and testing
------------------------

Code reviewed by: self

CLM testing:

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

build-namelist tests:

yellowstone - not run

unit-tests (components/clm/src):

yellowstone - pass

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

yellowstone - not run

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

yellowstone - not run

regular tests (aux_clm40, aux_clm45):

yellowstone_intel - ok
yellowstone_pgi - ok
yellowstone_gnu (clm45 only) - ok
hobart_nag - ok

ok means tests pass or xfail, plus expected failures in CLM5 ERP tests with
threading, just in the NPP_BURNEDOFF field, due to bug 2292 (leading to
differences both in the baseline comparison and in the comparison of the
restart to the baseline)

CLM tag used for the baseline comparisons: clm4_5_8_r175


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

Changes answers relative to baseline: NO

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

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

List all files eliminated: none

List all files added and what they do: none

List all existing files that have been modified, and describe the changes:

========= Compute active flags and filters earlier in initialization
M components/clm/src/main/clm_initializeMod.F90
M components/clm/src/main/restFileMod.F90

========= Change CN product history fields (see above for details)
M components/clm/src/biogeochem/CNProductsMod.F90

========= Unrelated change: fix argument intent
M components/clm/src/biogeochem/CNPhenologyMod.F90

===============================================================
===============================================================
Tag name: clm4_5_8_r175
Originator(s): sacks (Bill Sacks)
Date: Sat Apr 9 15:48:47 MDT 2016
Expand Down
108 changes: 108 additions & 0 deletions components/clm/doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,112 @@
===============================================================
Tag name: clm4_5_8_r176
Originator(s): sacks (Bill Sacks)
Date: Wed Apr 13 09:32:56 MDT 2016
One-line Summary: Calculate active flags and filters earlier in initialization

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

Main purpose is to compute the active flags and filters (via reweight_wrapup)
earlier in initialization. These are now computed initially before the restart
file is read, and tehn updated as soon as possible in the midst of the restart
file read. This is useful in case any of the clm_instMod restart routines want
to use the active flags or filters, directly or indirectly (e.g., via a call to
subgridAveMod) - e.g., for the sake of backwards compatibility. This is
something that's needed in an upcoming tag.

Also: change some CN product history fields, so that they are more consistent -
so totals just give totals for wood:

- Renamed TOTPROD to TOT_WOODPROD

- Removed PRODUCT_CLOSS and similar fields, added TOT_WOODPRODC_LOSS and similar
fields: now just include losses from wood product pools


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

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

Changes to CLM's user interface (e.g., new/renamed XML or namelist variables):
- renamed CN product history fields: see above

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: none


Code reviews and testing
------------------------

Code reviewed by: self

CLM testing:

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

build-namelist tests:

yellowstone - not run

unit-tests (components/clm/src):

yellowstone - pass

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

yellowstone - not run

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

yellowstone - not run

regular tests (aux_clm40, aux_clm45):

yellowstone_intel - ok
yellowstone_pgi - ok
yellowstone_gnu (clm45 only) - ok
hobart_nag - ok

ok means tests pass or xfail, plus expected failures in CLM5 ERP tests with
threading, just in the NPP_BURNEDOFF field, due to bug 2292 (leading to
differences both in the baseline comparison and in the comparison of the
restart to the baseline)

CLM tag used for the baseline comparisons: clm4_5_8_r175


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

Changes answers relative to baseline: NO

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

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

List all files eliminated: none

List all files added and what they do: none

List all existing files that have been modified, and describe the changes:

========= Compute active flags and filters earlier in initialization
M components/clm/src/main/clm_initializeMod.F90
M components/clm/src/main/restFileMod.F90

========= Change CN product history fields (see above for details)
M components/clm/src/biogeochem/CNProductsMod.F90

========= Unrelated change: fix argument intent
M components/clm/src/biogeochem/CNPhenologyMod.F90

===============================================================
===============================================================
Tag name: clm4_5_8_r175
Originator(s): sacks (Bill Sacks)
Date: Sat Apr 9 15:48:47 MDT 2016
Expand Down
1 change: 1 addition & 0 deletions components/clm/doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
clm4_5_8_r176 sacks 04/13/2016 Calculate active flags and filters earlier in initialization
clm4_5_8_r175 sacks 04/09/2016 For glc_mec, change downscaling and where SMB is computed
clm4_5_8_r174 erik 03/25/2016 Bring Rosie's respiration changes to the trunk
clm4_5_8_r173 sacks 03/17/2016 Major refactor of CN Products
Expand Down
2 changes: 1 addition & 1 deletion components/clm/doc/UsersGuide/clm_ug.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ The purpose of this guide is to instruct both the novice and experienced user, a
</para>
</abstract>

<releaseinfo>$URL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r175/components/clm/doc/UsersGuide/clm_ug.xml $</releaseinfo>
<releaseinfo>$URL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r176/components/clm/doc/UsersGuide/clm_ug.xml $</releaseinfo>

<date>&build_date;</date>

Expand Down
2 changes: 1 addition & 1 deletion components/clm/src/biogeochem/CNPhenologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2372,7 +2372,7 @@ subroutine CNBackgroundLitterfall (num_soilp, filter_soilp, &
implicit none
integer , intent(in) :: num_soilp ! number of soil patches in filter
integer , intent(in) :: filter_soilp(:) ! filter for soil patches
type(cnveg_state_type) , intent(in) :: cnveg_state_inst
type(cnveg_state_type) , intent(inout) :: cnveg_state_inst
type(cnveg_carbonstate_type) , intent(in) :: cnveg_carbonstate_inst
type(cnveg_nitrogenstate_type), intent(in) :: cnveg_nitrogenstate_inst
type(cnveg_carbonflux_type) , intent(inout) :: cnveg_carbonflux_inst
Expand Down
40 changes: 24 additions & 16 deletions components/clm/src/biogeochem/CNProductsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ module CNProductsMod
class(species_base_type), allocatable :: species ! C, N, C13, C14, etc.

! States
real(r8), pointer :: cropprod1_col(:) ! (g[C or N]/m2) grain product pool, 1-year lifespan
real(r8), pointer :: prod10_col(:) ! (g[C or N]/m2) wood product pool, 10-year lifespan
real(r8), pointer :: prod100_col(:) ! (g[C or N]/m2) wood product pool, 100-year lifespan
real(r8), pointer :: totprod_col(:) ! (g[C or N]/m2) total WOOD product pool
real(r8), pointer :: cropprod1_col(:) ! (g[C or N]/m2) grain product pool, 1-year lifespan
real(r8), pointer :: prod10_col(:) ! (g[C or N]/m2) wood product pool, 10-year lifespan
real(r8), pointer :: prod100_col(:) ! (g[C or N]/m2) wood product pool, 100-year lifespan
real(r8), pointer :: tot_woodprod_col(:) ! (g[C or N]/m2) total wood product pool

! Fluxes: gains
real(r8), pointer :: dwt_prod10_gain_col(:) ! (g[C or N]/m2/s) dynamic landcover addition to 10-year wood product pool
Expand All @@ -46,9 +46,10 @@ module CNProductsMod
real(r8), pointer :: grain_to_cropprod1_col(:) ! (g[C or N]/m2/s) grain to 1-year crop product pool

! Fluxes: losses
real(r8), pointer :: cropprod1_loss_col(:) ! (g[C or N]/m2/s) decomposition loss from 1-yr grain product pool
real(r8), pointer :: prod10_loss_col(:) ! (g[C or N]/m2/s) decomposition loss from 10-yr wood product pool
real(r8), pointer :: prod100_loss_col(:) ! (g[C or N]/m2/s) decomposition loss from 100-yr wood product pool
real(r8), pointer :: cropprod1_loss_col(:) ! (g[C or N]/m2/s) decomposition loss from 1-yr grain product pool
real(r8), pointer :: prod10_loss_col(:) ! (g[C or N]/m2/s) decomposition loss from 10-yr wood product pool
real(r8), pointer :: prod100_loss_col(:) ! (g[C or N]/m2/s) decomposition loss from 100-yr wood product pool
real(r8), pointer :: tot_woodprod_loss_col(:) ! (g[C or N]/m2/s) decompomposition loss from all wood product pools

contains

Expand Down Expand Up @@ -113,7 +114,7 @@ subroutine InitAllocate(this, bounds)
allocate(this%cropprod1_col(begc:endc)) ; this%cropprod1_col(:) = nan
allocate(this%prod10_col(begc:endc)) ; this%prod10_col(:) = nan
allocate(this%prod100_col(begc:endc)) ; this%prod100_col(:) = nan
allocate(this%totprod_col(begc:endc)) ; this%totprod_col(:) = nan
allocate(this%tot_woodprod_col(begc:endc)) ; this%tot_woodprod_col(:) = nan

allocate(this%dwt_prod10_gain_col(begc:endc)) ; this%dwt_prod10_gain_col(:) = nan
allocate(this%dwt_prod100_gain_col(begc:endc)) ; this%dwt_prod100_gain_col(:) = nan
Expand All @@ -124,6 +125,7 @@ subroutine InitAllocate(this, bounds)
allocate(this%cropprod1_loss_col(begc:endc)) ; this%cropprod1_loss_col(:) = nan
allocate(this%prod10_loss_col(begc:endc)) ; this%prod10_loss_col(:) = nan
allocate(this%prod100_loss_col(begc:endc)) ; this%prod100_loss_col(:) = nan
allocate(this%tot_woodprod_loss_col(begc:endc)) ; this%tot_woodprod_loss_col(:) = nan
allocate(this%product_loss_col(begc:endc)) ; this%product_loss_col(:) = nan

end subroutine InitAllocate
Expand Down Expand Up @@ -171,13 +173,13 @@ subroutine InitHistory(this, bounds)
long_name = '100-yr wood product ' // this%species%get_species(), &
ptr_col = this%prod100_col)

this%totprod_col(begc:endc) = spval
this%tot_woodprod_col(begc:endc) = spval
call hist_addfld1d( &
fname = this%species%hist_fname('TOTPROD'), &
fname = this%species%hist_fname('TOT_WOODPROD'), &
units = 'g' // this%species%get_species() // '/m^2', &
avgflag = 'A', &
long_name = 'total wood product ' // this%species%get_species(), &
ptr_col = this%totprod_col)
ptr_col = this%tot_woodprod_col)

this%dwt_prod10_gain_col(begc:endc) = spval
call hist_addfld1d( &
Expand Down Expand Up @@ -219,13 +221,13 @@ subroutine InitHistory(this, bounds)
long_name = 'loss from 100-yr wood product pool', &
ptr_col = this%prod100_loss_col)

this%product_loss_col(begc:endc) = spval
this%tot_woodprod_loss_col(begc:endc) = spval
call hist_addfld1d( &
fname = this%species%hist_fname('PRODUCT_', suffix='LOSS'), &
fname = this%species%hist_fname('TOT_WOODPROD', suffix='_LOSS'), &
units = 'g' // this%species%get_species() // '/m^2/s', &
avgflag = 'A', &
long_name = 'total loss from wood product pools', &
ptr_col = this%product_loss_col)
ptr_col = this%tot_woodprod_loss_col)

end subroutine InitHistory

Expand All @@ -245,7 +247,7 @@ subroutine InitCold(this, bounds)
this%cropprod1_col(c) = 0._r8
this%prod10_col(c) = 0._r8
this%prod100_col(c) = 0._r8
this%totprod_col(c) = 0._r8
this%tot_woodprod_col(c) = 0._r8
end do

! TODO(wjs, 2016-03-11) I think the only reason this should be necessary is to set the
Expand All @@ -261,6 +263,7 @@ subroutine InitCold(this, bounds)
this%cropprod1_loss_col(c) = 0._r8
this%prod10_loss_col(c) = 0._r8
this%prod100_loss_col(c) = 0._r8
this%tot_woodprod_loss_col(c) = 0._r8
this%product_loss_col(c) = 0._r8
end do

Expand Down Expand Up @@ -618,10 +621,15 @@ subroutine ComputeSummaryVars(this, bounds, num_soilc, filter_soilc)
c = filter_soilc(fc)

! total wood products
this%totprod_col(c) = &
this%tot_woodprod_col(c) = &
this%prod10_col(c) + &
this%prod100_col(c)

! total loss from wood products
this%tot_woodprod_loss_col(c) = &
this%prod10_loss_col(c) + &
this%prod100_loss_col(c)

! total loss from ALL products
this%product_loss_col(c) = &
this%cropprod1_loss_col(c) + &
Expand Down
Loading

0 comments on commit f40a5e8

Please sign in to comment.