-
|
Dear Opendrift community, 14:18:56 INFO opendrift.models.basemodel:2139: 'The simulation stopped before requested end time was reached.' An exception has occurred, use %tb to see the full traceback. SystemExit: Simulation aborted. 'The simulation stopped before requested end time was reached.' From what I understand, there seems to be an issue that deals with the function get_environment. In particular, the error seems to concern the dimensionality of the variable sea_surface_height. I looked in the file shyfem.py at the point where the error occurred and there are only two cases considered: the one for variables which have exactly 1 dimension and the one for variables which have more than 2 dimensions. An option considering the case of 2 dimensions seems not to be contemplated, and this is exactly the case of sea_surface_height, which dimensions are "nodes" (since the model has an unstructured grid) and "time", and that by definition can't have "levels" as a third dimension. So, how could I import this variable and use it in the simulation without getting this error? I don't even understand the warning that tells that "environment is missing", since when I write o.list_config I get:
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
|
Hi, Yes, it seems the error is that your variables have exactly 2 dimensions. The following error about environment is a bit misleading, as it is a downstream consequence. Could you try to change the line If that does not work, I am not sure how to proceed, as I have never used this reader or worked with SYFEM data myself. |
Beta Was this translation helpful? Give feedback.
-
|
Looking at the reader code, changing Thus you could try to insert this part in the reader. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for your replies, |
Beta Was this translation helpful? Give feedback.
-
|
Ok, this sounds promising. If you seem to get meaningful results, we can update the reader permanently. |
Beta Was this translation helpful? Give feedback.
-
|
Great, thank you for the contribution. |
Beta Was this translation helpful? Give feedback.
Looking at the reader code, changing
>2to>=2might perhaps not be correct. Instead, probably seems we need to deal with two dimensions (time and node, but no level) as a separate case.As untested pseudo-code, I would suggest inserting something like this: