Boundary condition change conditional for setting tempslope#24
Boundary condition change conditional for setting tempslope#24
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. |
| (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.
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_routewheretempslopeis set to theedgeslopeparameter. Currently onmastertempslope is set whereyandxare<=2. Opposite boundary usesimaxandjmax.Now replacing:
with:
And same for the
ydirections.Also removing negative edgeslope at opposite ends of the model domain.
Corresponds to jmax/imax at other boundary conditions of model domain.