source: trunk/src/paper01/fig6/icoads_ws_stats_paper.pro @ 47

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

going on consolidation of paper01 materials using loholt1

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