-
Notifications
You must be signed in to change notification settings - Fork 123
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
fix(sfr): enforce divflow<=1.0 for divs with cprior type 'FRACTION' #636
fix(sfr): enforce divflow<=1.0 for divs with cprior type 'FRACTION' #636
Conversation
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.
Looks good. One small comment below, which is trivial, and is intended to get you using the constants in the ConstantsModule
! -- if diversion cprior is 'fraction', ensure that 0.0 <= fraction <= 1.0 | ||
cp = this%divcprior(ii) | ||
divq = this%divflow(ii) | ||
if (cp == 'FRACTION' .and. (divq < 0.0 .or. divq > 1.0)) then |
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.
Should probably use the constants DZERO and DONE instead of 0.0 and 1.0.
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.
Thanks for the pointer @langevin-usgs, have patched and PR is now rerunning
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.
@langevin-usgs I looked at the failure and it occurred with one of the models in modflow6-testmodels.git, specifically one that resides in mf5to6:
Not being sure if the error was anomalous, I tried running the model locally after running the conversion program:
It doesn't seem like this error is related to the change made in this PR? Since the first commit on this PR passed, then changing 0.0 -> DZERO in the second commit caused it to fail, I'm wondering if we should try and get it to run again?
done in response to PR review: #636 (review)
Fixes #635