wolfhece 2.2.37__py3-none-any.whl → 2.2.38__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wolfhece/PyVertex.py +7 -0
- wolfhece/PyVertexvectors.py +53 -47
- wolfhece/apps/version.py +1 -1
- wolfhece/hydrology/climate_data.py +334 -0
- wolfhece/hydrology/constant.py +11 -0
- wolfhece/hydrology/hyetograms.py +2095 -0
- wolfhece/hydrometry/kiwis.py +28 -19
- wolfhece/hydrometry/kiwis_gui.py +7 -2
- {wolfhece-2.2.37.dist-info → wolfhece-2.2.38.dist-info}/METADATA +1 -1
- {wolfhece-2.2.37.dist-info → wolfhece-2.2.38.dist-info}/RECORD +13 -11
- {wolfhece-2.2.37.dist-info → wolfhece-2.2.38.dist-info}/WHEEL +0 -0
- {wolfhece-2.2.37.dist-info → wolfhece-2.2.38.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.2.37.dist-info → wolfhece-2.2.38.dist-info}/top_level.txt +0 -0
wolfhece/hydrometry/kiwis.py
CHANGED
@@ -424,7 +424,7 @@ class hydrometry():
|
|
424
424
|
self.get_groups()
|
425
425
|
self.save_struct()
|
426
426
|
except Exception as e:
|
427
|
-
|
427
|
+
logging.error('Error in hydrometry init :', e)
|
428
428
|
self.realstations = None
|
429
429
|
pass
|
430
430
|
|
@@ -1041,7 +1041,7 @@ class hydrometry():
|
|
1041
1041
|
if timezone=='Europe/Brussels' or timezone=='local':
|
1042
1042
|
timezone=''
|
1043
1043
|
|
1044
|
-
nb = (todate - fromdate).days*24 * (3600/interval)
|
1044
|
+
nb = int((todate - fromdate).days*24 * (3600/interval))
|
1045
1045
|
cursec = interval
|
1046
1046
|
# id = ''
|
1047
1047
|
if ts_id == '':
|
@@ -1105,8 +1105,8 @@ class hydrometry():
|
|
1105
1105
|
curend = curfrom+timedelta(seconds=200000 * cursec)
|
1106
1106
|
locts=[]
|
1107
1107
|
while curfrom<todate:
|
1108
|
-
|
1109
|
-
tmpts = self.timeseries(stationname, stationcode, dir, curfrom, curend, ts_name, ts_id, timezone=timezone)
|
1108
|
+
logging.info('Getting data from {0} to {1}'.format(curfrom, curend))
|
1109
|
+
tmpts = self.timeseries(stationname, stationcode, dir = dir, fromdate= curfrom, todate= curend, ts_name= ts_name, ts_id= ts_id, timezone=timezone)
|
1110
1110
|
if len(tmpts)>0:
|
1111
1111
|
locts.append(tmpts)
|
1112
1112
|
|
@@ -1115,22 +1115,31 @@ class hydrometry():
|
|
1115
1115
|
if curend>todate:
|
1116
1116
|
curend=todate
|
1117
1117
|
|
1118
|
+
if len(locts)==0:
|
1119
|
+
logging.warning('No data found for timeseries {0} for station {1} ({2}) between {3} and {4}'.format(ts_name, stationname, stationcode, fromdate, todate))
|
1120
|
+
return pd.DataFrame()
|
1121
|
+
|
1118
1122
|
return pd.concat(locts)
|
1119
1123
|
else:
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1124
|
+
try:
|
1125
|
+
json_data = requests.get(self._get_commandstr(kiwis_command.getTimeseriesValues)
|
1126
|
+
+"&"+urllib.parse.urlencode({
|
1127
|
+
"ts_id":str(ts_id),
|
1128
|
+
"from":fromdate.strftime("%Y-%m-%dT%H:%M:%S"),
|
1129
|
+
"to":todate.strftime("%Y-%m-%dT%H:%M:%S"),
|
1130
|
+
# "format":"json",
|
1131
|
+
"timezone":timezone})
|
1132
|
+
,verify=True,
|
1133
|
+
headers=self._header,
|
1134
|
+
timeout=TIMEOUT).json()
|
1130
1135
|
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1136
|
+
df = pd.DataFrame(json_data[0]['data'], columns = json_data[0]['columns'].split(','))
|
1137
|
+
df.set_index('Timestamp', inplace = True)
|
1138
|
+
df.index = pd.to_datetime(df.index,format="%Y-%m-%dT%H:%M:%S.%f%z")
|
1139
|
+
|
1140
|
+
except Exception as e:
|
1141
|
+
logging.error('Error in timeseries :', e)
|
1142
|
+
return pd.DataFrame()
|
1134
1143
|
|
1135
1144
|
return df.squeeze()
|
1136
1145
|
|
@@ -1210,8 +1219,8 @@ class hydrometry():
|
|
1210
1219
|
curend = curfrom+timedelta(seconds=200000 * cursec)
|
1211
1220
|
locts=[]
|
1212
1221
|
while curfrom<todate:
|
1213
|
-
|
1214
|
-
locts.append(self.timeseries(stationname,stationcode,dir,curfrom,curend,ts_name,ts_id))
|
1222
|
+
logging.info('Getting data from {0} to {1}'.format(curfrom, curend))
|
1223
|
+
locts.append(self.timeseries(stationname,stationcode, dir = dir, fromdate= curfrom, todate= curend, ts_name= ts_name, ts_id= ts_id))
|
1215
1224
|
curfrom = curend
|
1216
1225
|
curend = curfrom+timedelta(seconds=200000 * cursec)
|
1217
1226
|
if curend>todate:
|
wolfhece/hydrometry/kiwis_gui.py
CHANGED
@@ -274,6 +274,10 @@ class hydrometry_gui(wx.Frame):
|
|
274
274
|
"""
|
275
275
|
to_exclude = ['alarm', 'batterie']
|
276
276
|
|
277
|
+
if len(self.listbox2.GetSelections())==0:
|
278
|
+
logging.error(_('No station selected'))
|
279
|
+
return
|
280
|
+
|
277
281
|
#treat only the first one if multiple selections
|
278
282
|
stationname, stationcode = self._getname_code_fromindex(self.listbox2.GetSelections()[0])
|
279
283
|
|
@@ -584,11 +588,12 @@ class hydrometry_gui(wx.Frame):
|
|
584
588
|
if stationname is None:
|
585
589
|
return
|
586
590
|
|
587
|
-
for curdata, curname in zip(data,tsname):
|
591
|
+
for curdata, curname in zip(data, tsname):
|
588
592
|
if curdata is not None:
|
589
593
|
if len(curdata)>1:
|
590
594
|
curdata.to_csv('{}-{}.csv'.format(stationcode,curname), date_format="%Y%m%d%H%M%S%z", sep=";")
|
591
|
-
|
595
|
+
|
596
|
+
if datumsizebv[0]!='' and 'hauteur' in curname.lower():
|
592
597
|
curdata:pd.Series
|
593
598
|
zdata = curdata.copy()
|
594
599
|
zdata += float(datumsizebv[0])
|
@@ -16,8 +16,8 @@ wolfhece/PyPalette.py,sha256=SiRngKml2EXsq1jwQvqh5pBZiV1yS0CY7QrRJGSZD1s,36281
|
|
16
16
|
wolfhece/PyParams.py,sha256=BgTAwxxq831rYEq_KLcFBX_upjiSUpVtfoQnCxCNWUI,100443
|
17
17
|
wolfhece/PyPictures.py,sha256=5X2HBkZG1gTaMKMu6UoU-cOY8SRkFyPScJ8bhdoNY7g,18930
|
18
18
|
wolfhece/PyTranslate.py,sha256=4appkmNeHHZLFmUtaA_k5_5QL-5ymxnbVN4R2OblmtE,622
|
19
|
-
wolfhece/PyVertex.py,sha256=
|
20
|
-
wolfhece/PyVertexvectors.py,sha256=
|
19
|
+
wolfhece/PyVertex.py,sha256=dg6pqYRBlveodKhpg9YQv3zBPq2TS986HhyTtlZIXGU,51274
|
20
|
+
wolfhece/PyVertexvectors.py,sha256=1-XhaaLa8dmwM0524vaUqyEIBzzd4313oRFnWYCXCUo,375606
|
21
21
|
wolfhece/PyWMS.py,sha256=XcSlav5icct2UwV7K2r7vpxa5rKZWiHkp732lI94HFI,31534
|
22
22
|
wolfhece/RatingCurve.py,sha256=bUjIrQjvIjkD4V-z8bZmA6pe1ILtYNM0-3fT6YUY1RU,22498
|
23
23
|
wolfhece/RatingCurveData.py,sha256=5UvnIm89BwqjnEbLCcY3CA8WoFd_xHJbooNy62fX5iY,57660
|
@@ -89,7 +89,7 @@ wolfhece/apps/curvedigitizer.py,sha256=lEJJwgAfulrrWQc-U6ij6sj59hWN3SZl4Yu1kQxVz
|
|
89
89
|
wolfhece/apps/hydrometry.py,sha256=lhhJsFeb4zGL4bNQTs0co85OQ_6ssL1Oy0OUJCzhfYE,656
|
90
90
|
wolfhece/apps/isocurrent.py,sha256=dagmGR8ja9QQ1gwz_8fU-N052hIw-W0mWGVkzLu6C7I,4247
|
91
91
|
wolfhece/apps/splashscreen.py,sha256=EdGDN9NhudIiP7c3gVqj7dp4MWFB8ySizM_tpMnsgpE,3091
|
92
|
-
wolfhece/apps/version.py,sha256=
|
92
|
+
wolfhece/apps/version.py,sha256=zSOtAk-adGkIXfloe0DaNJen1MYZBxqVeiHCM9qL5Gc,388
|
93
93
|
wolfhece/apps/wolf.py,sha256=mRnjYsUu4KIsRuamdQWAINFMuwN4eJgMo9erG-hkZ70,729
|
94
94
|
wolfhece/apps/wolf2D.py,sha256=4z_OPQ3IgaLtjexjMKX9ppvqEYyjFLt1hcfFABy3-jU,703
|
95
95
|
wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
|
@@ -144,17 +144,19 @@ wolfhece/hydrology/PyWatershed.py,sha256=a26M6tVe4hrQ-a8FyAx7H9-RZcVCU5BBzFff4_Y
|
|
144
144
|
wolfhece/hydrology/RetentionBasin.py,sha256=vFvpnomo5h8ZWq3Hq-YlxRnyqyQqHrojABMKzu3RP6E,83358
|
145
145
|
wolfhece/hydrology/SubBasin.py,sha256=ORK1VmvBOfyDjfOTxFQ9bcHe78pAoVcRWwu5Vm-CDHo,181790
|
146
146
|
wolfhece/hydrology/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
147
|
-
wolfhece/hydrology/
|
147
|
+
wolfhece/hydrology/climate_data.py,sha256=CYCs0ViP389-lbYKeOFSYjPdwvKlHWdMs0RePsl6c2w,13418
|
148
|
+
wolfhece/hydrology/constant.py,sha256=tP-AHRzXNKLtVI3VuqG8Q_tQ0-P5mrX_zFlznB6OeHo,2526
|
148
149
|
wolfhece/hydrology/cst_exchanges.py,sha256=yT2cSIXjlfshPkSAdhyBxYwCPZ5L9s75BYM24tEO6_4,39699
|
149
150
|
wolfhece/hydrology/data_treatment.py,sha256=vHNtEvXHJOdGHjaNjbTTvVoFQjVee-AdspJEesxVNuQ,34967
|
150
151
|
wolfhece/hydrology/forcedexchanges.py,sha256=MrzMqKISX6G6t3XwkyFQa6tVFfTTC8ifm_nSvrOy5-8,2259
|
152
|
+
wolfhece/hydrology/hyetograms.py,sha256=E24e3zDIfzBk0C-djI61pL6D7G3BVGtpXNTP4UqjIXw,83393
|
151
153
|
wolfhece/hydrology/plot_hydrology.py,sha256=M1cujLxA03SG8P7CkIPVIsrbfsbCwZPpLHQHN2xxm4w,35708
|
152
154
|
wolfhece/hydrology/read.py,sha256=BaaIp1x44wPQz2LkWtzu7ZNKx3Gw_WDtAw-B4y_C2IU,9553
|
153
155
|
wolfhece/hydrology/slope_manager.py,sha256=vlek0z8qcqB61eleiksyOe3QR1vpbtwfeowy6ms7_Fg,5580
|
154
156
|
wolfhece/hydrology/wolfMap_treatment.py,sha256=eAxr24zJGwmDof1aZpcxewVvv_bWDvoO8t9Wwf99Mlo,10606
|
155
157
|
wolfhece/hydrometry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
156
|
-
wolfhece/hydrometry/kiwis.py,sha256=
|
157
|
-
wolfhece/hydrometry/kiwis_gui.py,sha256=
|
158
|
+
wolfhece/hydrometry/kiwis.py,sha256=UEShGBMHMqxMj58304GFt_SAoaACZi4PhJVEC8MpZ-E,65130
|
159
|
+
wolfhece/hydrometry/kiwis_gui.py,sha256=s4xCsqkKvI1YcIZ4X2A7hV11zyJFI8Q_4i82jOO6_ys,25060
|
158
160
|
wolfhece/hydrometry/kiwis_wolfgui.py,sha256=GPa5YNp2V2ZlxYQjPiCXERgPuWB_zij4ec2yHpRvoFA,4027
|
159
161
|
wolfhece/icons/folder_open.png,sha256=ykBlU2FtGcpjAu1YO4_eGlDg2svgs_IAs-4d5O2e3AM,2329
|
160
162
|
wolfhece/icons/folder_plus.png,sha256=Z1Jcs87Z6pNcudxGDTNhC_hgolSSaXe6_fmQE_n-ero,1963
|
@@ -308,8 +310,8 @@ wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=u4C7CXe_bUyGKx7c_Bi0x9
|
|
308
310
|
wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=ORy7fz4dcp691qKzaOZHrRLZ0uXNhL-LIHxmpDGL6BI,5007
|
309
311
|
wolfhece/wintab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
310
312
|
wolfhece/wintab/wintab.py,sha256=8A-JNONV6ujgsgG3lM5Uw-pVgglPATwKs86oBzzljoc,7179
|
311
|
-
wolfhece-2.2.
|
312
|
-
wolfhece-2.2.
|
313
|
-
wolfhece-2.2.
|
314
|
-
wolfhece-2.2.
|
315
|
-
wolfhece-2.2.
|
313
|
+
wolfhece-2.2.38.dist-info/METADATA,sha256=-p1k0cf0vU1Z873clKqpbu4YwhoQTcXLhqqLXtyNz9M,2729
|
314
|
+
wolfhece-2.2.38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
315
|
+
wolfhece-2.2.38.dist-info/entry_points.txt,sha256=Jr187pyvA3EeJiQLjZK9yo6mJX7IAn6ygZU9T8qF_gQ,658
|
316
|
+
wolfhece-2.2.38.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
|
317
|
+
wolfhece-2.2.38.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|