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\snowcover application (lauched with ar\sp\main_create_snow_mask.m) %oifii.org's ar\sp\ratio 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 geneate the snowcover database that is merged to the temperature database % %version 3.2: create_mask_snow(zone,an,pathratio,pathsnowcover,sfsl_startof fset,sfsl_endoffset), spi 2009dec13, k:\ drive modif, stephane.poirier@oifii.org %version 3.0: create_mask_snow(zone,an,pathratio,pathsnowcover), spi 2009nov23, k:\ drive modif, stephane.poirier@oifii.org % %fonction matlab pour creer la base de donnees journalière de couverture de neige. %on possède des fichiers de debut et fin de periode sans neige %=> a transformer en fichier journlier de neige. %INPUT %zone : 'canada' ou 'russie' %an : aaaa %OUTPUT % %FCT ASSOCIEES %[jour1neige,jd,jf]=lire_jour(zone,'am',aaaa,''); % %jd (jourdebut d'ete) correspond to summer startday and jf (jourfin d'ete) correspond to summer endday %summer startday and summer endday matrices are located in folders K:\d-smmr_ratio\ratio_canada\fichier_jdjf and K:\d- ssmi_ratio\ratio_canada\fichier_jdjf %summer startday and summer endday matrices are accessed through function [jour1neige,jd,jf]=lire_jour(zone,phase,an,ext,pathratio) which also returns %firstday of snow (jour1neige) matrix also located in folders K:\d-smmr_ratio\ratio_canada\fichier_jdjf and K:\d- ssmi_ratio\ratio_canada\fichier_jdjf % %usage example: % % 2009dec13 % see function main_create_mask_snow() that calls this function % %nakedsoftware.org opensource license, copyright 2010 stephane.poirier@oifii.org

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

6

7 function [carte]=create_mask_snow(zone,an,pathratio,pathsnowcover,sfsl _startoffset,sfsl_endoffset) %spi 2009dec13, modif, begin if nargin<6 sfsl_endoffset=0;end %0 percent for no snowfree season length start offset (sfsl_endoffset specified in percent) if nargin<5 sfsl_startoffset=0;end %0 percent for no snowfree season length end offset (sfsl_startoffset specified in percent) %spi 2009dec13, modif, end prevdir=pwd; if strcmp(zone,'canada')==1 dim=[160 240]; cote=masque(1,2); m=masque(2,2); elseif strcmp(zone,'russie')==1 dim=[230 310]; cote=mask(6,2); m=mask(7,2); end [jour1,jd,jf]=lire_jour(zone,'am',an,'',pathratio); % 'AM' : phase du matin jour1(jour1==-10)=0; if strcmp(zone,'russie')==1 zone='eurasie'; end chemin=[pathsnowcover,filesep,zone,filesep,int2str(an)]; if(~isdir(chemin)) mkdir(chemin); end cd(chemin); display(['wrinting snow mask folder ',chemin]); for ijour=1:366 %1:366 carte=zeros(dim(1),dim(2)); carte(jour1<=ijour & ijour<jd)=1; carte(ijour>jf)=1; carte(jd==-10 & jf==-10)=0; carte(m==0)=-1; % enregistrement des matrices nomfile=sprintf('%03d',ijour); f=fopen(nomfile,'w+'); fwrite(f,carte,'int8'); fclose(f); %display(['wrinting snow mask file ',fullfile(chemin,nomfile)]); clear f; end cd(prevdir); end%function

8


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

Similar presentations


Ads by Google