Tools for manipulating and analysing GRACE level-2 data
balaji devaraju
devaraju at ife uni-hannover de
% scriptfile for assessing leakage into catchments
% Load catchment data
load ~/Documents/Octave/Data/Hydrology/ctchmntindx3.mat
% maximum degree of spherical harmonic expansion
lmax = 60;
% Gauss filter of radius 4 degrees
B = gaussfltr(pi/45, lmax);
% Reformatting into /S|C\ format
B = diag(B)*ones(lmax+1,(2*lmax + 1));
B = sc2cs(B); % Formatiing into C\S format
% Rearranging catchment mask -180--180 to 0--360.
% The mask is on a half-degree equiangular grid
cindx = [cindx3(:,361:end), cindx3(:,1:360)];
% Computing potential leakage
bf = catchleak(B,lmax,'cs',cindx);