Télécharger la présentation
La présentation est en train de télécharger. S'il vous plaît, attendez
Publié parMadeleine Poulin Modifié depuis plus de 6 années
1
Overview %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4
%nakedsoftware. org opensource license, copyright 2010 stephane
%nakedsoftware.org opensource license, copyright 2010 % %developed by Stephane Poirier, M.Sc. Optical Physics, Remote Sensing Application Software Developer ( ) %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 , Journal of Geophysical Research - Atmosphere, %Submitted June 2009, %This study's database can be downloaded from the author web site at: % %this function is used to display the raw microwave raster data (NSIDC's SMMR and SSMI satellite, ref. nsidc.org) %usage: % yymmmdd %version 0.0, 20yymmmdd, spi, initial function draft
5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6
fct qui simule par spline cubique les donnees NARR aux heures les donnees sources temperatures NARR sont aux 3 heures: 0h00, 3h00, 6h00, 09h00, 12h00, 15h00, 18h00, 21h00
7
function [tnarr,heure]=genere_Tnarr25kmx25kmx1h(an,jour1,jour2,region)
prevdir = pwd; % INPUT % an : entier du type aaaa % jour1 et jour2 : entier (jour de l'année : entre 1 et 365/366) % region : 'canada' ; 'russie'; 'tibet' % % FCT ASSOCIEES % - [temperature,day,hour] = lire_Tnarr25kmx25kmx3h(region,an,jour1,jour2,EXT) ; % temperature : nbre de ligne x nbre de colonne (dim de la region selectionnee) % x nbre de pas de temps % optiongraphe = 1 : trace la serie NARR simulée % : ne trace pas la serie optiongraphe=2; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % simulation a partir des donnees NARR air, hauteresolution %disp('NARR utilisees : NARR air haute resolution'); [temperature,day,hour]=lire_Tnarr25kmx25kmx3h(region,an,jour1,jour2,'air'); heureref=hour(1,1); %nombre de jours (jour2-jour1+1) multiplie par nombre d'heures par jour (24) %moins 6 (moins 6 heures, parce que derniere valeure dernier jour a 18h00) %plus 1 (? pour l'inclure, utilisation de derheure ci-dessous pas claire). derniereheure=(jour2-jour1)*24+1+hour(length(hour),1); %derniere heure % test si on a bien plusieurs canaux horaires differents if hour(2,1)==heureref disp('pour simulation, on doit avoir differents creneaux horaires par jour'); return, end dimension=24*(jour2-jour1+1); heure(1:3:dimension)=hour; heure(2:3:dimension)=1+heure(1:3:dimension); heure(3:3:dimension)=2+heure(1:3:dimension); %t=temperature; %clear temperature; %whos % % % INTERPOLATION % if (ndims(temperature)==3 && (size(temperature,1)==1 || size(temperature,2)==1 || size(temperature,3)==1) ) %matrice de temperature 3 dimensions, avec une des trois dimensions egale a un temperature=squeeze(temperature); %reduire la matrice a deux dimensions temperature=temperature'; disp('a'); pp=spline([1:3:dimension],temperature); tnarr=ppval(pp,[1:(dimension-(24-derniereheure-1))]); elseif size(temperature,1)~=1 & size(temperature,2)==1 disp('b'); elseif size(temperature,1)==1 & size(temperature,2)~=1 derniereheure disp('c'); elseif (ndims(temperature)==3 & size(temperature,1)~=1 & size(temperature,2)~=1 & size(temperature,3)~=1) if strcmp(region,'canada')==1 dim=[ ]; %disp('d1'); m=mask(2,2); elseif strcmp(region,'russie')==1 disp('d2'); dim=[ ]; m=mask(7,2); elseif strcmp(region,'tibet')==1 disp('d3'); dim=[90 180]; indice=find(m==1); temperature=reshape(temperature,dim(1,1)*dim(1,2),size(hour,1)); temperature=temperature(indice,:); tinterp=interp1([1:3:length(heure)],temperature',[1:length(heure)],'spline'); tinterp=tinterp'; tnarr(1:dim(1,1)*dim(1,2),length(heure))=NaN; tnarr(indice,:)=tinterp; tnarr=reshape(tnarr,dim(1,1),dim(1,2),length(heure)); tnarr(:,:,derniereheure+1:size(tnarr,3))=NaN; % % % NOTE SUR LES BORNES DE LA SIMULATION : lim sup = % dimension-(24-derniereheure+-1) % soit jusqu'a la derniere heure NARR disponible. % GRAPHE % if optiongraphe==1 % etiquette etiquette=[]; etiquette1=[]; etiquette2=[]; etiquette1=num2str(day); etiquette2=num2str(hour); etiquette=strcat(etiquette1,'_',etiquette2); figure;plot([1:6:length(t)*6],temperature,'+r',[1:length(tnarr)],tnarr,'-ob'); set(gca,'XLim',[1 dimension]); xlabelrot90([1:24:dimension],day(1:4:length(day))',0); end % fin de condition optiongraphe cd(prevdir); end %function
Présentations similaires
© 2024 SlidePlayer.fr Inc.
All rights reserved.