@@ -32,7 +32,7 @@ subroutine nut_nminrl
3232 use septic_data_module
3333 use basin_module
3434 use organic_mineral_mass_module
35- use hru_module, only : rsdco_plcom, i_sep, ihru, ipl, isep
35+ use hru_module, only : rsdco_plcom, i_sep, ihru, isep
3636 use soil_module
3737 use plant_module
3838 use output_landscape_module, only : hnb_d
@@ -43,7 +43,7 @@ subroutine nut_nminrl
4343 integer :: k = 0 ! none |counter (soil layer)
4444 integer :: kk = 0 ! none |soil layer used to compute soil water and
4545 ! |soil temperature factors
46- integer :: idp = 0
46+ ! integer :: idp = 0
4747 real :: rmn1 = 0 . ! kg N/ha |amount of nitrogen moving from fresh organic
4848 ! |to nitrate(80%) and active organic(20%)
4949 ! |pools in layer
@@ -62,7 +62,7 @@ subroutine nut_nminrl
6262 real :: cprf = 0 . ! |carbon phosphorus ratio factor
6363 real :: ca = 0 . ! |
6464 real :: decr = 0 . ! |
65- real :: rdc = 0 . ! |
65+ ! real :: rdc = 0. ! |
6666 real :: wdn = 0 . ! kg N/ha |amount of nitrogen lost from nitrate pool in
6767 ! |layer due to denitrification
6868 real :: cdg = 0 . ! none |soil temperature factor
@@ -77,6 +77,8 @@ subroutine nut_nminrl
7777 hnb_d(j)% org_lab_p = 0 .
7878 hnb_d(j)% act_sta_n = 0 .
7979 hnb_d(j)% denit = 0 .
80+ hnb_d(j)% rsd_nitorg_n = 0 .
81+ hnb_d(j)% rsd_laborg_p = 0 .
8082
8183 ! ! compute humus mineralization of organic soil pools
8284 do k = 1 , soil(j)% nly
@@ -147,33 +149,36 @@ subroutine nut_nminrl
147149 cnrf = 1 .
148150 end if
149151
150- if (soil1(j)% rsd(k)% p > 1.e-4 ) then
151- cpr = soil1(j)% rsd(k)% c / soil1(j)% rsd(k)% p
152- if (cpr > 5000 .) cpr = 5000 .
153- cprf = Exp (- .693 * (cpr - 200 .) / 200 .)
154- else
155- cprf = 1 .
156- end if
152+ if (soil1(j)% rsd(k)% p > 1.e-4 ) then
153+ cpr = soil1(j)% rsd(k)% c / soil1(j)% rsd(k)% p
154+ if (cpr > 5000 .) cpr = 5000 .
155+ cprf = Exp (- .693 * (cpr - 200 .) / 200 .)
156+ else
157+ cprf = 1 .
158+ end if
157159
158- ca = Min (cnrf, cprf, 1 .)
160+ ca = Min (cnrf, cprf, 1 .)
159161
160- ! ! compute root and incorporated residue decomposition
161- ! ! all plant residue in soil is mixed - don't track individual plant residue in soil
162+ ! ! compute root and incorporated residue decomposition
163+ ! ! all plant residue in soil is mixed - don't track individual plant residue in soil
162164
163- if (pcom(j)% npl > 0 ) then
164- decr = rsdco_plcom(j) / pcom(j)% npl * ca * csf
165- else
166- decr = 0.05
167- end if
168- decr = Max (bsn_prm% decr_min, decr)
169- decr = Min (decr, 1 .)
170- decomp = decr * soil1(j)% rsd(k)
171- soil1(j)% rsd(k) = soil1(j)% rsd(k) - decomp
172- soil1(j)% mn(k)% no3 = soil1(j)% mn(k)% no3 + .8 * decomp% n
173- soil1(j)% hact(k)% n = soil1(j)% hact(k)% n + .2 * decomp% n
174- soil1(j)% mp(k)% lab = soil1(j)% mp(k)% lab + .8 * decomp% p
175- soil1(j)% hsta(k)% p = soil1(j)% hsta(k)% p + .2 * decomp% p
176-
165+ if (pcom(j)% npl > 0 ) then
166+ decr = rsdco_plcom(j) / pcom(j)% npl * ca * csf
167+ else
168+ decr = 0.05
169+ end if
170+ decr = Max (bsn_prm% decr_min, decr)
171+ decr = Min (decr, 1 .)
172+ decomp = decr * soil1(j)% rsd(k)
173+ soil1(j)% rsd(k) = soil1(j)% rsd(k) - decomp
174+ soil1(j)% mn(k)% no3 = soil1(j)% mn(k)% no3 + .8 * decomp% n
175+ soil1(j)% hact(k)% n = soil1(j)% hact(k)% n + .2 * decomp% n
176+ soil1(j)% mp(k)% lab = soil1(j)% mp(k)% lab + .8 * decomp% p
177+ soil1(j)% hsta(k)% p = soil1(j)% hsta(k)% p + .2 * decomp% p
178+
179+ hnb_d(j)% rsd_nitorg_n = hnb_d(j)% rsd_nitorg_n + .8 * decomp% n
180+ hnb_d(j)% rsd_laborg_p = hnb_d(j)% rsd_laborg_p + .8 * decomp% p
181+
177182 ! ! compute denitrification
178183 wdn = 0 .
179184 if (i_sep(j) /= k .or. sep(isep)% opt /= 1 ) then
0 commit comments