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

Solved CERES-Maize issue with germination and emergence failure #301

Merged
merged 8 commits into from
May 8, 2023
11 changes: 11 additions & 0 deletions Management/AUTHAR.for
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,17 @@ C***********************************************************************
! YREND = -99
IF (YRDOY == YREND) RETURN

!TF 05/04/2023 - stop simulation if crop failed to germinate
IF(CONTROL % CropStatus .EQ. 12) THEN
YREND = YRDOY
RETURN
ENDIF

!TF 05/04/2023 - stop simulation if crop failed to germinate
IF(CONTROL % CropStatus .EQ. 13) THEN
YREND = YRDOY
RETURN
ENDIF
C-----------------------------------------------------------------------
C Harvest at maturity, NR8
C-----------------------------------------------------------------------
Expand Down
19 changes: 15 additions & 4 deletions Plant/CERES-IXIM-Maize/MZ_IX_GROSUB.for
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,11 @@ C ECNP = (5.0 - 0.0114 * XSTAGE)/100.0 !Ear critical [N] (frac)
K1 = 0.425 + (0.245*EXP(-((Z2STAGE-1.03)**2)/(0.0467)))
! JIL 09/07/2007 Z2STAGE (Phenology scale, 0-1-2) calculated in PHENOL
! JIL Intercepted PAR (MJ/plant d)
IPAR = PAR/PLTPOP * (1.0 - EXP(-K1 * LAI))
IF(PLTPOP .GT. 0.0) THEN
IPAR = PAR/PLTPOP * (1.0 - EXP(-K1 * LAI))
ELSE
IPAR = 0.0
ENDIF
PCARB = IPAR * RUE !RUE read from ECO file

!-------------------------------------------------------------
Expand Down Expand Up @@ -1323,7 +1327,11 @@ C ECNP = (5.0 - 0.0114 * XSTAGE)/100.0 !Ear critical [N] (frac)
IF (CVF .EQ. 0.0) THEN
PSCARB = (PG-MAINR)
ELSE
PSCARB = (PG-MAINR)/(CVF*PLTPOP) !(g/pl)
IF(PLTPOP .GT. 0.0) THEN
PSCARB = (PG-MAINR)/(CVF*PLTPOP) !(g/pl)
ELSE
PSCARB = 0.0
ENDIF
ENDIF

! JIL 09/07/2007 Comment/Switch-out this line to run the (IPAR * RUE) C balance
Expand Down Expand Up @@ -1448,10 +1456,13 @@ C ECNP = (5.0 - 0.0114 * XSTAGE)/100.0 !Ear critical [N] (frac)
LFWT = LFWT + GROLF
STMWT = STMWT + GROSTM

IF(PLTPOP .GT. 0.0) THEN
! 5/11/2005 CHP Added cumulative leaf senescence
CumLeafSenes = SENLA / 600. * PLTPOP * 10.
CumLeafSenes = SENLA / 600. * PLTPOP * 10.
! kg/ha = g/plant * plants/m2 * (kg/ha)/(g/m2)

ELSE
CumLeafSenes = 0.0
ENDIF
! Stage 3 accumulates leaf senescence from 0
! Save stage 2 value for true accumulation
Stg2CLS = CumLeafSenes
Expand Down
2 changes: 1 addition & 1 deletion Plant/CERES-IXIM-Maize/MZ_IX_PHENOL.for
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ C REAL PRLF ! JIL Prolificacy level

WRITE(MESSAGE(1),3500) DSGT
3500 FORMAT ('Crop failure because of lack of germination ',
& 'within',I5,' days of sowing.')
& 'within',F7.3,' days of sowing.')
CALL WARNING(1,'MZPHEN',MESSAGE)
! WRITE (*,3500)
IF (IDETO .EQ. 'Y') THEN
Expand Down
14 changes: 9 additions & 5 deletions Plant/CERES-IXIM-Maize/MZ_IX_PLANTG.for
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
C=======================================================================
C PLANTG, Subroutine, J.I. Lizaso
C Calculates instantaneous plant photosynthesis (�mol CO2/m2 s) of
C Calculates instantaneous plant photosynthesis (µmol CO2/m2 s) of
C shaded and sunlit leaf area on a per-leaf basis and integrates for
C the whole canopy
C Adapted from CANOPG by K.J. Boote, J.W. Jones, G. Hoogenboom
Expand Down Expand Up @@ -102,7 +102,7 @@ C Compute photosynthesis for shaded leaves
& PARSH(I), ASSAT(I), INTSLP(I), CVXTY(I), !Input
& PGSH(I)) !Output

C Compute instantaneous canopy gross photosynthesis (�mol CO2/m2 s).
C Compute instantaneous canopy gross photosynthesis (µmol CO2/m2 s).

PGHR = PGHR + PGSL(I)*PLAISL(I) + PGSH(I)*PLAISH(I)
ENDIF
Expand Down Expand Up @@ -214,7 +214,11 @@ C ** JIL Calculating light response curve parameters for each leaf
CVTY(I) = 0.0
INSL(I) = 0.0
IF(GLA(I) .GT. 0.0) THEN
XX = LAP(I)/YX(I)
IF(YX(I) .GT. 0.0) THEN
XX = LAP(I)/YX(I)
ELSE
XX = 0.0
ENDIF
IF(XX .LT. 0.99) THEN ! Expanding leaf
AYZ = 0.66
AXX = 0.34
Expand Down Expand Up @@ -306,8 +310,8 @@ C Curve parameters are defined at 30 C and scaled using hourly air temp

C=======================================================================
C PSLEAF, Subroutine, J.I. Lizaso
C Calculates gross photosynthesis (�mol CO2/m2 s) per unit leaf area as
C a function of instantaneous PAR (�mol/m2 s)
C Calculates gross photosynthesis (µmol CO2/m2 s) per unit leaf area as
C a function of instantaneous PAR (µmol/m2 s)
C Adapted from PGLEAF by K.J.Boote, J.W.Jones, G.Hoogenboom
C-----------------------------------------------------------------------
C REVISION HISTORY
Expand Down
7 changes: 5 additions & 2 deletions Plant/CERES-Maize/MZ_GROSUB.for
Original file line number Diff line number Diff line change
Expand Up @@ -1121,13 +1121,16 @@ C-GH 60 FORMAT(25X,F5.2,13X,F5.2,7X,F5.2)
PCO2 = TABEX (CO2Y,CO2X,CO2,10)

! JIL 08/01/2006 Intercepted PAR (MJ/plant d)
IPAR = PAR/PLTPOP * (1.0 - EXP(-LIFAC * LAI))
IF(PLTPOP .GT. 0.0) THEN
IPAR = PAR/PLTPOP * (1.0 - EXP(-LIFAC * LAI))
ELSE
IPAR = 0.0
ENDIF
PCARB = IPAR * RUE * PCO2

!-SPE PRFT= AMIN1(1.25 - 0.0035*((0.25*TMIN+0.75*TMAX)-25.0)**2,1.0)
TAVGD = 0.25*TMIN+0.75*TMAX


!**************************************************************************
!**************************************************************************
! CHP inserted old code for comparison of methods:
Expand Down
4 changes: 2 additions & 2 deletions Plant/CERES-Maize/MZ_PHENOL.for
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@

WRITE(MESSAGE(1),3500) DSGT
3500 FORMAT ('Crop failure because of lack of germination ',
& 'within',I5,' days of sowing.')
& 'within',F7.3,' days of sowing.')
CALL WARNING(1,'MZPHEN',MESSAGE)
! WRITE (*,3500)
IF (IDETO .EQ. 'Y') THEN
Expand Down Expand Up @@ -621,7 +621,7 @@
WRITE (NOUTDO,1399)
ENDIF
MDATE = YRDOY
CropStatus = 12 ! failure to germinate
CropStatus = 13 ! failure to emerge
RETURN
ENDIF

Expand Down
2 changes: 1 addition & 1 deletion Plant/CERES-Millet/ML_CERES.for
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ C Original 10/1/03 SDWT = PANWT*PLTPOP !g/m2
PCNGRN = 0.0
ENDIF

IF((WTLF+STMWT).GT.0.0) THEN
IF((WTLF+STMWT).GT.0.0.AND.PLTPOP.GT.0.0) THEN
PCNVEG = (WTNLF+WTNST)/(WTLF+(STMWT*PLTPOP))*100
ELSE
PCNVEG = 0.0
Expand Down
6 changes: 5 additions & 1 deletion Plant/CERES-Millet/ML_GROSUB.for
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,11 @@ C

C LIFAC =1.5 - 0.768 * ((ROWSPC * 0.01)**2 * PLTPOP)**0.1
PCO2 = TABEX (CO2Y,CO2X,CO2,10)
PCARB = RUE * PAR/PLTPOP * (1.0 - EXP(-LIFAC * LAI))
IF (PLTPOP .GT. 0.0) THEN
PCARB = RUE * PAR/PLTPOP * (1.0 - EXP(-LIFAC * LAI))
ELSE
PCARB = 0.0
ENDIF
PCARB = PCARB*PCO2 !chp added

TEMPM = (TMAX + TMIN)*0.5 !Mean air temperature, C
Expand Down
6 changes: 5 additions & 1 deletion Plant/CERES-Sugarbeet/BS_GROSUB.for
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,11 @@
PAR = SRAD*PARSR !PAR local variable
LIFAC = 1.5 - 0.768 * ((ROWSPC * 0.01)**2 * PLTPOP)**0.1
PCO2 = TABEX (CO2Y,CO2X,CO2,10)
IPAR = PAR/PLTPOP * (1.0 - EXP(-LIFAC * LAI))
IF(PLTPOP .GT. 0.0) THEN
IPAR = PAR/PLTPOP * (1.0 - EXP(-LIFAC * LAI))
ELSE
IPAR = 0.0
ENDIF
PCARB = IPAR * RUE * PCO2
TAVGD = 0.25*TMIN+0.75*TMAX

Expand Down
61 changes: 46 additions & 15 deletions Plant/OilCrop-Sunflower/SU_GROSUB.for
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,11 @@
! mantainance respiration
!
RM = (BIOMAS+RTWT*PLTPOP)*0.008*0.729
RI1 = 1.0 + RM/PSKER/PLTPOP
IF(PLTPOP .GT. 0.0) THEN
RI1 = 1.0 + RM/PSKER/PLTPOP
ELSE
RI1 = 0.0
ENDIF

!
! Pericarp number calculated according to Soriano
Expand All @@ -1000,13 +1004,20 @@

XRAT = XNGLF / GLFWT
YRAT = (0.009-0.0875*XRAT)/0.9125
SLOPEPE = LAI*10E3/PLTPOP/(XNGLF-YRAT*GLFWT) ! SUN, HV

IF(PLTPOP .GT. 0.0) THEN
SLOPEPE = LAI*10E3/PLTPOP/(XNGLF-YRAT*GLFWT) ! SUN, HV
ELSE
SLOPEPE = 0.0
ENDIF

XPEPE = 0.50 * (XNGLF - YRAT*GLFWT)
GPP = 0.0
MAXLAI = PLAMX*PLTPOP/10000.0
APLA = LAI*10000.0/PLTPOP
IF(PLTPOP .GT. 0.0) THEN
APLA = LAI*10000.0/PLTPOP
ELSE
APLA = 0.0
ENDIF
ABIOMS = BIOMAS
OILWT = 0.0
OIL = 0.0
Expand Down Expand Up @@ -1111,8 +1122,13 @@
!
! Calculate total N in plant parts
!
TCNP=(XLCNP*GLFWT+XSCNP*STMWT+XHCNP*HEADWT)/(STOVWT-SLFWT)
TMNC=(XLMNC*GLFWT+XSMNC*STMWT+XHMNC*HEADWT)/(STOVWT-SLFWT)
IF(STOVWT-SLFWT .GT. 0.0) THEN
TCNP=(XLCNP*GLFWT+XSCNP*STMWT+XHCNP*HEADWT)/(STOVWT-SLFWT)
TMNC=(XLMNC*GLFWT+XSMNC*STMWT+XHMNC*HEADWT)/(STOVWT-SLFWT)
ELSE
TCNP=0.0
TMNC=0.0
ENDIF

! -------------------------------------------------------------
! Compute Nitrogen Stress Factors
Expand Down Expand Up @@ -1241,14 +1257,18 @@ C recalculated KEP taken into account that K(FR)=0.5 K(PAR)
C2 = GF1
ENDIF
ENDIF
IF (ISTAGE .LT. 4) THEN
IF (ISTAGE .LT. 4 .AND. PLTPOP .GT. 0.0) THEN
PCARB = RUE * RI/PLTPOP
ELSE
IF (RI .GT. 0) THEN
PCARB = (RI*RI1*C2/C1*RUE-RM)/PLTPOP
IF(PLTPOP .GT. 0.0) THEN
IF (RI .GT. 0) THEN
PCARB = (RI*RI1*C2/C1*RUE-RM)/PLTPOP

ELSE
PCARB =-RM/PLTPOP
ENDIF
ELSE
PCARB =-RM/PLTPOP
PCARB = 0.0
ENDIF
ENDIF
c write(*,*)istage,lai,pcarb,pco2,ri1,c2,c1,rm
Expand Down Expand Up @@ -1584,8 +1604,7 @@ C CALCULATE MAXIMUM LEAF AREA GROWTH
ELSE
SENRATE = 0.0
ENDIF

IF (SENRATE .GT. 0.0) THEN
IF (SENRATE .GT. 0.0 .AND. PLTPOP .GT. 0.0) THEN
! rate of senescence cm2/day/plant
DSLAN1 = SENRATE*10000.0/PLTPOP
ELSE
Expand Down Expand Up @@ -2448,13 +2467,21 @@ c WRITE (*,2800)

BIOMAS = (GLFWT + STMWT + HEADWT + GRNWT + GRNWTE)*PLTPOP
DM = BIOMAS*10.0
HIO = OILWT/BIOMAS
IF (BIOMAS .GT. 0.0) THEN
HIO = OILWT/BIOMAS
ELSE
HIO = 0.0
ENDIF

BIOMAS_R=(GLFWT+STMWT+HEADWT+GRNWT+GRNWTE+RTWT)
& *PLTPOP

STOVWT = GLFWT + STMWT + HEADWT
PTF = STOVWT/(RTWT + STOVWT)
IF(RTWT + STOVWT .GT. 0.0) THEN
PTF = STOVWT/(RTWT + STOVWT)
ELSE
PTF = 0.0
ENDIF
IF (BIOMAS .GT. 0.0) THEN
PTF = BIOMAS/BIOMAS_R
ELSE
Expand Down Expand Up @@ -2605,8 +2632,12 @@ C WTN = WTNCAN*10. / BIOMAS * 100.
AREALF = LAI *10000 !cm2/m2
! Compute N lost in leaf senescence
! N in senesced leaves - calculate based on today's N content
CumLfNSenes = CumLfNSenes +
IF (GLFWT .GT. 0.0) THEN
CumLfNSenes = CumLfNSenes +
& (CumLeafSenes - CumLeafSenesY) * XNGLF/GLFWT
ELSE
CumLfNSenes = 0.0
ENDIF

!----------------------------------------------------------------------
!----------------------------------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion Plant/OilCrop-Sunflower/SU_NFACTO.for
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ C ----------------------------------------------------------------
! based on proportion nitrogen below critical level (TCNP-TANC) and
! total nitrogen between the critical level and minimum
! level (TCNP-TMNC).
NFAC = 1.0 - (TCNP-TANC)/(TCNP-TMNC)
IF (TCNP-TMNC .GT. 0.0) THEN
NFAC = 1.0 - (TCNP-TANC)/(TCNP-TMNC)
ELSE
NFAC = 0.0
ENDIF
c write(*,*)'nfacto 62',tcnp,tanc,tmnc,NFAC
NFAC = AMIN1 (NFAC,1.0)
NFAC = AMAX1 (NFAC,0.001)
Expand Down
1 change: 1 addition & 0 deletions Plant/plant.for
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ c Total LAI must exceed or be equal to healthy LAI:
! 6 - auto-harvest within window NORMAL
! 11 - failure to plant (automatic planting) NO_SOW
! 12 - failure to germinate NOGERM
! 13 - failure to emerge NOEMRG
! 21 - crop mature due to slow grain filling SLOGRN
! 31 - crop died due to heat stress HOT
! 32 - crop died due to cold stress COLD
Expand Down