Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid mismatch #350

Merged
merged 2 commits into from
Dec 20, 2023
Merged

Avoid mismatch #350

merged 2 commits into from
Dec 20, 2023

Conversation

ecomodeller
Copy link
Member

Matching multiple observations with models is only possible if the models are a Dfsu or Grid, i.e. the modelled timeseries can be extracted from spatial field.

Copy link
Member

@jsmariegaard jsmariegaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great - but please improve error description before merge

if len(obs) > 1 and isinstance(mod, Iterable) and len(mod) > 1:
if not all(isinstance(m, (DfsuModelResult, GridModelResult)) for m in mod):
raise ValueError(
"Multiple models can only be compared if they are the the observation can be extracted, e.g. DfsuModelResult or GridModelResult"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something wrong with this sentence

@jsmariegaard jsmariegaard merged commit 36d4518 into main Dec 20, 2023
10 checks passed
@jsmariegaard jsmariegaard deleted the match-validate-connection branch December 20, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants