=====================================================================================
=========== A computationally efficient depression-filling algorithm for  ===========
=========== digital elevation models applied to proglacial lake drainage. ===========
=====================================================================================
=====================================================================================
==============================  Supplementary material ==============================
=====================================================================================

This package contains Matlab scripts with the improved flood-fill algorithm described
in the paper, as well as data files and demonstration scripts. The full package
should contain the following files:

- Fill_40km.m
- Fill_5km.m
- Fill_1km.m
- Map_Stack_40km_to_5km.m
- Map_Stack_40km_to_1km.m
- Map_Stack_5km_to_1km.m
- Demo_FillSea.m
- Demo_FillLake.m
- ShowMap.m
- Data_PD.nc
- Data_30Ky.nc

=====================================================================================

The two NetCDF files contain bedrock elevation, ice thickness and geoid perturbation
fields at present-day and 30,000 years ago, respectively. The latter were generated
by the ANICE-SELEN coupled ice-sheet sea-level equation model (de Boer et al., 2014).

The two demonstration scripts, Demo_FillSea and Demo_FillLake, are heavily commented
and explain how the optimized flood-fill algorithm works.

Demo_FillSea uses the Data_PD data file and determines the land/ocean-mask.
Demo_FillLake uses the Data_30Ky data file. It first determines the land/ocean mask
in the same way and then determines the extent and depth field of Lake Agassiz
30,000 years ago.

The three Fill_*km functions contain the optimized flood-fill algorithm for
different resolutions, as explained in the paper and in the comments within the
function code.

The three Map_Stack_*km-to_*km functions convert a Map and Stack from a low
resolution to a high resolution, as explained in the paper and in the comments
within the function code.

The ShowMap function creates a Matlab figure of a given land/water-mask and ice
thickness distribution. It should be compatible with most recent Matlab versions.
The size of the Figure may need to be adjusted to fit the screen resolution.

Command line calls to the scripts:
  Demo_FillSea
  Demo_FillLake

For questions, please contact the author:
Tijn Berends, c.j.berends@uu.nl

=====================================================================================