1 | ;+ |
---|
2 | ; .. _icoads_ws_stats_paper.pro: |
---|
3 | ; |
---|
4 | ; ========================= |
---|
5 | ; icoads_ws_stats_paper.pro |
---|
6 | ; ========================= |
---|
7 | ; |
---|
8 | ; DESCRIPTION |
---|
9 | ; =========== |
---|
10 | ; |
---|
11 | ; .. graphviz:: |
---|
12 | ; |
---|
13 | ; digraph icoads_ws_stats_paper { |
---|
14 | ; |
---|
15 | ; ws [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/ws_monthly_1960_2010_oafluxgrid.nc"]; |
---|
16 | ; ws_tropflux [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/ws_TropFlux_global_monthly_1989_2009.nc"]; |
---|
17 | ; ws_oaflux [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/ws_OAFlux_global_monthly_1989_2009.nc"]; |
---|
18 | ; ws_erai [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/ws_ERAI_global_monthly_1989_2009.nc"]; |
---|
19 | ; ws_ncep2 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/ws_NCEP2_global_monthly_1989_2009.nc"]; |
---|
20 | ; ws_ncep1 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/ws_NCEP1_global_monthly_1989_2009.nc"]; |
---|
21 | ; ws_noc [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/nocv2_ws_19890101_20091231_oafluxgrid.nc"]; |
---|
22 | ; |
---|
23 | ; figure [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/icoads_ws_stats_paper.ps"]; |
---|
24 | ; |
---|
25 | ; icoads_ws_stats_paper [shape=box, |
---|
26 | ; fontname=Courier, |
---|
27 | ; color=blue, |
---|
28 | ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig6/icoads_ws_stats_paper.pro", |
---|
29 | ; label="${TROPFLUX}/src/paper01/fig6/icoads_ws_stats_paper.pro"]; |
---|
30 | ; |
---|
31 | ; {ws ws_tropflux ws_oaflux ws_erai ws_ncep2 ws_ncep1 ws_noc} -> {icoads_ws_stats_paper} -> {figure} |
---|
32 | ; } |
---|
33 | ; |
---|
34 | ; SEE ALSO |
---|
35 | ; ======== |
---|
36 | ; |
---|
37 | ; :ref:`project_profile.sh` |
---|
38 | ; :ref:`project_init.pro` |
---|
39 | ; |
---|
40 | ; :ref:`statistics.pro` |
---|
41 | ; |
---|
42 | ; EXAMPLES |
---|
43 | ; ======== |
---|
44 | ; |
---|
45 | ; :: |
---|
46 | ; |
---|
47 | ; icoads_ws_stats_paper |
---|
48 | ; |
---|
49 | ; TODO |
---|
50 | ; ==== |
---|
51 | ; |
---|
52 | ; make it work (missing data, box definition) |
---|
53 | ; |
---|
54 | ; coding rules |
---|
55 | ; |
---|
56 | ; complete description |
---|
57 | ; |
---|
58 | ; handle IO error |
---|
59 | ; |
---|
60 | ; EVOLUTIONS |
---|
61 | ; ========== |
---|
62 | ; |
---|
63 | ; $Id$ |
---|
64 | ; |
---|
65 | ; $URL$ |
---|
66 | ; |
---|
67 | ; - fplod 20110420T092454Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
68 | ; |
---|
69 | ; * remove hard coding path |
---|
70 | ; * add graphviz |
---|
71 | ; |
---|
72 | ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
73 | ; |
---|
74 | ; * minimal header |
---|
75 | ; |
---|
76 | ;- |
---|
77 | pro icoads_ws_stats_paper |
---|
78 | @cm_general |
---|
79 | @cm_project |
---|
80 | reinitplt, /z,/invert |
---|
81 | key_portrait = 1 |
---|
82 | coefpalit=.9 |
---|
83 | ; |
---|
84 | openps, FILENAME = project_od_env+"icoads_ws_stats_paper.ps" |
---|
85 | ; partie a changer |
---|
86 | marge=[-2,-2, -4,2] |
---|
87 | st=19890101 |
---|
88 | en=20091231 |
---|
89 | domdef, box |
---|
90 | ; |
---|
91 | file=project_id_env+'ws_monthly_1960_2010_oafluxgrid.nc" |
---|
92 | initncdf, file |
---|
93 | icoads=read_ncdf("ws", st-1, en , file=file,/nostr, box=box) |
---|
94 | help, icoads |
---|
95 | ; |
---|
96 | file=project_id_env+"ws_TropFlux_global_monthly_1989_2009.nc" |
---|
97 | initncdf, file |
---|
98 | trop=read_ncdf("ws", st, en , file=file,/nostr, box=box) |
---|
99 | help, trop |
---|
100 | ; |
---|
101 | file=project_id_env+"ws_OAFlux_global_monthly_1989_2009.nc" |
---|
102 | initncdf, file |
---|
103 | oaf=read_ncdf("ws", st, en , file=file,/nostr, box=box) |
---|
104 | help, oaf |
---|
105 | ; |
---|
106 | file=project_id_env+"ws_ERAI_global_monthly_1989_2009.nc" |
---|
107 | initncdf, file |
---|
108 | erai=read_ncdf("ws", st, en , file=file,/nostr, box=box) |
---|
109 | help, erai |
---|
110 | ; |
---|
111 | file=project_id_env+"ws_NCEP2_global_monthly_1989_2009.nc" |
---|
112 | initncdf, file |
---|
113 | ncep2=read_ncdf("wsm", st, en , file=file,/nostr, box=box) |
---|
114 | help, ncep2 |
---|
115 | ; |
---|
116 | file=project_id_env+"ws_NCEP1_global_monthly_1989_2009.nc" |
---|
117 | initncdf, file |
---|
118 | ncep1=read_ncdf("ws", st, en , file=file,/nostr, box=box) |
---|
119 | help, ncep1 |
---|
120 | ; |
---|
121 | file=project_id_env+'nocv2_ws_19890101_20091231_oafluxgrid.nc' |
---|
122 | initncdf, file |
---|
123 | noc=read_ncdf("ws", st, en , file=file,/nostr, box=box) |
---|
124 | help, noc |
---|
125 | ; |
---|
126 | si=size(trop) |
---|
127 | nt=si(3) |
---|
128 | ; |
---|
129 | lat_rama=[67, 55, 55, 80.5, 80.5, 80.5, 80.5, 90, 90, 90, 90, 90, 90, 90, 95] |
---|
130 | lon_rama=[-8, -12, -8,-8, -1.5, 0, 1.5, -1.5, 0, 1.5, 4, 8, 12, 15, -5] |
---|
131 | ; |
---|
132 | lat_pirata=[0, 350, 337, 325, 350, 337, 322, 328, 322, 326, 322, 337, 337, 322, 350, 322, 330] |
---|
133 | lon_pirata=[0, 0, 0, 0, -10, 12, 12, -14, 15, -19, 20, 21, 4, 4, -6, 8, -8] |
---|
134 | ; |
---|
135 | lat_tao=[165, 180, 205, 235, 250, 265, 156, 165, 180, 190, 205, 220, 235, 250, 265, 156, 165, 180, 190, 205, 220, 235, 250, 265, 147, 156, $ |
---|
136 | 165, 180, 190, 205, 220, 235, 250, 265, 147, 156, 165, 180, 190, 205, 220, 235, 250, 265, 147, 156, 165, 190, 205, 220, 235, 250, 265, $ |
---|
137 | 156, 165, 180, 190, 220, 235, 250, 265] |
---|
138 | ; |
---|
139 | lon_tao=[-8, -8, -8, -8, -8, -8, -5, -5, -5, -5, -5, -5, -5, -5, -5, -2, -2, -2, -2, -2, -2, -2, -2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, $ |
---|
140 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 9, 8, 8, 8] |
---|
141 | ; |
---|
142 | lat=[lat_rama, lat_pirata, lat_tao] |
---|
143 | lon=[lon_rama, lon_pirata, lon_tao] |
---|
144 | ; |
---|
145 | lat_tao=lat |
---|
146 | lon_tao=lon |
---|
147 | nn=n_elements(lat) |
---|
148 | ; |
---|
149 | list=0 |
---|
150 | for n=0, nn-1 do begin |
---|
151 | x=lat_tao(n) |
---|
152 | y=lon_tao(n) |
---|
153 | dx=abs(reform(glamt-x)) |
---|
154 | dy=abs(reform(gphit)-y) |
---|
155 | ind=where((dx le 0.5) and (dy le 0.5)) |
---|
156 | if (total(ind) ge 0.) then begin |
---|
157 | list=[list,ind] |
---|
158 | endif |
---|
159 | endfor |
---|
160 | ; |
---|
161 | msk=replicate(1,nxt,nyt) |
---|
162 | msk(list)=!Values.f_nan |
---|
163 | ; |
---|
164 | mask=trop*0 |
---|
165 | for jt=0,jpt-1 do begin |
---|
166 | t=reform(msk(*,*)) |
---|
167 | mask(*,*,jt)=t |
---|
168 | endfor |
---|
169 | ; |
---|
170 | param=icoads*mask |
---|
171 | trop=trop*mask |
---|
172 | oaf=oaf*mask |
---|
173 | erai=erai*mask |
---|
174 | ncep2=ncep2*mask |
---|
175 | ncep1=ncep1*mask |
---|
176 | noc=noc*mask |
---|
177 | ; |
---|
178 | ind=where(finite(param) and finite(noc) and finite(erai) and finite(trop) and finite(oaf) and finite(ncep2) and finite(ncep1)) |
---|
179 | x=param(ind) |
---|
180 | y=trop(ind) |
---|
181 | param=param(ind) |
---|
182 | trop=trop(ind) |
---|
183 | erai=erai(ind) |
---|
184 | oaf=oaf(ind) |
---|
185 | ncep2=ncep2(ind) |
---|
186 | ncep1=ncep1(ind) |
---|
187 | noc=noc(ind) |
---|
188 | ; |
---|
189 | statistics, param, trop, $ |
---|
190 | cor, bias, std, rmsd |
---|
191 | print, cor, bias, std, rmsd |
---|
192 | cstat_trop=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
193 | abs_diff=total(abs(trop-param))/n_elements(trop) |
---|
194 | abs_trop=string(abs_diff, format='(f5.2)') |
---|
195 | ; |
---|
196 | statistics, param, oaf, $ |
---|
197 | cor, bias, std, rmsd |
---|
198 | print, cor, bias, std, rmsd |
---|
199 | cstat_oaf=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
200 | abs_diff=total(abs(oaf-param))/n_elements(oaf) |
---|
201 | abs_oaf=string(abs_diff, format='(f5.2)') |
---|
202 | ; |
---|
203 | statistics, param, erai, $ |
---|
204 | cor, bias, std, rmsd |
---|
205 | print, cor, bias, std, rmsd |
---|
206 | cstat_erai=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
207 | abs_diff=total(abs(erai-param))/n_elements(erai) |
---|
208 | abs_erai=string(abs_diff, format='(f5.2)') |
---|
209 | ; |
---|
210 | statistics, param, ncep2, $ |
---|
211 | cor, bias, std, rmsd |
---|
212 | print, cor, bias, std, rmsd |
---|
213 | cstat_ncep2=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
214 | abs_diff=total(abs(ncep2-param))/n_elements(ncep2) |
---|
215 | abs_ncep2=string(abs_diff, format='(f5.2)') |
---|
216 | ; |
---|
217 | statistics, param, ncep1, $ |
---|
218 | cor, bias, std, rmsd |
---|
219 | print, cor, bias, std, rmsd |
---|
220 | cstat_ncep1=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
221 | abs_diff=total(abs(ncep1-param))/n_elements(ncep1) |
---|
222 | abs_ncep1=string(abs_diff, format='(f5.2)') |
---|
223 | ; |
---|
224 | statistics, param, noc, $ |
---|
225 | cor, bias, std, rmsd |
---|
226 | print, cor, bias, std, rmsd |
---|
227 | cstat_noc=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') |
---|
228 | abs_diff=total(abs(noc-param))/n_elements(noc) |
---|
229 | abs_noc=string(abs_diff, format='(f5.2)') |
---|
230 | ; |
---|
231 | mio=0 |
---|
232 | mao=15 |
---|
233 | inx=1 |
---|
234 | nx=(mao-mio)/inx+1l |
---|
235 | xx=mio+indgen(nx)*inx |
---|
236 | mis=0 |
---|
237 | mas=15 |
---|
238 | iny=1 |
---|
239 | ny=(mas-mis)/iny+1l |
---|
240 | yy=mis+indgen(ny)*iny |
---|
241 | xp=4 |
---|
242 | yp=13 |
---|
243 | x1=0 |
---|
244 | x2=15 |
---|
245 | y1=x1 |
---|
246 | y2=x2 |
---|
247 | ; |
---|
248 | pdf, param,trop,mio,mao,inx,mis,mas,iny, $ |
---|
249 | pdf,xx,yy |
---|
250 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
251 | title="ws - ICOADS/TropFlux", small=[2,3,1], $ |
---|
252 | xrange=[x1, x2], yrange=[y1, y2] |
---|
253 | xyouts, xp, yp, cstat_trop, charsize=1 |
---|
254 | xyouts, xp, yp-1, abs_trop, charsize=1 |
---|
255 | ; |
---|
256 | pdf, param,oaf,mio,mao,inx,mis,mas,iny, $ |
---|
257 | pdf,xx,yy |
---|
258 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
259 | title="ws - ICOADS/OAFlux", small=[2,3,2], $ |
---|
260 | xrange=[x1, x2], yrange=[y1, y2] |
---|
261 | xyouts, xp, yp, cstat_oaf, charsize=1 |
---|
262 | xyouts, xp, yp-1, abs_oaf, charsize=1 |
---|
263 | ; |
---|
264 | pdf, param,erai,mio,mao,inx,mis,mas,iny, $ |
---|
265 | pdf,xx,yy |
---|
266 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
267 | title="ws - ICOADS/ERAI", small=[2,3,3], $ |
---|
268 | xrange=[x1, x2], yrange=[y1, y2] |
---|
269 | xyouts, xp, yp, cstat_erai, charsize=1 |
---|
270 | xyouts, xp, yp-1, abs_erai, charsize=1 |
---|
271 | ; |
---|
272 | pdf, param,ncep2,mio,mao,inx,mis,mas,iny, $ |
---|
273 | pdf,xx,yy |
---|
274 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
275 | title="ws - ICOADS/NCEP2", small=[2,3,4], $ |
---|
276 | xrange=[x1, x2], yrange=[y1, y2] |
---|
277 | xyouts, xp, yp, cstat_ncep2, charsize=1 |
---|
278 | xyouts, xp, yp-1, abs_ncep2, charsize=1 |
---|
279 | ; |
---|
280 | pdf, param,ncep1,mio,mao,inx,mis,mas,iny, $ |
---|
281 | pdf,xx,yy |
---|
282 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
283 | title="ws - ICOADS/NCEP1", small=[2,3,5], $ |
---|
284 | xrange=[x1, x2], yrange=[y1, y2] |
---|
285 | xyouts, xp, yp, cstat_ncep1, charsize=1 |
---|
286 | xyouts, xp, yp-1, abs_ncep1, charsize=1 |
---|
287 | ; |
---|
288 | pdf, param,noc,mio,mao,inx,mis,mas,iny, $ |
---|
289 | pdf,xx,yy |
---|
290 | scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ |
---|
291 | title="ws - ICOADS/NOC", small=[2,3,6], $ |
---|
292 | xrange=[x1, x2], yrange=[y1, y2] |
---|
293 | xyouts, xp, yp, cstat_noc, charsize=1 |
---|
294 | xyouts, xp, yp-1, abs_noc, charsize=1 |
---|
295 | ; |
---|
296 | closeps |
---|
297 | ; |
---|
298 | end |
---|