 
% A beginner might try to get the average global sea surface temperature
% by taking the _unweighted_ mean of all |sst| values: 

mean(sst,'all','omitnan')

%% 
% However, we must recall that the sst grid corresponds to equally spaced 
% latitudes and longitudes, which are *not* all equal in area. Lines of longitude
% converge at the poles, so an area-averaged measure of SST requires weighting 
% the mean by are of each grid cell. 
% 
% To accomplish this, turn the |lat| and |lon| arrays into grids and us