-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing a bug causing model crash by avoiding negative channel storage #6568
base: master
Are you sure you want to change the base?
Conversation
Is there an issue for this bug? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this modification is not BFB.
else | ||
TRunoff%erout(iunit,nt) = -(TRunoff%erlateral(iunit,nt) + TRunoff%erin(iunit,nt) + TRunoff%wr(iunit,nt)/ theDeltaT) | ||
end if | ||
TRunoff%erout(iunit,nt) = -(TRunoff%erlateral(iunit,nt) + TRunoff%erin(iunit,nt) + TRunoff%wr(iunit,nt)*MaxStorageDepleted/ theDeltaT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will result in non BFB in the MOSART simulation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. This is non-BFB. It won't affect the overall model simulation (hence science), but it does change the results slightly for the rare cases when a whole channel storage is completely depleted. I added the "non-BFB" label.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since its potentially non-BFB, this fix would have to go in with 3.1
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.