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

Gsum bug #48

Open
eclare108213 opened this issue Dec 15, 2017 · 3 comments
Open

Gsum bug #48

eclare108213 opened this issue Dec 15, 2017 · 3 comments

Comments

@eclare108213
Copy link
Contributor

Gsum is the cumulative area of ice and open water in a grid cell. It is occasionally 0 and causes a divzero error, though probably not in active grid cells. Fixing it may cause nonBFB results and therefore this will need to be tested in the full CICE model, once the new version of Icepack is added there.

@eclare108213
Copy link
Contributor Author

Unfortunately this problem only shows up with some compilers, and I'm not seeing it so can't debug it. Hints for fixing it:

The issue occurs in this line, in icepack_mechred.F90:

 work = c1 / Gsum(ncat)

Gsum(ncat) should never be zero, so there is a problem somewhere else, maybe in a halo cell? The quick fix is to wrap this statement with "if (Gsum(ncat) > puny) then ... endif" but that does not fix the source of the problem.

@apcraig
Copy link
Contributor

apcraig commented Feb 5, 2018

I've implemented this on a branch and am testing. PR soon.

@eclare108213
Copy link
Contributor Author

PR #127 provides a work-around, but there is still an underlying bug. Gsum should never be zero. I am leaving this issue open for now, to return to later when more pressing issues have been addressed.

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

No branches or pull requests

2 participants