536 add check for nan values before running the soil model#1004
Merged
jacobcook1995 merged 3 commits intodevelopfrom Aug 20, 2025
Merged
Conversation
… it goes into (and stalls) the soil integration
…ng-the-soil-model
Collaborator
Author
|
If you run This is a meaningful improvement as previously the soil model integration would just stall, and this error message gives information as to what the bad input is |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1004 +/- ##
===========================================
+ Coverage 94.90% 94.91% +0.01%
===========================================
Files 80 80
Lines 6616 6632 +16
===========================================
+ Hits 6279 6295 +16
Misses 337 337 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a step to check for unexpected NaN values (which can stall the soil model integration) before the soil model integration starts. If NaNs are detected the an error is raised, informing the user which variables contain unexpected NaN values.
For variables that don't have a layer structure, unexpected NaN values are any NaN values. For variables that pertain to the soil layers, they are NaN values in any soil layer For the
soil_temperature(the only above ground variable the soil model cares about), unexpected NaN values are any NaN values in the surface layer.Fixes #536
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks