Running gradient fixes from home -- cleaned up paths
Debugging session. Found some bugs. High anchors weren't being identified correctly for lakes. As a result, elevations were artificially heightened to the minimum elevation of the biggest lake trib.
Cleaned up code. Made minimum elevations more consistent -- minimum elevations now always take the value of the downstream maximum, if possible. Found a couple occasions where elevCheck flag should have been assigned, but wasn't. Hopefully this will cure both the problem with lake tributaries not being assigned as well as the occasional discontinuous elevation profile.
Fixed how post-headwater selection works. Prior to the fix, the algorithm was choosing 'any' of the next largest drainage areas, but to work properly the algorithm needed to choose the next largest drainage area in the working outlet
Need to fix line 82 in gradientControl.r to deal with choosing the downstream-most TRACEID in cases where a lake is at a confluence
fixed line 82 in gradientControl.r -- Should hopefully work now. Even if it works, we may want to revisit the problem of lake elevations propogating in chains of lakes--sometimes these chains of lakes have high-head dams. If elevations are propogated through chains of lakes, tribs of upstream lakes will have artificially high gradients.
still had issues with ties at confluences. Fixed.
Fixed a problem with elevations assigned values of 1. Also implemented a way of reducing problems with elevations propogating up chains of lakes--with changes, elevations will not propogate if dams exist. Instead, miniumum elevations will reflect the raw minimums