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

Model does not warn for NAs in cliamte driver and run as normal #1200

Open
XiulinGao opened this issue May 15, 2024 · 2 comments
Open

Model does not warn for NAs in cliamte driver and run as normal #1200

XiulinGao opened this issue May 15, 2024 · 2 comments

Comments

@XiulinGao
Copy link
Contributor

XiulinGao commented May 15, 2024

I recently discovered that FATES does not given warning messages and run as normal when there are significant amount of NAs in climate drivers. I noticed this because when I run FATES on my own branch (with some new code implmentation), I randomly get model failure with error message pointing to negative relative humidity from the HumanIndexMod on CTSM side. This made me to check the climate driver (which is subsetted point data from a regional climate dataset), and noticed that there are A LOT of NAs in the climate driver, and whole climate data literally has no useful information.... But the model will not fail if it's running on other branches. I am not totally sure what differences in model set up or between branches that triggered this, but it's worth noting that FATES can run when climate data is NA.

Although I have solved this for my own simulations by fixing the data subsetting problem, I think I need to bring this to your attention so people are aware of this. And maybe fix it?

@ekluzek
Copy link
Collaborator

ekluzek commented May 16, 2024

I think you mean NaN's (Not a Number) rather than NA? If not I'm not sure what you mean by NA? NaN's happen when a mathematical calculation is done that doesn't have a defined result (sqrt of a negative number for example).

The production build version of the model typically allows NaN's to happen and lets the calculated result be expressed as a NaN. If the calculation is restricted this may be fine, but it can propagate out depending on what is going on. The reason the production code allows NaN's is for performance, checking for NaN's is slower. When we run the code with the DEBUG option turned on, the code will abort when a NaN is calculated. In testing we typically do shorter simulations in DEBUG mode and hence catch problems like this. And we do recommend that if you encounter NaN's that are problems you run in DEBUG mode so that these are caught.

Does that answer your query?

@XiulinGao
Copy link
Contributor Author

Thanks Erik. by 'NA' I did mean NaN. Does that mean when in DATM mode the model allow most climate variables to be NaNs and only abort under debug mode? It is sort of concerning we can grow a forest when there is literally no precipitation or anything....

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

No branches or pull requests

2 participants