%% Calculates H_proj for the years
%
%
%%%
function make_hproj

    % load Fi data
    load('Fi_year.mat');
   
    % load yeartime array
    load('yeartime.mat');
    
   for year = 1997:2009

      disp(year);
      % load X_dist and Y_dist 
      load(['dist_' num2str(year) '.mat']);
      eval (['dist = dist_' num2str(year)]);
      
      % Calculate H_proj
      H_proj = hproj(yeartime(1,:),yeartime(2,:),Fi_year(1,1:105120), dist.x(1,1:105120), dist.y(1,1:105120));
      
      % Save H_proj to the file
        eval (['Hproj_' num2str(year) '=H_proj;']);
        fn = ['Hproj_' num2str(year)];
        eval (['save(''' fn ''', ''' fn ''');']);
    end;  
    
  