MATLAB Examples

arcticseaice documentation

arcticseaice plots daily Arctic sea ice concentration from Nimbus-7 SMMR and DMSP SSM/I-SSMIS Passive Microwave Data or Near-Real-Time DMSP SSMIS Daily Polar Gridded Sea Ice Concentrations.

Data are described here: http://nsidc.org/data/docs/daac/nsidc0081_ssmi_nrt_seaice.gd.html and here: http://nsidc.org/data/docs/daac/nsidc0051_gsfc_seaice.gd.html

Contents

Syntax

arcticseaice
arcticseaice(Date)
arcticseaice(...,'km')
arcticseaice(...,'label',LabelLocation)
ci = arcticseaice(...,'noplot')
[ci,lat,lon,x,y,h] = arcticseaice(...)

Description

arcticseaice plots a the most recent available sea ice concentration map.

arcticseaice(Date) specifies a date from October 26, 1978 to present. Date can be entered as a string in just about any common format for writing dates, or in Matlab's datenum format. Any date after January 1 of the current year will use Near-Real-Time data. This may potentially cause errors in the first week of the year. We will see.

arcticseaice(...,'km') plots in polar stereographic kilometers.

arcticseaice(...,'label',LabelLocation) specifies a location for date label. Location must be specified in cardinal coordinates (e.g., 'north' for top) or 'none' to place no label. Default LabelLocation is 'southwest', meaning the lower left corner of the map.

ci = arcticseaice(...,'noplot') does not plot any data, but returns a gridded sea ice concentration. This may be useful for populating a 3D matrix of sea ice concentrations.

[ci,lat,lon,x,y,h] = arcticseaice(...) returns a whole slew of good information, including lat/lon grids, handle h of plotted object(s), and x,y grids.

Example 1: A very simple example:

arcticseaice

Example 2: Specify a date:

arcticseaice('feb. 3, 2015','label','none')
cb = colorbar;
ylabel(cb,'sea ice concentration (%)')

For a better context, you can add land areas with arcticborders, I'll use my rgb function to get RGB values of tan:

arcticborders('facecolor',rgb('tan'))

And Matlab's default colormap is not very intuitive for sea ice concentration, so let's use cmocean, which is now included in this package:

cmocean ice

Example 3: Make a gif

This example uses export_fig to make a gif. Rather than letting the arcticseaice function do the plotting, we'll download the data and specify the 'noplot' option, then plot later so we'll only be changing the gridded dataset with each frame of the final gif. Start by downloading the data, we'll do every three days for a year. This will take some time to download. Start by plotting the first frame and export a tif of the first frameAfter the first frame, loop through the others, changing only the cdata values and the text string. Then convert the tif to a gif.

% Every three days for a year:
t = datenum('jan 1, 2013'):3:datenum('dec 31, 2013');
% Preallocate the full grid of NaNs before filling with data:
ci = NaN(448,304,length(t));
% Get the first day of data and also return the x,y grids:
[ci(:,:,1),~,~,x,y] = arcticseaice(t(1),'noplot');
% Get the rest of the days of data:
for n = 2:length(t)
    ci(:,:,n) = arcticseaice(t(n),'noplot');
end
% First frame:
figure
p=pcolor(x,y,squeeze(ci(:,:,1)));
shading interp
axis image off
cmocean ice
hold on
arcticborders('facecolor',rgb('tan'))
caxis([0 100])
set(gca,'color',rgb('medium gray'))
set(gcf,'color',rgb('medium gray'))
txt = text(0,1,datestr(t(1),'mmm yyyy'),'vert','top',...
           'color','w','fontname','helvetica','horiz','left',...
           'fontweight','bold','units','normalized')
export_fig temp.tif -append -m1.5
% Loop through all other frames:
for k = 2:length(t)
   set(p,'cdata',squeeze(ci(:,:,k)))
   set(txt,'string',datestr(t(k),'mmm yyyy'))
   caxis([0 100])
   export_fig temp.tif -append -m1.5
end
im2gif('temp.tif','ArcticSeaIce2013.gif','-delay',0.01,'-nocrop')

Author Info

This function was written by Chad A. Greene of the University of Texas Institute for Geophysics (UTIG). http://www.chadagreene.com. March 2015. Modified for the arctic by Chad in May 2016. This function contains polarstereo_fwd, which was written by Andy Bliss.

Citing this dataset

If you use near-real-time data, cite this: Maslanik, J. and J. Stroeve. 1999, updated daily. Near-Real-Time DMSP SSMIS Daily Polar Gridded Sea Ice Concentrations. [indicate subset used]. Boulder, Colorado USA: NASA DAAC at the National Snow and Ice Data Center.

For finalized data, cite this: Cavalieri, D., C. Parkinson, P. Gloersen, and H. J. Zwally. 1996, updated yearly. Sea Ice Concentrations from Nimbus-7 SMMR and DMSP SSM/I-SSMIS Passive Microwave Data. [indicate subset used]. Boulder, Colorado USA: NASA DAAC at the National Snow and Ice Data Center.