mirror of https://gitlab.com/pamhyr/pamhyr2
Solver: Mage: Fix mage export.
parent
645a76b0e8
commit
420d766ae5
|
|
@ -250,12 +250,7 @@ class Mage(CommandLineSolver):
|
||||||
|
|
||||||
# Generate sediment additional data if available
|
# Generate sediment additional data if available
|
||||||
sediment = ""
|
sediment = ""
|
||||||
if profile.sl is None:
|
if profile.sl is not None and not profile.sl.is_deleted():
|
||||||
return
|
|
||||||
|
|
||||||
if profile.sl.is_deleted():
|
|
||||||
return
|
|
||||||
|
|
||||||
if not any(filter(lambda f: ".GRA" in f, files)):
|
if not any(filter(lambda f: ".GRA" in f, files)):
|
||||||
files.append(self._gra_file)
|
files.append(self._gra_file)
|
||||||
|
|
||||||
|
|
@ -283,12 +278,8 @@ class Mage(CommandLineSolver):
|
||||||
# Generate sediment additional data if available
|
# Generate sediment additional data if available
|
||||||
sediment = ""
|
sediment = ""
|
||||||
prev = point.z
|
prev = point.z
|
||||||
if point.sl is None:
|
|
||||||
return
|
|
||||||
|
|
||||||
if point.sl.is_deleted():
|
|
||||||
return
|
|
||||||
|
|
||||||
|
if point.sl is not None and not point.sl.is_deleted():
|
||||||
# Number of layers
|
# Number of layers
|
||||||
nl = len(point.sl)
|
nl = len(point.sl)
|
||||||
sediment = f"{nl:>3}"
|
sediment = f"{nl:>3}"
|
||||||
|
|
@ -701,18 +692,15 @@ class Mage(CommandLineSolver):
|
||||||
|
|
||||||
nb_cv = 0
|
nb_cv = 0
|
||||||
for hs in hydraulic_structures:
|
for hs in hydraulic_structures:
|
||||||
|
if not hs.enabled or hs.is_deleted():
|
||||||
|
continue
|
||||||
|
|
||||||
if hs.input_reach is None:
|
if hs.input_reach is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not hs.input_reach.is_enable() or hs.input_reach.is_deleted():
|
if not hs.input_reach.is_enable() or hs.input_reach.is_deleted():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not hs.enabled:
|
|
||||||
continue
|
|
||||||
|
|
||||||
if hs.is_deleted():
|
|
||||||
continue
|
|
||||||
|
|
||||||
for bhs in hs.basic_structures:
|
for bhs in hs.basic_structures:
|
||||||
if bhs.enabled:
|
if bhs.enabled:
|
||||||
logger.info(bhs._type)
|
logger.info(bhs._type)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue