-
Notifications
You must be signed in to change notification settings - Fork 12
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
Boundary condition change conditional for setting tempslope #24
base: master
Are you sure you want to change the base?
Conversation
Regression test resultsOk, strictly speaking this breaks the tests as the results are not exactly identical: However the results are broadly comparable. There is some slight timing difference at certain points, but this might be expected since we have modified where tempslope is set for 2 grid cell on the West and Northern edges of the model domain. |
@@ -2345,7 +2345,7 @@ void LSDCatchmentModel::flow_route() | |||
(elev[x][y] + water_depth[x][y])) / DX; | |||
|
|||
if (x == imax) tempslope = edgeslope; | |||
if (x <= 2) tempslope = 0 - edgeslope; |
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.
Why is tempslope negative at the Western domain boundary, and positive at the Eastern domain boundary. (And similarly for N-S)?
This seems odd...
@aproeme Setting edgeslope/tempslope at the boundary edges in addition to the fix above does not seem to produce wildly different results, and seems more logically consistent. i.e. if (x == imax) tempslope = edgeslope;
if (x == 0) tempslope = edgeslope; and if (y == jmax) tempslope = edgeslope;
if (y == 0) tempslope = edgeslope; |
@aproeme I flipped the DEM in this one so that the catchment is on the Eastern edge. Tempslope is positive and equal to edgeslope now on all the boundaries: There are slightly higher peak discharges when edgeslope is positive on the E edge, but I'm wondering if this is actually more 'correct' since having a negative edgeslope on the boundary edge would act like a little 'speedbump' slowing the water down slightly... |
Will hold off on merging this into master this until we reconcile comments from Tom:
Maybe there is a way to get around this for the libgeodecomp port... will think about it! |
Changes part of
flow_route
wheretempslope
is set to theedgeslope
parameter. Currently onmaster
tempslope is set wherey
andx
are<=2
. Opposite boundary usesimax
andjmax
.Now replacing:
with:
And same for the
y
directions.Also removing negative edgeslope at opposite ends of the model domain.
Corresponds to jmax/imax at other boundary conditions of model domain.