Skip to content

Commit

Permalink
modifications to enable fpe_traps to pass on gnu
Browse files Browse the repository at this point in the history
  • Loading branch information
rgknox committed Apr 1, 2016
1 parent 378d8ec commit 2cbe980
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions biogeochem/EDPhysiologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ subroutine trim_canopy( currentSite )
currentCohort%leaf_cost = currentCohort%leaf_cost * (ED_val_grperc(1) + 1._r8)
else !evergreen costs
currentCohort%leaf_cost = 1.0_r8/(pftcon%slatop(currentCohort%pft)* &
pftcon%leaf_long(currentCohort%pft)*1000.0_r8) !convert from sla in m2g-1 to m2kg-1
pftcon%leaf_long(currentCohort%pft)*1000.0_r8) !convert from sla in m2g-1 to m2kg-1
currentCohort%leaf_cost = currentCohort%leaf_cost + 1.0_r8/(pftcon%slatop(currentCohort%pft)*1000.0_r8) * &
pftcon%froot_leaf(currentCohort%pft) / EDecophyscon%root_long(currentCohort%pft)
currentCohort%leaf_cost = currentCohort%leaf_cost * (ED_val_grperc(1) + 1._r8)
Expand All @@ -215,10 +215,11 @@ subroutine trim_canopy( currentSite )
endif !leaf activity?
enddo !z
if (currentCohort%NV.gt.2)then
write(iulog,*) 'nv>4',currentCohort%year_net_uptake(1:6),currentCohort%leaf_cost,&
currentCohort%canopy_trim
! leaf_cost may be uninitialized, removing its diagnostic from the log
! to allow checking with fpe_traps (RGK)
write(iulog,*) 'nv>4',currentCohort%year_net_uptake(1:6),currentCohort%canopy_trim
endif

currentCohort%year_net_uptake(:) = 999.0_r8
if (trimmed == 0.and.currentCohort%canopy_trim < 1.0_r8)then
currentCohort%canopy_trim = currentCohort%canopy_trim + inc
Expand Down
2 changes: 1 addition & 1 deletion main/EDCLMLinkMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ subroutine ed_update_history_variables( this, bounds, ed_allsites_inst, &
scpf = (ft-1)*nlevsclass_ed+sc

! Flux Variables (must pass a NaN check on growth increment and not be recruits)
if( .not.(isnan(currentCohort%ddbhdt)) .and. .not.(currentCohort%isnew)) then
if( .not.(currentCohort%isnew) ) then
ed_gpp_scpf(g,scpf) = ed_gpp_scpf(g,scpf) + n_perm2*currentCohort%gpp ! [kgC/m2/yr]
ed_npp_totl_scpf(g,scpf) = ed_npp_totl_scpf(g,scpf) + currentcohort%npp*n_perm2
ed_npp_leaf_scpf(g,scpf) = ed_npp_leaf_scpf(g,scpf) + currentcohort%npp_leaf*n_perm2
Expand Down

0 comments on commit 2cbe980

Please sign in to comment.