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

id check on 0. rather than 0 #1016

Closed
StephenGriffies opened this issue Oct 8, 2019 · 2 comments
Closed

id check on 0. rather than 0 #1016

StephenGriffies opened this issue Oct 8, 2019 · 2 comments

Comments

@StephenGriffies
Copy link
Contributor

https://github.com/NOAA-GFDL/MOM6/blob/ceaca560c975fe32cc463041e1549ca6c69da813/src/ALE/MOM_ALE.F90#L807

Tr%id_remap_cont>0.

should be

Tr%id_remap_cont>0

That is, there is an extra decimal after the 0 in the check for diagnostic id.

@marshallward
Copy link
Collaborator

Thanks Steve, I will fix this.

In the future we should look into a compiler warning which flags integer-vs-real inequalities but ignores real-vs-real.

marshallward added a commit to marshallward/MOM6 that referenced this issue Oct 8, 2019
A diagnostic ID was compared to floating point 0. to test if it had been
set.  This patch replaces this with an integer inequality test.

This resolves GitHub Issue mom-ocean#1016.

Thanks to Stephen Griffies for reporting.
@marshallward
Copy link
Collaborator

This has been fixed.

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

2 participants