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

seascape polygons across the meridian 0/360 #6

Open
bexeross opened this issue Dec 1, 2016 · 1 comment
Open

seascape polygons across the meridian 0/360 #6

bexeross opened this issue Dec 1, 2016 · 1 comment
Labels

Comments

@bexeross
Copy link
Contributor

bexeross commented Dec 1, 2016

I believe the current code in mod_reef.f90 doesn't account for any polygons that cross the GMT meridian. I have tried multiple formats of coordinates but if you have a box that starts at -0.5Deg East (359.5deg) in the western extent and extends to 0.5 Deg east in the eastern extent, it looks like CMS decides the box goes from the east to the west around the world instead of the intended west to east.
...
e.g. Here is my example polygon (from top left>top right>bottom right>bottom left)- roughly 50km square around a Spanish coastal release location (also tried with 5th coordinate back at the start, and with longitudes in 360 format).

-0.81517885497 39.58398313240 8
0.30245816118 39.71128726480 8
0.45953581914 38.79684471190 8
-0.64123030184 38.67112556320 8

See attached pdf for e.g. trajectories in this simulation, exemplifying that this polygon has been interpreted as a band around the world extending out beyond Italy, around the world, and back through Portuguese waters to Spain. (the con file shows connections from Italy, Morocco, and Portugal which tracks do not suggest to be true)
...
Apologies for not being good enough at Fortran to suggest a solution, but it looks like you need to tell CMS that 350-something, could come before 1. Perhaps there needs to be a standard where polygons must be interpreted from east to west and back, or where values less than 10 and over 350 are found the 350s are interpreted into minus numbers (the -180/180deg format) instead? Or perhaps there could be a runconf.list entry where you opt to work on 0-360 or -180to180 scale dependent upon the longitude range you want to centre?

All the best,
Bex

plot_bad_polygon_meridian.pdf

@bexeross
Copy link
Contributor Author

bexeross commented Dec 1, 2016

P.S. will workaround for now by splitting polygon in 2 at the meridian and summing con_file results. (In case others need a workaround too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants