% PS05_init a m-file script to read in the AVHRR images and display them % as images in a 3x1 plot % % Started 2000:10:05 D. Glover, WHOI % Modif'd 2002:10:22 DMG to add "PS04a 2002" text at bottom % Modif'd 2008:10:27 DMG changed the name from PS04 to PS05 % Start the stopwatch t_init_init=clock; % Set a new colormap load purp_map; cmap=purp_map; cmap(1,:)=[1 1 1]; cmap(64,:)=[0.5 0.5 0.5]; % Read in the binary satellite images fid1=fopen('A1987130h09da_sst.bin'); fid2=fopen('A1987131h09da_sst.bin'); fid3=fopen('A1987132h09da_sst.bin'); X1=fread(fid1,[114 114],'uint8'); X2=fread(fid2,[114 114],'uint8'); X3=fread(fid3,[114 114],'uint8'); % Get some size parameters of the images [nrows,ncols]=size(X1); % Convert binary values into SSTs X1sst=byte2sst(X1); X2sst=byte2sst(X2); X3sst=byte2sst(X3); % Set missing data (-3) to Nan X1sst(X1sst==-3)=nan; X2sst(X2sst==-3)=nan; X3sst(X3sst==-3)=nan; % Display images, AS images figure subplot(311); imagesc([-69 -59],[27 37],flipud(X1sst'),[18 26]);h1=colorbar;axis xy; colormap(cmap);axis square; title('AVHRR PathFinder SST 1987 day 130','fontsize',16); subplot(312); imagesc([-69 -59],[27 37],flipud(X2sst'),[18 26]);h2=colorbar;axis xy; colormap(cmap);axis square; title('AVHRR PathFinder SST 1987 day 131','fontsize',16); subplot(313); imagesc([-69 -59],[27 37],flipud(X3sst'),[18 26]);h3=colorbar;axis xy; colormap(cmap);axis square; title('AVHRR PathFinder SST 1987 day 132','fontsize',16); text(-60,25,'PS05a 2002'); fclose(fid1);fclose(fid2);fclose(fid3); % Report total initialization time sprintf('%s%g\n','Initialization Elasped Time: ',etime(clock,t_init_init))