These scripts handle pre-processing of data used in IFPA, post-processing of IFPA data, perform analysis, and make figures in the manuscript.
If you use these scripts, please cite: A Vast Valley Network Beneath the Greenland Ice Sheet
- MATLAB version: 2024b or later
- Required toolboxes: Image Processing Toolbox, Mapping Toolbox, TopoToolbox v3.0.0
- Operating system compatibility: [Windows/Mac/Linux]
The following scripts require downloads from MATLAB File Exchange:
-
Arctic Mapping Tools by Chad Greene
- File Exchange ID: 63324
- URL: https://www.mathworks.com/matlabcentral/fileexchange/63324-arctic-mapping-tools
- Required by: IFPA_Plots_pub.m, IFPA_Analysis_pub.m
-
ColorBrewer: Attractive and Distinctive Colormaps by Stephen Cobeldick
- File Exchange ID: 45208
- URL: https://www.mathworks.com/matlabcentral/fileexchange/45208-colorbrewer-attractive-and-distinctive-colormaps
- Required by: IFPA_Plots_pub.m
-
cmocean perceptually-uniform colormaps by Chade Greene
- File Exchange ID: 57773
- URL: https://www.mathworks.com/matlabcentral/fileexchange/57773-cmocean-perceptually-uniform-colormaps
- Required by: IFPA_Plots_pub.m
-
subtightplot by Felipe G. Nievinski
- File Exchange ID: 39664
- URL: https://www.mathworks.com/matlabcentral/fileexchange/39664-subtightplot
- Required by: IFPA_Plots_pub.m
-
textborder - Higher contrast text using a 1-pixel-thick border by Joao Henriques
- File Exchange ID: 27383
- URL: https://www.mathworks.com/matlabcentral/fileexchange/27383-textborder-higher-contrast-text-using-a-1-pixel-thick-border
- Required by: IFPA_Plots_pub.m
getIFPAdata.m: Loads raw IFPA data, filtered DEM and velocity data, BMGnetworksegment_AC.m: altered version of TopoToolbox function networksegment.m, with additional code for computing stream branching anglestotal_least_squares.m: Computes total least squares fit for stream segmentswrite_std_attrs_Grn.m: Writes standard attributes of netcdf for Greenlandshadecalc_alt.m: Makes hillshade or flow-aware hillshadereadGeotiff.m: reads x, y, z of geotiff into structureredblue.m: makes a nice red-blue diverging colorscale
- Download and extract all files to a folder
- Download required File Exchange dependencies (see links above)
- Add all folders and subfolders to your MATLAB path
Run the scripts in the following order:
processIFPAInputs_pub.m- Makes filtered, resampled DEM and velocity fields and flow-aware hillshadeGreenland_IFPA.ipynb- Run IFPA in Jupyter Notebook (python - has its own dependencies)Blend_IFPA_pub.m- Blends IFPA and BMG using a combination of automatic and manual delineation of places where IFPA is not preferredRadar correction step- Part of BedMachine Greenland workflow performed by Mathieu MorlighemIFPA_Analysis_pub.m- Runs analyses and exports final resultsIFPA_Figures_pub.m- Makes all figures in manuscript and supplement
- File format: netcdf (.nc), shapefiles (.shp), matfiles (.mat)
- Expected structure: described in scripts. Publicly available external datasets are linked, referenced in the paper, or described.
Common issues and solutions:
- Path errors: Ensure all dependencies are on MATLAB path
- Missing functions: Check that all File Exchange dependencies are installed
- Version compatibility: No known version-specific issues, but good to check
For questions about these scripts, contact: allison.m.chartrand@gmail.com
This project is licensed under the terms of the GNU GENERAL PUBLIC LICENSE Version 3.
Original code contained herein is written by Allison Chartrand and/or Joe MacGregor, with some code snippets generated by AI tool ChatGSFC (claude-4.5-sonnet). We thank the authors acknowledged above who have contributed useful code on FileExchange.