Télécharger la présentation
La présentation est en train de télécharger. S'il vous plaît, attendez
Publié parVirgile Cantin Modifié depuis plus de 6 années
1
Overview %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% validation section initialization section
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) % fonction qui renvoie le masque souhaite % Var : % 1 - canada : cote geographique (note spi: avec les iles dans le nord) % 2 - canada : cotes rognees (note spi: sans les iles dans le nord) % 3 - masque NCEP (note spi: fourni par le NCEP, national center for environmental prediction) % 4 - canada politique (note spi: sans alaska, sans usa) % 5 - russie : cote geo % 6 - russie : cotes rognees % 7 - russie : cotes rognées + latitudes > 45 °N % 8 - tibet % 9 - leconte sur la McKenzie % 10 - ocean/terre EASEGrid % 11 - canada pour lequel fws > 10 % % 12 - ims northern hemisphere % option = 1 ou 2 % 1 = trace la figure % 2 = ne trace pas de figure %usage: % yymmmdd %version 0.0, 20yymmmdd, spi, initial function draft
5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6
function [m]=masque(var,option)
7
validation section
8
if(var<1)||(var>12)
disp ('erreur : var compris entre 1 et 11') return end if(option~=1)&&(option~=2) disp ('erreur : option = 1 ou 2')
9
initialization section
11
[driveletter]=getsourceimagedatabasedrive();if(~exist(driveletter,'dir'))display([driveletter,' drive not ready']);return;end load('srcarsplib_path.mat'); %load('srcimgdb_paths.mat'); %pathmask = 'C:\ar\sp\mask'; %pathmask='C:\spoirier\oifii-org\httpdocs\ns-org\nsd\ar\sp\mask'; pathmask=srcarsplib_pathmask; %pathutilities = 'C:\Spoirier\mw\utilities'; %cd /Documents/masque; prevdir=pwd; cd(pathmask); %cd /home/mialon/Documents/masque; if var==1 % nom : CAN_MASK f=fopen('CAN_MASK','r'); m=fread(f,[ ],'float32'); fclose(f); clear f; elseif var==2 % nom : masque_can load('masque_canada'); %note spi: load charge des fichiers matrices, *.mat m=masque_can; clear masque_can; elseif var==3 % NCEP file = fopen('masque_eau','rb'); m = fread(file, inf, 'float'); fclose(file);clear f; m = m(2:18049); m = reshape(m,192,94); m = m'; elseif var==4 load('canada'); m = canada; clear canada; elseif var==5 f=fopen('RUS_MASK','r'); m=fread(f,[ ],'float32'); elseif var==6 load('masque_rus'); m=masque_rus; clear masque_rus; elseif var==7 load('m'); elseif var==8 f=fopen('TIB_MASK','r'); m=fread(f,[90 180],'float32'); elseif var==9 load('leconte'); m=leconte; clear leconte; elseif var==10 f=fopen('masque_ocean.raw','r'); m=fread(f,[ ],'float'); elseif var==11 load('canada_fws_sup10'); m = essai; clear essai ; elseif var==12 f=fopen('ims','r'); m = fread(f,[ ],'int8'); fclose (f); end if option==1 figure; imagesc(m) %masque=m; % % % % % masque cote canada % nom : canada_cote % carte politique du canada % lecture du masque : % load canada_cote % affichage du masque : % figure;imagesc(canada_cote);set(gca,'YDir','Normal') % masque cote russie % nom : RUS_MASK % f=fopen('RUS_MASK','r'); % masque_rus=fread(f,[ ],'float32'); % fclose(f); % figure;imagesc(masque_rus);set(gca,'XDir','reverse') % masque cote tibet % nom : TIB_MASK % f=fopen('TIB_MASK','r'); % masque_tib=fread(f,[90 180],'float32'); % figure;imagesc(masque_tib);set(gca,'XDir','reverse') % masque canada + alaska % (sans les cotes et les regions polaires)------ % masque canada % nom : canada % masque du canada (politique) en rognant les cotes et les bords de lacs % load('canada') % masque russie % nom : masque_rus % load('masque_rus') cd(prevdir); %cd(pathutilities); %cd /home/mialon/Documents/utilities ; end%function
Présentations similaires
© 2024 SlidePlayer.fr Inc.
All rights reserved.