diff --git a/src/Solver/Mage.py b/src/Solver/Mage.py index 22168ea3..bd7299cb 100644 --- a/src/Solver/Mage.py +++ b/src/Solver/Mage.py @@ -38,7 +38,11 @@ def mage_file_open(filepath, mode): if "w" in mode: # Write header - f.write("* This file is generated by PAMHYR, please don't modify\n") + comment = "*" + if ".ST" in filepath: + comment = "#" + + f.write(f"{comment} This file is generated by PAMHYR, please don't modify\n") return f @@ -1009,10 +1013,8 @@ class Mage8(Mage): # Set data for profile RI reach.set(ri, timestamp, key, d) if key == "Z": - profile = study.river\ - .current_reach()\ - .reach.profile(ri) - ptX, ptY = profile.get_water_limits(d) + profile = reach.profile(ri) + ptX, ptY = profile.geometry.get_water_limits(d) reach.set(ri, timestamp, "ptX", ptX) reach.set(ri, timestamp, "ptY", ptY) diff --git a/src/View/Geometry/Window.py b/src/View/Geometry/Window.py index 2ebd12f5..b291d1c4 100644 --- a/src/View/Geometry/Window.py +++ b/src/View/Geometry/Window.py @@ -567,7 +567,7 @@ class GeometryWindow(PamhyrWindow): def _export_to_file_st(self, filename): with open(filename, "w+") as f: - f.write("* Exported from Pamhyr2\n") + f.write("# Exported from Pamhyr2\n") self._export_to_file_st_reach(f, self._reach) def _export_to_file_st_reach(self, wfile, reach):