-
Notifications
You must be signed in to change notification settings - Fork 1
/
ASMDM.FOR
92 lines (79 loc) · 3.57 KB
/
ASMDM.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
C=======================================================================
C ASMDM, Subroutine
C Calculates assimilative damage due to pests.
C-----------------------------------------------------------------------
C REVISION HISTORY
C 03/20/98 CHP Written based on assimilative damage calculations in
C PLANT subroutine.
C 01/13/98 GH Incorporated into CROPGRO
C-----------------------------------------------------------------------
C Called by: PEST
C Calls: None
C=======================================================================
SUBROUTINE ASMDM(
& PGAVL, PPSR, TPSR, !Input
& ASMDOT, CASM, !Output
& DYNAMIC) !Control
!-----------------------------------------------------------------------
USE ModuleDefs !Definitions of constructed variable types,
! which contain control information, soil
! parameters, hourly weather data.
IMPLICIT NONE
INTEGER DYNAMIC
REAL ASMDOT, CASM
REAL PGAVL, PPSR, TPSR
!***********************************************************************
!***********************************************************************
! Seasonal initialization - run once per season
!***********************************************************************
IF (DYNAMIC .EQ. SEASINIT) THEN
!-----------------------------------------------------------------------
C Initialize cumulative assimilative damage variable.
C-----------------------------------------------------------------------
CASM = 0.0
ASMDOT = 0.0
!***********************************************************************
!***********************************************************************
! Daily integration
!***********************************************************************
ELSEIF (DYNAMIC .EQ. INTEGR) THEN
!***********************************************************************
ASMDOT = 0.0
IF (TPSR .GT. PGAVL) THEN
TPSR = MAX(0.,PGAVL)
ELSE
TPSR = MAX(0.,TPSR)
ENDIF
IF (PPSR .GT. 100.) THEN
PPSR = 100.
ELSE
PPSR = MAX(0.,PPSR)
ENDIF
TPSR = TPSR + PPSR*PGAVL/100.
IF (TPSR .GT. PGAVL) THEN
TPSR = MAX(0.,PGAVL)
ELSE
TPSR = MAX(0.,TPSR)
ENDIF
ASMDOT = ASMDOT + TPSR
CASM = CASM + TPSR
!***********************************************************************
ENDIF
!***********************************************************************
!***********************************************************************
! END OF DYNAMIC IF CONSTRUCT
!***********************************************************************
RETURN
END ! SUBROUTINE ASMDM
C-----------------------------------------------------------------------
C Variable definitions
C-----------------------------------------------------------------------
! ASMDOT Daily assimilative damage (g[CH2O] /m2 / d)
! CASM Cumulative assimilate damage (g[CH2O] / m2)
! PGAVL Total available CH2O available for growth & respiration
! (g[CH2O] / m2)
! PPSR Assimilate damage in daily percent photosynthesis reduction (%/d)
! TPSR Daily absolute assimilate damage (g[CH2O]/m2/d)
C-----------------------------------------------------------------------
C End Subroutine ASMDM
C-----------------------------------------------------------------------