MATLAB Examples

bamberdem_data documentation

The bamberdem_data function returns Bamber et al. 2009 combined ERS-1 and ICESat Antarctic surface elevations and corresponding geographic or polar stereographic cartesian coordinates.


Requirements and installation

This function requires the Antarctic Mapping Tools package found here:

There are two options for installation:

  1. You can download the data manually here:, unzip the two Antarctic folders containing .tif files, and make sure Matlab knows how to find the folders by adding a path to the folder, or you can
  1. Simply run bamberdem_data and if it cannot find the datasets it will try to download the data automatically. It will ask for your permission, of course. The automatic download option is sensitive to firewall settings.


Z = bamberdem_data
Z = bamberdem_data(lati,loni)
Z = bamberdem_data(xi,yi)
Z = bamberdem_data(...,extrakm)
Z = bamberdem_data(...,'res',resolution)
[lat,lon,Z] = bamberdem_data(...)
[X,Y,Z] = bamberdem_data(...,'xy')
[...] = bamberdem_data(...,'uncertainty')


Z = bamberdem_data returns Bamber et al. surface elevation data at the full 1 km resolution. This is a 5601x5601 dataset and loading may take a second. Surface elevations are relative to the WGS84 ellipsoid.

Z = bamberdem_data(lati,loni) returns only enough Bamber et al. data to fully encompass a set of points given by geo coordinates lati,loni.

Z = bamberdem_data(...,xi,yi) returns only enough Bamber et al. data to fully encompass a set of points given by polar stereographic (True lat -71) coordinates xi,yi.

Z = bamberdem_data(...,extrakm) as above, but encompasses points xi,yi or lati,loni and adds a buffer of specified width extrakm in kilometers around all four sides of data points. This is useful when you want data surrounding a point or several measurments.

Z = bamberdem_data(...,'res',resolution) specifies a resolution in kilometers. By default, this function returns the full 1 km Bamber et al. data set. Downsampling is somewhat crude as it only loads every Nth datapoint rather than antialiasing. For a good antialiased low-res dataset, load the full dataset then use imresize to attain the resolution you seek.

[lat,lon,Z] = bamberdem_data(...) returns geo coordinates and elevation or mask data Z.

[X,Y,Z] = bamberdem_data(...,'xy') returns polar stereographic coordinates when the 'xy' tag is included.

[...] = bamberdem_data(...,'uncertainty') loads the uncertainty dataset rather than the surface elevation dataset.

Example 1: Comparison to Bedmap2

Suppose you're interested in the elevation of Totten Glacier and the surrounding region. Totten Glacier is located at

scarloc 'totten glacier'
ans =
  -66.8333  116.3333

so load a 500 km wide DEM by setting (66.83S,116.33E) as the center point and specify a 250 m buffer on all sides of the centerpoint. Below I'm specifying Zbam as the Bamber surface elevation because later we'll load a Bedmap2 surface elevation:

[lat,lon,Zbam] = bamberdem_data(-66.83,116.33,150);

Use surfps if you want to see the surface in fancy 3D and also return a handle which we'll use later:

h = surfps(lat,lon,Zbam);
material dull

Okay, that view is a bit silly--what we want is a quantitative comparison to Bedmap2. Use bedmap2_interp to get the surface elevation from Bedmap2. Remember, a key difference between Bedmap2 and the Bamber et al. DEM is that Bedmap2 is natively relative to the geoid, whereas the Bamber et al. DEM is relative to WGS-84 ellipsoid. You can either use Antarctic Geoid Conversions functions or you can specify 'surfw' to denote the WGS-84-referenced elevations when you load Bedmap2 data:

Zb = bedmap2_interp(lat,lon,'surfw');

Now set the color data from the plot above to be the difference between Bamber et al. and Bedmap2:


Change to a nadir viewing angle:


Add a colorbar and use a diverging colormap because difference maps like this should always be depicted with a diverging colormap. I'm using brewermap, which is available on the Mathworks File Exchange site:

cb = colorbar;
ylabel(cb,'Bamber et al. minus Bedmap2 (m)')
caxis([-200 200])

Example 2: Uncertainty plotted using Matlab's Mapping Toolbox

Load a 1100 km by 1100 km uncertainty grid centered on Mount Finley. To start, use scarloc to find the coordinates of Crary Ice Rise:

scarloc 'crary ice rise'
ans =
  -82.9333 -172.5000

Now a 80 km by 1000 km grid can be loaded as the center coordinate plus a 550 km buffer around top, bottom, left, and right edges:

[lat,lon,U] = bamberdem_data(-82.93,-172.5,550,'uncertainty');

If you have Matlab's Mapping Toolbox, You can plot uncertainty like this:

mapzoom('crary ice rise',1100,'inset','nw')
cb = colorbar('south')
xlabel(cb,'Bamber et al. DEM uncertainty (m)')
cb =

Citing Bamber et al. data

This dataset can be found here:

If you use Bamber et al. data, please cite the following:

Bamber, J. L., J. L. Gomez-Dans, and J. A. Griggs. 2009. A New 1 km Digital Elevation Model of the Antarctic Derived from Combined Satellite Radar and Laser Data ? Part 1: Data and Methods. The Cryosphere, 3, 101-111.

Griggs, J. A. and J. L. Bamber. 2009. A New 1 km Digital Elevation Model of Antarctica Derived from Combined Radar and Laser Data ? Part 2: Validation and Error Estimates. The Cryosphere, 3, 113?123.

Author Info

This function was written by Chad A. Greene of the Institute for Geophysics (UTIG) at the University of Texas in Austin, May 2016.