1 | function [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 | |
---|
89 | global application; |
---|
90 | global PROJECT_ID; |
---|
91 | global PROJECT_OD; |
---|
92 | |
---|
93 | % init year +todo+ must be a parameter |
---|
94 | yyyy=2006; |
---|
95 | % +todo+ mm should be a parameter |
---|
96 | mm=substr(date,1,2); |
---|
97 | |
---|
98 | z_deb=[latmin lonmin]; |
---|
99 | z_fin=[latmax lonmax]; |
---|
100 | |
---|
101 | file=['amsubch5-noaa15_',num2str(yyyy),date,'-',heure,'_afratl_Nadir.nc']; |
---|
102 | file=[PROJECT_ID,'/AMSU/',num2str(yyyy),'/',mm,'/',file]; |
---|
103 | file |
---|
104 | %ncdump(file); |
---|
105 | file=netcdf(file,'nowrite'); |
---|
106 | time=file{'time'}; |
---|
107 | lon=file{'lon'}; |
---|
108 | lat=file{'lat'}; |
---|
109 | tbamsu=file{'tbch5b'}; |
---|
110 | mask=file{'mask'}; |
---|
111 | |
---|
112 | la=find(lat(:)>z_deb(1) & lat(:)<z_fin(1)); |
---|
113 | lo=find(lon(:)>z_deb(2) & lon(:)<z_fin(2)); |
---|
114 | latit=lat(la); |
---|
115 | longi=lon(lo); |
---|
116 | imageamsu=squeeze(tbamsu(1,la,lo)); |
---|
117 | imageamsu(find(imageamsu == -999)) = NaN; |
---|
118 | [x,y]=meshgrid(longi,latit); |
---|
119 | figure(2) |
---|
120 | %limits=[0,350]; |
---|
121 | switch application |
---|
122 | case {'matlab'} |
---|
123 | imagesc(longi,latit,imageamsu); |
---|
124 | case {'octave'} |
---|
125 | imagesc(x,y,imageamsu); |
---|
126 | otherwise |
---|
127 | error('unknown application running'); |
---|
128 | end |
---|
129 | set(gca,'Ydir','reverse'); |
---|
130 | xlabel('longitude'); |
---|
131 | ylabel('latitude'); |
---|
132 | title('amsubch5'); |
---|
133 | set(gca,'Ydir','normal'); |
---|
134 | %colorbar('YTick',[1:1:10.5],'YTickLabel','fontsize',8); |
---|
135 | colorbar('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); |
---|