MATLAB Examples

gmb_ts documentation

gmb_ts gives a time series of gravimetric mass balance data from TU-Dresden (Groh & Horwath 2016).

See also: gmb_data.



[gmb,t] = gmb_ts(mask)


[gmb,t] = gmb_ts(mask) gives the total sum gravimetric mass balance gmb in Gt for all true grid cells in a logical input mask. The mask must have the dimensions 117x97, corresponding to the dimensions of the GMB grid.


Before you can use this function, you must download the ~36 MB file from TU-Dresden here.

Example 1: Mass balance of the entire continent

This function requires you to define a mask for the region you're interested in. If you want the total mass balance of the continent, just define the mask as a 117x97 matrix of true values:

[gmb,t] = gmb_ts(true(117,97));

ylabel 'mass balance (Gt)'

Example 2: Mass balance of Pine Island Glacier

If you're interested in a particular ice basin, you'll have to know which GMB grid cells correspond to the basin of interest. Start by loading the GMB grid via the gmb_data function:

[lat,lon] = gmb_data;

% Plot the grid as gray dots and add a coastline for context:
plotps(lat,lon,'.','color',0.8*[1 1 1])

Now if you check your workspace, you'll see that lat and lon are 117x97 grids, and those are the gray dots plotted above. If you're interested in the mass balance of a particular ice basin, you'll need to figure out which grid cells correspond to that basin. The easiest way to do that is with the inbasin function in the Antarctic boundaries plugin for Antarctic Mapping Tools.

The inbasin function returns true for all grid cells within a given basin. So let's figure out which GMB grid cells lie within the Pine Island Glacier basin, and identify them as circles on the map:

pig = inbasin(lat,lon,'imbie refined','pine island');


For a little added context we can add the other basin outlines too:

plot_basins('imbie refined')

To get a time series of the total mass balance of the Pine Island Glacier basin, simply call gmb_ts with the pig mask as the only input:

[gmb,t] = gmb_ts(pig);

axis tight
box off
ylabel('Pine Island Glacier mass anomaly (Gt)')

Citing this dataset

If this function is useful to you, please cite the following:

  • Antarctic Mapping Tools: Greene, C. A., Gwyther, D. E., & Blankenship, D. D. Antarctic Mapping Tools for Matlab. Computers & Geosciences. 104 (2017) pp.151-157. doi:10.1016/j.cageo.2016.08.003.

Author Info

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