Presentation is loading. Please wait.

Presentation is loading. Please wait.

Overview %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%

Similar presentations


Presentation on theme: "Overview %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%"— Presentation transcript:

1 Overview %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%

2

3

4 %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) % fct qui applique le filtre median aux series de ratio % %usage: % 20yymmmdd % %version 0.0, 20yymmmdd, spi, initial function draft % %nakedsoftware.org opensource license, copyright 2010 stephane.poirier@oifii.org

5 %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%

6

7 function [ratiofiltre]=filtre_ratio(zone,dataset,an,phase,jour1,jour2, pathratio) prevdir=pwd; m=0; % FCT ASSOCIEES % - [ratio]=lire_ratio(zone,dataset,an,phase,xpixel,ypixel,jour1, jour2,type); % : mat xdim x ydim x 366: 'all' 'all' % type : 'filtre' % 'sansfiltre' % - ratiocorrige=correction_ratio(ratio) % disp('attention ne filtre que jusqu''au jour 225 car année 2003 n''est pas complète'); nbrejour=(jour2-jour1)+1; %pathutilities = 'D:\Spoirier\mw\utilities'; %pathratio = 'D:\Spoirier\mw\ratio'; testcanada=strcmp(zone,'canada'); testrussie=strcmp(zone,'russie'); testtibet=strcmp(zone,'tibet'); if testcanada == 1 dim=[160 240]; %cd(pathutilities); biss=IsLeapYear(an) ; m=masque(2,2); elseif testrussie == 1 dim=[230 310]; %cd(pathutilities); biss=IsLeapYear(an) ; m=masque(7,2); elseif testtibet == 1 dim=[90 180]; %cd(pathutilities); biss=IsLeapYear(an); end if biss==1 nbrejmax=366; else nbrejmax=365; end if nbrejour>nbrejmax nbrejour=nbrejmax; end [indmask]=find(m==1); [indmask1 indmask2]=find(m==1); % chargement de ma matrice % 1ere facon %[ratio]=lire_ratio(zone,dataset,an,phase,'all','all',jour1,j our2,'sansfiltre'); % trop long % 2 eme facon %cd(pathratio); ratio=[]; n=0; %for i=1:60:nbrejour for i=jour1:60:(jour1+nbrejour-1) n=n+1; %i2=60+60*(n-1) ; i2=60+60*(n-1)+jour1-1; %{ if i2 > nbrejmax i2 = nbrejmax; %} if i2 > (jour1+nbrejour-1) i2= (jour1+nbrejour-1); end [r]=lire_ratio(zone,dataset,an,phase,'all','all',i,i2,'sansfi ltre',pathratio); ratio=cat(3,ratio,r); %a la fin, ratio devient 160 x 240 x nbrejour clear r; end a=1; % ne garde que les pixels definit sur le contient par le masque ratio=reshape(ratio,dim(1,1)*dim(1,2),nbrejour); ratio=ratio(indmask,:); [d1 d2]=size(ratio) ; % nbre de pixel contient 42635 * nbre de jours ratio(ratio==-10)=NaN; % correction de la serie : ratio a des valeurs manquantes : % on va faire 1 interpolation linéaire des ratio manquants %cd /home/mialon/Documents/ratio ; ratiocorrige=correction_ratio(ratio); % filtre median matfiltre=filtre_median(ratiocorrige,23) ; % filtre de 23 données ratiofiltre=-10.* ones(dim(1,1)*dim(1,2),nbrejour); ratiofiltre(indmask,:)=matfiltre(:,:); ratiofiltre=reshape(ratiofiltre,dim(1,1),dim(1,2),nbrejour); % corrige la serie au debut de l'annee % enregistrement %chemin=[pathratio,filesep,'ratio_',zone,filesep,'fichier_rat iofiltre',filesep,int2str(an),filesep]; chemin=fullfile(pathratio,['ratio_',zone],'fichier_ratiofiltr e',int2str(an)); if(~isdir(chemin)) mkdir(chemin); end feval('cd',chemin); for ijour=1:nbrejour matrice=ratiofiltre(:,:,ijour); %nom=['ratio_am',sprintf('%03d',ijour)]; nom=['ratio_',lower(phase),sprintf('%03d',(ijour+jour1- 1))]; f=fopen(nom,'w+'); fwrite(f,matrice,'float32'); fclose(f); clear f nom matrice; end cd(prevdir); end%function


Download ppt "Overview %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%"

Similar presentations


Ads by Google