Skip to content

Commit

Permalink
add nodata value to "empty array"
Browse files Browse the repository at this point in the history
  • Loading branch information
roeldegoede committed Jan 28, 2025
1 parent 3849deb commit ba2740a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hydromt_sfincs/workflows/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def merge_multi_dataarrays(
# no data in da1 so use an empty array like da_like
logger.debug("No data da1, start with empty array")
da1 = xr.full_like(da_like, np.nan)
da1.raster.set_nodata(np.nan)
else:
# TODO: this applies to the whole dataset, not only the clipped part
da1 = da1.load().raster.reproject_like(da_like)
Expand Down

0 comments on commit ba2740a

Please sign in to comment.