-
Notifications
You must be signed in to change notification settings - Fork 9
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
Problems with match() (flooding/drying) #506
Comments
|
Is the point inside the domain? (it could be that the error message could be improved in this case) |
It is, althought at the very edge. This bit of code I'm using forces the observation to be inside the domain if it is close enough to it. I'm using
|
Thanks. Could you share the code you use for the comparison as well as the full stack trace of the error? |
I hope this helps. Call stack :
Code :
|
This approach seems very sensible for coastal locations. |
Thanks for your help, I dug around and solved the case, I can reproduce the Assertion Error with this minimal code. Like I said at the beginning, this sometimes fails but not always.
So the thing is that I set my observation in an element that experience flooding and drying. The element happens to be dry for the whole simulation. Hence the error indicate that the mr len < 0 in that element. There is nothing to extract. Maybe the match function could be improve to check for flooding and drying or something like that. Thanks again ! |
Thanks for reporting back @ducvi ! Yes it would be a good idea if modelskill provided a better error message in this case. |
Hi,
I'm experiencing a bug with the
match()
function. Sometimes, I get an error in the function_get_global_start_end()
defined in matching.py. My understanding is that this function checks the begin and end times of the model results passed to it and defines those as the "period" to match the observations.When trying to match, I sometimes get an
AssertionError
in the following line:assert all([len(x) > 0 for x in idxs])
The model results are of type
DfsuModelResult
and the observations are of typePointObservation
. Both have well-defined start and end times, but they do not overlap perfectly.Is there something I'm missing here?
Best regards,
Victor
The text was updated successfully, but these errors were encountered: