Skip to content

Commit

Permalink
minimized diff
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer committed Oct 17, 2024
1 parent 075c792 commit 996193c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hydromt_delft3dfm/dflowfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down Expand Up @@ -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 <root>/<geoms>."""
self._assert_write_mode
self._assert_write_mode()

# Optional: also write mesh_gdf object
if write_mesh_gdf:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 996193c

Please sign in to comment.