Skip to content

Checking atmospheric forcings specified in a DATM namelist file#18

Open
jjokella wants to merge 9 commits intomainfrom
dev-check-script
Open

Checking atmospheric forcings specified in a DATM namelist file#18
jjokella wants to merge 9 commits intomainfrom
dev-check-script

Conversation

@jjokella
Copy link
Contributor

The check_forcing.py script validates eCLM atmospheric forcing files
specified in datm_in namelist and stream files. It checks for file
existence, required variables as specified in the stream files, and
validates that radiation and precipitation values are non-negative.

jjokella and others added 9 commits December 15, 2025 12:22
reads datm_in and stream files and outputs info
Implement comprehensive validation for eCLM atmospheric forcing files:
- Parse datm_in namelist using f90nml
- Parse stream XML files using lxml
- Check NetCDF forcing files for required variables
- Validate non-negative values in radiation (swdn, lwdn) and
  precipitation (precn) variables
- Fix variable mapping direction: NetCDF variable -> eCLM variable
- Make script IPython-friendly (returns exit codes instead of sys.exit)

The script now provides detailed error reporting including:
- Missing forcing files
- Missing required variables
- Negative values in radiation/precipitation fields with counts and ranges

Usage: python checkforcing/check_forcing.py <path_to_datm_in>

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant