-
Notifications
You must be signed in to change notification settings - Fork 6
/
Model_variables.py
168 lines (161 loc) · 6.95 KB
/
Model_variables.py
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
# -*- coding: utf-8 -*-
"""
Created on Wed May 25 23:53:16 2022
@author: osamatarabih
"""
import numpy as np
import pandas as pd
from datetime import datetime
import os
from Model_Config import Model_Config
Working_Path = Model_Config.Working_Path
os.chdir('%s'%Working_Path)
from Pre_defined_Variables import Pre_defined_Variables
year, month, day = map(int, Pre_defined_Variables.startdate_entry)
startdate = datetime(year, month, day).date()
year, month, day = map(int, Pre_defined_Variables.enddate_entry)
enddate = datetime(year, month, day).date()
year, month, day = map(int, Pre_defined_Variables.enddate_TC)
enddate_TC = datetime(year, month, day).date()
date_rng_3 = pd.date_range(start=startdate, end = enddate_TC, freq= 'W-Fri')
TC_Count = len(date_rng_3)
class M_var:
RF_Cls = np.zeros(TC_Count)
MainTrib_Cls = np.zeros(TC_Count)
Palmer_Cls = np.zeros(TC_Count)
NetInflow_Cls = np.zeros(TC_Count)
Max_RF_MainTrib = np.zeros(TC_Count)
Max_Palmer_NetInf = np.zeros(TC_Count)
date_rng_4 = pd.date_range(start=startdate, end = enddate, freq= 'MS')
LONINO_Count = len(date_rng_4)
Seas = np.zeros(LONINO_Count)
M_Seas = np.zeros(LONINO_Count)
LONINO_Seas_cls = np.zeros(Pre_defined_Variables.Month_N)
LONINO_M_Seas_cls = np.zeros(Pre_defined_Variables.Month_N)
date_rng_5 = pd.date_range(start = startdate, end = enddate, freq ='D')
Seas_Count = len(date_rng_5)
Daily_Seasons = np.zeros(Seas_Count)
Mon = np.zeros(Seas_Count)
date_rng_6 = pd.date_range(start='12/30/%d'%(Pre_defined_Variables.startyear-1), end = enddate, freq= 'D')
n_rows = len(date_rng_6)
Lake_Stage = np.zeros(n_rows,dtype = object)
WSM_Zone = np.zeros(n_rows,dtype = object)
Max_Supply = np.zeros(n_rows,dtype = object)
LOSA_Supply = np.zeros(n_rows,dtype = object)
Cut_back = np.zeros(n_rows,dtype = object)
Dem_N_Sup = np.zeros(n_rows,dtype = object)
V = len(date_rng_5)
V10per = np.zeros(V)
V20per = np.zeros(V)
V25per = np.zeros(V)
V30per = np.zeros(V)
V40per = np.zeros(V)
V45per = np.zeros(V)
V50per = np.zeros(V)
V60per = np.zeros(V)
NI_Supply = np.zeros(n_rows,dtype = object)
Zone_Code = np.zeros(n_rows,dtype = object)
LO_Zone = np.zeros(n_rows,dtype = object)
Counter = len(date_rng_5)
Zone_D_Trib = np.zeros(Counter)
Zone_D_stage = np.zeros(Counter)
Zone_D_Seas = np.zeros(Counter)
Zone_D_MSeas = np.zeros(Counter)
Zone_D_Branch_Code = np.zeros(Counter)
Zone_D_Rel_Code = np.zeros(Counter)
Zone_C_Trib = np.zeros(Counter)
Zone_C_Seas = np.zeros(Counter)
Zone_C_MSeas = np.zeros(Counter)
Zone_C_MetFcast = np.zeros(Counter)
Zone_C_Branch_Code = np.zeros(Counter)
Zone_C_Rel_Code = np.zeros(Counter)
Zone_B_Trib = np.zeros(Counter)
Zone_B_Stage = np.zeros(Counter)
Zone_B_Seas = np.zeros(Counter)
Zone_B_Branch_Code = np.zeros(Counter)
Zone_B_Rel_Code = np.zeros(Counter)
DecTree_Relslevel = np.zeros(n_rows,dtype = object)
DayFlags = np.zeros(n_rows,dtype = object)
PlsDay = np.zeros(n_rows,dtype = object)
Release_Level = np.zeros(n_rows,dtype = object)
dh_7days = np.zeros(n_rows,dtype = object)
ZoneCodeminus1Code = np.zeros(n_rows,dtype = object)
ZoneCodeCode = np.zeros(n_rows,dtype = object)
Fraction_of_Zone_height = np.zeros(n_rows,dtype = object)
ReLevelCode_1 = np.zeros(n_rows,dtype = object)
ReLevelCode_2 = np.zeros(n_rows,dtype = object)
ReLevelCode_3_S80 = np.zeros(n_rows,dtype = object)
Outlet2DS_Mult = np.zeros(n_rows,dtype = object)
Outlet2DS_Mult_2 = np.zeros(n_rows,dtype = object)
Outlet2DSRS = np.zeros(n_rows,dtype = object)
Outlet2USRG1 = np.zeros(n_rows,dtype = object)
Sum_Outlet2USRG1 = np.zeros(n_rows,dtype = object)
Outlet2DSBS = np.zeros(n_rows,dtype = object)
Outlet2USBK = np.zeros(n_rows,dtype = object)
ROeast = np.zeros(n_rows,dtype = object)
Outlet2USBS = np.zeros(n_rows,dtype = object)
Sum_Outlet2USBK = np.zeros(n_rows,dtype = object)
Outlet2USRG_Code = np.zeros(n_rows,dtype = object)
Outlet2USRG = np.zeros(n_rows,dtype = object)
Outlet2DS = np.zeros(n_rows,dtype = object)
ReLevelCode_3_S77 = np.zeros(n_rows,dtype = object)
Outlet1US_Mult = np.zeros(n_rows,dtype = object)
Outlet1US_Mult_2 = np.zeros(n_rows,dtype = object)
Outlet1USBSAP = np.zeros(n_rows,dtype = object)
Outlet1USRS = np.zeros(n_rows,dtype = object)
Sum_Outlet1USRS = np.zeros(n_rows,dtype = object)
Outlet1USBK = np.zeros(n_rows,dtype = object)
ROwest = np.zeros(n_rows,dtype = object)
Outlet1DSBS = np.zeros(n_rows,dtype = object)
Outlet1USBS = np.zeros(n_rows,dtype = object)
Outlet1USEWS = np.zeros(n_rows,dtype = object)
Outlet1USREG = np.zeros(n_rows,dtype = object)
Outlet1DS = np.zeros(n_rows,dtype = object)
TotRegEW = np.zeros(n_rows,dtype = object)
Choose_WCA = np.zeros(n_rows,dtype = object)
RegWCA = np.zeros(n_rows,dtype = object)
Choose_L8C51 = np.zeros(n_rows,dtype = object)
RegL8C51 = np.zeros(n_rows,dtype = object)
TotRegSo = np.zeros(n_rows,dtype = object)
Stage2ar = np.zeros(n_rows,dtype = object)
Stage2marsh = np.zeros(n_rows,dtype = object)
RF = np.zeros(n_rows,dtype = object)
ET = np.zeros(n_rows,dtype = object)
Choose_WSA_1 = np.zeros(n_rows,dtype = object)
Choose_WSA_2 = np.zeros(n_rows,dtype = object)
WSA_MIA = np.zeros(n_rows,dtype = object)
WSA_NNR = np.zeros(n_rows,dtype = object)
DSto = np.zeros(n_rows,dtype = object)
Storage = np.zeros(n_rows,dtype = object)
Count_AP = len(date_rng_5)
THC_Class_normal_or_above = np.zeros(Count_AP)
Lake_O_Stage_AP = np.zeros(Count_AP)
Lake_O_Schedule_Zone = np.zeros(Count_AP)
LStgCorres = np.zeros(Count_AP)
LowChance_Check = np.zeros(Count_AP)
Outlet1USRS_AP = np.zeros(Count_AP)
Outlet1USBS_AP = np.zeros(Count_AP)
Outlet1USRS_Pre_AP_S77_Baseflow = np.zeros(Count_AP)
Forecast_D_Sal = np.zeros(Count_AP)
n30d_mavg = np.zeros(Count_AP)
n30davgForecast = np.zeros(Count_AP)
LORS08_bf_rel = np.zeros(Count_AP)
LDS_LC6_1 = np.zeros(Count_AP)
S_O = np.zeros(Count_AP)
All_4 = np.zeros(Count_AP)
Sabf = np.zeros(Count_AP)
Swbf = np.zeros(Count_AP)
Swbu = np.zeros(Count_AP)
All_4andStage = np.zeros(Count_AP)
All_4andStagein = np.zeros(Count_AP)
P_AP_BF_Stg = np.zeros(Count_AP)
Logic_test_1 = np.zeros(Count_AP)
Post_Ap_Baseflow = np.zeros(Count_AP)
Outlet1USRSplusPreAPS77bsf = np.zeros(Count_AP)
AndEstNeedsLakeWater = np.zeros(Count_AP)
Choose_PAPEWS_1 = np.zeros(Count_AP)
Choose_PAPEWS_2 = np.zeros(Count_AP)
AndLowChance61stagelessth11 = np.zeros(Count_AP)
ATHCnora = np.zeros(Count_AP)
Post_AP_EWS = np.zeros(Count_AP)
Post_AP_Baseflow_EWS_cfs = np.zeros(Count_AP)