Skip to content

Commit

Permalink
Lower number-density termination threshold
Browse files Browse the repository at this point in the history
Merge branch 'lower_termination_threshold'

Fixes to termination logic to allow demotion to occur successfully

reduces termination threshold due to small number density and also
deletes calls to terminate_cohorts in CanopyStructureMod except for
those that are after a call to fuse_cohorts.

Fixes: #187

User interface changes?: No

Code review: changes done in consultation with @rgknox and @rosiealice

Testing:

  ckoven

    Test suite: ed tests on lawrencium
    Test baseline: a5dc8da
    Test namelist changes:
    Test answer changes: climate changing

    Test summary: [Remove 'PASS' fields]

        [cdkoven@n0002 ed.lawrencium-lr3.intel.37ba5ce]$ ./cimeteststatus | grep FAIL
        FAIL SMS_D_Lm6.f45_f45.ICLM45ED.lawrencium-lr3_intel.clm-edTest.clm2.h0.nc : baseline compare clm2.h0 (baseline: compare .base file with ed.lawrencium-lr3.intel.a5dc8da file)
        FAIL SMS_D_Lm6.f45_f45.ICLM45ED.lawrencium-lr3_intel.clm-edTest.cpl.hi.nc : baseline compare cpl.hi (baseline: compare .base file with ed.lawrencium-lr3.intel.a5dc8da file)
        FAIL SMS_D_Lm6.f45_f45.ICLM45ED.lawrencium-lr3_intel.clm-edTest.rtm.h0.nc : baseline compare rtm.h0 (baseline: compare .base file with ed.lawrencium-lr3.intel.a5dc8da file)
        FAIL SMS_D_Lm6.f45_f45.ICLM45ED.lawrencium-lr3_intel.clm-edTest : baseline compare summary (baseline: compare .base file with ed.lawrencium-lr3.intel.a5dc8da file)

  andre:

    Test suite: ed - yellowstone gnu, intel, pgi
                     hobart nag
    Test baseline: 4ccb9ef
    Test namelist changes: none
    Test answer changes: climate changing, only expected to show up on longer tests
    Test status:
        PASS - all functionality tests.
        Expected baseline failures for all SMS_D_Lm6.f45_f45.ICLM45ED.yellowstone_{gnu,intel,pgi}.clm-edTest.
        PASS - all other tests are bit for bit with baseline.

    Test suite: clm_short - yellowstone gnu, intel, pgi
    Test baseline: clm4_5_12_r195
    Test namelist changes: none
    Test answer changes: bit for bit
    Test status: all tests pass
  • Loading branch information
bandre-ucar committed Mar 14, 2017
2 parents 4ccb9ef + 07c10f3 commit 0ea3fed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
5 changes: 0 additions & 5 deletions components/clm/src/ED/biogeochem/EDCanopyStructureMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ subroutine canopy_structure( currentSite )
!currentCohort%canopy_layer,currentCohort%dbh

endif
! call terminate_cohorts(currentPatch)

!----------- End of cohort splitting ------------------------------!
endif !canopy layer = i
Expand All @@ -307,7 +306,6 @@ subroutine canopy_structure( currentSite )

enddo !currentCohort

call terminate_cohorts(currentSite, currentPatch)
arealayer(i) = arealayer(i) - sumloss
!Update arealayer for diff calculations of layer below.
arealayer(i + 1) = arealayer(i + 1) + sumloss
Expand Down Expand Up @@ -343,7 +341,6 @@ subroutine canopy_structure( currentSite )

enddo !is there still excess area in any layer?

call terminate_cohorts(currentSite, currentPatch)
call fuse_cohorts(currentPatch)
call terminate_cohorts(currentSite, currentPatch)

Expand Down Expand Up @@ -503,7 +500,6 @@ subroutine canopy_structure( currentSite )
!currentCohort%pft,currentPatch%patchno

endif
!call terminate_cohorts(currentPatch)
if(promswitch == 1)then
! write(fates_log(),*) 'cohort loop',currentCohort%pft,currentPatch%patchno
endif
Expand Down Expand Up @@ -565,7 +561,6 @@ subroutine canopy_structure( currentSite )
endif
enddo !is there still not enough canopy area in any layer?

call terminate_cohorts(currentSite, currentPatch)
call fuse_cohorts(currentPatch)
call terminate_cohorts(currentSite, currentPatch)

Expand Down
15 changes: 6 additions & 9 deletions components/clm/src/ED/main/EDTypesMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,12 @@ module EDTypesMod
integer , parameter :: N_DBH_BINS = 5 ! no. of dbh bins used when comparing patches


real(r8), parameter :: min_npm2 = 1.0d-5 ! minimum cohort number density per m2 before termination
real(r8), parameter :: min_patch_area = 0.001_r8 ! smallest allowable patch area before termination
real(r8), parameter :: min_nppatch = 1.0d-8 ! minimum number of cohorts per patch (min_npm2*min_patch_area)

! in some cases, we want to immediately remove super small
! number densities of cohorts to prevent FPEs, this is usually
! just relevant in the first day after recruitment
real(r8), parameter :: min_n_safemath = 1.0E-15_r8

real(r8), parameter :: min_npm2 = 1.0E-8_r8 ! minimum cohort number density per m2 before termination
real(r8), parameter :: min_patch_area = 0.001_r8 ! smallest allowable patch area before termination
real(r8), parameter :: min_nppatch = 1.0E-11_r8 ! minimum number of cohorts per patch (min_npm2*min_patch_area)
real(r8), parameter :: min_n_safemath = 1.0E-15_r8 ! in some cases, we want to immediately remove super small
! number densities of cohorts to prevent FPEs, this is usually
! just relevant in the first day after recruitment
character*4 yearchar

! special mode to cause PFTs to create seed mass of all currently-existing PFTs
Expand Down

0 comments on commit 0ea3fed

Please sign in to comment.