dvalters / HAIL-CAESAR

The High-Performance Architecture-Independent LISFLOOD-CAESAR model of floodplain, river, and sediment dynamics
http://dvalters.github.io/HAIL-CAESAR
GNU General Public License v3.0
38 stars 12 forks source link

[flow routing] Can tempslope be set when x<1 rather than x<=2? #22

Open dvalters opened 6 years ago

dvalters commented 6 years ago

This is the only place in the code where we check the leftmost + 2 grid cells to set tempslope, it would make it easier for the libgeodecomp refactor if this was consistent on all edges of the model domain.

Perhaps it is some legacy code from an older version of the CAESAR code?

https://github.com/dvalters/HAIL-CAESAR/blob/b6454bd58184a3599930e2fd6022426a3273572a/src/catchmentmodel/LSDCatchmentModel.cpp#L2348

It means that in libgeodecomp, there is lots of complicated "edge" cases:

https://github.com/dvalters/HAIL-CAESAR/blob/634bcfc8e7209ce366d076d7caf9e56bbe0e7382/src/catchmentmodel/LSDCatchmentModel.cpp#L116-L125

Which make for lots of case statements

Try running the standard test with this changed to x<=1 and run standard case. (Arno and I could not see a reason why this wouldbe necessary at first glance.)