Monday, March 17, 2014

Script to stitch the images

Call the MODISdaily Script to stitch the images
clc
clear all
close all
cd /home/nabin/dineof-3.0/DainelTry/Daniel_Codes

%Julian date and corresponding calendar date
N = xlsread('/home/nabin/dineof-3.0/DainelTry/Daniel_Codes/Day_correspondence.xlsx',1);
N_JT = N(:,1);
N_mm = N(:,2);
N_dd = N(:,3);
 

disp('working on aqua and terra for 2008')
 
%% variables
clc

%Grid limits
Lat_min = 35;
Lat_max = 46;
Lon_min = -85;
Lon_max = -69;


%vector of coordinates
latv = Lat_min:0.1:Lat_max;
lonv = Lon_min:0.1:Lon_max;

%creates box grid
for i=1:length(latv)
    for j=1:length(lonv)
        box_lat(i,j) = latv(i);
        box_lon(i,j) = lonv(j);
    end
end
clear latv lonv

saveAODboxIDW = [];
saveAODday = [];


% end
for daynum =1:366

[box_lat box_lon AODboxIDW AODday] = daynumMODIS(daynum, N, box_lat, box_lon);

saveAODboxIDW(:,:,daynum) = AODboxIDW;
saveAODday(:,:,daynum)= AODday;


end

save box_Lat_lon_IDW_AODav2008.mat box_lat box_lon saveAODboxIDW saveAODday

No comments: