-
Notifications
You must be signed in to change notification settings - Fork 15
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
Added support for global meshes (stereographic projection) #68
Conversation
I can also push the ocean.shp vector I used for the coastlines, as it is really light (42kB). Let me know |
bSGP = bSGP.difference(pSGP) | ||
# Append polygon segment to mainland | ||
mainland = np.vstack((mainland, poly)) | ||
# Clip polygon segment from boubox and regenerate path |
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.
The order of the comments has changed here.
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.
true, I guess I could have just added the condition at the end and overwrite bSGP
.
Let me know what you think, I'll rectify it
@tomsail This is looking quite good. Could it be due to slight variations in the initial point distribution? |
It could be. After the initial distribution - a grid covering the world with a resolution of |
@krober10nd I also have missed the stitching of the polygons on either side of the International Date Line (IDL): you can see clearly on the last picture I posted above the Russian peninsula cut from the rest of the continent. Summing up here is the checklist to complete this PR:
|
Hi @krober10nd, I corrected and simplified the compute_force() routine to account for the stereographic distortion. I am quite happy now with the quality of the mesh This validate the first item of the checklist above. The other 2 items on the other hand would require both quite extensive implementations, which are already available in pyposeidon. 2 options :
|
I will take a look at this hopefully this weekend thanks for your great work!! |
I've seen that convergence pattern in the mesh shape before and it has to do with the forces being too powerful. Could you try re-making the global meshes using a lower pseudo delta tilmestep smaller value? Also, the ratio of the medians for the scale factor could work better (in general) but that's not related to your changes. I'm on board with merging this in, just please address the |
Seems like |
Awesome Keith thanks.
|
I implemented 2 fixes and one enhancement, see the last commits:
|
sorry I realised I didn't check the last implementations I did with flake8 .. |
That's not a problem, I can fix that. Did the modifications to the forces improve the mesh quality near the poles (or the experiments with reducing the timestep)? |
No I couldn't enhance or fix it |
All CIs should pass now (I fixed flake8 and lowpass filter for bathy gradient) |
I will remove the bathymetric gradient test as this function is not functional and needs to be revisited regardless. |
FIY now the bathy gradient function works with the default |
@krober10nd, I will
Note:
|
@tomsail everything looks good. could you add an example on the README with an image to highlight this new feature? |
I added supporting files for global coastlines. It'll be clearer for users.
as I refer to the I think this is a wrap |
Changes were made in the following routines:
_AREAMIN
test (to suppress islands smaller than the resolution) for stereographic projection._stereo_distortion
and the new keywordstereo
to the options (opts
) to rectify the following functions :NB: bounding box for global mesh has to be (-180.00, 180.00, -89.00, 90.00)
NBB: it is necessary to define all the coastlines at once: the Shoreline class will the detect the biggest coastline (antartica and define it as the outside boundary). This is because the Shoreline hasn't been defined has a multi-shapefile reader - which would be a "nice to have"