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

Missing tillage implement #237

Merged
merged 2 commits into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion Data/MODEL.ERR
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ IPPLNT 2
Error in planting inputs. Check format.

IPPLNT 10
Planting date is before start of simulation. Please fix input file.
Planting date is before start of simulation. Please correct input file.

IPPLNT 11
Error in plant population input. Check format.
Expand Down Expand Up @@ -574,6 +574,9 @@ Tillage input level not found. Please correct input file.
IPTILL 3
First tillage application date is defined prior to the start of simulation date.

IPTILL 4
Tillage implement is not defined or missing. Please correct input file.

IPVAR 1
Error in Cultivar entry. Fix entry or batch file.

Expand Down
8 changes: 7 additions & 1 deletion InputModule/IPTILL.for
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ C 08/19/2002 GH Modified for Y2K
C 08/23/2002 GH Expanded array tillage applications to 200
C 02/03/2005 GH Corrected error checking for missing levels
C 05/07/2020 FO Added new Y4K subroutine call to convert YRDOY
C 06/24/2022 GH Check for missing tillage implement
C-----------------------------------------------------------------------
C INPUT : LUNEXP,FILEX,LNCHE,CDATE,CHCOD,CHAMT,CHMET,CHDEP,CHT
C YRSIM,ISWWAT,NCHEM,FOLFR,SOLFR
Expand Down Expand Up @@ -39,7 +40,7 @@ C=======================================================================
CHARACTER*80 CHARTEST

INTEGER LNTIL,LUNEXP,ISECT,LINEXP,TDATE(NAPPL),NTIL
INTEGER ERRNUM,J,IFIND,LN,YRSIM,LNSIM
INTEGER ERRNUM,J,IFIND,LN,YRSIM,LNSIM,TIMPLN
REAL TDEP(NAPPL)

PARAMETER (ERRKEY ='IPTILL')
Expand Down Expand Up @@ -71,6 +72,11 @@ C
READ (CHARTEST,60,IOSTAT=ERRNUM) LN,TDATE(NTIL),
& TIMPL(NTIL),TDEP(NTIL)
IF (ERRNUM .NE. 0) CALL ERROR (ERRKEY,ERRNUM,FILEX,LINEXP)

C-GH 6/24/2022 Check for missing tillage implement
READ (TIMPL(NTIL)(3:5),'(I3)')TIMPLN
ERRNUM = 4
IF (TIMPLN .LE. 0) CALL ERROR (ERRKEY,ERRNUM,FILEX,LINEXP)

IF ((TDATE(NTIL) .LT. 1) .OR.
& (MOD(TDATE(NTIL),1000) .GT. 366)) THEN
Expand Down