Major cleanup of snow code
- Dominant language
- Fortran
- Stars
- 352
- Forks
- 361
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
**Original comment from me 2015-10-18**
The exercise of tracking down a bug that caused infinite growth in snow_depth - which turns out to have been introduced in `clm4_5_1_r121` in order to fix a different bug - has highlighted for me how tangled the snow logic has become. I have given up when trying to trace this logic myself, and I am worried that more and more bugs are going to creep in unless we spend some time cleaning it up. Between (a) the multiple overlapping variables that represent snow pack state (water volume, depth, per-layer or integrated over the whole snow pack), which at any point in the code may or may not be entirely self-consistent; (b) the fact that snow variables sometimes represent averages over the whole column (including non-snow-covered area) and sometimes just averages over the snow-covered area; and (c) the fact that various snow-related variables (like snow_depth) are set in multiple places, spread across multiple modules – this becomes very hard code to understand or modify.
Contributor guide
Assessment
This issue has not been assessed yet.