Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for N balance error due to spval value for land use simulation #6618

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions components/elm/src/data_types/ColumnDataType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7538,14 +7538,16 @@ subroutine col_cf_summary(this, bounds, num_soilc, filter_soilc, isotope)
c = filter_soilc(fc)
this%decomp_cpools_leached(c,l) = 0._r8
end do
do j = 1, nlev
do fc = 1,num_soilc
if(l /= i_cwd)then
do j = 1, nlev
do fc = 1,num_soilc
c = filter_soilc(fc)
this%decomp_cpools_leached(c,l) = &
this%decomp_cpools_leached(c,l) + &
this%decomp_cpools_transport_tendency(c,j,l) * dzsoi_decomp(j)
end do
end do
end do
end do
endif
do fc = 1,num_soilc
c = filter_soilc(fc)
this%som_c_leached(c) = &
Expand Down Expand Up @@ -9784,17 +9786,19 @@ subroutine col_nf_summary(this, bounds, num_soilc, filter_soilc)
c = filter_soilc(fc)
this%decomp_npools_leached(c,l) = 0._r8
end do
do j = 1, nlev
do fc = 1,num_soilc
if(l /= i_cwd)then
do j = 1, nlev
do fc = 1,num_soilc
c = filter_soilc(fc)
this%decomp_npools_leached(c,l) = &
this%decomp_npools_leached(c,l) + &
this%decomp_npools_transport_tendency(c,j,l) * dzsoi_decomp(j)

this%bgc_npool_inputs(c,l) = this%bgc_npool_inputs(c,l) + &
(this%bgc_npool_ext_inputs_vr(c,j,l)-this%bgc_npool_ext_loss_vr(c,j,l))*dzsoi_decomp(j)
end do
end do
end do
end do
endif
do fc = 1,num_soilc
c = filter_soilc(fc)
this%som_n_leached(c) = &
Expand Down Expand Up @@ -11314,16 +11318,16 @@ subroutine col_pf_summary(this, bounds, num_soilc, filter_soilc)
c = filter_soilc(fc)
this%decomp_ppools_leached(c,l) = 0._r8
end do

do j = 1, nlevdecomp
do fc = 1,num_soilc
if(l /= i_cwd)then
do j = 1, nlevdecomp
do fc = 1,num_soilc
c = filter_soilc(fc)
this%decomp_ppools_leached(c,l) = &
this%decomp_ppools_leached(c,l) + &
this%decomp_ppools_transport_tendency(c,j,l) * dzsoi_decomp(j)
end do
end do

end do
end do
endif
do fc = 1,num_soilc
c = filter_soilc(fc)
this%som_p_leached(c) = &
Expand Down