wolfhece 2.1.128__py3-none-any.whl → 2.1.129__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/PyParams.py +5 -1
- wolfhece/PyVertexvectors.py +52 -7
- wolfhece/apps/version.py +1 -1
- wolfhece/hydrology/Catchment.py +111 -10
- wolfhece/hydrology/Comparison.py +29 -25
- wolfhece/hydrology/Optimisation.py +309 -178
- wolfhece/hydrology/PostProcessHydrology.py +6 -3
- wolfhece/hydrology/RetentionBasin.py +21 -14
- wolfhece/hydrology/SubBasin.py +128 -12
- wolfhece/hydrology/constant.py +3 -0
- wolfhece/hydrology/cst_exchanges.py +364 -38
- wolfhece/hydrology/plot_hydrology.py +32 -16
- wolfhece/hydrology/read.py +16 -6
- wolfhece/libs/WolfDll.dll +0 -0
- wolfhece/radar/wolfradar.py +75 -22
- wolfhece/shapes/__init__.py +0 -0
- wolfhece/shapes/circle.py +335 -0
- {wolfhece-2.1.128.dist-info → wolfhece-2.1.129.dist-info}/METADATA +4 -3
- {wolfhece-2.1.128.dist-info → wolfhece-2.1.129.dist-info}/RECORD +22 -20
- {wolfhece-2.1.128.dist-info → wolfhece-2.1.129.dist-info}/WHEEL +0 -0
- {wolfhece-2.1.128.dist-info → wolfhece-2.1.129.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.1.128.dist-info → wolfhece-2.1.129.dist-info}/top_level.txt +0 -0
wolfhece/radar/wolfradar.py
CHANGED
@@ -19,7 +19,16 @@ from datetime import timezone
|
|
19
19
|
from os import path
|
20
20
|
from osgeo import gdal, osr
|
21
21
|
from ..drawing_obj import Element_To_Draw
|
22
|
+
from tqdm import tqdm
|
22
23
|
|
24
|
+
RADQPE = 1
|
25
|
+
RADCLIM = 2
|
26
|
+
RADFLOOD = 3
|
27
|
+
|
28
|
+
FILL_NONE = 0
|
29
|
+
FILL_ZERO = 1
|
30
|
+
FILL_NAN = 2
|
31
|
+
FILL_INTERP = 3
|
23
32
|
|
24
33
|
class L08L72:
|
25
34
|
epsgL08:osr.SpatialReference
|
@@ -51,12 +60,13 @@ class RadarIRM(Element_To_Draw):
|
|
51
60
|
|
52
61
|
|
53
62
|
def convert2rain(self, coordMin:tuple, coordMax:tuple, dateBegin:date, dateEnd:date, deltaT:tdelta,
|
54
|
-
dirIn:str="", dirOut:str="",
|
55
|
-
check_all_polygons:bool=False):
|
63
|
+
dirIn:str="", dirOut:str="", file_name_conv:str=".radclim.accum", type_rain:int=RADCLIM, recursive_dir="",
|
64
|
+
check_all_polygons:bool=False, fill_data:int=FILL_NONE):
|
56
65
|
|
57
|
-
from datetime import datetime as date
|
58
66
|
# =================
|
59
67
|
# ALL VERIFICATIONS :
|
68
|
+
logging.info("Starting the conversion of IRM data to rain data ...")
|
69
|
+
logging.info("Verification ongoing ...")
|
60
70
|
|
61
71
|
# Checking the validity of the repository to read and write :
|
62
72
|
isOk, dirIn = check_path(dirIn, applyCWD=True)
|
@@ -74,12 +84,21 @@ class RadarIRM(Element_To_Draw):
|
|
74
84
|
dt = deltaT.total_seconds()
|
75
85
|
nb_intervals = floor((dateEnd - dateBegin).total_seconds() / dt)
|
76
86
|
time = [dateBegin + tdelta(seconds=dt*i) for i in range(nb_intervals + 1)]
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
87
|
+
if recursive_dir == "":
|
88
|
+
# Prefix for dates -> only if it's not a recursive directory
|
89
|
+
dt_str = "{:.0f}d".format(deltaT.days)*(deltaT.days>0) \
|
90
|
+
+ "{:.0f}h".format(floor(deltaT.seconds)/3600)*(floor(deltaT.seconds/3600)>0) \
|
91
|
+
+ "{:.0f}m".format(floor(deltaT.seconds%3600)/60)*(floor(deltaT.seconds%3600)/60>0)
|
92
|
+
suffix = "".join([file_name_conv, dt_str, ".hdf"])
|
93
|
+
all_files = [os.path.join(dirIn,"".join([t.strftime("%Y%m%d%H%M%S"),suffix])) for t in time]
|
94
|
+
else:
|
95
|
+
suffix = "".join([file_name_conv, ".hdf"])
|
96
|
+
all_files = [os.path.join(dirIn,
|
97
|
+
t.strftime("%Y"),
|
98
|
+
t.strftime("%m"),
|
99
|
+
t.strftime("%d"),
|
100
|
+
recursive_dir,
|
101
|
+
"".join([t.strftime("%Y%m%d%H%M%S"),suffix])) for t in time]
|
83
102
|
# are_present = np.all(np.array( \
|
84
103
|
# [os.path.exists(os.path.join(dirIn,"".join([t.strftime("%Y%m%d%H%M%S"),suffix]))) for t in time] \
|
85
104
|
# ))
|
@@ -90,7 +109,14 @@ class RadarIRM(Element_To_Draw):
|
|
90
109
|
|
91
110
|
if not are_present:
|
92
111
|
logging.error("Rain files present in the selected directory are does not contain all the information between the desired interval.")
|
93
|
-
|
112
|
+
i_problem = np.where(np.array([os.path.exists(el) for el in all_files]) == False)[0]
|
113
|
+
logging.error("The following files are missing :")
|
114
|
+
for i in i_problem:
|
115
|
+
logging.error(all_files[i])
|
116
|
+
if fill_data == FILL_NONE:
|
117
|
+
logging.error("The process stops because there are missing files!")
|
118
|
+
logging.error("To make an linear interpolation set to False 'no_missing_files' argument.")
|
119
|
+
return
|
94
120
|
|
95
121
|
# Creating the direcory results
|
96
122
|
# Directory of the shapefile
|
@@ -118,12 +144,15 @@ class RadarIRM(Element_To_Draw):
|
|
118
144
|
else:
|
119
145
|
print ("Successfully created the directory %s" % timeSeriesDir)
|
120
146
|
|
147
|
+
logging.info("Verification validated!")
|
121
148
|
|
122
149
|
# =================
|
123
150
|
# CORE PROCEDURE
|
124
151
|
# After all verifications, the core procedure can now start :
|
125
152
|
# extract all the points in all the .hdf files and their values -> check whether to crop during this process of after
|
126
153
|
|
154
|
+
logging.info("Creation of the shapefile ongoing ...")
|
155
|
+
|
127
156
|
# Definition of the domaine zone
|
128
157
|
limits = vector()
|
129
158
|
limits.add_vertex(wolfvertex(coordMin[0],coordMin[1]))
|
@@ -173,27 +202,52 @@ class RadarIRM(Element_To_Draw):
|
|
173
202
|
|
174
203
|
# save the polygons in .shp shapefile
|
175
204
|
polygons.export_shape(fileOut)
|
205
|
+
logging.info("Creation of the shapefile finished !")
|
176
206
|
|
177
|
-
|
207
|
+
logging.info("Creation of polygon time series ongoing ...")
|
178
208
|
# Create a folder with the time serie for each polygone
|
179
209
|
timeStps = [[str(t.day), str(t.month), str(t.year), str(t.hour), str(t.minute), str(t.second)] for t in time]
|
180
210
|
|
181
211
|
all_values = np.zeros((len(all_files), polygons.nbvectors))
|
182
|
-
for i in range(len(all_files)):
|
212
|
+
for i in tqdm(range(len(all_files))):
|
183
213
|
cur_file = all_files[i]
|
214
|
+
exists = os.path.exists(cur_file)
|
184
215
|
try:
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
216
|
+
if exists:
|
217
|
+
hdf_ds = gdal.Open(cur_file, gdal.GA_ReadOnly)
|
218
|
+
values, coord, proj = wrl.georef.raster.extract_raster_dataset(hdf_ds, mode="edge", nodata=0.0)
|
219
|
+
vec_values = values.reshape(-1)
|
220
|
+
all_values[i,:] = np.nan_to_num([vec_values[i] for i in zones_indices], copy=False, nan=0.0)
|
221
|
+
# FIXME this following line -> to check !!!! -> Convert [mm/h] to accumulated rain [mm] at each time step
|
222
|
+
# radflood
|
223
|
+
if type_rain == RADFLOOD or type_rain == RADCLIM:
|
224
|
+
all_values[i,:] = all_values[i,:]
|
225
|
+
elif type_rain == RADQPE:
|
226
|
+
# radqpe
|
227
|
+
# TODO : check the conversion for radclim
|
228
|
+
all_values[i,:] = all_values[i,:]*(dt/3600.0)
|
229
|
+
# all_values[i,:] = all_values[i,:]*(dt/3600.0)
|
230
|
+
else:
|
231
|
+
if fill_data == FILL_ZERO:
|
232
|
+
all_values[i,:] = 0.0
|
233
|
+
else:
|
234
|
+
all_values[i,:] = np.nan
|
191
235
|
except:
|
192
236
|
logging.error("".join(["Something bad happened while reading hdf file :", cur_file]))
|
193
237
|
all_values[i,:] = 0.0
|
194
|
-
|
238
|
+
logging.info("Creation of polygon time series finished !")
|
239
|
+
|
240
|
+
logging.info("Writing polygon time series ongoing ...")
|
195
241
|
# Writing the file
|
196
|
-
for iVec in range(polygons.nbvectors):
|
242
|
+
for iVec in tqdm(range(polygons.nbvectors)):
|
243
|
+
# Clean the nan value with linear interpolation
|
244
|
+
# FIXME : to check the interpolation
|
245
|
+
if(fill_data == FILL_INTERP):
|
246
|
+
logging.warning('Interpolating missing values in the time series -> Still to test!')
|
247
|
+
valid = ~np.isnan(all_values[:,iVec])
|
248
|
+
invalid = np.isnan(all_values[:,iVec])
|
249
|
+
all_values[invalid,iVec] = np.interp(np.flatnonzero(invalid), np.flatnonzero(valid), all_values[valid,iVec])
|
250
|
+
# write in the file
|
197
251
|
with open(os.path.join(timeSeriesDir,"".join([str(iVec+1),".rain"])), 'w') as f:
|
198
252
|
f.write("".join([str(iVec+1),"\n"]))
|
199
253
|
f.write("".join([str(1),"\n"]))
|
@@ -201,11 +255,10 @@ class RadarIRM(Element_To_Draw):
|
|
201
255
|
f.write("".join([str(len(all_files)),"\n"]))
|
202
256
|
for cur_t in range(len(timeStps)):
|
203
257
|
f.write("\t".join(timeStps[cur_t] + [str(all_values[cur_t,iVec])]) + "\n")
|
204
|
-
|
258
|
+
logging.info("Writing polygon time series finished !")
|
205
259
|
|
206
260
|
print(are_present)
|
207
261
|
|
208
|
-
|
209
262
|
# def plot(self):
|
210
263
|
# pass
|
211
264
|
|
File without changes
|
@@ -0,0 +1,335 @@
|
|
1
|
+
import math
|
2
|
+
import numpy as np
|
3
|
+
from numba import jit
|
4
|
+
|
5
|
+
""" JIT is a decorator that tells Numba to compile this function using the Numba JIT compiler. """
|
6
|
+
|
7
|
+
@jit(nopython=True)
|
8
|
+
def A_from_h(h:float, diameter:float):
|
9
|
+
""" Compute the area of a circular segment from its height """
|
10
|
+
d = diameter / 2.0 - h
|
11
|
+
theta = math.acos(1.0 - 2.0 * h / diameter)
|
12
|
+
chord = math.sqrt(h * (diameter - h))
|
13
|
+
area = theta * diameter**2 / 4.0 - chord * d
|
14
|
+
|
15
|
+
return area
|
16
|
+
|
17
|
+
@jit(nopython=True)
|
18
|
+
def dichotomy_A2h(f, a:float, b:float, args, tol=1e-10, max_iter=1000):
|
19
|
+
""" Dichotomy algorithm to find the root of a function f between a and b.
|
20
|
+
The function f must be defined as f(x, *args) and must return a scalar.
|
21
|
+
The function must have a single root in the interval [a, b].
|
22
|
+
"""
|
23
|
+
def cond_fun(val):
|
24
|
+
a, b, i = val
|
25
|
+
return (b - a) > tol
|
26
|
+
|
27
|
+
def body_fun(val):
|
28
|
+
a, b, i = val
|
29
|
+
c = (a + b) / 2.
|
30
|
+
diameter = args[0]
|
31
|
+
fa = f(a, diameter)
|
32
|
+
fc = f(c, diameter)
|
33
|
+
if fc == 0:
|
34
|
+
return (c, c, i + 1)
|
35
|
+
else:
|
36
|
+
if fa * fc < 0:
|
37
|
+
return (a, c, i + 1)
|
38
|
+
else:
|
39
|
+
return (c, b, i + 1)
|
40
|
+
|
41
|
+
i=0
|
42
|
+
while cond_fun((a, b, i)) and i < max_iter:
|
43
|
+
a, b, i = body_fun((a, b, 0))
|
44
|
+
|
45
|
+
return (a + b) / 2
|
46
|
+
|
47
|
+
@jit(nopython=True)
|
48
|
+
def segment_of_circle(diameter:float, h:float=None, chord:float=None,
|
49
|
+
arc_length:float=None, area:float=None,
|
50
|
+
from_which:int=None, init_val:bool=None,
|
51
|
+
eps:float=1e-8) -> tuple:
|
52
|
+
""" Calcul des caractristiques d'un segment circulaire
|
53
|
+
plus d'infos sur http://mathworld.wolfram.com/CircularSegment.html.
|
54
|
+
|
55
|
+
:param diameter: diamtre du cercle [m]
|
56
|
+
:param h: hauteur du segment [m]
|
57
|
+
:param chord: longueur de la corde [m]
|
58
|
+
:param arc_length: longueur de l'arc soutenu par la corde [m]
|
59
|
+
:param area: aire du sgment [m]
|
60
|
+
:param from_which: variable de calcul sur base de laquelle les autres grandeurs doivent tre values [index dans l'ordre des paramètres (h = 1, area = 4...)]
|
61
|
+
:param init_val: utilise h comme valeur initiale pour le calcul de h depuis A [booléen]
|
62
|
+
"""
|
63
|
+
|
64
|
+
R = diameter / 2.0
|
65
|
+
|
66
|
+
if from_which == 1: # from h
|
67
|
+
# The solution is unique
|
68
|
+
|
69
|
+
d = diameter / 2.0 - h
|
70
|
+
theta = math.acos(1.0 - 2.0 * h / diameter)
|
71
|
+
|
72
|
+
arc_length = theta * diameter
|
73
|
+
chord = math.sqrt(h * (diameter - h))
|
74
|
+
area = theta * diameter**2 / 4.0 - chord * d
|
75
|
+
chord = 2.0 * chord
|
76
|
+
|
77
|
+
elif from_which == 2: # from chord
|
78
|
+
# The solution is not unique --> two possible values for h
|
79
|
+
# Conserve the value of h that is the closest to the previous value of h
|
80
|
+
|
81
|
+
# h1 as root of the quadratic equation
|
82
|
+
h1 = (diameter - math.sqrt(diameter**2 - chord**2)) / 2.0
|
83
|
+
|
84
|
+
if init_val is not None:
|
85
|
+
if init_val:
|
86
|
+
h2 = diameter - h1
|
87
|
+
dh1 = abs(h - h1)
|
88
|
+
dh2 = abs(h + h1 - diameter)
|
89
|
+
|
90
|
+
h = h1 if dh1 < dh2 else h2
|
91
|
+
else:
|
92
|
+
# Conserve the lowest value of h
|
93
|
+
h = h1
|
94
|
+
else:
|
95
|
+
h = h1
|
96
|
+
|
97
|
+
d = diameter / 2.0 - h
|
98
|
+
theta = math.acos(1.0 - 2.0 * h / diameter)
|
99
|
+
|
100
|
+
arc_length = theta * diameter
|
101
|
+
area = theta * diameter**2 / 4.0 - chord /2. * d
|
102
|
+
|
103
|
+
elif from_which == 3: # from arc_length
|
104
|
+
# The solution is unique
|
105
|
+
|
106
|
+
theta = arc_length / diameter
|
107
|
+
h = R * (1.0 - math.cos(theta))
|
108
|
+
d = R - h
|
109
|
+
|
110
|
+
chord = math.sqrt(h * (diameter - h))
|
111
|
+
area = theta * diameter**2 / 4.0 - chord * d
|
112
|
+
chord = 2.0 * chord
|
113
|
+
|
114
|
+
elif from_which in [4,41]: # from area using Newton's method
|
115
|
+
# The solution is unique BUT the calculation is iterative
|
116
|
+
|
117
|
+
cur_error = 1.0
|
118
|
+
|
119
|
+
d2by4 = diameter**2 / 4.0
|
120
|
+
area_max = math.pi * d2by4
|
121
|
+
|
122
|
+
if area == 0.0:
|
123
|
+
h = 0.0
|
124
|
+
chord = 0.0
|
125
|
+
arc_length = 0.0
|
126
|
+
|
127
|
+
elif area_max > area:
|
128
|
+
if init_val is not None:
|
129
|
+
if not init_val or h == 0.0:
|
130
|
+
h = R
|
131
|
+
else:
|
132
|
+
h = R
|
133
|
+
|
134
|
+
while abs(cur_error) > eps:
|
135
|
+
d = R - h
|
136
|
+
theta = math.acos(1.0 - h / R)
|
137
|
+
chord = math.sqrt(h * (diameter - h))
|
138
|
+
area_loc = theta * d2by4 - chord * d
|
139
|
+
dAdh = chord - ((h - R)**2 - d2by4) / (chord + 1e-200)
|
140
|
+
|
141
|
+
cur_error = (area_loc - area) / dAdh
|
142
|
+
if h - cur_error < 0.0:
|
143
|
+
h = h / 2.0
|
144
|
+
elif h - cur_error > diameter:
|
145
|
+
h = (h + diameter) / 2.0
|
146
|
+
else:
|
147
|
+
h = h - cur_error
|
148
|
+
|
149
|
+
chord = 2.0 * chord
|
150
|
+
arc_length = theta * diameter
|
151
|
+
|
152
|
+
else:
|
153
|
+
h = diameter
|
154
|
+
chord = 0.0
|
155
|
+
arc_length = math.pi * diameter
|
156
|
+
|
157
|
+
elif from_which == 42: # from area but using dichotomy rather than Newton-Raphson
|
158
|
+
# The solution is unique BUT the calculation is iterative
|
159
|
+
|
160
|
+
cur_error = 1.0
|
161
|
+
|
162
|
+
d2by4 = diameter**2 / 4.0
|
163
|
+
area_max = math.pi * d2by4
|
164
|
+
|
165
|
+
if area == 0.0:
|
166
|
+
h = 0.0
|
167
|
+
chord = 0.0
|
168
|
+
arc_length = 0.0
|
169
|
+
|
170
|
+
elif area_max > area:
|
171
|
+
if init_val is not None:
|
172
|
+
if not init_val or h == 0.0:
|
173
|
+
h = R
|
174
|
+
else:
|
175
|
+
h = R
|
176
|
+
|
177
|
+
h = dichotomy_A2h(f=A_from_h, a=0., b=diameter, args=(diameter,), tol=eps)
|
178
|
+
|
179
|
+
d = diameter / 2.0 - h
|
180
|
+
theta = math.acos(1.0 - 2.0 * h / diameter)
|
181
|
+
arc_length = theta * diameter
|
182
|
+
chord = math.sqrt(h * (diameter - h))
|
183
|
+
chord = 2.0 * chord
|
184
|
+
|
185
|
+
else:
|
186
|
+
h = diameter
|
187
|
+
chord = 0.0
|
188
|
+
arc_length = math.pi * diameter
|
189
|
+
|
190
|
+
return diameter, h, chord, arc_length, area
|
191
|
+
|
192
|
+
|
193
|
+
if __name__ == '__main__':
|
194
|
+
|
195
|
+
diameter = 10.0
|
196
|
+
h = 5.0
|
197
|
+
chord = -1.
|
198
|
+
arc_length = -1.
|
199
|
+
area = -1.
|
200
|
+
from_which = 1
|
201
|
+
init_val = None
|
202
|
+
|
203
|
+
res1 = segment_of_circle(diameter, h, chord, arc_length, area, from_which, init_val)
|
204
|
+
diameter, h, chord, arc_length, area = res1
|
205
|
+
|
206
|
+
print(f"diameter = {diameter}")
|
207
|
+
print(f"h = {h}")
|
208
|
+
print(f"chord = {chord}")
|
209
|
+
print(f"arc_length = {arc_length}")
|
210
|
+
print(f"area = {area}")
|
211
|
+
|
212
|
+
from_which = 2
|
213
|
+
res2 = segment_of_circle(diameter, h, chord, arc_length, area, from_which, init_val)
|
214
|
+
diameter, h, chord, arc_length, area = res2
|
215
|
+
|
216
|
+
print(f"diameter = {diameter}")
|
217
|
+
print(f"h = {h}")
|
218
|
+
print(f"chord = {chord}")
|
219
|
+
print(f"arc_length = {arc_length}")
|
220
|
+
print(f"area = {area}")
|
221
|
+
|
222
|
+
from_which = 2
|
223
|
+
res2 = segment_of_circle(diameter, h, chord/2., arc_length, area, from_which, False)
|
224
|
+
diameter, h, chord, arc_length, area = res2
|
225
|
+
|
226
|
+
print(f"diameter = {diameter}")
|
227
|
+
print(f"h = {h}")
|
228
|
+
print(f"chord = {chord}")
|
229
|
+
print(f"arc_length = {arc_length}")
|
230
|
+
print(f"area = {area}")
|
231
|
+
|
232
|
+
from_which = 3
|
233
|
+
res3 = segment_of_circle(diameter, h, chord, arc_length, area, from_which, init_val)
|
234
|
+
diameter, h, chord, arc_length, area = res3
|
235
|
+
|
236
|
+
print(f"diameter = {diameter}")
|
237
|
+
print(f"h = {h}")
|
238
|
+
print(f"chord = {chord}")
|
239
|
+
print(f"arc_length = {arc_length}")
|
240
|
+
print(f"area = {area}")
|
241
|
+
|
242
|
+
from_which = 2
|
243
|
+
res2 = segment_of_circle(diameter, h, chord/2., arc_length, area, from_which, init_val)
|
244
|
+
diameter, h, chord, arc_length, area = res2
|
245
|
+
|
246
|
+
print(f"diameter = {diameter}")
|
247
|
+
print(f"h = {h}")
|
248
|
+
print(f"chord = {chord}")
|
249
|
+
print(f"arc_length = {arc_length}")
|
250
|
+
print(f"area = {area}")
|
251
|
+
|
252
|
+
diameter = 10.0
|
253
|
+
h = 1.
|
254
|
+
chord = -1.
|
255
|
+
arc_length = -1.
|
256
|
+
area = 10.0
|
257
|
+
from_which = 4
|
258
|
+
init_val = True
|
259
|
+
|
260
|
+
res4 = segment_of_circle(diameter, h, chord, arc_length, area, from_which, init_val)
|
261
|
+
diameter, h, chord, arc_length, area = res4
|
262
|
+
|
263
|
+
print(f"diameter = {diameter}")
|
264
|
+
print(f"h = {h}")
|
265
|
+
print(f"chord = {chord}")
|
266
|
+
print(f"arc_length = {arc_length}")
|
267
|
+
print(f"area = {area}")
|
268
|
+
|
269
|
+
diameter = 10.0
|
270
|
+
h = -1.
|
271
|
+
chord = -1.
|
272
|
+
arc_length = -1.
|
273
|
+
area = 10.0
|
274
|
+
from_which = 4
|
275
|
+
init_val = False
|
276
|
+
|
277
|
+
res5 = segment_of_circle(diameter, h, chord, arc_length, area, from_which, init_val)
|
278
|
+
diameter, h, chord, arc_length, area = res5
|
279
|
+
|
280
|
+
print(f"diameter = {diameter}")
|
281
|
+
print(f"h = {h}")
|
282
|
+
print(f"chord = {chord}")
|
283
|
+
print(f"arc_length = {arc_length}")
|
284
|
+
print(f"area = {area}")
|
285
|
+
|
286
|
+
diameter = 10.0
|
287
|
+
h = 9.
|
288
|
+
chord = -1.
|
289
|
+
arc_length = -1.
|
290
|
+
area = 10.0
|
291
|
+
from_which = 4
|
292
|
+
init_val = True
|
293
|
+
|
294
|
+
res6 = segment_of_circle(diameter, h, chord, arc_length, area, from_which, init_val)
|
295
|
+
diameter, h, chord, arc_length, area = res6
|
296
|
+
|
297
|
+
print(f"diameter = {diameter}")
|
298
|
+
print(f"h = {h}")
|
299
|
+
print(f"chord = {chord}")
|
300
|
+
print(f"arc_length = {arc_length}")
|
301
|
+
print(f"area = {area}")
|
302
|
+
|
303
|
+
diameter = 10.0
|
304
|
+
h = 2.
|
305
|
+
chord = -1.
|
306
|
+
arc_length = -1.
|
307
|
+
area = 10.0
|
308
|
+
from_which = 4 # from area using Newton's method
|
309
|
+
init_val = True
|
310
|
+
|
311
|
+
res7 = segment_of_circle(diameter, h, chord, arc_length, area, from_which, init_val, eps= 1e-12)
|
312
|
+
diameter, h, chord, arc_length, area = res7
|
313
|
+
|
314
|
+
print(f"diameter = {diameter}")
|
315
|
+
print(f"h = {h}")
|
316
|
+
print(f"chord = {chord}")
|
317
|
+
print(f"arc_length = {arc_length}")
|
318
|
+
print(f"area = {area}")
|
319
|
+
|
320
|
+
diameter = 10.0
|
321
|
+
h = 2.
|
322
|
+
chord = -1.
|
323
|
+
arc_length = -1.
|
324
|
+
area = 10.0
|
325
|
+
from_which = 42 # from area using dichotomy
|
326
|
+
init_val = True
|
327
|
+
|
328
|
+
res8 = segment_of_circle(diameter, h, chord, arc_length, area, from_which, init_val, eps= 1e-12)
|
329
|
+
diameter, h, chord, arc_length, area = res7
|
330
|
+
|
331
|
+
print(f"diameter = {diameter}")
|
332
|
+
print(f"h = {h}")
|
333
|
+
print(f"chord = {chord}")
|
334
|
+
print(f"arc_length = {arc_length}")
|
335
|
+
print(f"area = {area}")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: wolfhece
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.129
|
4
4
|
Author-email: Pierre Archambeau <pierre.archambeau@uliege.be>
|
5
5
|
Project-URL: Homepage, https://uee.uliege.be/hece
|
6
6
|
Project-URL: Issues, https://uee.uliege.be/hece
|
@@ -39,7 +39,7 @@ Requires-Dist: notebook
|
|
39
39
|
Requires-Dist: matplotlib
|
40
40
|
Requires-Dist: mkl
|
41
41
|
Requires-Dist: python-gettext
|
42
|
-
Requires-Dist: shapely
|
42
|
+
Requires-Dist: shapely==2.0.7
|
43
43
|
Requires-Dist: openpyxl
|
44
44
|
Requires-Dist: xlrd
|
45
45
|
Requires-Dist: openkmi
|
@@ -58,7 +58,7 @@ Requires-Dist: numba==0.58.*
|
|
58
58
|
Requires-Dist: xmltodict
|
59
59
|
Requires-Dist: opencv-python
|
60
60
|
Requires-Dist: xarray
|
61
|
-
Requires-Dist: rasterio
|
61
|
+
Requires-Dist: rasterio==1.3.11
|
62
62
|
Requires-Dist: h5py
|
63
63
|
Requires-Dist: exif
|
64
64
|
Requires-Dist: pyglm
|
@@ -69,6 +69,7 @@ Requires-Dist: autograd
|
|
69
69
|
Requires-Dist: plyfile
|
70
70
|
Requires-Dist: tabulate
|
71
71
|
Requires-Dist: ipympl
|
72
|
+
Requires-Dist: contextily
|
72
73
|
|
73
74
|
Ce paquet contient l'interface graphique Python du logiciel WOLF (HECE - ULiège) de même que plusieurs outils de traitements topographique, hydraulique et hydrologique.
|
74
75
|
|
@@ -12,11 +12,11 @@ wolfhece/PyGui.py,sha256=5ANCUmsBwsx_h-GWqV9xwnSQyGJ16mSObOm-h3_7LIQ,144708
|
|
12
12
|
wolfhece/PyGuiHydrology.py,sha256=f60E8K9eGTnRq5RDF6yvt-ahf2AYegwQ9t25zZ2Mk1A,14946
|
13
13
|
wolfhece/PyHydrographs.py,sha256=jwtSNMMACwarxrtN1UeQYth99UNrhwPx1IGgUwcooHA,3774
|
14
14
|
wolfhece/PyPalette.py,sha256=cwoiYMQW8SMgtUvQwXhIYKJ2NNhAfiemKE8npIu4eqc,33724
|
15
|
-
wolfhece/PyParams.py,sha256=
|
15
|
+
wolfhece/PyParams.py,sha256=wVgzJC5Bs8rfx6NdUdcFDtnsaPBYJgRn3A-rROk49MQ,99525
|
16
16
|
wolfhece/PyPictures.py,sha256=m1kY0saW6Y9Q0bDCo47lW6XxDkBrbQG-Fd8uVn8G5ic,2514
|
17
17
|
wolfhece/PyTranslate.py,sha256=4appkmNeHHZLFmUtaA_k5_5QL-5ymxnbVN4R2OblmtE,622
|
18
18
|
wolfhece/PyVertex.py,sha256=qFf8UPvkbwumRRfjpBcgZmqpHtcEtIEoUh30rWFF-lQ,45205
|
19
|
-
wolfhece/PyVertexvectors.py,sha256=
|
19
|
+
wolfhece/PyVertexvectors.py,sha256=2kjtKwdYiGif-NVok8rS9T7Ok8jYMGN4tzy6zXoTxh8,325764
|
20
20
|
wolfhece/PyWMS.py,sha256=WmOzHP02wVcB5RGJAlENL_NzF9rYfvLxslRFyxaEt1Q,6615
|
21
21
|
wolfhece/RatingCurve.py,sha256=bUjIrQjvIjkD4V-z8bZmA6pe1ILtYNM0-3fT6YUY1RU,22498
|
22
22
|
wolfhece/RatingCurveData.py,sha256=5UvnIm89BwqjnEbLCcY3CA8WoFd_xHJbooNy62fX5iY,57660
|
@@ -82,7 +82,7 @@ wolfhece/apps/curvedigitizer.py,sha256=lEJJwgAfulrrWQc-U6ij6sj59hWN3SZl4Yu1kQxVz
|
|
82
82
|
wolfhece/apps/hydrometry.py,sha256=lhhJsFeb4zGL4bNQTs0co85OQ_6ssL1Oy0OUJCzhfYE,656
|
83
83
|
wolfhece/apps/isocurrent.py,sha256=dagmGR8ja9QQ1gwz_8fU-N052hIw-W0mWGVkzLu6C7I,4247
|
84
84
|
wolfhece/apps/splashscreen.py,sha256=SrustmIQeXnsiD-92OzjdGhBi-S7c_j-cSvuX4T6rtg,2929
|
85
|
-
wolfhece/apps/version.py,sha256=
|
85
|
+
wolfhece/apps/version.py,sha256=bTot2RdHq2MShlNmumJbDtXhE0SckmKwrhnLgJVMixc,389
|
86
86
|
wolfhece/apps/wolf.py,sha256=j_CgvsL8rwixbVvVD5Z0s7m7cHZ86gmFLojKGuetMls,729
|
87
87
|
wolfhece/apps/wolf2D.py,sha256=4z_OPQ3IgaLtjexjMKX9ppvqEYyjFLt1hcfFABy3-jU,703
|
88
88
|
wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
|
@@ -118,22 +118,22 @@ wolfhece/fonts/helvetica.ttf,sha256=X4Zd3zdUmuRGMLE6UB-BMIbirpdK3Ia5czfNnuSx5P8,
|
|
118
118
|
wolfhece/fonts/sanserif.ttf,sha256=Nvv5eMgTl5-bWgV37B7E1-vZpAZPNJwjtJSzMNDrl9A,42696
|
119
119
|
wolfhece/ftp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
120
120
|
wolfhece/ftp/downloader.py,sha256=NANzxSzdcp25dFMYin5QA9UnFexNe6-W2AqqTzUE4f4,5223
|
121
|
-
wolfhece/hydrology/Catchment.py,sha256=
|
122
|
-
wolfhece/hydrology/Comparison.py,sha256=
|
121
|
+
wolfhece/hydrology/Catchment.py,sha256=gyj4GtbTbs0L_bBFoQvX1fCdSxfPWBt8hsV46c-lUsM,144461
|
122
|
+
wolfhece/hydrology/Comparison.py,sha256=WBG-NbbtNYgNmCCl9SPTcHf-2XtjRVY-9ohpC2XGkaI,84480
|
123
123
|
wolfhece/hydrology/Dumping.py,sha256=SHGYXr30nMOGPSLArMvAzVxGyLywLf4i267166oUHhQ,2403
|
124
|
-
wolfhece/hydrology/Optimisation.py,sha256=
|
124
|
+
wolfhece/hydrology/Optimisation.py,sha256=soT2TsM443uzqUFYOVDhj2oyLPF6Ob5YhRefSQLKkUM,149243
|
125
125
|
wolfhece/hydrology/Outlet.py,sha256=jdjYN2gIolQJ5prf1wVfxm7cp_YguwQ0JMRsC9ks-Tg,10519
|
126
|
-
wolfhece/hydrology/PostProcessHydrology.py,sha256=
|
126
|
+
wolfhece/hydrology/PostProcessHydrology.py,sha256=GS2dm9ahDb856apXvTM-oyusTn0xj-ySNpKbHa_jQdw,7419
|
127
127
|
wolfhece/hydrology/PyWatershed.py,sha256=a26M6tVe4hrQ-a8FyAx7H9-RZcVCU5BBzFff4_YT0UU,97665
|
128
|
-
wolfhece/hydrology/RetentionBasin.py,sha256=
|
129
|
-
wolfhece/hydrology/SubBasin.py,sha256=
|
128
|
+
wolfhece/hydrology/RetentionBasin.py,sha256=vFvpnomo5h8ZWq3Hq-YlxRnyqyQqHrojABMKzu3RP6E,83358
|
129
|
+
wolfhece/hydrology/SubBasin.py,sha256=wFPehJ0vbZM9nZjEdttuch3Dmt8LzDtRVsF5E8pxM4E,178326
|
130
130
|
wolfhece/hydrology/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
131
|
-
wolfhece/hydrology/constant.py,sha256=
|
132
|
-
wolfhece/hydrology/cst_exchanges.py,sha256=
|
131
|
+
wolfhece/hydrology/constant.py,sha256=0o6l8zwLESlW6G9vYNFlUJV4YhcDq6_jnCN28DNchmU,1634
|
132
|
+
wolfhece/hydrology/cst_exchanges.py,sha256=w83FyI1gOQ5EjTWb9usLfakQAJwv52u8_Hap2Nih570,39593
|
133
133
|
wolfhece/hydrology/data_treatment.py,sha256=vHNtEvXHJOdGHjaNjbTTvVoFQjVee-AdspJEesxVNuQ,34967
|
134
134
|
wolfhece/hydrology/forcedexchanges.py,sha256=MrzMqKISX6G6t3XwkyFQa6tVFfTTC8ifm_nSvrOy5-8,2259
|
135
|
-
wolfhece/hydrology/plot_hydrology.py,sha256=
|
136
|
-
wolfhece/hydrology/read.py,sha256=
|
135
|
+
wolfhece/hydrology/plot_hydrology.py,sha256=nIOPPa_91z6wllCRC8BsEijK_4XMzC7lZHy_OvzesNc,35704
|
136
|
+
wolfhece/hydrology/read.py,sha256=BaaIp1x44wPQz2LkWtzu7ZNKx3Gw_WDtAw-B4y_C2IU,9553
|
137
137
|
wolfhece/hydrology/slope_manager.py,sha256=vlek0z8qcqB61eleiksyOe3QR1vpbtwfeowy6ms7_Fg,5580
|
138
138
|
wolfhece/hydrology/wolfMap_treatment.py,sha256=eAxr24zJGwmDof1aZpcxewVvv_bWDvoO8t9Wwf99Mlo,10606
|
139
139
|
wolfhece/hydrometry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -186,7 +186,7 @@ wolfhece/lazviewer/viewer/qt.conf,sha256=uzoy7MmKYo_uTrNsfMuQ84LgBI5pVOeWXK_rXYM
|
|
186
186
|
wolfhece/lazviewer/viewer/viewer.exe,sha256=pF5nwE8vMWlEzkk-SOekae9zpOsPhTWhZbqaJntumJc,202240
|
187
187
|
wolfhece/lazviewer/viewer/viewer.py,sha256=5igxFDFZMnnnhF3oFbEHKLfgiK4TUgXEZHsgOJbtNY4,25319
|
188
188
|
wolfhece/libs/MSVCP140.dll,sha256=2GrBWBI6JFuSdZLIDMAg_qKcjErdwURGbEYloAypx3o,565640
|
189
|
-
wolfhece/libs/WolfDll.dll,sha256=
|
189
|
+
wolfhece/libs/WolfDll.dll,sha256=iGTdK8Hb4OKxh3xCOuYrK2KCfDlUJGl50FGUP160ddQ,134159360
|
190
190
|
wolfhece/libs/__init__.py,sha256=x7QvPd7hjL-Xl7RjlA8y6rcvKCkYu3JpFE3YnzUJeCY,3326
|
191
191
|
wolfhece/libs/api-ms-win-crt-heap-l1-1-0.dll,sha256=r0euvgZa8vBFoZ8g7H5Upuc8DD6aUQimMJWnIyt1OBo,19720
|
192
192
|
wolfhece/libs/api-ms-win-crt-math-l1-1-0.dll,sha256=ol0GVN6wzqGu8Ym6IXTQ8TvfUvCY06nsNtFeS_swxJk,27912
|
@@ -265,7 +265,7 @@ wolfhece/pythonfortran/example_makendarray.py,sha256=FNPp6lsU9Mv0O8VLN3JHWk5Qn1z
|
|
265
265
|
wolfhece/pythonfortran/example_numpy_memory.py,sha256=o3hzJDw7YtE4v0FXI3-l2VzupCk5xF7-uqlb_Ay8FUQ,3660
|
266
266
|
wolfhece/pythonfortran/tools.py,sha256=oYh9MguRYEGNGKVbHqQW2V9okZJLs3n4Qs-vLWPmBe4,2462
|
267
267
|
wolfhece/radar/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
268
|
-
wolfhece/radar/wolfradar.py,sha256=
|
268
|
+
wolfhece/radar/wolfradar.py,sha256=LM2jfdlclBN5fycL6i1wI2ipIsTfG6wor1A5IwE7JPs,12983
|
269
269
|
wolfhece/rem/REMMaker.py,sha256=zkiAo36MmusPhgv1qJmpDgtoTWbh_eJ6qJqtCfeC1M8,31480
|
270
270
|
wolfhece/rem/RasterViz.py,sha256=fnyMfAJZDoS-rjagsNRGLndS-UYNUzMY4DgenjD3Y_4,29068
|
271
271
|
wolfhece/rem/__init__.py,sha256=S2-J5uEGK_VaMFjRUYFIdSScJjZyuXH4RmMmnG3OG7I,19
|
@@ -288,6 +288,8 @@ wolfhece/shaders/simple_vertex_shader.glsl,sha256=crJlvIx-nNcUpKyK4KpJWR789xG-Rq
|
|
288
288
|
wolfhece/shaders/simple_vertex_shader_mvp.glsl,sha256=4uMy9GFutnVkdwrfe9BdoPVAaFjdKwcX4eKVakug3zg,229
|
289
289
|
wolfhece/shaders/simple_vertex_shader_wo_mvp.glsl,sha256=CT5dr1s0kdL90MtZi22DelFzFVns-w0XcrVbPan6yOc,122
|
290
290
|
wolfhece/shaders/vertex_shader_texture.glsl,sha256=8CmklD7-H57iPWhf5nQpGpqIW1uXvcz2kTBVZh-1F8Q,214
|
291
|
+
wolfhece/shapes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
292
|
+
wolfhece/shapes/circle.py,sha256=UNCgSX-Xa_s64gJdWyouaiXCd2q-7WXvL-GbXAIRKQE,10136
|
291
293
|
wolfhece/sigmoid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
292
294
|
wolfhece/sigmoid/circle_jax.py,sha256=3CrOViLTvt6ZtQPY_1rOe0Qp_AgwdOKhWwpbG5vBki0,4305
|
293
295
|
wolfhece/sigmoid/circle_jax_copilot.py,sha256=fF8vwY_q_i8_u-anGpVXJ5aZEdx3KC3kuYsZZlaGZwE,5952
|
@@ -301,8 +303,8 @@ wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=8PlMYrb_8jI8h9F0_EagpM
|
|
301
303
|
wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=ORy7fz4dcp691qKzaOZHrRLZ0uXNhL-LIHxmpDGL6BI,5007
|
302
304
|
wolfhece/wintab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
303
305
|
wolfhece/wintab/wintab.py,sha256=8A-JNONV6ujgsgG3lM5Uw-pVgglPATwKs86oBzzljoc,7179
|
304
|
-
wolfhece-2.1.
|
305
|
-
wolfhece-2.1.
|
306
|
-
wolfhece-2.1.
|
307
|
-
wolfhece-2.1.
|
308
|
-
wolfhece-2.1.
|
306
|
+
wolfhece-2.1.129.dist-info/METADATA,sha256=RFHPYSX_-2KsN3-nviEAZbMzvwmC2z1aXOjGR1E24BA,2558
|
307
|
+
wolfhece-2.1.129.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
308
|
+
wolfhece-2.1.129.dist-info/entry_points.txt,sha256=ZZ-aSfbpdcmo-wo84lRFzBN7LaSnD1XRGSaAKVX-Gpc,522
|
309
|
+
wolfhece-2.1.129.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
|
310
|
+
wolfhece-2.1.129.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|