Skip to content

Commit

Permalink
netcdf4_classic instead
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer committed Oct 11, 2024
1 parent 0c9616b commit 51aa6f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hydrolib/core/dflowfm/net/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def read_mesh1d_network1d(self, mesh1d: Mesh1d) -> None:
return

# If the mesh is not given (default), use the networks one
ds = nc.Dataset(self._ncfile_path) # type: ignore[import]
ds = nc.Dataset(self._ncfile_path, data_model="NETCDF4_CLASSIC") # type: ignore[import]

# Read mesh1d
for meshkey, nckey in self._explorer.mesh1d_var_name_mapping.items():
Expand Down Expand Up @@ -83,7 +83,7 @@ def read_mesh2d(self, mesh2d: Mesh2d) -> None:
logging.debug("Mesh2d is not found in the dataset, reading is skipped.")
return

ds = nc.Dataset(self._ncfile_path) # type: ignore[import]
ds = nc.Dataset(self._ncfile_path, data_model="NETCDF4_CLASSIC") # type: ignore[import]

mapping = self._explorer.mesh2d_var_name_mapping

Expand Down Expand Up @@ -118,7 +118,7 @@ def read_link1d2d(self, link1d2d: Link1d2d) -> None:
logging.debug("Link1d2d is not found in the dataset, reading is skipped.")
return

ds = nc.Dataset(self._ncfile_path) # type: ignore[import]
ds = nc.Dataset(self._ncfile_path, data_model="NETCDF4_CLASSIC") # type: ignore[import]

# Read mesh1d
link1d2d_contact_type_arr = self._read_nc_attribute(ds["link1d2d_contact_type"])
Expand Down Expand Up @@ -202,7 +202,7 @@ def from_file_path(cls, file_path: Path) -> "NCExplorer":
NCExplorer: A newly initialized NCExplorer.
"""
conventions = NCExplorer._read_ugrid_conventions()
dataset = nc.Dataset(file_path) # type: ignore[import]
dataset = nc.Dataset(file_path, data_model="NETCDF4_CLASSIC") # type: ignore[import]

keys = NCExplorer._determine_keys(dataset)
network1d_mapping = NCExplorer._retrieve_variable_names_mapping(
Expand Down

0 comments on commit 51aa6f5

Please sign in to comment.