File size: 2,749 Bytes
64ab846
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import numpy as np

from ..entities.modelConstants import ModelConstants


class InitialCondition:
    """

    The InitCond Class contains all Paramaters and variables used in the simulation



    updated each timestep with the name NewCond





    """

    def __init__(self, num_comp):
        # counters
        self.age_days = 0
        self.age_days_ns = 0
        self.aer_days = 0
        self.aer_days_comp = np.zeros(num_comp)
        self.irr_cum = 0
        self.delayed_gdds = 0
        self.delayed_cds = 0
        self.pct_lag_phase = 0
        self.t_early_sen = 0
        self.gdd_cum = 0
        self.day_submerged = 0
        self.irr_net_cum = 0
        self.dap = 0
        self.e_pot = 0
        self.t_pot = 0

        # States
        self.pre_adj = False
        self.crop_mature = False
        self.crop_dead = False
        self.germination = False
        self.premat_senes = False
        self.harvest_flag = False
        self.growing_season = False
        self.yield_form = False
        self.stage2 = False

        self.wt_in_soil = False

        # harvest_index
        self.stage = 1
        self.f_pre = 1
        self.f_post = 1
        self.fpost_dwn = 1
        self.fpost_upp = 1

        self.h1_cor_asum = 0
        self.h1_cor_bsum = 0
        self.f_pol = 0
        self.s_cor1 = 0
        self.s_cor2 = 0
        self.hi_ref = 0.0
        self.HIfinal = 0.0

        # GS
        self.growth_stage = 0

        # Transpiration
        self.tr_ratio = 1

        # crop growth
        self.r_cor = 1

        self.canopy_cover = 0
        self.canopy_cover_adj = 0
        self.canopy_cover_ns = 0
        self.canopy_cover_adj_ns = 0
        self.biomass = 0
        self.biomass_ns = 0
        self.YieldPot = 0
        self.harvest_index = 0
        self.harvest_index_adj = 0
        self.ccx_act = 0
        self.ccx_act_ns = 0
        self.ccx_w = 0
        self.ccx_w_ns = 0
        self.ccx_early_sen = 0
        self.cc_prev = 0
        self.protected_seed = 0
        self.DryYield = 0
        self.FreshYield = 0

        self.z_root = 0.0
        self.cc0_adj = 0
        self.surface_storage = 0
        self.z_gw = ModelConstants.NO_VALUE

        self.th_fc_Adj = np.zeros(num_comp)
        self.th = np.zeros(num_comp)
        self.thini = np.zeros(num_comp)

        self.time_step_counter = 0

        self.precipitation = 0
        self.temp_max = 0
        self.temp_min = 0
        self.et0 = 0
        self.sumET0EarlySen = 0
        self.gdd = 0

        self.w_surf = 0
        self.evap_z = 0
        self.w_stage_2 = 0

        self.depletion = 0
        self.taw = 0