shr_wv_sat_mod routines should abort (or produce an obviously-incorrect answer) if init hasn't been called
- Dominant language
- Fortran
- Stars
- 3
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
As @uturuncoglu pointed out in https://github.com/ESCOMP/CMEPS/issues/653, if you try to use the routines in shr_wv_sat_mod without first calling shr_wv_sat_init, they can produce 0 values. It would be best if they aborted in this case, or at the very least (if aborting from within these functions isn't acceptable, e.g., because it would require changing functions to no longer be pure and that would be bad for performance) produced obviously-incorrect values that would allow failing faster - e.g., as in:
https://github.com/ESCOMP/CESM_share/blob/f210ab4b326ce9da5f8b062953eef0bb023ec188/src/shr_wv_sat_mod.F90#L644-L648
This could be done by having a module-level `initialized` variable that is checked in each function.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.