Skip to content

Commit

Permalink
Try update away from the problimatic netcdf4 library that is causing …
Browse files Browse the repository at this point in the history
…errors saving and loading files
  • Loading branch information
rosepearson committed Oct 9, 2024
1 parent 5a49481 commit 19cbb9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion environment_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ dependencies:
- python-pdal >= 3.3.0
- dask >= 2023.6.0
- distributed >= 2023.6.0
- netcdf4 < 1.7
- h5netcdf
4 changes: 2 additions & 2 deletions src/geofabrics/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ def save_dem(
compression["dtype"] = dem[key].dtype
encoding[key] = compression
dem.to_netcdf(
filename, format="NETCDF4", engine="netcdf4", encoding=encoding
filename, format="NETCDF4", engine="h5netcdf", encoding=encoding
)
else:
dem.to_netcdf(filename, format="NETCDF4", engine="netcdf4")
dem.to_netcdf(filename, format="NETCDF4", engine="h5netcdf")
elif filename.suffix.lower() == ".tif":
for key, array in dem.data_vars.items():
filename_layer = (
Expand Down

0 comments on commit 19cbb9b

Please sign in to comment.