-
Notifications
You must be signed in to change notification settings - Fork 13
add state NaN checker #970
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
Conversation
39a4e0e
to
49206ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to also add this to our global runs in this PR? soil, soil canopy, soil canopy snow? perhaps we can add it as a callback to check every month e.g.
dcec968
to
42d41d2
Compare
42d41d2
to
27d961f
Compare
9bf117c
to
5234a43
Compare
Looking at the snowy land longrun here, we see that from months 1-5, only I also interactively checked the state immediately after initialization, and there are no NaNs in any of the state, including the soilco2 model. I'm not sure what to make of this but I'll continue looking into it. Investigating these NaNs is separate from the purpose of this PR, which is to provide the infrastructure to be able to see the NaNs, so this doesn't need to block merging this PR. |
5234a43
to
4411c53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Julia! this will be super helpful.
soil co2 has problems - we dont check it in any diagnostic or map right now, so we arent catching the NaNs. it's something @AlexisRenchon and I need to go back to. could some of the NaNs be over the ocean? agreed that that is a separate problem! |
It could be over the ocean, but from the info we get from this checker it's hard to tell. Before these runs, I expected we would see NaNs over the ocean in most (all?) variables after 1 timestep. But I guess even over the ocean things can be stable for some time and only break later on. If this is the case, I'm not sure how helpful the single number of NaNs we provide will be, since it's impossible to distinguish if they're over ocean or not. We could solve this by including the mask in our check though. |
4411c53
to
1d2e827
Compare
Adds a function that quantitatively checks how many NaNs are present in the state, and displays this information to the user. This can be used to inspect sol.u[end] after a simulation has run, to see if any NaNs were produced at the end of the simulation. If no NaNs are found, this information is logged in an info statement when run in verbose mode. If NaNs are found, this information is logged in a warn statement.
1d2e827
to
2031735
Compare
Purpose
closes #969
Adds a function that quantitatively checks how many NaNs are present in the state, and displays this information to the user. This can be used to inspect
sol.u[end]
after a simulation has run, to see if any NaNs were produced at the end of the simulation.If no NaNs are found, this information is logged in an
info
statement. If NaNs are found, this information is logged in awarn
statement.To-do