source: trunk/src/plotimageAMSU.m @ 325

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

rehab MSG, EPSAT tools (to be cont.)

  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1function [long,lat,imageamsu]=plotimageAMSU(date,heure,lonmin,lonmax,latmin,latmax)
2
3%+
4%
5% .. _plotimageAMSU.m:
6%
7% ===============
8% plotimageAMSU.m
9% ===============
10%
11% DESCRIPTION
12% ===========
13%
14% ``plotimageAMSU`` read AMSU NetCDF file in :file:`${PROJECT_ID}/{yyyy}/{mm}/`.
15%
16% +todo+ calcule
17%
18% +todo+ dessine
19%
20% EXAMPLES
21% ========
22%
23% To plot channel 5 temperature brillance of AMSU data on 2006-08-02 at time 175432:
24%
25% see demo 1
26%
27% SEE ALSO
28% ========
29%
30% :ref:`data_amsu`
31%
32% :ref:`varamma_startup.m`
33%
34% TODO
35% ====
36%
37% date yyyymmdd (not like now mmdd)
38%
39% get rid of mlint output
40%
41% use readAMSU
42%
43% EVOLUTIONS
44% ==========
45%
46% $Id$
47%
48% $URL$
49%
50% - fplod 20110610T085749Z aedon.locean-ipsl.upmc.fr (Darwin)
51%
52%   * move example to demo
53%   * correction for Y axis direction
54%
55%
56% - fplod 20100726T124214Z aedon.locean-ipsl.upmc.fr (Darwin)
57%
58%   * files must be in ${PROJECT_ID}/AMSU/yyyy/mm/
59%
60% - fplod 20100608T113515Z aedon.locean-ipsl.upmc.fr (Darwin)
61%
62%   * make it work running with matlab 7.4
63%
64% - fplod 20100604T093734Z aedon.locean-ipsl.upmc.fr (Darwin)
65%
66%   * minimize mlint output
67%
68% - fplod 20100604T083004Z aedon.locean-ipsl.upmc.fr (Darwin)
69%
70%   * add usage of varamma_startup : no more chemin parameter, PROJECT_ID value
71%     used instead
72%
73% - fplod 20100525T124910Z aedon.locean-ipsl.upmc.fr (Darwin)
74%
75%   * add example
76%
77% - fplod 20100521T150917Z aedon.locean-ipsl.upmc.fr (Darwin)
78%
79%   * minimal header
80%
81% - lelod 20100521
82%
83%-
84% exemple de lecture d'un fichier netcdf et de trace d'une image
85% dans le domaine 10 - 20 N et W
86%'exemple date 0818'
87%'heure 181344'
88
89global application;
90global PROJECT_ID;
91global PROJECT_OD;
92
93% init year +todo+ must be a parameter
94yyyy=2006;
95% +todo+ mm should  be a parameter
96mm=substr(date,1,2);
97
98z_deb=[latmin lonmin];
99z_fin=[latmax lonmax];
100
101file=['amsubch5-noaa15_',num2str(yyyy),date,'-',heure,'_afratl_Nadir.nc'];
102file=[PROJECT_ID,'/AMSU/',num2str(yyyy),'/',mm,'/',file];
103file
104%ncdump(file);
105file=netcdf(file,'nowrite');
106time=file{'time'};
107lon=file{'lon'};
108lat=file{'lat'};
109tbamsu=file{'tbch5b'};
110mask=file{'mask'};
111
112la=find(lat(:)>z_deb(1) & lat(:)<z_fin(1));
113lo=find(lon(:)>z_deb(2) & lon(:)<z_fin(2));
114latit=lat(la);
115longi=lon(lo);
116imageamsu=squeeze(tbamsu(1,la,lo));
117imageamsu(find(imageamsu == -999)) = NaN;
118[x,y]=meshgrid(longi,latit);
119figure(2)
120%limits=[0,350];
121switch application
122   case {'matlab'}
123      imagesc(longi,latit,imageamsu);
124   case {'octave'}
125      imagesc(x,y,imageamsu);
126   otherwise
127      error('unknown application running');
128end
129set(gca,'Ydir','reverse');
130xlabel('longitude');
131ylabel('latitude');
132title('amsubch5');
133set(gca,'Ydir','normal');
134%colorbar('YTick',[1:1:10.5],'YTickLabel','fontsize',8);
135colorbar('WestOutside');
136
137%!demo
138%! % To plot channel 5 temperature brillance of AMSU data on 2006-08-02 at time 175432::
139%! clear all
140%! close all
141%! varamma_startup
142%! more off
143%! date='0802';
144%! heure='175432';
145%! tseuil=239;
146%! lonmin=-20;
147%! lonmax=-10;
148%! latmin=10;
149%! latmax=20;
150%! [long,lat,imageamsu]=plotimageAMSU(date,heure,lonmin,lonmax,latmin,latmax);
Note: See TracBrowser for help on using the repository browser.