-
Notifications
You must be signed in to change notification settings - Fork 1
/
CSP_GROW.FOR
1703 lines (1549 loc) · 72.9 KB
/
CSP_GROW.FOR
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
C=======================================================================
C CSP_GROW, Subroutine, O. H. Daza, based on
C GROW, Subroutine, G. Hoogenboom, J.W. Jones, and K.J.Boote
C-----------------------------------------------------------------------
C Governing Model Equations
C Integrates all growth related variables
C-----------------------------------------------------------------------
C REVISION HISTORY
C 01/09/1989 GH Written.
C 01/04/1996 GH Added seed composition routine.
C 01/19/1996 KJB NMOBR
C 04/02/1996 KJB Modified
C 05/30/1998 CHP moved diseased leaf area calculations to PEST module.
C 07/16/1998 CHP Modified for modular format
C 05/11/1999 GH Incorporated in CROPGRO
C 03/29/2000 CHP Added cumulative senescence variables
C 06/19/2001 GH Add checks for negative state variables
C 06/11/2002 GH Modified for Y2K
C 03-12-2003 CHP Changed senescence variable to composite (SENESCE)
C as defined in ModuleDefs.for
C 08/14/2003 FSR Changed from GROW_SC for CASUPRO in DSSAT 4.0
C 07/26/2004 CHP Removed variables which were not being used
C-----------------------------------------------------------------------
C Called by: CASUPRO
C Calls: CSP_IPGROW, CSP_STRESS
C ERROR
C=======================================================================
SUBROUTINE CSP_GROW(CONTROL, DYNAMIC, ISWITCH,
& AGEFAC, CADLF, CADST, CRUSLF, CRUSRT, CRUSST, !Input
& DISLA, F, FILECC, FILEGC, FRLF, FRSTM, NADLF, !Input
& NADRT, NADST, NGRLF, NGRRT, NGRST, NMINEA, !Input
& NOUTDO, NPLTD, NRUSLF, NRUSRT, NRUSST, PPLTD, !Input
& SENRT, SLDOT, SLNDOT, SOILPROP, SRDOT, SSDOT, !Input
& SSNDOT, TRNH4U, TRNO3U, TRNU, TURFAC, WLDOTN, !Input
& WLIDOT, WRDOTN, WRIDOT, WSDOTN, WSIDOT, YRNR1, !Input
& MDATE, YRPLT, !Input
& CADSU, CRUSSU, FRSU, NADSU, NGRSU, NRUSSU, !CSR Input (FSR)
& WSUDOTN, !CSR Input (FSR)
& WLFDOT, XHLAI, !Input/Output
& AREALF, BETN, CANNAA, CANWAA, CLW, CSW, GROWTH, !Output
& GRWRES, LAIMX, PCNL, PCNRT, PCNST, PLTPOP, !Output
& PLIGLF, PLIGRT, PLIGST, RHOL, RHOS, RNITP, !Output
& ROWSPC, RTWT, SDNPL, SDRATE, SEEDNI, SENESCE, !Output
& SLA, SLAAD, STMWT, TOPWT, TOTWT, WCRLF, WCRRT, !Output
& WCRST, WNRLF, WNRRT, WNRST, WTCO, WTLF, WTLO, !Output
& WTMAIN, WTNCAN, WTNEW, WTNLA, WTNLF, WTNLO, !Output
& WTNRA, WTNRO, WTNRT, WTNSA, WTNSO, WTNST, !Output
& WTNUP, WTRO, WTSO, XLAI, !Output
& CSUW, PCNSU, SUWT, WCRSU, WNRSU, WTNSU, !CSP Output (FSR)
& WTNSUA) !CSP Output (FSR)
!-----------------------------------------------------------------------
USE ModuleDefs !Definitions of constructed variable types,
! which contain control information, soil
! parameters, hourly weather data.
IMPLICIT NONE
SAVE
!-----------------------------------------------------------------------
CHARACTER*1 ISWSYM, ISWNIT, IDETO, IHARI, PLME
CHARACTER*2 CROP !, XPODF
CHARACTER*6 ERRKEY
PARAMETER (ERRKEY = 'GROW ')
CHARACTER*30 FILEIO
CHARACTER*92 FILECC, FILEGC
INTEGER DYNAMIC, NOUTDO, L, NLAYR
INTEGER YRDOY, YRNR1, MDATE
INTEGER YRPLT
REAL WTNUP,WTNMOB,WTNCAN,TGROW !,WTNFX
REAL DISLA !WRCSHD,WSDMAN
REAL WLFDOT, PPLTD,NPLTD,CANNAA,CANWAA !,SDWTAM
REAL AGEFAC !DWNODA,WTNNAG,
! REAL POTLIP,POTCAR
REAL CPFLF, CPFSTM, CPFRT !, CPFNOD, CPFSH1, CPFSD1
REAL WRIDOT,WSIDOT !,WTNNOD
REAL WDOT,WRCLDT,WRCSDT,WRCRDT !WNDOT,WPDOT,
REAL NLOFF, NSOFF, NROFF !, NSHOFF, NSDOFF
REAL WTLO, WTSO, WTRO !, WTSHO, WTSDO, WTNOO
REAL WTCO
REAL NLALL, NSALL, NRALL !, NSHALL, NSDALL
REAL WTNLA, WTNSA, WTNRA !, WTNSHA, WTNSDA, WTNNA
REAL WTNLO, WTNSO, WTNRO !, WTNSHO, WTNSDO, WTNNO
REAL WLDOT, WSDOT, WRDOT
REAL WLDOTN, WSDOTN, WRDOTN !, WSDDTN, WSHDTN
REAL NGRLF, NGRST, NGRRT
REAL WTLF, STMWT, RTWT !, SDWT
REAL PROLFF, PROSTF, PRORTF !, PROSHF
REAL PCNL, PCNST, PCNRT
REAL WTNLF, WTNST, WTNRT
REAL NLDOT, NSDOT, NRDOT !, NSHDOT, NSDDOT
REAL NRUSLF, NRUSST, NRUSRT
REAL CRUSLF, CRUSST, CRUSRT
REAL ALPHL, ALPHS, ALPHR
REAL RHOL, RHOS, RHOR
REAL WCRLF, WCRST, WCRRT
REAL NADLF, NADST, NADRT
REAL WNRLF, WNRST, WNRRT
REAL CADLF, CADST
REAL SLDOT, SSDOT, SRDOT !, SWIDOT
REAL SLNDOT, SSNDOT !, SDIDOT
REAL WLIDOT, WSDDOT !, WSHIDT, WSHDOT
REAL GRWRES, TRNO3U, TRNH4U !SDPROR,
! REAL WTABRT
! REAL WTLSD, WTCSD, NTOVR, XPOD
REAL TOTWT, TOPWT !, PODWT, DWNOD
REAL WTMAIN
! REAL WTSHMT
REAL WTNTOT, NMINEA, TRNU
REAL RNITP, PCNMIN !PCLSD, PCCSD,
REAL ALFDOT, F, SLA, AREALF, XLAI, SLAAD
REAL LAIMX, AREAH
REAL XHLAI, PLTPOP, ROWSPC, BETN !, SEEDNO
REAL TURFAC
REAL GROWTH
REAL FRLF, FRSTM
REAL SDNPL, SEEDNI, SDRATE
REAL WTNEW
REAL PCARLF, PCARRT, PCARST, !PCARNO, PCARSD, PCARSH,
& PLIGLF, PLIGRT, PLIGST, !PLIGNO, PLIGSD, PLIGSH,
& PLIPLF, PLIPRT, PLIPST, !PLIPNO, PLIPSH,
& PMINLF, PMINRT, PMINST, !PMINNO, PMINSD, PMINSH,
& POALF, POART, POAST, !POANO, POASD, POASH,
& PROLFI, PRORTI, PROSTI, !PRONOD,
& SDPRO, WTFSD, WTPSD !, SDWTPL
REAL RMIN, WLFI, WSTI, WRTI !, SDLIP
REAL CLW, CSW
!FSR - LIST OF VARIABLES ADDED TO ENABLE SIMULATION OF SUGARS IN THE
! SUGARCANE MODEL
REAL ALPHSU, CPFSU, CRUSSU, CSUW, FRSU
REAL CADSU, NADSU, NGRSU, NRUSSU, NSUDOT
REAL NSUALL, PCNSU, PCARSU, PLIGSU, PLIPSU, PMINSU !NSUOFF,
REAL POASU, PROSUF, PROSUI, RHOSU, SUWT, WCRSU, WNRSU, WRCSUDT
REAL WSUDOT, WSUDOTN, WSUI, WTNSU, WTNSUA, WTNSUO, WTSUO
! Surface and soil residue due to daily senescence of plant matter
REAL SENRT(NL)
REAL SenWt(0:NL) !kg[dry matter]/ha
REAL SenLig(0:NL) !kg[lignin]/ha
REAL SenE(0:NL,NELEM) !kg[E]/ha (E=N, P, S,...)
!CHP - puncture variables, not functional
REAL PUNDOT, SDPDOT !,PUNCSD, PUNCTR
!-----------------------------------------------------------------------
! Constructed variable types defined in ModuleDefs.for.
TYPE (ControlType) CONTROL
TYPE (SwitchType) ISWITCH
TYPE (SoilType) SOILPROP
TYPE (ResidueType) SENESCE
! Transfer values from constructed data types into local variables.
!Don't get DYNAMIC from CONTROL variable because it will not
! have EMERG value (set only in CROPGRO).
!DYNAMIC = CONTROL % DYNAMIC
FILEIO = CONTROL % FILEIO
YRDOY = CONTROL % YRDOY
IDETO = ISWITCH % IDETO
IHARI = ISWITCH % IHARI
ISWNIT = ISWITCH % ISWNIT
ISWSYM = ISWITCH % ISWSYM
NLAYR = SOILPROP % NLAYR
!***********************************************************************
!***********************************************************************
! Run Initialization - Called once per simulation
!***********************************************************************
IF (DYNAMIC .EQ. RUNINIT) THEN
!-----------------------------------------------------------------------
CALL CSP_IPGROW(
& FILEIO, FILECC, FILEGC, CROP, !Input
& ALPHL, ALPHR, ALPHS, ALPHSU, PCARLF, PCARST, !Output
& PCARRT, PCARSU, PLIGLF, PLIGST, PLIGRT, PLIGSU, !Output
& PLIPLF, PLIPST, PLIPRT, PLIPSU, PLME, PLTPOP, !Output
& PMINLF, PMINST, PMINRT, PMINSU, POALF, POAST, !Output
& POART, POASU, PROLFF, PROSTF, PRORTF, PROSUF, !Output
& PROLFI, PROSTI, PRORTI, PROSUI, ROWSPC, RMIN, !Output
& SDPRO, WTFSD, WTPSD) !Output
!CASUPRO Output follows (FSR)
! & ALPHSU, PCARSU, PLIGSU, PLIPSU, PMINSU, POASU)
IF (CROP .NE. 'FA') THEN
!-----------------------------------------------------------------------
! Copied from IPIBS
!-----------------------------------------------------------------------
ROWSPC = ROWSPC / 100.
IF (ROWSPC .GT. 0.0 .AND. PLTPOP .GT. 0.0) THEN
BETN = 1./(ROWSPC*PLTPOP)
ELSE
BETN = 0.
ENDIF
C-----------------------------------------------------------------------
C Newest version of CROPGRO has variable seed N, oil, CH2O,
C which may make this tougher
C-----------------------------------------------------------------------
CPFLF = 30./44.*(PLIPLF*1.720 + PLIGLF*0.659 + POALF*(-0.011)
& + PMINLF*RMIN + PCARLF*0.170)
CPFSTM = 30./44.*(PLIPST*1.720 + PLIGST*0.659 + POAST*(-0.011)
& + PMINST*RMIN + PCARST*0.170)
CPFRT = 30./44.*(PLIPRT*1.720 + PLIGRT*0.659 + POART*(-0.011)
& + PMINRT*RMIN + PCARRT*0.170)
CPFSU = 30./44. * (PLIPSU * 1.720 + PLIGSU * 0.659
& + POASU * (-0.011) + PMINSU * RMIN + PCARSU * 0.170)
! FSR- ABOVE added CPFSU for CASUPRO Sugar model.
! Removed CPFNOD & CPFSD1
! CPFNOD = 30./44.*(PLIPNO*1.720 + PLIGNO*0.659 + POANO*(-0.011)
! & + PMINNO*RMIN + PCARNO*0.170)
! CPFSH1 = 30./44.*(PLIPSH*1.720 + PLIGSH*0.659 + POASH*(-0.011)
! & + PMINSH*0.073 + PCARSH*0.170)
! CPFSD1 = 30./44.*(PMINSD*0.073 + PLIGSD*0.659 + POASD*(-0.011)
! & + (SDLIP*1.720 + PCARSD*0.170)*(1. - SDPROR))
C-----------------------------------------------------------------------
! CALCULATE PERCENT NITROGEN IN LEAVES AT END OF SEASON
PCNMIN = PROLFF * 16.0 !Moved from INCOMP
!-----------------------------------------------------------------------
ENDIF
!***********************************************************************
!***********************************************************************
! Seasonal initialization - run once per season
!***********************************************************************
ELSEIF (DYNAMIC .EQ. SEASINIT) THEN
!-----------------------------------------------------------------------
ALFDOT = 0.0
AREALF = 0.0
AREAH = 0.0
CANWAA = 0.0
CANNAA = 0.0
GROWTH = 0.0
GRWRES = 0.0
LAIMX = 0.0
NLDOT = 0.0
NSDOT = 0.0
NRDOT = 0.0
NSUDOT = 0.0 !Sugar
PCNL = 0.0
PCNRT = 0.0
PCNSU = 0.0 !Sugars
RHOL = 0.0
RHOR = 0.0
RHOS = 0.0
RHOSU = 0.0 !Sugars
RTWT = 0.0
SEEDNI = 0.0
SenWt = 0.0
SenLig = 0.0
SenE = 0.0
SENESCE % ResWt = SenWt
SENESCE % ResLig = SenLig
SENESCE % ResE = SenE
SLAAD = 0.0
STMWT = 0.0
TGROW = 0.0
TOPWT = 0.0
TOTWT = 0.0
WCRLF = 0.0
WCRRT = 0.0
WCRST = 0.0
WCRSU = 0.0 !Sugars
WNRLF = 0.0
WNRRT = 0.0
WNRST = 0.0
WNRSU = 0.0 !Sugars
WSDDOT = 0.0
WTCO = 0.0
WTLF = 0.0
WTLO = 0.0
WTMAIN = 0.0
WTNCAN = 0.0
WTNLA = 0.0
WTNLF = 0.0
WTNLO = 0.0
WTNMOB = 0.0
WTNRA = 0.0
WTNRO = 0.0
WTNRT = 0.0
WTNSU = 0.0 !Sugars
WTNSA = 0.0
WTNSUA = 0.0 !Sugars
WTNSO = 0.0
WTNSUO = 0.0 !Sugars
WTNST = 0.0
WTNTOT = 0.0
WTNUP = 0.0
WTRO = 0.0
WTSO = 0.0
WTSUO = 0.0 !Sugars
XLAI = 0.0
XHLAI = 0.0
CLW = 0.0 !Cumulative leaf growth
CSW = 0.0 !Cumulative stem growth
CSUW = 0.0 !Cumulative sugars accumulation
SDPDOT = 0.0 !CHP - not used
PUNDOT = 0.0 !CHP - not used
!-----------------------------------------------------------------------
! KJB 02/12/03 Set SLA to zero until emergence
! JWJ 09/16/03 Set SLA to -99 until emergence
! CHP 09/17/03 Do this for output only - SLA is used in calculations!
SLA = 0.0
! Need to get initial value of F from DEMAND first chp 9/14/98
! IF (CROP .NE. 'FA') THEN
! SLA = F
! ENDIF
!***********************************************************************
!***********************************************************************
! EMERGENCE CALCULATIONS - Performed once per season upon emergence
! or transplanting of plants
!***********************************************************************
ELSEIF (DYNAMIC .EQ. EMERG) THEN
!-----------------------------------------------------------------------
! Net growth rates
WLDOT = 0.0
WSDOT = 0.0
WRDOT = 0.0
WSUDOT = 0.0 !Sugars
WLFDOT = 0.0
C Initial seedling or transplant weight
SDRATE = WTPSD * PLTPOP * 10 ! kg / ha (CASUPRO sugarcane)
IF (PLME .NE. 'T') THEN
WTNEW = WTFSD * WTPSD
TOTWT = WTNEW * PLTPOP
! ELSE
! TOTWT = SDWTPL / 10.
! WTNEW = TOTWT / PLTPOP
ENDIF
! Initial mass of plant components
WTLF = FRLF * TOTWT
STMWT = FRSTM * TOTWT
SUWT = FRSU * TOTWT !Sugars
TOPWT = WTLF + STMWT + SUWT !Sugars
RTWT = TOTWT - TOPWT
WLFI = WTLF
WSTI = STMWT
WRTI = RTWT
WSUI = SUWT !Sugars
! Initialize cumulative variables
! CLW Cumulative leaf growth (g [leaf] / m2)
CLW = WTLF !Leaf
CSW = STMWT !Stalk
CSUW = SUWT !Sugars
! CH2O reserves
WCRLF = ALPHL * WTLF
WCRST = ALPHS * STMWT
WCRRT = ALPHR * RTWT
WCRSU = ALPHSU * SUWT !Sugars
!! Initialize cumulative C variables
! WCRLA = WCRLF
! WCRSA = WCRST
! WCRRA = WCRRT
! Carbohydrate composition of plant components (fraction)
RHOL = ALPHL
RHOR = ALPHR
RHOS = ALPHS
RHOSU = ALPHSU !Sugars
! Net carbon addition variables
WRCLDT = 0.0
WRCSDT = 0.0
WRCRDT = 0.0
WRCSUDT = 0.0 !Sugars
! Compute N in plant components
WTNLF = WLFI * PROLFI * 0.16
WTNST = WSTI * PROSTI * 0.16
WTNRT = WRTI * PRORTI * 0.16
WTNSU = WSUI * PROSUI * 0.16 !Sugars
WTNTOT = WTNLF + WTNST + WTNRT + WTNSU
! Seed or transplant N at planting
SDNPL = WTPSD * SDPRO * 0.16 * PLTPOP -
& (WTNLF + WTNST + WTNRT + WTNSU)
SDNPL = MAX(SDNPL,0.0)
SEEDNI = WTNLF + WTNST + WTNRT + SDNPL + WTNSU !Sugars
! Initialize cumulative N variables
WTNLA = WTNLF
WTNSA = WTNST
WTNRA = WTNRT
WTNSUA = WTNSU !Sugars
! Percent N in plant components
PCNL = WTNLF / WLFI * 100.
RNITP = PCNL
PCNST = WTNST / WSTI * 100.
PCNRT = WTNRT / WRTI * 100.
PCNSU = WTNSU / WSUI * 100. !Sugars
! Intialize leaf area. Value of F initialized in DEMAND.
AREALF = WTLF * F
AREAH = AREALF
SLA = AREALF / WTLF
SLAAD = AREALF / (WTLF - WCRLF)
XLAI = AREALF / 10000.
XHLAI = XLAI
C***********************************************************************
C***********************************************************************
C Daily integration
C***********************************************************************
ELSEIF (DYNAMIC .EQ. INTEGR) THEN
C-----------------------------------------------------------------------
! GROWTH = WLDOTN + WSDOTN + WRDOTN + WSHDTN + WSDDTN + NODGR
!
! GRWRES = WLDOTN*CPFLF + WSDOTN*CPFSTM + WRDOTN*CPFRT +
! & NODGR*CPFNOD + WSHDTN*CPFSH1 + WSDDTN*CPFSD1 +
! & 30./44*(TRNO3U/0.16 * 1.798 + TRNH4U/0.16 * 0.462 +
! & NFIXN/0.16 * 1.798)
!
! FSR-Substituted OHD code (COSUPRO sugarcane model)
GROWTH = WLDOTN + WSDOTN + WRDOTN + WSUDOTN
GRWRES = WLDOTN * CPFLF + WSDOTN * CPFSTM + WRDOTN * CPFRT +
& WSUDOTN * CPFSU +
& 30./44 * (TRNO3U / 0.16 * 1.798 + TRNH4U / 0.16 * 0.462)
C-----------------------------------------------------------------------
C Use 1982 Penning de Vries book, p. 125, composition of tissue,
C fraction C for six categories, convert by 30/12 to CH20.
C-----------------------------------------------------------------------
C Account for N added to existing plant tissue, e.g., NADLF, that
C is damaged by insects, freezing, or senesced. Otherwise, could
C get increase in tissue N composition when tissue is aborted. Need
C to account for mass, N and C lost this way in sections below
C-----------------------------------------------------------------------
C WLDOT = Net leaf growth rate
C-----------------------------------------------------------------------
WLDOT = WLDOTN - SLDOT - WLIDOT - WLFDOT - NRUSLF/0.16 - CRUSLF
IF (WTLF .GT. 0.0) THEN
WLDOT = WLDOT + (CADLF+NADLF/0.16) *
& (1. - MIN(1.0,(SLDOT+WLIDOT+WLFDOT)/WTLF))
ENDIF
IF (WLDOT .LT. 0.0) THEN
WLDOT = MAX(WLDOT, -WTLF)
ENDIF
C-----------------------------------------------------------------------
C WSDOT = Net stalk growth rate
C-----------------------------------------------------------------------
WSDOT = WSDOTN - SSDOT - NRUSST / 0.16 - CRUSST - WSIDOT
IF (STMWT .GT. 0.0) THEN
WSDOT = WSDOT + (CADST + NADST / 0.16) *
& (1. - MIN(1.0,(SSDOT + WSIDOT) / STMWT))
ENDIF
IF (WSDOT .LT. 0.0) THEN
WSDOT = MAX(WSDOT, -STMWT)
ENDIF
C-----------------------------------------------------------------------
C Net root growth rate
C-----------------------------------------------------------------------
WRDOT = WRDOTN - SRDOT - NRUSRT/0.16 - CRUSRT - WRIDOT
IF (RTWT .GT. 0.0) THEN
WRDOT = WRDOT + (NADRT / 0.16) *
& (1. - MIN(1.0,(SRDOT + WRIDOT) / RTWT))
ENDIF
IF (WRDOT .LT. 0.0) THEN
WRDOT = MAX(WRDOT, -RTWT)
ENDIF
C-----------------------------------------------------------------------
C Net sugars growth rate (Added for CASUPRO FSR)
C-----------------------------------------------------------------------
WSUDOT = WSUDOTN - NRUSSU / 0.16 - CRUSSU
IF (SUWT .GT. 0.0) THEN
WSUDOT = WSUDOT + (CADSU + NADSU / 0.16)
ENDIF
C-----------------------------------------------------------------------
C Net shell growth rate (Removed fof CASUPRO FSR)
C-----------------------------------------------------------------------
C Net seed growth rate (Removed for CASUPRO FSR)
C-----------------------------------------------------------------------
C Net nodule growth rate (Removed for CASUPRO FSR)
C-----------------------------------------------------------------------
C Net pod growth rate (Removed for CASUPRO FSR)
C-----------------------------------------------------------------------
!
C Total Net plant growth rate
C-----------------------------------------------------------------------
WDOT = WLDOT + WSDOT + WRDOT + WSUDOT
C-----------------------------------------------------------------------
C Integration, Add Today's Net Growth to Existing Weights
C-----------------------------------------------------------------------
TOTWT = TOTWT + WDOT
TOPWT = TOPWT + WSDOT + WLDOT + WSUDOT
WTLF = WTLF + WLDOT
STMWT = STMWT + WSDOT
RTWT = RTWT + WRDOT
SUWT = SUWT + WSUDOT !Sugars FSR
TGROW = TGROW + GROWTH
C-----------------------------------------------------------------------
C Cumulative leaf, stalk and sugars growth
C-----------------------------------------------------------------------
CLW = CLW + WLDOTN
CSW = CSW + WSDOTN
CSUW = CSUW + WSUDOTN !Sugars
!OHD - Include roots later
C-----------------------------------------------------------------------
C Compute Seed Weight for Which there is Maintenance Costs.
C-----------------------------------------------------------------------
WTMAIN = TOTWT
C-----------------------------------------------------------------------
C Carbon Reserves: Net Growth Rates for Mobile Carbohydrates
C-----------------------------------------------------------------------
C Account for N added to existing plant tissue, e.g., NADLF, that
C is damaged by insects, freezing, or senesced. Otherwise, could
C get increase in tissue N composition when tissue is aborted. Need
C to account for mass, N and C lost this way in sections below
C-----------------------------------------------------------------------
!Leaves
WRCLDT = ALPHL * WLDOTN - CRUSLF - RHOL * (SLNDOT+WLIDOT+WLFDOT)
IF (WTLF .GT. 0.0) THEN
WRCLDT = WRCLDT + CADLF *
& (1. - MIN(1.0,(SLDOT + WLIDOT + WLFDOT) / WTLF))
ENDIF
!Stalks
WRCSDT = ALPHS * WSDOT - CRUSST - RHOS * SSNDOT
IF (STMWT .GT. 0.0) THEN
WRCSDT = WRCSDT + CADST *
& (1. - MIN(1.0,(SSDOT + WSIDOT) / STMWT))
ENDIF
!Roots
WRCRDT = ALPHR * WRDOT - CRUSRT - RHOR * SRDOT
!Sugars
WRCSUDT = ALPHSU * WSUDOT - CRUSSU !Sugars (FSR)
C-----------------------------------------------------------------------
C Update C Storage, Concentrations in Leaves, Stalks, Roots and Sugars
C-----------------------------------------------------------------------
WCRLF = WCRLF + WRCLDT
WCRST = WCRST + WRCSDT
WCRRT = WCRRT + WRCRDT
WCRSU = WCRSU + WRCSUDT !Sugars
IF (WCRLF .LE. 1.0E-30) WCRLF = 0.0
IF (WCRST .LE. 1.0E-30) WCRST = 0.0
IF (WCRRT .LE. 1.0E-30) WCRRT = 0.0
IF (WCRSU .LE. 1.0E-30) WCRSU = 0.0 !Sugars (FSR)
C-----------------------------------------------------------------------
C Compute Cumulative C loss During Season
C-----------------------------------------------------------------------
WTLO = WTLO + SLDOT + WLIDOT + WLFDOT
WTSO = WTSO + SSDOT + WSIDOT
WTRO = WTRO + SRDOT + WRIDOT
!OHD - Does not include sugars
WTCO = WTLO + WTSO
C-----------------------------------------------------------------------
C Compute CH20 fractions
C-----------------------------------------------------------------------
IF (WTLF .GT. 0.0001) THEN
RHOL = WCRLF/WTLF
ELSE
RHOL = 0.0
ENDIF
IF (STMWT .GT. 0.0001) THEN
RHOS = WCRST/STMWT
ELSE
RHOS = 0.0
ENDIF
IF (RTWT .GT. 0.0001) THEN
RHOR = WCRRT/RTWT
ELSE
RHOR = 0.0
ENDIF
IF (SUWT .GT. 0.0001) THEN !Sugars (FSR)
RHOSU = WCRSU / SUWT
ELSE
RHOSU = 0.0
ENDIF
C=======================================================================
C Nitrogen Balance: Net Growth Rates for Nitrogen Components
C=======================================================================
C Account for N added to existing plant tissue, e.g., NADLF, that
C is damaged by insects, freezing, or senesced. Otherwise, could
C get increase in tissue N composition when tissue is aborted. Need
C to account for mass, N and C lost this way in sections below
C-----------------------------------------------------------------------
C-----------------------------------------------------------------------
C Leaf nitrogen senescence and pest damage loss
C-----------------------------------------------------------------------
! senesc. + pest + freeze
NLOFF = (SLNDOT + WLIDOT + WLFDOT) * (PCNL/100.) +
& (SLDOT-SLNDOT) * PROLFF * 0.16
IF (NLOFF. LT. 0.0) THEN
NLOFF = 0.0
ENDIF
C-----------------------------------------------------------------------
C Net growth rate of nitrogen in the leaves
C-----------------------------------------------------------------------
NLDOT = NGRLF - NLOFF - NRUSLF
IF (WTLF .GT. 0.0) THEN
NLDOT = NLDOT + NADLF *
& (1. - MIN(1.0,(SLDOT + WLIDOT + WLFDOT) / WTLF))
ENDIF
C-----------------------------------------------------------------------
C Stalk nitrogen senescence and pest damage loss
C-----------------------------------------------------------------------
! senesce + pest
NSOFF = (SSNDOT + WSIDOT) * (PCNST/100.) + (SSDOT - SSNDOT)
& * PROSTF * 0.16
IF (NSOFF .LT. 0.0) THEN
NSOFF = 0.0
ENDIF
C-----------------------------------------------------------------------
C Net growth rate of nitrogen in the stems
C-----------------------------------------------------------------------
NSDOT = NGRST - NSOFF - NRUSST
IF (STMWT .GT. 0.0) THEN
NSDOT = NSDOT + NADST *
& (1. - MIN(1.0,(SSDOT + WSIDOT) / STMWT))
ENDIF
C-----------------------------------------------------------------------
C Root nitrogen senescence and pest damage loss
C-----------------------------------------------------------------------
NROFF = (SRDOT+WRIDOT) * (PCNRT/100.)
IF (NROFF .LT. 0.0) THEN
NROFF = 0.0
ENDIF
C-----------------------------------------------------------------------
C Net growth rate of nitrogen in the roots
C-----------------------------------------------------------------------
NRDOT = NGRRT - NROFF - NRUSRT
IF (RTWT .GT. 0.0) THEN
NRDOT = NRDOT + NADRT *
& (1. - MIN(1.0,(SRDOT + WRIDOT) / RTWT))
ENDIF
C-----------------------------------------------------------------------
C Net growth rate of nitrogen in sugars (NEW, CHECK)
C-----------------------------------------------------------------------
! NGRSU Maximum N demand for sugars growth (g [sugars N] / m2 [ground] - d)
! NRUSSU N actually mobilized from sugars in a day (g [N] / m2 - d)
! NSUDOT Net N addition for sugars (g [N] / m2 [ground] - d)
NSUDOT = NGRSU - NRUSSU ! Added for CASUPRO (FSR)
C-----------------------------------------------------------------------
C Shell nitrogen senescence, abortion and pest damage loss
! Removed for CASUPRO (FSR)
C-----------------------------------------------------------------------
C Net growth rate of nitrogen in shells
! Removed for CASUPRO (FSR)
C-----------------------------------------------------------------------
C Seed nitrogen senescence, abortion and pest damage loss
! Removed for CASUPRO (FSR)
C-----------------------------------------------------------------------
C Net growth rate of nitrogen in seeds
! Removed for CASUPRO (FSR)
!
C-----------------------------------------------------------------------
C Integration, Update N in Each Component by Adding Today's Growth
C-----------------------------------------------------------------------
C-----------------------------------------------------------------------
C Total nitrogen in the leaves
C-----------------------------------------------------------------------
IF ((NLDOT .LT. 0.0) .AND. (ABS(NLDOT) .GT. WTNLF)) THEN
NLDOT = - WTNLF
ENDIF
WTNLF = WTNLF + NLDOT
C-----------------------------------------------------------------------
C Total nitrogen in the stalks
C-----------------------------------------------------------------------
IF ((NSDOT .LT. 0.0) .AND. (ABS(NSDOT) .GT. WTNST)) THEN
NSDOT = - WTNST
ENDIF
WTNST = WTNST + NSDOT
C-----------------------------------------------------------------------
C Total nitrogen in the roots
C-----------------------------------------------------------------------
IF ((NRDOT .LT. 0.0) .AND. (ABS(NRDOT) .GT. WTNRT)) THEN
NRDOT = - WTNRT
ENDIF
WTNRT = WTNRT + NRDOT
C-----------------------------------------------------------------------
C Total nitrogen in sugars Added for CASUPRO (FSR)
C-----------------------------------------------------------------------
IF ((NSUDOT .LT. 0.0) .AND. (ABS(NSUDOT) .GT. WTNSU)) THEN
NSUDOT = - WTNSU
ENDIF
WTNSU = WTNSU + NSUDOT
C-----------------------------------------------------------------------
C Total nitrogen in the nodules
! Removed for CASUPRO (FSR)
C-----------------------------------------------------------------------
C Total nitrogen in the shells
! Removed for CASUPRO (FSR)
C-----------------------------------------------------------------------
C Total nitrogen in the seed
! Removed for CASUPRO (FSR)
C-----------------------------------------------------------------------
C Total nitrogen in the plant
C-----------------------------------------------------------------------
WTNTOT = WTNLF + WTNST + WTNRT + WTNSU
C-----------------------------------------------------------------------
C Total nitrogen in the canopy (all above ground components)
C-----------------------------------------------------------------------
WTNCAN = WTNLF + WTNST + WTNSU
C-----------------------------------------------------------------------
C Save total nitrogen in the canopy at the start of flowering
C-----------------------------------------------------------------------
IF (YRDOY .EQ. YRNR1) THEN
CANNAA = WTNCAN
ENDIF
C-----------------------------------------------------------------------
C Compute Cumulative N added during season
C-----------------------------------------------------------------------
! CHP - working on Plant N balance:
! Add adjustment factors for N addition.
! These factors are used in computation of net addition to
! tissue, but previously not here. Adding these statements
! forces cumulative N additions to equal 'current N' plus
! 'senesced N'.
! However . . . by making this change, cumulative tissue N no longer
! matches 'Seed N' plus 'N2 fixed' plus 'N uptake'. Why???
! Leaf
NLALL = NGRLF - NRUSLF
IF (WTLF .GT. 0.0) THEN
NLALL = NLALL + NADLF *
& (1. - MIN(1.0,(SLDOT + WLIDOT + WLFDOT) / WTLF))
ENDIF
! Stem
NSALL = NGRST - NRUSST
IF (STMWT .GT. 0.0) THEN
NSALL = NSALL + NADST *
& (1. - MIN(1.0,(SSDOT + WSIDOT) / STMWT))
ENDIF
! Root
NRALL = NGRRT - NRUSRT
IF (RTWT .GT. 0.0) THEN
NRALL = NRALL + NADRT *
& (1. - MIN(1.0,(SRDOT + WRIDOT) / RTWT))
ENDIF
! Add a Sugar section similar to above?
NSUALL = NGRSU - NRUSSU + NADSU !Sugars
WTNLA = WTNLA + NLALL
WTNSA = WTNSA + NSALL
WTNRA = WTNRA + NRALL
WTNSUA = WTNSUA + NSUALL !Sugars
C-----------------------------------------------------------------------
C Nodules
! Removed for CASUPRO (FSR)
C-----------------------------------------------------------------------
C Compute Cumulative N loss During Season
C-----------------------------------------------------------------------
WTNLO = WTNLO + NLOFF
WTNSO = WTNSO + NSOFF
WTNRO = WTNRO + NROFF
!OHD - Does not include sugars
! WTNSUO = WTNSUO + NSUOFF !Sugars
C-----------------------------------------------------------------------
C N Balance Components for Mobilized, Uptake, and Fixed N
C-----------------------------------------------------------------------
WTNMOB = WTNMOB + NMINEA
WTNUP = WTNUP + TRNU
C-----------------------------------------------------------------------
C Compute Percentage N in each Plant Component
C-----------------------------------------------------------------------
IF ((WTLF .GT. 0.0) .AND. (WTLF .GT. WTNLF) .AND.
& (WTNLF .GT. 0.0)) THEN
PCNL = WTNLF / WTLF * 100.0
ELSE
PCNL = 0.0
ENDIF
IF ((STMWT .GT. 0.0) .AND. (WTNST .GT. 0.0)) THEN
PCNST = WTNST / STMWT * 100.0
ELSE
PCNST = 0.0
ENDIF
IF ((RTWT .GT. 0.0) .AND. (WTNRT .GT. 0.0)) THEN
PCNRT = WTNRT / RTWT * 100.0
ELSE
PCNRT = 0.0
ENDIF
!Sugars
IF ((SUWT .GT. 0.0) .AND. (WTNSU .GT. 0.0)) THEN
PCNSU = WTNSU / SUWT * 100.0
ELSE
PCNSU = 0.0
ENDIF
C-----------------------------------------------------------------------
C Compute Percentage Seed Composition
! Removed for CASUPRO (FSR)
C-----------------------------------------------------------------------
C Calculate true nitrogen concentration in leaf tissue for
C photosynthesis reduction.
C-----------------------------------------------------------------------
IF ((WTLF - WCRLF) .GT. 0.0) THEN
RNITP = 100. * WTNLF / (WTLF - WCRLF)
ELSE
RNITP = PCNMIN
ENDIF
C-----------------------------------------------------------------------
C Calculate Remaining N in Shells, Leaves, Stalks and Roots
C That can be Mined (Plant N-Balance).
C-----------------------------------------------------------------------
IF ((WTLF - WCRLF) .GT. 0.0) THEN
WNRLF = MAX (WTNLF - PROLFF * 0.16 * (WTLF-WCRLF), 0.0)
ELSE
WNRLF = 0.0
ENDIF
IF ((STMWT - WCRST) .GT. 0.0) THEN
WNRST = MAX (WTNST - PROSTF * 0.16 * (STMWT-WCRST), 0.0)
ELSE
WNRST = 0.0
ENDIF
IF (RTWT .GT. 0.) THEN
WNRRT = MAX (WTNRT - PRORTF * 0.16 * RTWT, 0.0)
ELSE
WNRRT = 0.0
ENDIF
!Sugars
IF (SUWT .GT. 0.) THEN
WNRSU = MAX (WTNSU - PROSUF * 0.16 * SUWT, 0.0)
ELSE
WNRSU = 0.0
ENDIF
C-----------------------------------------------------------------------
C This section added to provide senescence parameters to the
C Soil N routines (senescence and freeze values are added to soil
C residue; pest damage components are lost from the system)
C-----------------------------------------------------------------------
C Surface carbon includes all senescence and freeze variables for
C leaf (SLDOT, WLFDOT), and stalk (SSDOT)
C
C Convert from biomass to C with a factor 0.40.
C-----------------------------------------------------------------------
SenWt(0) = (SLDOT + WLFDOT + SSDOT)
C Convert from g/m2 to kg/ha with a factor of 10.
SenWt(0) = AMAX1(SenWt(0), 0.) * 10.0 !kg[dry matter]/ha
C-----------------------------------------------------------------------
C Surface nitrogen includes nitrogen losses computed above minus the
C pest damage components.
C-----------------------------------------------------------------------
SenE(0,1) = (NLOFF - WLIDOT * PCNL / 100.) + !Leaf
& (NSOFF - WSIDOT * PCNST / 100.) !Stem
C Convert from g/m2 to kg/ha with a factor of 10.
SenE(0,1) = AMAX1 (SenE(0,1),0.) * 10.0 !kg[N]/ha
C-----------------------------------------------------------------------
C Contribution of lignin to surface litter from senesced and frozen
C plant matter
C-----------------------------------------------------------------------
SenLig(0) = (SLDOT + WLFDOT) * PLIGLF + SSDOT * PLIGST
! & WTABRT * PLIGSH
C Convert from g/m2 to kg/ha with a factor of 10.
SenLig(0) = AMAX1 (SenLig(0),0.) * 10.0 !kg[lig]/ha
C-----------------------------------------------------------------------
C Senescence of roots and nodules (kg/ha)
C-----------------------------------------------------------------------
DO L = 1, NLAYR
SenWt(L) = (SENRT(L)) !kg[dry matter]/ha
SenLig(L) = SENRT(L) * PLIGRT !kg[lig]/ha
SenE(L,1) = (SENRT(L)* PRORTF) * 0.16
ENDDO
C-----------------------------------------------------------------------
C Leaf Area, Specific Leaf Area Calculations
C Calculate Area Growth rate and Update Leaf Area (AREALF, XLAI)
C-----------------------------------------------------------------------
ALFDOT = WLDOTN*F - (SLDOT+WLIDOT+WLFDOT+NRUSLF/0.16)*SLA
IF (WTLF .GT. 0.0) THEN
ALFDOT = ALFDOT + SLA * (NADLF/0.16) *
& (1. - MIN(1.0,(SLDOT+WLIDOT+WLFDOT)/WTLF))
ENDIF
AREALF = AREALF + ALFDOT
XLAI = AREALF / 10000.
IF (AREALF .GT. 0.00001 .AND. WTLF .GT. 0.0) THEN
SLA = AREALF / WTLF
SLAAD = AREALF / (WTLF - WCRLF)
IF (SLA .GT. 999.) SLA = 0.0
IF (SLAAD .GT. 999.) SLAAD = -99.
ENDIF
C-----------------------------------------------------------------------
C Remember XLAI
C-----------------------------------------------------------------------
LAIMX = MAX(XLAI,LAIMX)
C-----------------------------------------------------------------------
C Calculate "Healthy" or Non-Diseased Leaf Area Index
C-----------------------------------------------------------------------
AREAH = AREALF - 2. * DISLA
AREAH = MAX(0.,AREAH)
XHLAI = AREAH / 10000.
C-----------------------------------------------------------------------
C Integrate Pest Damage to Seeds Removed for CASUPRO (FSR)
C-----------------------------------------------------------------------
C Loss in Plants due to Pests, Adjust Plant Spacing Also
C-----------------------------------------------------------------------
IF (NPLTD .GT. 0.0) THEN
PLTPOP = PLTPOP - NPLTD
PLTPOP = MAX(0.,PLTPOP)
IF (PLTPOP*ROWSPC .GT. 0.0) THEN
BETN = 1.0/(ROWSPC*PLTPOP)
ENDIF
ENDIF
IF (PPLTD .GT. 0.0) THEN
PLTPOP = PLTPOP - PPLTD*PLTPOP/100.
PLTPOP = MAX(0.,PLTPOP)
IF(PLTPOP*ROWSPC .GT. 0.0) THEN
BETN = 1.0/(ROWSPC*PLTPOP)
ENDIF
ENDIF
C-----------------------------------------------------------------------
C Terminate growth if stress causes extremely low plant weights
C-----------------------------------------------------------------------
IF (TOPWT .LT. 0.00001 .OR. STMWT .LT. 0.00001) THEN
CALL CSP_STRESS(
& AGEFAC, IDETO, IHARI, NOUTDO, !Input
& RTWT, SUWT, STMWT, TOPWT, !Input
& TOTWT, TURFAC, WTLF, YRDOY, YRPLT, !Input
& MDATE) !Output
RETURN
ENDIF
IF (IHARI .NE. 'R' .AND. IHARI .NE. 'D') THEN
IF (RTWT .LT. 0.00001 .OR. WTLF .LT. 0.00001) THEN
CALL CSP_STRESS(
& AGEFAC, IDETO, IHARI, NOUTDO, !Input