Skip to content

Code release accompanying manuscript reporting on the application of IFPA to infer subglacial topography in Greenland. The DOI for the datasets which accompany this repository is 10.5281/zenodo.18245712

License

Notifications You must be signed in to change notification settings

AllisonCh/Greenland_IFPA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Greenland-Scape: MATLAB Analysis Scripts

Description

These scripts handle pre-processing of data used in IFPA, post-processing of IFPA data, perform analysis, and make figures in the manuscript.

Citation

If you use these scripts, please cite: A Vast Valley Network Beneath the Greenland Ice Sheet

System Requirements

  • MATLAB version: 2024b or later
  • Required toolboxes: Image Processing Toolbox, Mapping Toolbox, TopoToolbox v3.0.0
  • Operating system compatibility: [Windows/Mac/Linux]

Dependencies

MATLAB File Exchange Dependencies

The following scripts require downloads from MATLAB File Exchange:

  1. Arctic Mapping Tools by Chad Greene

  2. ColorBrewer: Attractive and Distinctive Colormaps by Stephen Cobeldick

  3. cmocean perceptually-uniform colormaps by Chade Greene

  4. subtightplot by Felipe G. Nievinski

  5. textborder - Higher contrast text using a 1-pixel-thick border by Joao Henriques

Custom Helper Scripts (Included)

  • getIFPAdata.m: Loads raw IFPA data, filtered DEM and velocity data, BMG
  • networksegment_AC.m: altered version of TopoToolbox function networksegment.m, with additional code for computing stream branching angles
  • total_least_squares.m: Computes total least squares fit for stream segments
  • write_std_attrs_Grn.m: Writes standard attributes of netcdf for Greenland
  • shadecalc_alt.m : Makes hillshade or flow-aware hillshade
  • readGeotiff.m: reads x, y, z of geotiff into structure
  • redblue.m: makes a nice red-blue diverging colorscale

Installation Instructions

  1. Download and extract all files to a folder
  2. Download required File Exchange dependencies (see links above)
  3. Add all folders and subfolders to your MATLAB path

Usage Instructions

Workflow Order

Run the scripts in the following order:

  1. processIFPAInputs_pub.m - Makes filtered, resampled DEM and velocity fields and flow-aware hillshade
  2. Greenland_IFPA.ipynb - Run IFPA in Jupyter Notebook (python - has its own dependencies)
  3. Blend_IFPA_pub.m - Blends IFPA and BMG using a combination of automatic and manual delineation of places where IFPA is not preferred
  4. Radar correction step - Part of BedMachine Greenland workflow performed by Mathieu Morlighem
  5. IFPA_Analysis_pub.m - Runs analyses and exports final results
  6. IFPA_Figures_pub.m - Makes all figures in manuscript and supplement

Input Data Requirements

  • 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.

Troubleshooting

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

Contact Information

For questions about these scripts, contact: allison.m.chartrand@gmail.com

License

This project is licensed under the terms of the GNU GENERAL PUBLIC LICENSE Version 3.

Acknowledgments

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.

About

Code release accompanying manuscript reporting on the application of IFPA to infer subglacial topography in Greenland. The DOI for the datasets which accompany this repository is 10.5281/zenodo.18245712

Resources

License

Stars

Watchers

Forks

Packages

No packages published