MATLAB Examples

dist2mask documentation

dist2mask returns the distance in kilometers from given datapoints to any mask type (grounded, iceshelf, etc.) according to MEaSURES Antarctic Boundaries for IPY 2007-2009 from Satellite Radar, Version 2. This function is similar to the bedmap2_dist function in the Bedmap2 Toolbox.

The dataset is described on the NSIDC site here:



d = dist2mask(masktype,lati,loni)
d = dist2mask(masktype,xi,yi)


d = dist2mask(masktype,lati,loni) gives the distance d from the geo locations (lati,loni) to the nearest mask type, which can be any of the following:

  • 'grounded' all ice or rocks on the landward side of the InSAR-detected landward limit of flexure.
  • 'iceshelf' all the bits of the ice sheet (not sea ice) on the seaward side of the landward limit of flexure.
  • 'ice' any part of the ice sheet (not sea ice).
  • 'openocean' any part of the open ocean (not ice shelves or sea ice).
  • 'tidal' everything seaward of the landward limit of flexure, including ice shelves.

d = dist2mask(masktype,xi,yi) is the same as above, except coordinates are polar stereographic meters (ps71), which are automatically parsed by the islatlon function.


Given these scattered points, let's say it's mooring data:

lat = -70+4*randn(50,1);
lon = -45+6*randn(50,1);


Suppose you want to know the distance of each mooring to the nearest bit of ice sheet:

d = dist2mask('ice',lat,lon);

cb = colorbar;
ylabel(cb,' distance from coast (km) ')

Citing this dataset

If you use this dataset, please cite the following:

  • Dataset citation: Mouginot, J., B. Scheuchl, and E. Rignot. 2017. MEaSUREs Antarctic Boundaries for IPY 2007-2009 from Satellite Radar, Version 2. [Indicate subset used]. Boulder, Colorado USA. NASA National Snow and Ice Data Center Distributed Active Archive Center.

Author Info

This function and supporting documentation were written by Chad A. Greene of the University of Texas Institute for Geophysics (UTIG), November 2016.