wolfhece 2.2.15__py3-none-any.whl → 2.2.16__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/Model1D.py +12 -12
- wolfhece/PyDraw.py +1 -1
- wolfhece/PyGui.py +9 -1
- wolfhece/__init__.py +1 -1
- wolfhece/apps/version.py +1 -1
- wolfhece/apps/wolf.py +1 -1
- wolfhece/assets/__init__.py +0 -1
- wolfhece/assets/mesh.py +685 -0
- wolfhece/friction_law.py +3 -3
- wolfhece/hydrology/SubBasin.py +154 -154
- wolfhece/hydrometry/kiwis.py +55 -16
- wolfhece/hydrometry/kiwis_wolfgui.py +8 -7
- wolfhece/lazviewer/laz_viewer.py +4 -4
- wolfhece/mesh2d/wolf2dprev.py +23 -0
- wolfhece/pyshields.py +38 -2
- wolfhece/wolf_array.py +19 -16
- wolfhece/wolfresults_2D.py +220 -74
- {wolfhece-2.2.15.dist-info → wolfhece-2.2.16.dist-info}/METADATA +2 -3
- {wolfhece-2.2.15.dist-info → wolfhece-2.2.16.dist-info}/RECORD +22 -21
- {wolfhece-2.2.15.dist-info → wolfhece-2.2.16.dist-info}/WHEEL +0 -0
- {wolfhece-2.2.15.dist-info → wolfhece-2.2.16.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.2.15.dist-info → wolfhece-2.2.16.dist-info}/top_level.txt +0 -0
wolfhece/Model1D.py
CHANGED
@@ -1860,7 +1860,7 @@ class Creator_1D:
|
|
1860
1860
|
format ='zones',
|
1861
1861
|
save_as: str='',
|
1862
1862
|
return_list = True) -> list[crosssections]: # FIXME list of cross sections
|
1863
|
-
"""
|
1863
|
+
r"""
|
1864
1864
|
Save each `Zone` in `Zones` as a cross sections file and,
|
1865
1865
|
return a list of cross sections.
|
1866
1866
|
|
@@ -2530,7 +2530,7 @@ class Creator_1D:
|
|
2530
2530
|
return file_path
|
2531
2531
|
|
2532
2532
|
def count_lists_in_list(self, lst: list[list], nodes_1D = False) -> int:
|
2533
|
-
"""
|
2533
|
+
r"""
|
2534
2534
|
Return the sum of lengths of lists in a list.
|
2535
2535
|
- /!\ Attention for 1D nodes (nodes_1D),
|
2536
2536
|
the number of nodes is the number
|
@@ -2602,7 +2602,7 @@ class Creator_1D:
|
|
2602
2602
|
def _write_relations_profiles(self,
|
2603
2603
|
crosses:list[list[profile]],
|
2604
2604
|
save_as:str) -> None:
|
2605
|
-
"""
|
2605
|
+
r"""
|
2606
2606
|
/!\ Has been deprecated.
|
2607
2607
|
|
2608
2608
|
- Write the HSPW (Heigh, wetted Section, wetted Perimeter, top Width)relations
|
@@ -2680,7 +2680,7 @@ class Creator_1D:
|
|
2680
2680
|
def __write_relations_profiles(self,
|
2681
2681
|
crosses:list[list[profile]],
|
2682
2682
|
save_as:str) -> None:
|
2683
|
-
"""
|
2683
|
+
r"""
|
2684
2684
|
/!\ Has been deprecated.
|
2685
2685
|
|
2686
2686
|
- Write the HSPW (Height, wetted Section, wetted Perimeter, top Width)relations
|
@@ -3285,7 +3285,7 @@ class Creator_1D:
|
|
3285
3285
|
raise Exception('Define a writing a method!')
|
3286
3286
|
|
3287
3287
|
def read_hydrograph_from_textfile(self, file:str)-> list[list[list,list]]: # FIXME nameread discharges from
|
3288
|
-
"""
|
3288
|
+
r"""
|
3289
3289
|
Return a hydrograph from a text file.
|
3290
3290
|
/!\ The file should be on the wolf hydrograph format.
|
3291
3291
|
|
@@ -3401,7 +3401,7 @@ class Creator_1D:
|
|
3401
3401
|
save_as: str,
|
3402
3402
|
writing_method: Literal['continuous', 'stepwise'] = 'continuous',
|
3403
3403
|
epsilon:float = 0.01):
|
3404
|
-
"""
|
3404
|
+
r"""
|
3405
3405
|
- Write the infiltration files (.inf, .infil, .tv) and,
|
3406
3406
|
- Apply the preprocessing mode to the hydrographs before writing them.
|
3407
3407
|
|
@@ -4201,7 +4201,7 @@ class Creator_1D:
|
|
4201
4201
|
raise Exception(_('Bad type of boundary condition.'))
|
4202
4202
|
|
4203
4203
|
def write_width_file(self, crosses:list[list[profile]], width:float , save_as:str):
|
4204
|
-
'''
|
4204
|
+
r'''
|
4205
4205
|
Write the width file (.width file).
|
4206
4206
|
- The width is constant for all the profiles
|
4207
4207
|
|
@@ -4597,7 +4597,7 @@ class Creator_1D:
|
|
4597
4597
|
logging.info(f'{directory} removed.')
|
4598
4598
|
|
4599
4599
|
def find_1D_binary_results(self, directory:str) -> tuple[str]: #FIXME find why self is not working
|
4600
|
-
"""
|
4600
|
+
r"""
|
4601
4601
|
/!\ This method has been deprecated.
|
4602
4602
|
Return a tuple containing the paths to the model:
|
4603
4603
|
|
@@ -4627,7 +4627,7 @@ class Creator_1D:
|
|
4627
4627
|
return (head_file,results_depths, results_discharges, results_wetted_sections)
|
4628
4628
|
|
4629
4629
|
def read_1D_binary_results(self, results: list[str]) -> tuple[np.ndarray]:
|
4630
|
-
'''
|
4630
|
+
r'''
|
4631
4631
|
/!\ This method has been deprecated. Check the the class` Wolfresults_1D` for the new implementation.
|
4632
4632
|
Return a tuple containing the simulated results as numpy arrays in this order:
|
4633
4633
|
- 0. Nodes coordinates (np.ndarray),
|
@@ -4701,7 +4701,7 @@ class Creator_1D:
|
|
4701
4701
|
landmark:Zones = None,
|
4702
4702
|
banks: Zones = None,
|
4703
4703
|
dpi: float = Constants.DPI.value ) -> None:
|
4704
|
-
"""
|
4704
|
+
r"""
|
4705
4705
|
/!\ This method has been deprecated. Check the the class` Wolfresults_1D` for the new implementation.
|
4706
4706
|
Plot the results of 1D model either:
|
4707
4707
|
- as a gif (evolution of all parameters)
|
@@ -5040,7 +5040,7 @@ class Creator_1D:
|
|
5040
5040
|
which_nodes:list[int] = [0,-1],
|
5041
5041
|
save_as:str ='',
|
5042
5042
|
figure_size = (20,10)):
|
5043
|
-
"""
|
5043
|
+
r"""
|
5044
5044
|
/!\ This method has been deprecated. Check the the class` Wolfresults_1D` for the new implementation.
|
5045
5045
|
|
5046
5046
|
Plot the hydrographs of the nodes.
|
@@ -8907,7 +8907,7 @@ class Wolfresults_1D:
|
|
8907
8907
|
figsize:tuple = (20,10),
|
8908
8908
|
alpha:float = 0.3,
|
8909
8909
|
save_as:str=''):
|
8910
|
-
"""
|
8910
|
+
r"""
|
8911
8911
|
/!\ Deprecating
|
8912
8912
|
Animate the selected variables in figures, save them as a file and
|
8913
8913
|
return the information associated with their axes.
|
wolfhece/PyDraw.py
CHANGED
@@ -998,7 +998,7 @@ class Sim_Explorer(wx.Frame):
|
|
998
998
|
secax.tick_params(axis='x', rotation=30)
|
999
999
|
|
1000
1000
|
ax[1].plot(main_x, self.active_res2d.all_dt, 'o-')
|
1001
|
-
ax[1].set_ylabel(_('$\Delta t$ [s]'), fontsize=8)
|
1001
|
+
ax[1].set_ylabel(_(r'$\Delta t$ [s]'), fontsize=8)
|
1002
1002
|
ax[1].grid(which='both')
|
1003
1003
|
ax[1].set_xticks(main_x)
|
1004
1004
|
ax[1].set_xticklabels([])
|
wolfhece/PyGui.py
CHANGED
@@ -155,6 +155,8 @@ class GenMapManager(wx.Frame):
|
|
155
155
|
class MapManager(GenMapManager):
|
156
156
|
|
157
157
|
def __init__(self,*args, **kw):
|
158
|
+
|
159
|
+
logging.info("MapManager")
|
158
160
|
super().__init__(*args, **kw)
|
159
161
|
|
160
162
|
icon = wx.Icon()
|
@@ -181,7 +183,7 @@ class MapManager(GenMapManager):
|
|
181
183
|
except:
|
182
184
|
logging.error("No icon for the log window")
|
183
185
|
|
184
|
-
|
186
|
+
logging.info("MapManager - MapViewer created")
|
185
187
|
# Set directory for hydrometry data, relative to the current file
|
186
188
|
dir_data = Path(__file__).parent / "data"
|
187
189
|
dir_hydro = dir_data / "hydrometry"
|
@@ -196,11 +198,16 @@ class MapManager(GenMapManager):
|
|
196
198
|
if not dir_picc.exists():
|
197
199
|
dir_picc.mkdir(parents=True, exist_ok=True)
|
198
200
|
|
201
|
+
logging.info("MapManager - Data directories created")
|
199
202
|
try:
|
200
203
|
self.SPWhydrometry = hydrometry_wolfgui(dir=dir_hydro, idx = 'SPW hydrometry', mapviewer=self.mapviewer, parent = self, plotted=False)
|
204
|
+
logging.info("MapManager - hydrometry_wolfgui created")
|
201
205
|
self.picc = Picc_data(data_dir=dir_picc, mapviewer=self.mapviewer)
|
206
|
+
logging.info("MapManager - Picc_data created")
|
202
207
|
self.cadaster = Cadaster_data(data_dir=dir_cadaster, mapviewer=self.mapviewer)
|
208
|
+
logging.info("MapManager - Cadaster_data created")
|
203
209
|
self.landmaps = PlansTerrier(mapviewer=self.mapviewer, parent = self, idx='LandMaps', plotted=True)
|
210
|
+
logging.info("MapManager - PlansTerrier created")
|
204
211
|
|
205
212
|
self.mapviewer.add_object(which='other',
|
206
213
|
newobj=self.SPWhydrometry,
|
@@ -225,6 +232,7 @@ class MapManager(GenMapManager):
|
|
225
232
|
logging.warning("Can't load some data (hydrometry, picc, cadaster, landmaps) -- Please check the data directories and/or report the issue")
|
226
233
|
|
227
234
|
self.mapviewer.menu_walous()
|
235
|
+
logging.info("MapManager - Menu Walous created")
|
228
236
|
|
229
237
|
# class GPU2DModel(GenMapManager):
|
230
238
|
|
wolfhece/__init__.py
CHANGED
@@ -7,7 +7,7 @@ try:
|
|
7
7
|
ogr.UseExceptions()
|
8
8
|
osr.UseExceptions()
|
9
9
|
except ImportError as e:
|
10
|
-
print(e)
|
10
|
+
# print(e)
|
11
11
|
raise Exception(_('Error importing GDAL library\nPlease ensure GDAL is installed and the Python bindings are available\n\ngdal wheels can be found at https://github.com/cgohlke/geospatial-wheels'))
|
12
12
|
|
13
13
|
from .apps.version import WolfVersion
|
wolfhece/apps/version.py
CHANGED
wolfhece/apps/wolf.py
CHANGED
@@ -8,10 +8,10 @@ This script and its content are protected by copyright law. Unauthorized
|
|
8
8
|
copying or distribution of this file, via any medium, is strictly prohibited.
|
9
9
|
"""
|
10
10
|
|
11
|
+
import ctypes
|
11
12
|
import wx
|
12
13
|
from ..PyTranslate import _
|
13
14
|
|
14
|
-
import ctypes
|
15
15
|
myappid = 'wolf_hece_uliege' # arbitrary string
|
16
16
|
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
|
17
17
|
|
wolfhece/assets/__init__.py
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
from . import _add_path
|