E3SM
E3SM copied to clipboard
Fixing a bug causing model crash by avoiding negative channel storage
MOSART can be forced to crash if negative channel storage values are produced mainly due to round errors, when the channel storage is completely depleted in a single time step. The crashing was reported in several cases of E3SM fully coupled runs, where the kinematic waving routing method was invoked by default. Jon Wolfe was able to reproduce the crashing error in a low-res run and print out detailed information to identify the cause. In this fix, a numerical treatment has been implemented in the kinematic wave routing method, subroutine Routing_KW(), to ensure that any channel storage does not get completely depleted in a single time step. This treatment is physically reasonable as long as MOSART runs at a sub-daily time step. Jon Wolfe has tested this treatment in his low-res coupled run, and it helped avoid crashing.