MATLAB Examples

# bamberdem_interp documentation

The bamberdem_interp function interpolates the Bamber et al. surface elevation DEM to any geo- or polar stereographic coordinates.

## Requirements and installation

This function requires the Antarctic Mapping Tools package found here: http://www.mathworks.com/matlabcentral/fileexchange/47638

There are two options for installation:

1. You can download the data manually here: ftp://sidads.colorado.edu/pub/DATASETS/DEM/nsidc0422_antarctic_1km_dem/, 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.

## Syntax

```zi = bamberdem_interp(lati,loni)
zi = bamberdem_interp(xi,yi)
zi = bamberdem_interp(...,'uncertainty')
zi = bamberdem_interp(...,InterpolationMethod)```

## Description

zi = bamberdem_interp(lati,loni) returns surface elevations relative to the WGS-84 ellipsoid at geo coordinates lati,loni in decimal degrees.

zi = bamberdem_interp(xi,yi) returns surface elevations relative to the WGS-84 ellipsoid at xi,yi which are locations in polar stereographic meters with a true latitude of 71 S.

zi = bamberdem_interp(...,'uncertainty') interpolates the uncertainty grid rather than the surface elevation grid.

zi = bamberdem_interp(...,InterpolationMethod) specifies any interpolation method supported by Matlab's inbuilt interp2 function. Default interpolation method is linear.

## Example

For a 500 km wide grid at 500 m resolution centered on Wilkins Ice Shelf:

```[lat,lon] = psgrid('wilkins ice shelf',500,0.5); Z = bamberdem_interp(lat,lon); ```

Now map it. Start with mapzoomps and specify an inset map in the lower-left-hand or 'sw' for southwest corner. Plot the surface with pcolorps, add relief shading with a gain of 4 coming from the upper left-hand corner (225 degrees) at an elevation angle of 45 degrees, and add a scalebar. Also set axis tight so the frame will properly fill the map:

```mapzoomps('wilkins ice shelf','sw') p=pcolorps(lat,lon,Z); shadem(4,[225 45]) axis tight scalebarps('location','se') xlabel 'eastings (m)' ylabel 'northins (m)' ```

## Compare Bamber et al. DEM to CryoSat-2 DEM:

If you have the CryoSat-2 plugin for AMT, comparison is easy. First interpolate CryoSat-2 surface elevation values:

```Zcryo = cryosat2_interp(lat,lon); ```

Now tinker with the plot from the first example. The shading is already linked to z data from the Bamber DEM, but we can keep the z values, keep the shading, and adjust the color data. Of course this is difference data, so we'll need a diverging colormap. I'm using brewermap which is available on the Matlab File Exchange site. Also I call mapzoomps again to re-align the inset map:

```set(p,'CData',Z-Zcryo) cb = colorbar; ylabel(cb,'Z_{Bamber} - Z_{CryoSat2} (m)') caxis([-800 800]) colormap(brewermap(256,'prgn')) mapzoomps('wilkins ice shelf','sw') ```

## Citing Bamber et al. data

This dataset can be found here: http://nsidc.org/data/docs/daac/nsidc0422_antarctic_1km_dem/index.html

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 at the University of Texas in Austin May 2016. http://www.chadagreene.com