Skip to content

Commit d56ece0

Browse files
committed
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.
1 parent 79bbe4a commit d56ece0

File tree

3 files changed

+230
-271
lines changed

3 files changed

+230
-271
lines changed

libglide/glide_types.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1945,7 +1945,7 @@ module glide_types
19451945
!> Where u > umax, let u = umax when evaluating beta(u)
19461946

19471947
! Note: A basal process model is not currently supported, but a specified mintauf can be passed to subroutine calcbeta
1948-
! to simulate a plastic bed..
1948+
! to simulate a plastic bed.
19491949
real(dp),dimension(:,:) ,pointer :: mintauf => null() ! Bed strength (yield stress) calculated with basal process model
19501950

19511951
end type glide_basal_physics

libglissade/glissade.F90

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,6 @@ subroutine glissade_initialise(model, evolve_ice)
737737

738738
if (model%climate%overwrite_acab_value /= 0 .and. model%options%is_restart == RESTART_FALSE) then
739739

740-
!WHL - debug
741-
if (main_task) print*, 'overwrite_acab value (m/yr):', &
742-
model%climate%overwrite_acab_value * scyr*thk0/tim0
743-
744740
call glissade_overwrite_acab_mask(model%options%overwrite_acab, &
745741
model%climate%acab, &
746742
model%geometry%thck, &
@@ -1987,6 +1983,11 @@ subroutine glissade_thermal_solve(model, dt)
19871983
endwhere
19881984
endif
19891985

1986+
!WHL - debug - Set mask = 0 where thck = 0 for dome test
1987+
! where (model%geometry%thck == 0)
1988+
! bwat_mask = 0
1989+
! endwhere
1990+
19901991
call parallel_halo(bwat_mask, parallel)
19911992

19921993
! Compute bwat based on a steady-state flux routing scheme

0 commit comments

Comments
 (0)