Skip to content

Commit

Permalink
Merge branch 'yangx/lnd/outputs_bugfix' into next (PR #3278)
Browse files Browse the repository at this point in the history
Fix bugs that cause two land output variables to be NaN

Two diagnostic variables SEN_NLOSS_LITTER and SEN_PLOSS_LITTER
are NaN from current ELM runs due to bugs in the calculation.
This commit fixes those bugs.

[BFB]

Conflicts:
	components/clm/src/data_types/VegetationDataType.F90
  • Loading branch information
jqyin committed Dec 4, 2019
2 parents 6997c59 + 35c84f9 commit 180a8b0
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions components/clm/src/data_types/VegetationDataType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9824,11 +9824,17 @@ subroutine veg_nf_summary(this, bounds, num_soilc, filter_soilc, num_soilp, filt
this%hrv_deadcrootn_to_litter(p) + &
this%hrv_deadcrootn_storage_to_litter(p)+ &
this%hrv_deadcrootn_xfer_to_litter(p)
if (crop_prog) then
this%sen_nloss_litter(p) = &
this%livestemn_to_litter(p) + &
this%leafn_to_litter(p) + &
this%frootn_to_litter(p)
else
this%sen_nloss_litter(p) = &
this%leafn_to_litter(p) + &
this%frootn_to_litter(p)
end if

this%sen_nloss_litter(p) = &
this%livestemn_to_litter(p) + &
this%leafn_to_litter(p) + &
this%frootn_to_litter(p)
end do

call p2c(bounds, num_soilc, filter_soilc, &
Expand Down Expand Up @@ -10924,10 +10930,16 @@ subroutine veg_pf_summary(this, bounds, num_soilc, filter_soilc, num_soilp, filt
this%hrv_deadcrootp_storage_to_litter(p)+ &
this%hrv_deadcrootp_xfer_to_litter(p)

this%sen_ploss_litter(p) = &
this%livestemp_to_litter(p) + &
this%leafp_to_litter(p) + &
this%frootp_to_litter(p)
if (crop_prog) then
this%sen_ploss_litter(p) = &
this%livestemp_to_litter(p) + &
this%leafp_to_litter(p) + &
this%frootp_to_litter(p)
else
this%sen_ploss_litter(p) = &
this%leafp_to_litter(p) + &
this%frootp_to_litter(p)
end if
end do

call p2c(bounds, num_soilc, filter_soilc, &
Expand Down

0 comments on commit 180a8b0

Please sign in to comment.