The MATLAB code included here is designed to solve the network model posed in Rada & Schoof, Subglacial drainage characterization from eight years of continuous borehole data on a small glacier in the Yukon Territory, Canada, and to visualize the output.

network_percolation_v2 is the main time stepping routine, using a backward Euler step. The file header in network_percolation_v2 gives full detail. network_timestep_v5 is the function whose roots define the backward Euler step. with network_timestep_Jacobian_v5 its Jacobian matrix. network_percolation makes use of the Newton solver Newton_v2, and optionally calls hewitt_grid_v2 to create the network. Its default action is also to call Nfun and qfun to define water input to the network, and to define Dirichlet conditions at selected "boundary" nodes in the network.

default_params is a MATLAB .mat file containing a parameters structure "parameters" that will allow the network_percolation_v2 code to run; the corresponding output can be visualized using visualize_v7.





