Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented an efficient depression-filling algorithm
This commit adds an efficient algorithm for filling depressions in the head field when running the flux-routing hydrology scheme. The old scheme was very slow to converge on large grids such as the 4km Northern Hemisphere grid. The new scheme is based on the algorithm of Planchon and Darboux (2001). The basic idea is: * Initially, set phi = phi_in on the boundary, and set phi = a large number elsewhere (where phi is the head field). * Loop through the domain. For each cell c, with value phi(c) not yet fixed to a known value, compute phi_min8(n), the current minimum of phi in the 8 neighbor cells. - If phi_in(c) > phi_min8(n) + eps, then set phi(c) = phi_in(c) and mark that cell as having a known value, since phi(c) cannot go any lower. - If phi_in(c) < phi_min8(n) + eps, but phi(c) > phi_min8(c) + eps, set phi(c) = phi_min8(n) + eps. Do not mark the cell as having a known value, because it might be lowered further. * Continue until no further lowering of phi is possible. At that point, phi = phi_out. Here, eps is a small number greater than zero, which ensures that there are no flat surfaces when the depression-filling is done. Thus, it is no longer necessary to call fix_flats. On the 4km N.H. grid, the number of depression-fill iterations is reduced from several hundred per time step to ~10.
- Loading branch information