Skip to content

Commit

Permalink
Merge pull request #148 from fabiooliveira72/develop_v4.8
Browse files Browse the repository at this point in the history
Added PLTPOP protection for NWheat
  • Loading branch information
chporter authored Sep 24, 2021
2 parents b640bc3 + 7f9b6a0 commit 37d00a5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Plant/NWHEAT/WH_OPHARV.for
Original file line number Diff line number Diff line change
Expand Up @@ -308,20 +308,22 @@
! update nitrogen and residue applications after routines have been
! modified to handle automatic management
!-----------------------------------------------------------------------
IF (SEEDNO .GT. 0.0) THEN
!PSDWT equation reformulated and added/fixed the grain number (GPSM) calculation (TF & DP 07/18/2019)
IF (SEEDNO .GT. 0.0 .AND. PLTPOP .GT. 0.0) THEN
! TF & DP 07/18/2019 PSDWT equation reformulated and added/fixed the
! grain number (GPSM) calculation
PSDWT = SDWT/(SEEDNO*PLTPOP) *1000.
GPSM = SEEDNO * PLTPOP
GPSM = SEEDNO * PLTPOP
ELSE
PSDWT = 0.0
GPSM = 0.0
ENDIF
IF (TOPWT .GT. 0.0 .AND. YIELD .GE. 0.0) THEN
IF (TOPWT .GT. 0.0) THEN
HI = YIELD/(TOPWT*10.0)
ELSE
HI = 0.0
ENDIF

!Fixed the variables (TF & DP 07/16/2019)
! TF & DP 07/16/2019 Fixed the variables
SKERWT = PSDWT
!-----------------------------------------------------------------------
! Actual byproduct harvested (default is 0 %)
Expand Down

0 comments on commit 37d00a5

Please sign in to comment.