forked from jayantsi/nevadaet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
application_defaults.py
executable file
·228 lines (224 loc) · 10.3 KB
/
application_defaults.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
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
#############################################
## APPLICATION DEFAULTS ##
#############################################
import templatevariables
def get_applicationDefaults(self, applicationName):
if applicationName=='fewsNet':
CHIRPSvariable_default = 'CHIRPS-precipitation-Total'
elif applicationName=='precisionGrazing':
CHIRPSvariable_default = 'L_TOA-NDVI-Max-value'
elif applicationName=='gddTool':
CHIRPSvariable_default = 'G-precipitation-Total'
else:
CHIRPSvariable_default = ''
if applicationName == 'climateEngineExpert':
timeSeriesCalc_default = 'days'
subDomainTypeTS_default = 'points'
ftChoice1_default = 'states'
variable_default = 'pr'
productType_default = 'MET'
product_default = 'G'
statistic_default = 'Total'
calculation_default = 'value'
units_default = 'metric'
varUnits_default = 'mm'
colorbar_default = 'GnBu'
colorbarMin_default = 0
colorbarMax_default = 400
colorbarSize_default = '8'
colorbarTicks_default = '0,5,24,50,70,90,110,130,150,200,400,800'
timeperiod_default = 'last60days'
timeperiod_days = 60
scale_default = '4000'
mapCenterLongLat_default= '-112,42'
pointLat_default = '42'
pointLon_default = '-112'
mapCenterLongLat = templatevariables.get_variable(
self, 'mapCenterLongLat', mapCenterLongLat_default)
mapzoom_default = '5'
opacity_default = str(14*0.05)
NELat_default = 45
NELong_default = -95
SWLat_default = 40
SWLong_default = -111
minYear_default = '1979'
minDate_default = '1979-01-01'
runningMeanYears_default= '5'
runningMeanDays_default = '9'
basemap_default = 'hybrid'
if applicationName == 'nevadaet':
timeSeriesCalc_default = 'days'
subDomainTypeTS_default = 'points'
ftChoice1_default = 'states'
variable_default = 'ETg'
productType_default = 'RS'
product_default = 'L8_SR'
statistic_default = 'Mean'
calculation_default = 'value'
units_default = 'metric'
varUnits_default = 'mm'
colorbar_default = 'GnBu'
colorbarMin_default = 0
colorbarMax_default = 400
colorbarSize_default = '8'
colorbarTicks_default = '0,5,24,50,70,90,110,130,150,200,400,800'
timeperiod_default = 'last60days'
timeperiod_days = 60
scale_default = '4000'
mapCenterLongLat_default= '-113,39'
pointLat_default = '39'
pointLon_default = '-113'
mapCenterLongLat = templatevariables.get_variable(
self, 'mapCenterLongLat', mapCenterLongLat_default)
mapzoom_default = '7'
opacity_default = str(14*0.05)
NELat_default = 45
NELong_default = -95
SWLat_default = 40
SWLong_default = -111
minYear_default = '1979'
minDate_default = '1979-01-01'
runningMeanYears_default= '5'
runningMeanDays_default = '9'
basemap_default = 'hybrid'
elif applicationName == 'fewsNet':
timeSeriesCalc_default = 'interannual'
subDomainTypeTS_default = 'customShapes'
ftChoice1_default = 'fewscropzoneoverlayer',
variable_default = 'precipitation'
productType_default = 'MET'
product_default = 'CHIRPS'
statistic_default = 'Total'
calculation_default = 'value'
units_default = 'metric'
varUnits_default = 'mm'
colorbar_default = 'GnBu'
colorbarMin_default = 0
colorbarMax_default = 400
colorbarSize_default = '8'
colorbarTicks_default = '0,10,25,50,75,90,110,125,150,175,200,250'
timeperiod_default = 'last90days' # if modify this, also modify tempstart below
timeperiod_days = 90
scale_default = '4800'
mapCenterLongLat_default= '17.5,0.0' # Africa
pointLat_default = '0.0'
pointLon_default = '17.5'
mapCenterLongLat = templatevariables.get_variable(
self, 'mapCenterLongLat', mapCenterLongLat_default)
mapzoom_default = '4'
opacity_default = str(14*0.05)
NELat_default = 45
NELong_default = -95
SWLat_default = 40
SWLong_default = -111
minYear_default = '1981'
minDate_default = '1981-01-01'
runningMeanYears_default= '5'
runningMeanDays_default = '9'
basemap_default = 'lightPoliticalStyle'
elif applicationName == 'lakeMead':
timeSeriesCalc_default = 'days'
subDomainTypeTS_default = 'points'
ftChoice1_default = 'states'
variable_default = 'pr'
productType_default = 'MET'
product_default = 'G'
statistic_default = 'Total'
calculation_default = 'value'
units_default = 'metric'
varUnits_default = 'mm'
colorbar_default = 'GnBu'
colorbarMin_default = 0
colorbarMax_default = 400
colorbarSize_default = '8'
colorbarTicks_default = '0,5,24,50,70,90,110,130,150,200,400,800'
timeperiod_default = 'last60days'
timeperiod_days = 60
scale_default = '4000'
mapCenterLongLat_default= '-114.4410,36.3'
pointLat_default = '36.3'
pointLon_default = '-114.4410'
mapCenterLongLat = templatevariables.get_variable(
self, 'mapCenterLongLat', mapCenterLongLat_default)
mapzoom_default = '10'
opacity_default = str(14*0.05)
NELat_default = 36.5
NELong_default = -114
SWLat_default = 25.5
SWLong_default = -115
minYear_default = '1979'
minDate_default = '1979-01-01'
runningMeanYears_default= ' 5'
runningMeanDays_default = '9'
basemap_default = 'hybrid'
elif applicationName == 'precisionGrazing':
timeSeriesCalc_default = 'interannual'
subDomainTypeTS_default = 'customShapes'
ftChoice1_default = 'fewscropzoneoverlayer',
variable_default = 'NDVI'
productType_default = 'RS'
product_default = 'L_TOA'
statistic_default = 'Max'
calculation_default = 'value'
units_default = 'metric'
varUnits_default = ''
colorbar_default = 'YlGn'
colorbarMin_default = -0.1
colorbarMax_default = .9
colorbarSize_default = '8'
colorbarTicks_default = '0,10,25,50,75,90,110,125,150,175,200,250'
timeperiod_default = 'last90days' # if modify this, also modify tempstart below
timeperiod_days = 90
scale_default = '4800'
mapCenterLongLat_default= '-116.9436,45.5604'
pointLat_default = '45.5604'
pointLon_default = '-116.9436'
mapCenterLongLat = templatevariables.get_variable(
self, 'mapCenterLongLat', mapCenterLongLat_default)
mapzoom_default = '11'
opacity_default = str(14*0.05)
NELat_default = 47
NELong_default = -115
SWLat_default = 44
SWLong_default = -117
minYear_default = '1981'
minDate_default = '1981-01-01'
runningMeanYears_default= '5'
runningMeanDays_default = '9'
basemap_default = 'hybrid'
elif applicationName == 'gddTool':
timeSeriesCalc_default = 'interannual'
subDomainTypeTS_default = 'points'
ftChoice1_default = '',
variable_default = 'pr'
productType_default = 'MET'
product_default = 'G'
statistic_default = 'Total'
calculation_default = 'value'
units_default = 'metric'
varUnits_default = 'mm'
colorbar_default = 'GnBu'
colorbarMin_default = 0
colorbarMax_default = 400
colorbarSize_default = '8'
colorbarTicks_default = '0,10,25,50,75,90,110,125,150,175,200,250'
timeperiod_default = 'last90days' # if modify this, also modify tempstart below
timeperiod_days = 90
scale_default = '4000'
mapCenterLongLat_default= '-112,42'
pointLat_default = '42.0'
pointLon_default = '-112'
mapCenterLongLat = templatevariables.get_variable(
self, 'mapCenterLongLat', mapCenterLongLat_default)
mapzoom_default = '4'
opacity_default = str(14*0.05)
NELat_default = 45
NELong_default = -95
SWLat_default = 40
SWLong_default = -111
minYear_default = '1981'
minDate_default = '1981-01-01'
runningMeanYears_default= '5'
runningMeanDays_default = '9'
basemap_default = 'hybrid'
return timeSeriesCalc_default,subDomainTypeTS_default,ftChoice1_default,variable_default,productType_default,product_default,statistic_default,calculation_default,units_default,varUnits_default,colorbar_default,colorbarMin_default,colorbarMax_default,colorbarSize_default,colorbarTicks_default,timeperiod_default,timeperiod_days,scale_default,mapCenterLongLat_default,pointLat_default ,pointLon_default,mapCenterLongLat,mapzoom_default,opacity_default,NELat_default,NELong_default,SWLat_default,SWLong_default,minYear_default,minDate_default,runningMeanYears_default,runningMeanDays_default,basemap_default,CHIRPSvariable_default