From 996193cf24993aa4f7ca61636e2e3c8c8b1357ed Mon Sep 17 00:00:00 2001 From: veenstrajelmer Date: Thu, 17 Oct 2024 23:50:36 +0200 Subject: [PATCH] minimized diff --- hydromt_delft3dfm/dflowfm.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hydromt_delft3dfm/dflowfm.py b/hydromt_delft3dfm/dflowfm.py index 40d71fa..4d003cc 100644 --- a/hydromt_delft3dfm/dflowfm.py +++ b/hydromt_delft3dfm/dflowfm.py @@ -3187,7 +3187,7 @@ def write_maps(self) -> None: if len(self._maps) == 0: self.logger.debug("No maps data found, skip writing.") return - self._assert_write_mode + self._assert_write_mode() # Global parameters mapsroot = join(self.root, "maps") inilist = [] @@ -3321,7 +3321,7 @@ def read_geoms(self) -> None: # FIXME: gives an error when only 2D model. def write_geoms(self, write_mesh_gdf=True) -> None: """Write model geometries to a GeoJSON file at /.""" - self._assert_write_mode + self._assert_write_mode() # Optional: also write mesh_gdf object if write_mesh_gdf: @@ -3467,7 +3467,7 @@ def write_forcing(self) -> None: if len(self._forcing) == 0: self.logger.debug("No forcing data found, skip writing.") else: - self._assert_write_mode + self._assert_write_mode() self.logger.info("Writting forcing files.") savedir = dirname(join(self.root, self._config_fn)) # create new external forcing file @@ -3627,7 +3627,7 @@ def init_dfmmodel(self): self.logger.info(f"Reading mdu file at {mdu_fn}") self._dfmmodel = FMModel(filepath=mdu_fn) else: # use hydrolib template - self._assert_write_mode + self._assert_write_mode() self.logger.info("Initialising empty mdu file") self._dfmmodel = FMModel() self._dfmmodel.filepath = mdu_fn @@ -3649,7 +3649,7 @@ def read_dimr(self, dimr_fn: Optional[str] = None) -> None: dimr = DIMR(filepath=Path(dimr_fn)) # else initialise else: - self._assert_write_mode + self._assert_write_mode() self.logger.info("Initialising empty dimr file") dimr = DIMR() self._dimr = dimr