ShervanGharari / EASYMORE

EASYMORE; EArth SYstem MOdeling REmapper
GNU General Public License v3.0
24 stars 21 forks source link

`longitude` values necessarily need to be transformed into `[0, 360]` by default #85

Open kasra-keshavarz opened 7 months ago

kasra-keshavarz commented 7 months ago

The package seems to have issues when there is a "jump" in longitude values? It is better to convert all input longitude values from whatever range into a [0, 360] and do necessary calculations with this assumption on mind.

The following may provide further assistance for such a conversion: https://gis.stackexchange.com/a/201796

ShervanGharari commented 7 months ago

There is a half-baked solution: https://github.com/ShervanGharari/EASYMORE/blob/develop/easymore/easymore.py#L40 It is not yet implemented in the main branch as it needs more tests. The issue might be more delicate than simple transfer of lon, so more testing is needed which I did not have time before version 2.0.0. If you remember, we have looked into the solution link you shared some time ago. The difference with easymore is that it needs to create the grid shapes and two adjacent points should not have a jump. For example, two adjacent grids that one is transferred to around -180 while the other grid is 180 degrees may result in a grid that covers the entire globe from east to west. For the above reasons, I am a bit hesitant to give users the power to manipulate the longitude inside easymore and decided to leave manipulation outside the package (at this point).

kasra-keshavarz commented 7 months ago

I'm not sure if I am following, if the longitudes are always within [0,360], it would be easy to make sure all input cases can be taken care of, wouldn't it?