Skip to content

Commit

Permalink
Merge pull request APSIMInitiative#2057 from BrianCollinss/FixNUptake
Browse files Browse the repository at this point in the history
Sugarcane N uptake was always zero
  • Loading branch information
hol353 authored May 20, 2021
2 parents 21b18a2 + aed62fb commit cfeceaf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Model/Sugar/SugarMain.for
Original file line number Diff line number Diff line change
Expand Up @@ -3664,10 +3664,15 @@ c call sugar_nit_stress_expansion (1)
! plant nitrogen
elseif (variable_name .eq. 'n_uptake') then
act_N_up = g%N_uptake_tot*gm2kg /sm2ha
deepest_layer = find_layer_no (g%root_depth, g%dlayer
: , max_layer)
act_N_up = -1.0*sum_real_array(g%dlt_NO3gsm, deepest_layer)
act_N_up = act_N_up - sum_real_array(g%dlt_NH4gsm
: , deepest_layer)
act_N_up = max(0.0, act_N_up)
call respond2get_real_var (variable_name
: , '(kg/ha)'
: , act_N_up)
: , act_N_up*gm2kg/sm2ha)
elseif (variable_name .eq. 'no3_tot') then
deepest_layer = find_layer_no (g%root_depth, g%dlayer
Expand Down

0 comments on commit cfeceaf

Please sign in to comment.