Wednesday, January 28, 2015

Plot LST

fn = 'MOD11_L2.A2010001.1835.041.2010006193246.hdf' Longitude = double(hdfread(fn, 'Longitude')); Latitude = double(hdfread(fn, 'Latitude')); LST = double(hdfread(fn, 'LST')); % LST550 = squeeze(LST); % this is LST .550 um LST(LST<7500 an="" lst="">65535) = NaN; LST = 0.02* LST; % fill = -9999*scale % LST550(LST550==fill)=NaN; figure load coast latlim=[floor(min(min(Latitude))),ceil(max(max(Latitude))) ]; lonlim=[floor(min(min(Longitude))),ceil(max(max(Longitude))) ]; ax = worldmap(latlim, lonlim); surfacem(Latitude, Longitude, LST); geoshow(lat, long,'Color', 'black' ) colormap; set(gcf,'Color','white') map2 = colormap; map2( 1, : ) = 1; colormap(map2); colorbar % saveas(gcf, 'plotHDF.png', 'png') close all



 figure
W(W<0) = NaN;  
load coast
latlim=[floor(min(min(Lat))),ceil(max(max(Lat))) ]; lonlim=[floor(min(min(Lon))),ceil(max(max(Lon))) ];
ax = worldmap(latlim, lonlim);
surfacem(Lat, Lon, W);
geoshow(lat, long,'Color', 'black' )
colormap; set(gcf,'Color','white')
map2 = colormap; map2( 1, : ) = 1; colormap(map2);
colorbar % saveas(gcf, 'plotHDF.png', 'png') close all
caxis([ 0 5])

No comments: