-
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
SWAN Boundary #66
SWAN Boundary #66
Conversation
…it is overriden in the swan classes to set specific boundary point types
…id points in polygon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rafa-guedes. Cagil and I have both had a look at the notebooks in some detail and it looks good to us. Cagil commented that in some cases in rotated domains if the XY boundary points don't correspond to the boundary line then there is a risk that SWAN may threshold them out. We weren't clear on the exact circumstances were this occurs though so perhaps with your implementation it won't happen but it's something to watch out for. To avoid it Cagil has previously used an IJ specification. I have aspirations to integration variable boundary forcing into our SWAN domains to test in context but haven't been able to do that yet.
Thanks @benjaminleighton , there is still some work to do indeed for this to entirely support rotated domains. In the SIDE type boundary for example, SWAN applies the boundary to the side whose normal has the nearest direction to the specified side. However these objects use coordinates from the specific side in the grid array to interpolate the boundary data. The IJ specification will not be difficult to implement, the object will look similar to SegmentXY but we will need to translate coordinates into grid nodes. |
Closes #37 |
@tomdurrant I have synced main here and fixed the issue with filter_time, this should be ready to be reviewed. |
@rafa-guedes I'm getting some issues
|
@benjaminleighton I'll have a look at this. Has this worked on the existing version of the code in main as well or is it specific to this branch? |
@rafa-guedes I haven't tried against main because I think I'm heavily using components of this branch in the setup. Most of the errors look like they might be related to new boundary spec stuff. This could be something todo with my install as I"m getting warnings too like
the last one of those saying Boundnest1 doesn't match Boundnest1 doesn't make much sense. |
@rafa-guedes I'm trying and failing to replicate my error in a clean github workspaces enviornment so I think this maybe an issue with my local installation. |
Sorry @rafa-guedes, Actually I think I've replicated it in a slightly modified example_procedural_boundspec.ipynb see attached
then later after
trying
|
…e to fix upstream errors
@benjaminleighton thanks for the reproducible example. This should hopefully be fixed with eb43e42, there was some change in a core base class that was the root cause all those validation errors. Out of curiosity, why are you instantiating the Config class using the model_dump of an existing Config instance? This approach may fail with some other objects. For example, if we try to instantiate |
@rafa-guedes I was thinking that this would be a good way to serialize the whole model configuration, allow for editing it and load it back in. |
Implement data objects to generate different types of swan boundary.
Example notebooks showing usage for all the new classes are defined here.