clear all;close all;pack;clc % Read AMSR2 file % % Define the date for the filename d=dir(['f34_2018*']); for i=1:length(d) filename=d(i).name; disp(filename) % ----------------------------------------------------------- % Read the data as BINARY format fid=fopen(filename,'r'); aa=fread(fid,6*1440*720,'uchar'); fclose(fid); data=reshape(aa,1440,720,6); clear aa % ----------------------------------------------------------- % Read each one of the variables aux=data(:,:,1)'; % sst L=aux>250; aux(L)=nan; sst(:,:,i)=(aux*0.15)-3; % SST between -3 and 34.5C % ----------------------------------------------------------- % ----------------------------------------------------------- % Esta parte está comentada pois não usaremos essas variáveis %winz=data(:,:,2)'; % wind at 10.7GHz between 0 and 50 m/s %L=winz>250; %winz(L)=nan; %winz=winz*0.2; %winw=data(:,:,3)'; % wind at 37GHz between 0 and 50 m/s %L=winw>250; %winw(L)=nan; %winw=winw*0.2; %vap=data(:,:,4)'; % water vapor between 0 and 75 mm %L=vap>250; %vap(L)=nan; %vap=vap*0.3; %cld=data(:,:,5)'; % liquid cloud water between 0 and 2.5mm %L=cld>250; %cld(L)=nan; %cld=cld*0.01-.05; %rain=data(:,:,6)'; % precipitaion between 0 and 25mm/hr %L=rain>250; %rain(L)=nan; %rain=rain*0.1; % ----------------------------------------------------------- % ----------------------------------------------------------- end % Como eu sei quais são os valores de lat e lon? lon=.125:.5:360; lat=-89.975:.5:90; clear L ans fid filename aux d data i %save amsr2_2018