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

BUG: need to wrap longitudes to 0-360 #46

Closed
efiring opened this issue Dec 26, 2021 · 1 comment
Closed

BUG: need to wrap longitudes to 0-360 #46

efiring opened this issue Dec 26, 2021 · 1 comment

Comments

@efiring
Copy link
Member

efiring commented Dec 26, 2021

TEOS-10/GibbsSeaWater.jl#18 (comment) and https://discourse.julialang.org/t/a-weird-issue-with-julia-1-7-1-on-ubuntu-gibbsseawater-jl-package/73632 show the error for lon > 360. The gsw_saar function is only handling negative longitudes, not longitudes beyond 360. Likely fix: change

        if (lon  <  0.0)
            lon += 360.0;

to

        lon = fmod(lon, 360);
        if (lon  <  0.0)
            lon += 360.0;

I would be inclined to fix it first in Python and then propagate it back to here, since testing is so much easier in Python.

@efiring
Copy link
Member Author

efiring commented Dec 28, 2021

Closed by #47.

@efiring efiring closed this as completed Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant