source: trunk/src/readAMSU.m @ 327

Last change on this file since 327 was 327, checked in by pinsard, 13 years ago

change svn properties

  • Property svn:keywords set to URL
File size: 1.4 KB
Line 
1%% function[mat_3D,jours,lat ,lon]=readAMSU(file,z_deb, z_fin,chemin)
2
3%+
4%
5% .. _readAMSU.m:
6%
7% ==========
8% readAMSU.m
9% ==========
10%
11% routine de lecture d un fichier de donnees AMSU au format netcdf
12% nclod : simplification du seuillage et de la  mise sous forme
13% mat_3D(lat,lon, jours)
14%
15% EVOLUTIONS
16% ==========
17%
18% $Id: readAMSU.m 325 2011-08-04 15:30:01Z pinsard $
19%
20% $URL$
21%
22% - fplod 20110124T154723Z aedon.locean-ipsl.upmc.fr (Darwin)
23%
24%   * add minimal rest header
25%
26%-
27function[mat_3D,jours,lat ,lon]=readAMSU(file,z_deb, z_fin,chemin)
28
29if(nargin<2)
30z_deb=[ -30 -60 datenum(1957,1,2)] 
31end
32if(nargin<3)
33z_fin=[ 45 50 datenum(2020,1,1)]   
34end
35
36if(nargin<4)
37     chemin='/homedata/eymard/AMSUAB/';
38end
39
40if(chemin(end)~='/')
41chemin=[chemin,'/'];
42end
43
44file=[chemin,file];
45%% on stocke le canal dans la variable string
46
47nc=netcdf(file,'nowrite');
48longitude=nc{'xlon'}(:);
49latitude=nc{'ylat'}(:);
50jours=nc{'jours'}(:);
51
52%jours=jours/24+datenum(1957,01,01); % En jours juliens
53jo=find(jours>z_deb(3) & jours<z_fin(3));
54jours=jours(jo);
55
56la=find(latitude>z_deb(1) & latitude<z_fin(1));
57lat=latitude(la);
58
59lo=find(longitude>z_deb(2) & longitude<z_fin(2));
60lon=longitude(lo);
61
62
63
64
65temperature=squeeze(nc{'moyenne_tb'}(jo,la,lo));
66
67
68%% mat_3D est la matrice (lat,lon,jours) que l''on utilise par la suite
69mat_3D=permute(temperature,[2 3 1]);
70
71%% On realise un seuillage qui optimise l''affichage
72%% des donnees peu traitees.
73mat_3D(find((mat_3D>300)|(mat_3D<140)))=NaN; 
Note: See TracBrowser for help on using the repository browser.