wolfhece 2.0.5__py3-none-any.whl → 2.0.6__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.
Files changed (39) hide show
  1. wolfhece/GraphNotebook.py +0 -1
  2. wolfhece/GraphProfile.py +5 -14
  3. wolfhece/Lidar2002.py +0 -1
  4. wolfhece/PyCrosssections.py +21 -26
  5. wolfhece/PyDraw.py +219 -58
  6. wolfhece/PyGui.py +6 -3
  7. wolfhece/PyPalette.py +2 -2
  8. wolfhece/PyParams.py +48 -48
  9. wolfhece/PyVertex.py +1 -1
  10. wolfhece/PyVertexvectors.py +40 -4
  11. wolfhece/Results2DGPU.py +7 -6
  12. wolfhece/bernoulli/NetworkOpenGL.py +1 -1
  13. wolfhece/cli.py +7 -0
  14. wolfhece/flow_SPWMI.py +1 -1
  15. wolfhece/friction_law.py +6 -6
  16. wolfhece/gpuview.py +1 -1
  17. wolfhece/hydrology/PyWatershed.py +9 -10
  18. wolfhece/lagrangian/emitter.py +1 -1
  19. wolfhece/lagrangian/example_domain.py +1 -1
  20. wolfhece/lagrangian/velocity_field.py +4 -4
  21. wolfhece/libs/WolfDll.dll +0 -0
  22. wolfhece/libs/WolfDll_CD.dll +0 -0
  23. wolfhece/libs/WolfOGL.c +28187 -28187
  24. wolfhece/mesh2d/bc_manager.py +89 -13
  25. wolfhece/mesh2d/cst_2D_boundary_conditions.py +12 -0
  26. wolfhece/mesh2d/wolf2dprev.py +1 -2
  27. wolfhece/pydike.py +1 -1
  28. wolfhece/pyshields.py +43 -43
  29. wolfhece/pywalous.py +2 -2
  30. wolfhece/scenario/config_manager.py +3 -1
  31. wolfhece/ui/wolf_multiselection_collapsiblepane.py +10 -10
  32. wolfhece/wolf_array.py +1298 -418
  33. wolfhece/wolf_texture.py +1 -1
  34. wolfhece/wolfresults_2D.py +124 -19
  35. {wolfhece-2.0.5.dist-info → wolfhece-2.0.6.dist-info}/METADATA +1 -1
  36. {wolfhece-2.0.5.dist-info → wolfhece-2.0.6.dist-info}/RECORD +39 -38
  37. {wolfhece-2.0.5.dist-info → wolfhece-2.0.6.dist-info}/WHEEL +0 -0
  38. {wolfhece-2.0.5.dist-info → wolfhece-2.0.6.dist-info}/entry_points.txt +0 -0
  39. {wolfhece-2.0.5.dist-info → wolfhece-2.0.6.dist-info}/top_level.txt +0 -0
wolfhece/PyParams.py CHANGED
@@ -66,8 +66,8 @@ def new_json(values:dict, fullcomment:str='') -> dict:
66
66
  """
67
67
  Create a new JSON string from values and fullcomment
68
68
 
69
- @param values : values to store in the JSON string - dict of key:value - value must be integer
70
- @param fullcomment : full comment to store in the JSON string - str - can be multiline with \n
69
+ :param values : values to store in the JSON string - dict of key:value - value must be integer
70
+ :param fullcomment : full comment to store in the JSON string - str - can be multiline with \n
71
71
  """
72
72
  return {"Values":values, "Full_Comment":fullcomment}
73
73
 
@@ -75,10 +75,10 @@ def new_infos_incr(groupname:str= None, paramname:str='nb', min:int=1, max:int=1
75
75
  """
76
76
  Create a new string for an incrementable group or parameter
77
77
 
78
- @param groupname : name of the reference group (optional) -- if ommitted, the reference group is in the same group as the parameter
79
- @param paramname : name of the reference parameter
80
- @param min : minimum value
81
- @param max : maximum value
78
+ :param groupname : name of the reference group (optional) -- if ommitted, the reference group is in the same group as the parameter
79
+ :param paramname : name of the reference parameter
80
+ :param min : minimum value
81
+ :param max : maximum value
82
82
  """
83
83
  if groupname is None:
84
84
  return paramname, str(min), str(max)
@@ -287,16 +287,16 @@ class Wolf_Param(wx.Frame):
287
287
  """
288
288
  Initialisation
289
289
 
290
- @param parent : parent frame (wx.Window)
291
- @param title : title of the frame
292
- @param w : width of the frame
293
- @param h : height of the frame
294
- @param ontop : if True, the frame will be on top of all other windows
295
- @param to_read : if True, the file will be read
296
- @param filename : filename to read
297
- @param withbuttons : if True, buttons will be displayed
298
- @param DestroyAtClosing : if True, the frame will be destroyed when closed
299
- @param toShow : if True, the frame will be displayed
290
+ :param parent : parent frame (wx.Window)
291
+ :param title : title of the frame
292
+ :param w : width of the frame
293
+ :param h : height of the frame
294
+ :param ontop : if True, the frame will be on top of all other windows
295
+ :param to_read : if True, the file will be read
296
+ :param filename : filename to read
297
+ :param withbuttons : if True, buttons will be displayed
298
+ :param DestroyAtClosing : if True, the frame will be destroyed when closed
299
+ :param toShow : if True, the frame will be displayed
300
300
 
301
301
 
302
302
  Callbacks (see 'set_callbacks'):
@@ -392,15 +392,15 @@ class Wolf_Param(wx.Frame):
392
392
 
393
393
  To activate a parameter, double-click on it in the default tab. It will be copied to the active tab and the value will be modifiable.
394
394
 
395
- @param parent : parent frame
396
- @param title : title of the frame
397
- @param w : width of the frame
398
- @param h : height of the frame
399
- @param ontop : if True, the frame will be on top of all other windows
400
- @param to_read : if True, the file will be read
401
- @param withbuttons : if True, buttons will be displayed
402
- @param DestroyAtClosing : if True, the frame will be destroyed when closed
403
- @param toShow : if True, the frame will be displayed
395
+ :param parent : parent frame
396
+ :param title : title of the frame
397
+ :param w : width of the frame
398
+ :param h : height of the frame
399
+ :param ontop : if True, the frame will be on top of all other windows
400
+ :param to_read : if True, the file will be read
401
+ :param withbuttons : if True, buttons will be displayed
402
+ :param DestroyAtClosing : if True, the frame will be destroyed when closed
403
+ :param toShow : if True, the frame will be displayed
404
404
 
405
405
  """
406
406
 
@@ -608,11 +608,11 @@ class Wolf_Param(wx.Frame):
608
608
  """
609
609
  Routine interne de MAJ d'un paramètre
610
610
 
611
- @param group : nom du groupe
612
- @param param_name : nom du paramètre
613
- @param isIncrementable : True si le paramètre est incrémentable
614
- @param genGroup : generic name of an incrementable group
615
- @param genParam : generic name of an incrementable param
611
+ :param group : nom du groupe
612
+ :param param_name : nom du paramètre
613
+ :param isIncrementable : True si le paramètre est incrémentable
614
+ :param genGroup : generic name of an incrementable group
615
+ :param genParam : generic name of an incrementable param
616
616
 
617
617
  """
618
618
 
@@ -1151,12 +1151,12 @@ class Wolf_Param(wx.Frame):
1151
1151
  """
1152
1152
  Add or update a parameter
1153
1153
 
1154
- @param groupname : groupe in which the new param will be strored - If it does not exist, it will be created
1155
- @param name : param's name - If it does not exist, it will be created
1156
- @param value : param'a value
1157
- @param type : type -> will influence the GUI
1158
- @param comment : param's comment -- helpful to understand the parameter
1159
- @param jsonstr : string containing JSON data -- used in GUI
1154
+ :param groupname : groupe in which the new param will be strored - If it does not exist, it will be created
1155
+ :param name : param's name - If it does not exist, it will be created
1156
+ :param value : param'a value
1157
+ :param type : type -> will influence the GUI
1158
+ :param comment : param's comment -- helpful to understand the parameter
1159
+ :param jsonstr : string containing JSON data -- used in GUI
1160
1160
  param whichdict : where to store the param -- Default, Active or All, or IncGroup if the param is part of an incrementable group
1161
1161
 
1162
1162
  jsonstr can be a dict i.e. '{"Values":{choice1:1, choice2:2, choice3:3}, "Full_Comment":'Yeah baby !'}'
@@ -1633,14 +1633,14 @@ class Wolf_Param(wx.Frame):
1633
1633
  """
1634
1634
  Ajout d'un paramètre incrémentable
1635
1635
 
1636
- @param group: nom du groupe
1637
- @param name: nom du paramètre
1638
- @param value: valeur du paramètre
1639
- @param comment: commentaire du paramètre
1640
- @param type: type du paramètre
1641
- @param min: valeur minimale
1642
- @param max: valeur maximale
1643
- @param refParam: nom du paramètre contenant le nombre de paramètres - doit être dans le même groupe
1636
+ :param group: nom du groupe
1637
+ :param name: nom du paramètre
1638
+ :param value: valeur du paramètre
1639
+ :param comment: commentaire du paramètre
1640
+ :param type: type du paramètre
1641
+ :param min: valeur minimale
1642
+ :param max: valeur maximale
1643
+ :param refParam: nom du paramètre contenant le nombre de paramètres - doit être dans le même groupe
1644
1644
 
1645
1645
  """
1646
1646
 
@@ -1737,10 +1737,10 @@ class Wolf_Param(wx.Frame):
1737
1737
  """
1738
1738
  Routine interne de mise à jour d'un seul paramétre incrémentable
1739
1739
 
1740
- @param curIncParam : nom du paramètre incrémentable - contient $n$ à remplacer par le numéro
1741
- @param curGroup : nom du groupe de référence - ! peut être un groupe icrémentable !
1742
- @param genGroup : nom du groupe générique dans lequel sont stockés les informations sur le paramètre (key, value, min, max, ...)
1743
- @param withGUI : True si on est en mode GUI
1740
+ :param curIncParam : nom du paramètre incrémentable - contient $n$ à remplacer par le numéro
1741
+ :param curGroup : nom du groupe de référence - ! peut être un groupe icrémentable !
1742
+ :param genGroup : nom du groupe générique dans lequel sont stockés les informations sur le paramètre (key, value, min, max, ...)
1743
+ :param withGUI : True si on est en mode GUI
1744
1744
 
1745
1745
  """
1746
1746
 
wolfhece/PyVertex.py CHANGED
@@ -5,7 +5,7 @@ try:
5
5
  except:
6
6
  msg=_('Error importing OpenGL library')
7
7
  msg+=_(' Python version : ' + sys.version)
8
- msg+=_(' Please check your version of opengl32.dll -- conflict may exist between different fils present on your desktop')
8
+ msg+=_(' Please check your version of opengl32.dll -- conflict may exist between different files present on your desktop')
9
9
  raise Exception(msg)
10
10
 
11
11
  import math
@@ -21,8 +21,8 @@ import geopandas as gpd
21
21
  import io
22
22
  from typing import Union, Literal
23
23
 
24
- from .textpillow import Font_Priority
25
24
  from .PyTranslate import _
25
+ from .textpillow import Font_Priority
26
26
  from .CpGrid import CpGrid
27
27
  from .PyVertex import wolfvertex,getIfromRGB,getRGBfromI
28
28
  from .PyParams import Wolf_Param, key_Param, Type_Param
@@ -417,8 +417,8 @@ class vectorproperties:
417
417
  """
418
418
  Init the vector properties -- Compatibility with VB6, Fortran codes --> Modify with care
419
419
 
420
- @param lines: list of lines from a file
421
- @param parent: parent vector
420
+ :param lines: list of lines from a file
421
+ :param parent: parent vector
422
422
  """
423
423
 
424
424
  self.parent:vector
@@ -796,6 +796,39 @@ class vector:
796
796
  if fromshapely is not None:
797
797
  self.import_shapelyobj(fromshapely)
798
798
 
799
+
800
+ def get_normal_segments(self) -> np.ndarray:
801
+ """
802
+ Return the normals of each segment
803
+
804
+ The normals are oriented to the left
805
+ """
806
+
807
+ if self.nbvertices<2:
808
+ return None
809
+
810
+ xy = self.asnparray()
811
+ delta = xy[1:]-xy[:-1]
812
+ norm = np.sqrt(delta[:,0]**2+delta[:,1]**2)
813
+ normals = np.zeros_like(delta)
814
+ notnull = np.where(norm!=0)
815
+ normals[notnull,0] = -delta[notnull,1]/norm[notnull]
816
+ normals[notnull,1] = delta[notnull,0]/norm[notnull]
817
+
818
+ return normals
819
+
820
+ def get_center_segments(self) -> np.ndarray:
821
+ """
822
+ Return the center of each segment
823
+ """
824
+
825
+ if self.nbvertices<2:
826
+ return None
827
+
828
+ xy = self.asnparray()
829
+ centers = (xy[1:]+xy[:-1])/2.
830
+ return centers
831
+
799
832
  @property
800
833
  def nbvertices(self) -> int:
801
834
  return len(self.myvertices)
@@ -1083,6 +1116,9 @@ class vector:
1083
1116
  """
1084
1117
  Ajout de vertices depuis une matrice numpy -- shape = (nb_vert,2 ou 3)
1085
1118
  """
1119
+ if xyz.dtype==np.int32:
1120
+ xyz = xyz.astype(np.float64)
1121
+
1086
1122
  if xyz.shape[1]==3:
1087
1123
  for cur in xyz:
1088
1124
  self.add_vertex(wolfvertex(cur[0], cur[1], cur[2]))
@@ -2077,7 +2113,7 @@ class zone:
2077
2113
  self.ymin=minsy[0]
2078
2114
  self.ymax=maxsy[0]
2079
2115
 
2080
- def plot(self,prep=False):
2116
+ def plot(self, prep:bool=False):
2081
2117
  """
2082
2118
  Graphique OpenGL
2083
2119
  """
wolfhece/Results2DGPU.py CHANGED
@@ -281,6 +281,8 @@ class wolfres2DGPU(Wolfresults_2D):
281
281
 
282
282
  self.loaded_rough = True
283
283
 
284
+ self.head_blocks[getkeyblock(0)] = curblock.top.get_header()
285
+
284
286
  to_check =[curblock.waterdepth, curblock.qx, curblock.qy, curblock.rough_n]
285
287
  check = False
286
288
  for curarray in to_check:
@@ -351,9 +353,9 @@ class wolfres2DGPU(Wolfresults_2D):
351
353
 
352
354
  curblock = self.myblocks[getkeyblock(1,False)]
353
355
  if self.epsilon > 0.:
354
- curblock.waterdepth.array=ma.masked_less_equal(wd_np.astype(np.float32).T,self.epsilon)
356
+ curblock.waterdepth.array=ma.masked_less_equal(wd_np.astype(np.float32).T, self.epsilon)
355
357
  else:
356
- curblock.waterdepth.array=ma.masked_equal(wd_np.astype(np.float32).T,0.)
358
+ curblock.waterdepth.array=ma.masked_equal(wd_np.astype(np.float32).T, 0.)
357
359
 
358
360
  curblock.qx.array=ma.masked_where(curblock.waterdepth.array.mask,qx_np.astype(np.float32).T)
359
361
  curblock.qy.array=ma.masked_where(curblock.waterdepth.array.mask,qy_np.astype(np.float32).T)
@@ -362,10 +364,9 @@ class wolfres2DGPU(Wolfresults_2D):
362
364
  curblock.qx.count()
363
365
  curblock.qy.count()
364
366
 
365
- if self.epsilon > 0.:
366
- curblock.waterdepth.set_nullvalue_in_mask()
367
- curblock.qx.set_nullvalue_in_mask()
368
- curblock.qy.set_nullvalue_in_mask()
367
+ curblock.waterdepth.set_nullvalue_in_mask()
368
+ curblock.qx.set_nullvalue_in_mask()
369
+ curblock.qy.set_nullvalue_in_mask()
369
370
 
370
371
  self.current_result = which
371
372
  self.loaded=True
@@ -24,7 +24,7 @@ try:
24
24
  except:
25
25
  msg=_('Error importing OpenGL library')
26
26
  msg+=_(' Python version : ' + sys.version)
27
- msg+=_(' Please check your version of opengl32.dll -- conflict may exist between different fils present on your desktop')
27
+ msg+=_(' Please check your version of opengl32.dll -- conflict may exist between different files present on your desktop')
28
28
  raise Exception(msg)
29
29
 
30
30
  from ..PyTranslate import _
wolfhece/cli.py CHANGED
@@ -1,29 +1,36 @@
1
1
 
2
2
  def wolf():
3
+ """ Main wolf application : Map Manager"""
3
4
  from .apps.wolf import main
4
5
  main()
5
6
 
6
7
  def wolf2d():
8
+ """ Application for 2D simuations """
7
9
  from .apps.wolf2D import main
8
10
  main()
9
11
 
10
12
  def digitizer():
13
+ """ Application for digitizing curves """
11
14
  from .apps.curvedigitizer import main
12
15
  main()
13
16
 
14
17
  def params():
18
+ """ Application for managing parameters in WOLF format """
15
19
  from .apps.ManageParams import main
16
20
  main()
17
21
 
18
22
  def optihydro():
23
+ """ Application for hydrological optimisation """
19
24
  from .apps.Optimisation_hydro import main
20
25
  main()
21
26
 
22
27
  def hydro():
28
+ """ Application for hydrological simulations """
23
29
  from .apps.wolfhydro import main
24
30
  main()
25
31
 
26
32
  def compare():
33
+ """ Application for comparing 2D arrays """
27
34
  from .apps.wolfcompare2Darrays import main
28
35
  from PyTranslate import _
29
36
  from wolf_array import WolfArray
wolfhece/flow_SPWMI.py CHANGED
@@ -570,7 +570,7 @@ class SPW_MI_flows():
570
570
  Le résultat est écrit dans des fichiers .csv dans le répertoire passé en argument
571
571
  Il est possible de restreindre le téléchargement entre deux années passées en argument
572
572
  Il est également possible de redémarrer le téléchargement depuis un index de station si l'opération s'est interrompue
573
- @param
573
+ :param
574
574
  """
575
575
  dirout=normpath(dirout)
576
576
  mystations = list(self.code2name.keys())
wolfhece/friction_law.py CHANGED
@@ -3,8 +3,8 @@ import math
3
3
  def f_barr_bathurst(k_sur_D,reynolds):
4
4
  """
5
5
  !> Evaluation du coefficient de frottement par Barr-Bathurst
6
- !! @param k_sur_D : rugosité relative [-]
7
- !! @param reynolds : nombre de Reynolds [-] au sens des conduites circulaires --> ATTENTION quand cette fonction est utilisée pour des écoulements à surface libre : Re' = 4*Re
6
+ !! :param k_sur_D : rugosité relative [-]
7
+ !! :param reynolds : nombre de Reynolds [-] au sens des conduites circulaires --> ATTENTION quand cette fonction est utilisée pour des écoulements à surface libre : Re' = 4*Re
8
8
  !! @author Louis Goffin
9
9
  !! @author Pierre Archambeau
10
10
  !!
@@ -44,8 +44,8 @@ def f_barr_bathurst(k_sur_D,reynolds):
44
44
  def f_colebrook(k_sur_D,reynolds):
45
45
  """
46
46
  !> Evaluation du coefficient de frottement par Colebrook
47
- !! @param k_sur_D : rugosité relative [-]
48
- !! @param reynolds : nombre de Reynolds [-] au sens des conduites circulaires --> ATTENTION quand cette fonction est utilisée pour des écoulements à surface libre : Re' = 4*Re
47
+ !! :param k_sur_D : rugosité relative [-]
48
+ !! :param reynolds : nombre de Reynolds [-] au sens des conduites circulaires --> ATTENTION quand cette fonction est utilisée pour des écoulements à surface libre : Re' = 4*Re
49
49
  !! @author Pierre Archambeau
50
50
  !!
51
51
  !! Formule implicite de Colebrook : \f$ \sqrt {\frac{1}{f}} = - 2\log \left[ {\frac{k}{{3,7D}} + \frac{{2,51}}{{Re \sqrt f }}} \right] = - 2\log \left[ {\frac{k}{{14,8{R_h}}} + \frac{{2,51}}{{Re \sqrt f }}} \right] \f$
@@ -82,8 +82,8 @@ def f_colebrook(k_sur_D,reynolds):
82
82
  def f_colebrook_pure(k_sur_D,reynolds):
83
83
  """
84
84
  !> Evaluation du coefficient de frottement par Colebrook - pas de test si laminaire
85
- !! @param k_sur_D : rugosité relative [-]
86
- !! @param reynolds : nombre de Reynolds [-] au sens des conduites circulaires --> ATTENTION quand cette fonction est utilisée pour des écoulements à surface libre : Re' = 4*Re
85
+ !! :param k_sur_D : rugosité relative [-]
86
+ !! :param reynolds : nombre de Reynolds [-] au sens des conduites circulaires --> ATTENTION quand cette fonction est utilisée pour des écoulements à surface libre : Re' = 4*Re
87
87
  !! @author Pierre Archambeau
88
88
  !!
89
89
  !! Formule implicite de Colebrook : \f$ \sqrt {\frac{1}{f}} = - 2\log \left[ {\frac{k}{{3,7D}} + \frac{{2,51}}{{Re \sqrt f }}} \right] = - 2\log \left[ {\frac{k}{{14,8{R_h}}} + \frac{{2,51}}{{Re \sqrt f }}} \right] \f$
wolfhece/gpuview.py CHANGED
@@ -6,7 +6,7 @@ try:
6
6
  except:
7
7
  msg='Error importing OpenGL library'
8
8
  msg+=' Python version : ' + sys.version
9
- msg+=' Please check your version of opengl32.dll -- conflict may exist between different fils present on your desktop'
9
+ msg+=' Please check your version of opengl32.dll -- conflict may exist between different files present on your desktop'
10
10
  raise Exception(msg)
11
11
 
12
12
  from math import sqrt,floor
@@ -1198,7 +1198,7 @@ class Watershed:
1198
1198
  isOk, fe_file = check_path(os.path.join(self.dir, "Coupled_pairs.txt"), prefix=self.dir)
1199
1199
  self.couplednodesxy=[]
1200
1200
  self.couplednodesij=[]
1201
-
1201
+
1202
1202
  if isOk>=0:
1203
1203
  f = open(fe_file, 'r')
1204
1204
  lines = f.read().splitlines()
@@ -1358,7 +1358,7 @@ class Watershed:
1358
1358
  demdelta.array = 0.0
1359
1359
  else:
1360
1360
  demdelta = WolfArray(demdeltaFile)
1361
- #
1361
+ #
1362
1362
  slopes= WolfArray(self.dir+'\\Characteristic_maps\\Drainage_basin.slope',masknull=False)
1363
1363
  reaches= WolfArray(self.dir+'\\Characteristic_maps\\Drainage_basin.reachs')
1364
1364
  cnv= WolfArray(self.dir+'\\Characteristic_maps\\Drainage_basin.cnv')
@@ -1505,8 +1505,8 @@ class Watershed:
1505
1505
  def find_rivers(self, whichsub:int=0, whichreach:int=0) -> tuple[list[Node_Watershed], Node_Watershed]:
1506
1506
  """
1507
1507
  Recherche des mailles rivières
1508
- @param whichsub : numéro du sous-bassin à traiter
1509
- @param whicreach : numéro du tronçon à identifier
1508
+ :param whichsub : numéro du sous-bassin à traiter
1509
+ :param whicreach : numéro du tronçon à identifier
1510
1510
  """
1511
1511
  if whichsub>0 and whichsub<=self.nb_subs:
1512
1512
  if whichreach>0:
@@ -1530,7 +1530,7 @@ class Watershed:
1530
1530
  def find_sub(self, whichsub:int=0) -> list[Node_Watershed]:
1531
1531
  """
1532
1532
  Recherche des mailles du sous-bassin versant
1533
- @param whichsub : numéro du sous-bassin à traiter
1533
+ :param whichsub : numéro du sous-bassin à traiter
1534
1534
  """
1535
1535
  if whichsub>0 and whichsub<=self.nb_subs:
1536
1536
  mysub=list(filter(lambda x: x.sub==whichsub, self.nodes))
@@ -1567,7 +1567,7 @@ class Watershed:
1567
1567
  def find_runoffnodes(self, whichsub:int=0) -> list[Node_Watershed]:
1568
1568
  """
1569
1569
  Recherche des mailles du bassin versant seul (sans les rivières)
1570
- @param whichsub : numéro du sous-bassin à traiter
1570
+ :param whichsub : numéro du sous-bassin à traiter
1571
1571
  """
1572
1572
  if whichsub>0 and whichsub<=self.nb_subs:
1573
1573
  myrunoff=list(filter(lambda x: not x.river and x.sub==whichsub,self.nodes))
@@ -1603,7 +1603,7 @@ class Watershed:
1603
1603
  def find_flatnodes(self, listofsortednodes:list):
1604
1604
  """
1605
1605
  Recherche des mailles dans des zones de faibles pentes
1606
- @param listofsortednodes : liste triée de mailles
1606
+ :param listofsortednodes : liste triée de mailles
1607
1607
  """
1608
1608
  myflatnodes=list(filter(lambda x: x.flatindex>-1,listofsortednodes))
1609
1609
 
@@ -1612,7 +1612,7 @@ class Watershed:
1612
1612
  def find_flatzones(self, listofsortednodes:list, maxindex:int):
1613
1613
  """
1614
1614
  Recherche des mailles dans des zones de faibles pentes
1615
- @param listofsortednodes : liste triée de mailles
1615
+ :param listofsortednodes : liste triée de mailles
1616
1616
  """
1617
1617
  myflatzones=[[]] * maxindex
1618
1618
  for i in range(maxindex):
@@ -1964,7 +1964,7 @@ class Watershed:
1964
1964
  fig.canvas.draw()
1965
1965
 
1966
1966
  def update_times(self, wolf_time=None):
1967
-
1967
+
1968
1968
  if wolf_time is None:
1969
1969
  wolf_time = WolfArray(self.dir+'\\Characteristic_maps\\Drainage_basin.time')
1970
1970
 
@@ -1972,4 +1972,3 @@ class Watershed:
1972
1972
  cur_node.time = wolf_time[cur_node.i, cur_node.j]
1973
1973
 
1974
1974
  self.to_update_times = False
1975
-
@@ -12,7 +12,7 @@ class Clock_Emitter():
12
12
  """
13
13
  Time manager for the emitter.
14
14
 
15
- @param times: list of time intervals during which the emitter is active -- [[t_start1, t_end1], [t_start2, t_end2], ...]
15
+ :param times: list of time intervals during which the emitter is active -- [[t_start1, t_end1], [t_start2, t_end2], ...]
16
16
  """
17
17
  if isinstance(times, np.ndarray):
18
18
  assert times.ndim == 2, "times must be a 2D array - first line contains t_start, second line contains t_end"
@@ -10,7 +10,7 @@ def circle_velocity_field(size:int=201, oxoy:tuple[float]=(0.,0.), dxdy:tuple[fl
10
10
  """
11
11
  Create a circle velocity field.
12
12
 
13
- @param size: Size of the velocity field. (odd int)
13
+ :param size: Size of the velocity field. (odd int)
14
14
  """
15
15
  dx,dy = dxdy
16
16
  ox,oy = oxoy
@@ -158,10 +158,10 @@ class Velocity_2Fields_numba():
158
158
  start_time:float,
159
159
  delta_time:float) -> None:
160
160
  """
161
- @param uv1 is the velocity field at time start_time
162
- @param uv2 is the velocity field at time start_time + delta_time
163
- @param start_time is the time of uv1
164
- @param delta_time is the time between uv1 and uv2
161
+ :param uv1 is the velocity field at time start_time
162
+ :param uv2 is the velocity field at time start_time + delta_time
163
+ :param start_time is the time of uv1
164
+ :param delta_time is the time between uv1 and uv2
165
165
  """
166
166
 
167
167
  self.origx, self.origy = uv1.origx, uv1.origy
wolfhece/libs/WolfDll.dll CHANGED
Binary file
Binary file