wolfhece 2.2.41__py3-none-any.whl → 2.2.43__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/PyDraw.py +73 -19
- wolfhece/apps/version.py +1 -1
- wolfhece/mesh2d/wolf2dprev.py +45 -17
- wolfhece/models/walous_ocs.pal +49 -0
- wolfhece/pywalous.py +346 -141
- wolfhece/wolf_array.py +148 -78
- {wolfhece-2.2.41.dist-info → wolfhece-2.2.43.dist-info}/METADATA +1 -1
- {wolfhece-2.2.41.dist-info → wolfhece-2.2.43.dist-info}/RECORD +11 -10
- {wolfhece-2.2.41.dist-info → wolfhece-2.2.43.dist-info}/WHEEL +0 -0
- {wolfhece-2.2.41.dist-info → wolfhece-2.2.43.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.2.41.dist-info → wolfhece-2.2.43.dist-info}/top_level.txt +0 -0
wolfhece/PyDraw.py
CHANGED
@@ -3697,13 +3697,20 @@ class WolfMapViewer(wx.Frame):
|
|
3697
3697
|
self._uts_menu = wx.Menu()
|
3698
3698
|
self._ocs_menu = wx.Menu()
|
3699
3699
|
|
3700
|
-
self._uts_crop = self._uts_menu.Append(wx.ID_ANY, _("Crop on active array"), _("Crop active array"))
|
3701
|
-
self._uts_cropscreen = self._uts_menu.Append(wx.ID_ANY, _("Crop on screen"), _("Crop screen"))
|
3700
|
+
self._uts_crop = self._uts_menu.Append(wx.ID_ANY, _("Crop on active array"), _("Crop UTS data (vectorized - shp, gpkg) on the active array extent"))
|
3701
|
+
self._uts_cropscreen = self._uts_menu.Append(wx.ID_ANY, _("Crop on screen"), _("Crop UTS data (vectorized - shp, gpkg) on the current screen extent"))
|
3702
3702
|
self._uts_map = self._uts_menu.Append(wx.ID_ANY, _("Map active array (WAL_UTS -> Manning)"), _("Map Walous UTS active array to Manning's n"))
|
3703
3703
|
self._uts_legend = self._uts_menu.Append(wx.ID_ANY, _("Legend"), _("Legend"))
|
3704
3704
|
|
3705
|
-
self.
|
3706
|
-
self.
|
3705
|
+
self._ocs_crop_10m_2023 = self._ocs_menu.Append(wx.ID_ANY, _("Crop on active array (prepared data 10 m - 2023)"), _("Crop OCS data (matrix - geotif) on the active array extent using prepared 10m data"))
|
3706
|
+
self._ocs_cropscreen_10m_2023 = self._ocs_menu.Append(wx.ID_ANY, _("Crop on screen (prepared data 10 m - 2023)"), _("Crop OCS data (matrix - geotif) on the current screen extent using prepared 10m data"))
|
3707
|
+
self._ocs_menu.AppendSeparator()
|
3708
|
+
self._ocs_crop_10m_2020 = self._ocs_menu.Append(wx.ID_ANY, _("Crop on active array (prepared data 10 m - 2020)"), _("Crop OCS data (matrix - geotif) on the active array extent using prepared 10m data"))
|
3709
|
+
self._ocs_cropscreen_10m_2020 = self._ocs_menu.Append(wx.ID_ANY, _("Crop on screen (prepared data 10 m - 2020)"), _("Crop OCS data (matrix - geotif) on the current screen extent using prepared 10m data"))
|
3710
|
+
self._ocs_menu.AppendSeparator()
|
3711
|
+
self._ocs_crop = self._ocs_menu.Append(wx.ID_ANY, _("Crop on active array"), _("Crop OCS data (matrix - geotif) on the active array extent"))
|
3712
|
+
self._ocs_cropscreen = self._ocs_menu.Append(wx.ID_ANY, _("Crop on screen"), _("Crop OCS data (matrix - geotif) on the current screen extent"))
|
3713
|
+
self._ocs_menu.AppendSeparator()
|
3707
3714
|
self._ocs_map = self._ocs_menu.Append(wx.ID_ANY, _("Map active array (WAL_OCS -> Hydrology)"), _("Map Walous OCS active array to Hydrology's landuse classification"))
|
3708
3715
|
self._ocs_map = self._ocs_menu.Append(wx.ID_ANY, _("Map active array (WAL_OCS -> Manning)"), _("Map Walous OCS active array to Manning's n"))
|
3709
3716
|
self._ocs_legend = self._ocs_menu.Append(wx.ID_ANY, _("Legend"), _("Legend"))
|
@@ -3832,9 +3839,9 @@ class WolfMapViewer(wx.Frame):
|
|
3832
3839
|
|
3833
3840
|
itemlabel = item.ItemLabel
|
3834
3841
|
|
3835
|
-
if
|
3842
|
+
if _("Crop on active array") in itemlabel or _("Crop on screen") in itemlabel:
|
3836
3843
|
|
3837
|
-
if
|
3844
|
+
if _("Crop on screen") in itemlabel:
|
3838
3845
|
|
3839
3846
|
bounds = self.get_canvas_bounds(gridsize=1.)
|
3840
3847
|
|
@@ -3868,14 +3875,24 @@ class WolfMapViewer(wx.Frame):
|
|
3868
3875
|
from .pywalous import update_palette_walous_ocs
|
3869
3876
|
|
3870
3877
|
if self._walous_OCS_filepath is None:
|
3871
|
-
dlg = wx.FileDialog(self, _("Choose the Walous OCS Tif file"), wildcard="Tif file (*.tif)|*.tif|all (*.*)|*.*", style=wx.FD_OPEN)
|
3872
|
-
if dlg.ShowModal() == wx.ID_CANCEL:
|
3873
|
-
dlg.Destroy()
|
3874
|
-
return
|
3875
3878
|
|
3876
|
-
|
3877
|
-
|
3879
|
+
if itemlabel in [_("Crop on active array (prepared data 10 m - 2023)"), _("Crop on screen (prepared data 10 m - 2023)")]:
|
3880
|
+
self._walous_OCS_filepath = toys_dataset('Walous_OCS', 'WALOUS_2023_lbt72_10m.tif')
|
3881
|
+
elif itemlabel in [_("Crop on active array (prepared data 10 m - 2020)"), _("Crop on screen (prepared data 10 m - 2020)")]:
|
3882
|
+
self._walous_OCS_filepath = toys_dataset('Walous_OCS', 'WALOUS_2020_lbt72_10m.tif')
|
3878
3883
|
|
3884
|
+
else:
|
3885
|
+
dlg = wx.FileDialog(self, _("Choose the Walous OCS Tif file"), wildcard="Tif file (*.tif)|*.tif|all (*.*)|*.*", style=wx.FD_OPEN)
|
3886
|
+
if dlg.ShowModal() == wx.ID_CANCEL:
|
3887
|
+
dlg.Destroy()
|
3888
|
+
return
|
3889
|
+
|
3890
|
+
self._walous_OCS_filepath = Path(dlg.GetPath())
|
3891
|
+
dlg.Destroy()
|
3892
|
+
|
3893
|
+
if self._walous_OCS_filepath is None or not Path(self._walous_OCS_filepath).exists():
|
3894
|
+
logging.error(_('No Walous OCS file -- Please set it'))
|
3895
|
+
return
|
3879
3896
|
|
3880
3897
|
dlg = wx.FileDialog(self, _("Choose the output file"), wildcard="Geotif (*.tif)|*.tif|all (*.*)|*.*", style=wx.FD_SAVE, defaultDir=str(def_outdrir))
|
3881
3898
|
if dlg.ShowModal() == wx.ID_CANCEL:
|
@@ -3885,8 +3902,33 @@ class WolfMapViewer(wx.Frame):
|
|
3885
3902
|
output = Path(dlg.GetPath())
|
3886
3903
|
dlg.Destroy()
|
3887
3904
|
|
3905
|
+
header_OCS = header_wolf.read_header(self._walous_OCS_filepath)
|
3906
|
+
if header_OCS.dx != spatial_res:
|
3907
|
+
# Adapt bounds to ensure that the rebin will be correct.
|
3908
|
+
# If spatial_res is a multiple of header_OCS.dx, no need to change bounds.
|
3909
|
+
# If not, change the bounds to ensure that the crop will include data in all footprints.
|
3910
|
+
|
3911
|
+
# Convert bvounds to list to be able to modify it
|
3912
|
+
bounds = [list(bounds[0]), list(bounds[1])]
|
3913
|
+
|
3914
|
+
if (bounds[0][0] - header_OCS.origx) % header_OCS.dx != 0:
|
3915
|
+
bounds[0][0] = header_OCS.origx + ((bounds[0][0] - header_OCS.origx) // header_OCS.dx) * header_OCS.dx
|
3916
|
+
if (bounds[0][1] - bounds[0][0]) % header_OCS.dx != 0:
|
3917
|
+
bounds[0][1] = bounds[0][0] + ((bounds[0][1] - bounds[0][0]) // header_OCS.dx + 1) * header_OCS.dx
|
3918
|
+
if (bounds[1][0] - header_OCS.origy) % header_OCS.dy != 0:
|
3919
|
+
bounds[1][0] = header_OCS.origy + ((bounds[1][0] - header_OCS.origy) // header_OCS.dy) * header_OCS.dy
|
3920
|
+
if (bounds[1][1] - bounds[1][0]) % header_OCS.dy != 0:
|
3921
|
+
bounds[1][1] = bounds[1][0] + ((bounds[1][1] - bounds[1][0]) // header_OCS.dy + 1) * header_OCS.dy
|
3922
|
+
|
3888
3923
|
locwalous = WolfArray(fname=self._walous_OCS_filepath,
|
3889
|
-
crop = bounds)
|
3924
|
+
crop = [bounds[0][0], bounds[0][1], bounds[1][0], bounds[1][1]])
|
3925
|
+
|
3926
|
+
if locwalous.dx != spatial_res:
|
3927
|
+
locwalous.rebin(spatial_res / locwalous.dx, operation='min')
|
3928
|
+
logging.info(_('Rebin to {} m because original data are {} m').format(spatial_res, locwalous.dx))
|
3929
|
+
locwalous = WolfArray(mold=locwalous, crop = self.active_array.get_bounds())
|
3930
|
+
|
3931
|
+
locwalous.write_all(output)
|
3890
3932
|
|
3891
3933
|
if Path(output).exists():
|
3892
3934
|
logging.info(_('File {} created').format(output))
|
@@ -3904,6 +3946,7 @@ class WolfMapViewer(wx.Frame):
|
|
3904
3946
|
elif ret == wx.ID_YES:
|
3905
3947
|
walousarray = WolfArray(fname=output)
|
3906
3948
|
update_palette_walous_ocs(walousarray.mypal)
|
3949
|
+
walousarray.reset_plot()
|
3907
3950
|
self.add_object('array', newobj=walousarray, id = 'walous_ocs_crop')
|
3908
3951
|
dlg.Destroy()
|
3909
3952
|
|
@@ -3920,6 +3963,10 @@ class WolfMapViewer(wx.Frame):
|
|
3920
3963
|
logging.warning(_('No active array -- Please activate data first'))
|
3921
3964
|
return
|
3922
3965
|
|
3966
|
+
if self.active_array.wolftype != WOLF_ARRAY_FULL_SINGLE:
|
3967
|
+
logging.error(_('Active array is not a Float32 array -- Please change it to Float32 before mapping'))
|
3968
|
+
return
|
3969
|
+
|
3923
3970
|
vals = self.active_array.get_unique_values()
|
3924
3971
|
|
3925
3972
|
if self._walous_layer is None:
|
@@ -3955,6 +4002,10 @@ class WolfMapViewer(wx.Frame):
|
|
3955
4002
|
logging.warning(_('No active array -- Please activate data first'))
|
3956
4003
|
return
|
3957
4004
|
|
4005
|
+
if self.active_array.wolftype != WOLF_ARRAY_FULL_SINGLE:
|
4006
|
+
logging.error(_('Active array is not a Float32 array -- Please change it to Float32 before mapping'))
|
4007
|
+
return
|
4008
|
+
|
3958
4009
|
vals = self.active_array.get_unique_values()
|
3959
4010
|
|
3960
4011
|
if self._walous_layer is None:
|
@@ -3995,7 +4046,6 @@ class WolfMapViewer(wx.Frame):
|
|
3995
4046
|
|
3996
4047
|
if itemlabel in [_("Crop on active array"), _("Crop on screen")]:
|
3997
4048
|
|
3998
|
-
|
3999
4049
|
if itemlabel == _("Crop on screen"):
|
4000
4050
|
|
4001
4051
|
bounds = self.get_canvas_bounds(gridsize=1.)
|
@@ -4027,10 +4077,10 @@ class WolfMapViewer(wx.Frame):
|
|
4027
4077
|
def_outdrir = Path(self.active_array.filename).parent
|
4028
4078
|
spatial_res = self.active_array.dx
|
4029
4079
|
|
4030
|
-
from .pywalous import Walous_data,
|
4080
|
+
from .pywalous import Walous_data, WALOUS_UTS2MANNING_MAJ_NIV1, WALOUS_UTS2MANNING_MAJ_NIV2, update_palette_walous_uts
|
4031
4081
|
|
4032
4082
|
if self._walous_UTS_filepath is None:
|
4033
|
-
dlg = wx.FileDialog(self, _("Choose the Walous shape file"), wildcard="Shapefile (*.shp)|*.shp|all (*.*)|*.*", style=wx.FD_OPEN)
|
4083
|
+
dlg = wx.FileDialog(self, _("Choose the Walous shape file"), wildcard="Geopackage (*.gpkg)|*.gpkg|Shapefile (*.shp)|*.shp|all (*.*)|*.*", style=wx.FD_OPEN)
|
4034
4084
|
if dlg.ShowModal() == wx.ID_CANCEL:
|
4035
4085
|
dlg.Destroy()
|
4036
4086
|
return
|
@@ -4054,7 +4104,7 @@ class WolfMapViewer(wx.Frame):
|
|
4054
4104
|
dlg.Destroy()
|
4055
4105
|
return
|
4056
4106
|
|
4057
|
-
self._walous_layer = dlg.GetStringSelection()
|
4107
|
+
self._walous_layer = 'UTS_' + dlg.GetStringSelection()
|
4058
4108
|
|
4059
4109
|
locwalous = Walous_data(self._walous_UTS_filepath.parent, self._walous_UTS_filepath.name)
|
4060
4110
|
ret = locwalous.rasterize(bounds=bounds,
|
@@ -4100,14 +4150,18 @@ class WolfMapViewer(wx.Frame):
|
|
4100
4150
|
logging.warning(_('No active array -- Please activate data first'))
|
4101
4151
|
return
|
4102
4152
|
|
4153
|
+
if self.active_array.wolftype != WOLF_ARRAY_FULL_SINGLE:
|
4154
|
+
logging.error(_('Active array is not a Float32 array -- Please change it to Float32 before mapping'))
|
4155
|
+
return
|
4156
|
+
|
4103
4157
|
vals = self.active_array.get_unique_values()
|
4104
4158
|
|
4105
4159
|
if self._walous_layer is None:
|
4106
4160
|
|
4107
4161
|
if vals[0] > 10:
|
4108
|
-
self._walous_layer = '
|
4162
|
+
self._walous_layer = 'UTS_MAJ_NIV2'
|
4109
4163
|
else:
|
4110
|
-
self._walous_layer = '
|
4164
|
+
self._walous_layer = 'UTS_MAJ_NIV1'
|
4111
4165
|
|
4112
4166
|
dlg = DlgMapWalous2Manning(self, which=self._walous_layer)
|
4113
4167
|
|
wolfhece/apps/version.py
CHANGED
wolfhece/mesh2d/wolf2dprev.py
CHANGED
@@ -51,6 +51,8 @@ PREV_INFILTRATION_VAR_SIMPLE = -1 #INFILTRATION VARIABLE (RÉPARTITION UNIFORME
|
|
51
51
|
PREV_INFILTRATION_VAR_MOD_MOMENTUM = -2 #INFILTRATION VARIABLE AVEC MOD QT MVT (RÉPARTITION NON UNIFORME DU DÉBIT INJECTÉ CALCULÉ SUR BASE DE L'ÉTAT HYDRODYNAMIQUE INSTANTANÉ)
|
52
52
|
PREV_INFILTRATION_VAR_LINKED_ZONES = -3 #INFILTRATION/EXFILTRATION "INTERNE" VARIABLE (RÉPARTITION UNIFORME DU DÉBIT SUR BASE DE DEUX ZONES D'INFILTRATION)
|
53
53
|
|
54
|
+
PREV_INFILTRATION_MODES = [PREV_INFILTRATION_NULL, PREV_INFILTRATION_SIMPLE, PREV_INFILTRATION_MOD_MOMENTUM, PREV_INFILTRATION_MOD_MOMENTUM_IMPOSED, PREV_INFILTRATION_VAR_SIMPLE, PREV_INFILTRATION_VAR_MOD_MOMENTUM, PREV_INFILTRATION_VAR_LINKED_ZONES]
|
55
|
+
|
54
56
|
##
|
55
57
|
PREV_READ_TXT = 1
|
56
58
|
PREV_READ_FINE = 2
|
@@ -968,8 +970,8 @@ class prev_parameters_blocks:
|
|
968
970
|
def get_params_sediment(self) -> dict:
|
969
971
|
""" Retourne les paramètres du modèle sédimentaire """
|
970
972
|
|
971
|
-
return {_('Model'): self.
|
972
|
-
_('Drifting model'): self.
|
973
|
+
return {_('Model'): self._get_params_sediment_model(),
|
974
|
+
_('Drifting model'): self._get_params_sediment_drifting_model(),
|
973
975
|
_('Porosity'): self._sed_porosity,
|
974
976
|
_('Mean diameter'): self._sed_d_mean,
|
975
977
|
_('Sediment density'): self._sed_s,
|
@@ -2127,48 +2129,74 @@ class prev_parameters_blocks:
|
|
2127
2129
|
'cd_c': self._infil_dev_c,
|
2128
2130
|
'cd_d': self._infil_dev_d}
|
2129
2131
|
|
2130
|
-
elif self._infiltration_mode ==
|
2131
|
-
return self.
|
2132
|
+
elif self._infiltration_mode == PREV_INFILTRATION_MOD_MOMENTUM_IMPOSED:
|
2133
|
+
return self.get_params_infiltration_momentum_correction()
|
2132
2134
|
|
2133
2135
|
else:
|
2134
2136
|
return {}
|
2135
2137
|
|
2138
|
+
def get_infiltration_mode(self) -> int:
|
2139
|
+
""" Retourne le mode d'infiltration """
|
2140
|
+
return self._infiltration_mode
|
2141
|
+
|
2142
|
+
def set_infiltration_mode(self, mode:int) -> None:
|
2143
|
+
""" Définit le mode d'infiltration
|
2144
|
+
|
2145
|
+
0 : PREV_INFILTRATION_NULL - PAS D'INFILTRATION
|
2146
|
+
1 : PREV_INFILTRATION_SIMPLE - INFILTRATION SIMPLE (RÉPARTITION UNIFORME DU DÉBIT INJECTÉ PAR FICHIER .INF)
|
2147
|
+
2 : PREV_INFILTRATION_MOD_MOMENTUM - INFILTRATION AVEC MODIFICATION DE LA QT DE MVT (RÉPARTITION NON UNIFORME DU DÉBIT INJECTÉ PAR FICHIER .INF)
|
2148
|
+
4 : PREV_INFILTRATION_MOD_MOMENTUM_IMPOSED - INFILTRATION AVEC MODIFICATION IMPOSÉE DE LA QT DE MVT (RÉPARTITION NON UNIFORME DU DÉBIT INJECTÉ PAR FICHIER .INF)
|
2149
|
+
-1 : PREV_INFILTRATION_VAR_SIMPLE - INFILTRATION VARIABLE (RÉPARTITION UNIFORME DU DÉBIT INJECTÉ CALCULÉ SUR BASE DE L'ÉTAT HYDRODYNAMIQUE INSTANTANÉ)
|
2150
|
+
-2 : PREV_INFILTRATION_VAR_MOD_MOMENTUM - INFILTRATION VARIABLE AVEC MOD QT MVT (RÉPARTITION NON UNIFORME DU DÉBIT INJECTÉ CALCULÉ SUR BASE DE L'ÉTAT HYDRODYNAMIQUE INSTANTANÉ)
|
2151
|
+
-3 : PREV_INFILTRATION_VAR_LINKED_ZONES - INFILTRATION/EXFILTRATION "INTERNE" VARIABLE (RÉPARTITION UNIFORME DU DÉBIT SUR BASE DE DEUX ZONES D'INFILTRATION)
|
2152
|
+
|
2153
|
+
:param mode: mode d'infiltration
|
2154
|
+
"""
|
2155
|
+
assert isinstance(mode, int), "mode must be an integer"
|
2156
|
+
assert mode in PREV_INFILTRATION_MODES, f"mode must be in {PREV_INFILTRATION_MODES}"
|
2157
|
+
self._infiltration_mode = mode
|
2158
|
+
|
2159
|
+
def reset_infiltration_mode(self) -> None:
|
2160
|
+
""" Réinitialise le mode d'infiltration """
|
2161
|
+
self._infiltration_mode = PREV_INFILTRATION_NULL
|
2162
|
+
|
2163
|
+
|
2136
2164
|
def check_params_infiltration(self) -> tuple[bool, str]:
|
2137
2165
|
""" Vérifie les paramètres d'infiltration """
|
2138
2166
|
|
2139
2167
|
ret = '\nInfiltration\n************\n'
|
2140
2168
|
valid = True
|
2141
2169
|
|
2142
|
-
if self._infiltration_mode ==
|
2170
|
+
if self._infiltration_mode == PREV_INFILTRATION_NULL:
|
2143
2171
|
ret += _('Info: No infiltration\n')
|
2144
|
-
elif self._infiltration_mode ==
|
2172
|
+
elif self._infiltration_mode == PREV_INFILTRATION_SIMPLE:
|
2145
2173
|
ret += _('Info: Simple infiltration\n')
|
2146
|
-
elif self._infiltration_mode ==
|
2174
|
+
elif self._infiltration_mode == PREV_INFILTRATION_MOD_MOMENTUM:
|
2147
2175
|
ret += _('Info: Infiltration with momentum modification\n')
|
2148
|
-
elif self._infiltration_mode ==
|
2176
|
+
elif self._infiltration_mode == PREV_INFILTRATION_MOD_MOMENTUM_IMPOSED:
|
2149
2177
|
ret += _('Info: Infiltration with imposed momentum modification\n')
|
2150
|
-
elif self._infiltration_mode ==
|
2178
|
+
elif self._infiltration_mode == PREV_INFILTRATION_VAR_SIMPLE:
|
2151
2179
|
ret += _('Info: Variable infiltration\n')
|
2152
|
-
elif self._infiltration_mode ==
|
2180
|
+
elif self._infiltration_mode == PREV_INFILTRATION_VAR_MOD_MOMENTUM:
|
2153
2181
|
ret += _('Info: Variable infiltration with momentum modification\n')
|
2154
|
-
elif self._infiltration_mode ==
|
2182
|
+
elif self._infiltration_mode == PREV_INFILTRATION_VAR_LINKED_ZONES:
|
2155
2183
|
ret += _('Info: Variable infiltration/exfiltration (linked zone)\n')
|
2156
2184
|
|
2157
2185
|
if self._infiltration_mode < 0:
|
2158
2186
|
ret += _('Info: Coefficients a={self._infil_a}, b={self._infil_b}, c={self._infil_c}\n')
|
2159
2187
|
|
2160
|
-
if self._infiltration_mode !=
|
2188
|
+
if self._infiltration_mode != PREV_INFILTRATION_VAR_LINKED_ZONES and self._infil_a == 0. and self._infil_b == 0. and self._infil_c == 0.:
|
2161
2189
|
ret += _('Warning: No polynomial infiltration\n')
|
2162
2190
|
|
2163
|
-
if self._infiltration_mode ==
|
2191
|
+
if self._infiltration_mode == PREV_INFILTRATION_VAR_LINKED_ZONES and self._infil_a == 0.:
|
2164
2192
|
ret += _('Warning: No infiltration/exfiltration under bridge\n')
|
2165
2193
|
|
2166
2194
|
ret += _('Info: Coefficients Cd={self._infil_dev_cd}, width={self._infil_dev_width}\n, zseuil={self._infil_dev_zseuil}')
|
2167
2195
|
|
2168
|
-
if self._infiltration_mode !=
|
2196
|
+
if self._infiltration_mode != PREV_INFILTRATION_VAR_LINKED_ZONES and self._infil_dev_cd == 0. or self._infil_dev_width == 0.:
|
2169
2197
|
ret += _('Warning: No weir exfiltration\n')
|
2170
2198
|
|
2171
|
-
if self._infiltration_mode ==
|
2199
|
+
if self._infiltration_mode == PREV_INFILTRATION_VAR_LINKED_ZONES and (self._infil_dev_cd == 0. or self._infil_dev_width == 0.):
|
2172
2200
|
ret += _('Warning: No weir over bridge\n')
|
2173
2201
|
|
2174
2202
|
ret += _('Info: Coefficients d={self._infil_var_d}, e={self._infil_var_e}\n')
|
@@ -2195,7 +2223,7 @@ class prev_parameters_blocks:
|
|
2195
2223
|
self._infil_correction_ux = ux
|
2196
2224
|
self._infil_correction_vy = vy
|
2197
2225
|
|
2198
|
-
if self._infiltration_mode !=
|
2226
|
+
if self._infiltration_mode != PREV_INFILTRATION_MOD_MOMENTUM_IMPOSED:
|
2199
2227
|
logging.warning("To apply, you must set ninfil to 4")
|
2200
2228
|
else:
|
2201
2229
|
logging.info("Infiltration momentum correction applied")
|
@@ -2203,7 +2231,7 @@ class prev_parameters_blocks:
|
|
2203
2231
|
def get_params_infiltration_momentum_correction(self) -> dict:
|
2204
2232
|
""" Retourne les corrections de moment pour l'infiltration """
|
2205
2233
|
|
2206
|
-
if self._infiltration_mode ==
|
2234
|
+
if self._infiltration_mode == PREV_INFILTRATION_MOD_MOMENTUM_IMPOSED:
|
2207
2235
|
return {'ux': self._infil_correction_ux,
|
2208
2236
|
'vy': self._infil_correction_vy}
|
2209
2237
|
else:
|
@@ -0,0 +1,49 @@
|
|
1
|
+
12
|
2
|
+
0.0
|
3
|
+
229
|
4
|
+
234
|
5
|
+
63
|
6
|
+
1.0
|
7
|
+
138
|
8
|
+
138
|
9
|
+
138
|
10
|
+
2.0
|
11
|
+
220
|
12
|
+
15
|
13
|
+
15
|
14
|
+
3.0
|
15
|
+
78
|
16
|
+
78
|
17
|
+
78
|
18
|
+
4.0
|
19
|
+
208
|
20
|
+
208
|
21
|
+
208
|
22
|
+
5.0
|
23
|
+
36
|
24
|
+
97
|
25
|
+
247
|
26
|
+
6.0
|
27
|
+
255
|
28
|
+
255
|
29
|
+
115
|
30
|
+
7.0
|
31
|
+
233
|
32
|
+
255
|
33
|
+
190
|
34
|
+
8.0
|
35
|
+
0
|
36
|
+
50
|
37
|
+
0
|
38
|
+
9.0
|
39
|
+
40
|
40
|
+
200
|
41
|
+
40
|
42
|
+
80.0
|
43
|
+
0
|
44
|
+
120
|
45
|
+
0
|
46
|
+
90.0
|
47
|
+
183
|
48
|
+
232
|
49
|
+
176
|