Skip to content

Commit

Permalink
cannot be more sigma than totlayers (#605)
Browse files Browse the repository at this point in the history
File read by mikecore can sometimes contain more sigma than total number of layers.

Co-authored-by: Henrik Andersson <[email protected]>
  • Loading branch information
otzi5300 and ecomodeller authored Nov 30, 2023
1 parent b8d1ad1 commit 886661f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mikeio/dfsu/_dfsu.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def _read_dfsu_header(self, dfs):
element_ids=el_ids,
node_ids=node_ids,
n_layers=dfs.NumberOfLayers,
n_sigma=dfs.NumberOfSigmaLayers,
n_sigma=min(dfs.NumberOfSigmaLayers, dfs.NumberOfLayers),
validate=False,
)
elif self._type == DfsuFileType.DfsuSpectral1D:
Expand Down

0 comments on commit 886661f

Please sign in to comment.