Add check for invalid/incorrect mapunit in mksoiltexMod
- Dominant language
- Fortran
- Stars
- 352
- Forks
- 361
- Avg merge
- 6d 6h
- Merged PRs (30d)
- 8
Description
See below. In that discussion, @billsacks noted:
> This seems like a very good idea, but I haven't done enough analysis of this myself to know whether there are cases where we might expect the result to be zero after mapping. If you determine, through code analysis and/or experimentation, that this kind of check works, then I'd support having it in place!
___
### Discussed in https://github.com/ESCOMP/CTSM/discussions/2746
Originally posted by **samsrabin** September 9, 2024
Huge thanks to @billsacks and @mvertens for [solving](https://github.com/slevis-lmwg/ctsm/pull/9) the issue with bad mapunit determination in `mksoiltexMod`. It got me thinking—would it be helpful to add a check for bad mapping in there? It seems like mapunit can legitimately be zero over ocean, so maybe two checks:
- Initialize to a negative number, then check after mapping that it's not negative
- If it's zero after mapping, cross-reference with the land mask
Is that something we should consider?
Contributor guide
Assessment
This issue has not been assessed yet.