Overview %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%nakedsoftware. org opensource license, copyright 2010 stephane %nakedsoftware.org opensource license, copyright 2010 stephane.poirier@oifii.org % %developed by Stephane Poirier, M.Sc. Optical Physics, Remote Sensing Application Software Developer (1991-2010) %this function is part of oifii.org's ar\sp\ Microwave-derived 30-year Canada-Alaska Daily Temperature and Snowcover Databases library %this function is part of oifii.org's ar\sp\'this folder' application (lauched with ar\sp\'this file'.m) %oifii.org's ar\sp\affiche_carte application is part of the oifii.org's ar\sp set of applications which %may also contain similar variant versions of this function with identical filename. %A geophysical research paper about this work has been submitted in June 2009 for publication in JGR-Atmosphere %Royer, A. and Poirier S., Surface temperature spatial and temporal variations in North America from homogenized %satellite SMMR-SSM/I microwave measurements and reanalysis for 1979-2008, Journal of Geophysical Research - Atmosphere, %Submitted June 2009, http://www.oifii.org/tsatdb/Royer-Poirier_Microwave-derived-daily-surface-temperature_JGR2009JD012760_R2.pdf %This study's database can be downloaded from the author web site at: %http://www.oifii.org/tsatdb/Royer-Poirier_Microwave-derived-daily-surface-temperature-db_1979-2008.zip %this function is used to display the raw microwave raster data (NSIDC's SMMR and SSMI satellite, ref. nsidc.org) %usage: % 20yymmmdd %version 0.0, 20yymmmdd, spi, initial function draft
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [temp]=narr2easegrid(t,longitude,latitude) if nargin<1 disp('usage: narr2easegrid(t,longitude,latitude)'); return; end temp=[]; [grille]=latlon2easegrid_narr(longitude,latitude); % grille : m latitude x n longitude x 4 % 1 => les latitudes NARR % 1 => les longitudes NARR % 1 => les r EASEGrid % 1 => les s EASEGrid r=grille(:,:,3); s=grille(:,:,4); %ind=find(r>=1 & r<=721 & s>=1 & s<= 721); %spi %ind=find (r >=181 & r <= 340 & s >= 231 & s <= 470 ); ind=find (r >=161 & r <= 360 & s >= 211 & s <= 490); %yd %spi mat(:,1)=r(ind); mat(:,2)=s(ind); %grille dans laquelle l'interpolation va avoir lieu %[xease,yease]=meshgrid([1:721],[1:721]); %spi %[xease,yease]=meshgrid([181:340],[231:470]); [xease,yease]=meshgrid([161:360],[211:490]); %yd %spi for itemps=1:size(t,3); tnc=t(:,:,itemps); %z=[]; %n=0; mat(:,3)=tnc(ind); mat=mat'; % mat(1,:) => ligne des pixels dont on a 1 valeur % mat(2,:) => colonne des pixels .. % mat(3,:) => valeur des pixels au point mat(1,i) mat(2,i) % Interpolation au point de grille qui n'ont pas de donnnes warning off ; z=griddata(mat(1,:),mat(2,:),mat(3,:),xease,yease,'linear'); % 'linear' : interpolation % bilineaire z=flipud(rot90(z)); % SELECTION D'UNE ZONE %z = z(184,417) ; % site de la tuque %z=z(248,348); %z=z(181:340,231:470); %canada 160x240 %spi z=z(21:180,21:260); %yd %spi temp=cat(3,temp,z); mat(:,3)=[]; end %for itemps... end %function