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

Last change on this file since 182 was 182, checked in by pinsard, 12 years ago

fix some svn propset

  • Property svn:keywords set to Id URL
File size: 8.3 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;
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;-
77pro icoads_ws_stats_paper
78@cm_general
79@cm_project
80reinitplt, /z,/invert
81key_portrait = 1
82coefpalit=.9
83;
84openps, FILENAME = project_od_env+"icoads_ws_stats_paper.ps"
85; partie a changer
86marge=[-2,-2, -4,2]
87st=19890101
88en=20091231
89domdef, box
90;
91file=project_id_env+'ws_monthly_1960_2010_oafluxgrid.nc"
92initncdf, file
93icoads=read_ncdf("ws", st-1, en , file=file,/nostr, box=box)
94help, icoads
95;
96file=project_id_env+"ws_TropFlux_global_monthly_1989_2009.nc"
97initncdf, file
98trop=read_ncdf("ws", st, en , file=file,/nostr, box=box)
99help, trop
100;
101file=project_id_env+"ws_OAFlux_global_monthly_1989_2009.nc"
102initncdf, file
103oaf=read_ncdf("ws", st, en , file=file,/nostr, box=box)
104help, oaf
105;
106file=project_id_env+"ws_ERAI_global_monthly_1989_2009.nc"
107initncdf, file
108erai=read_ncdf("ws", st, en , file=file,/nostr, box=box)
109help, erai
110;
111file=project_id_env+"ws_NCEP2_global_monthly_1989_2009.nc"
112initncdf, file
113ncep2=read_ncdf("wsm", st, en , file=file,/nostr, box=box)
114help, ncep2
115;
116file=project_id_env+"ws_NCEP1_global_monthly_1989_2009.nc"
117initncdf, file
118ncep1=read_ncdf("ws", st, en , file=file,/nostr, box=box)
119help, ncep1
120;
121file=project_id_env+'nocv2_ws_19890101_20091231_oafluxgrid.nc'
122initncdf, file
123noc=read_ncdf("ws", st, en , file=file,/nostr, box=box)
124help, noc
125;
126si=size(trop)
127nt=si(3)
128;
129lat_rama=[67, 55, 55, 80.5, 80.5, 80.5, 80.5, 90, 90, 90, 90, 90, 90, 90, 95]
130lon_rama=[-8, -12, -8,-8, -1.5, 0, 1.5, -1.5, 0, 1.5, 4, 8, 12, 15, -5]
131;
132lat_pirata=[0, 350, 337, 325, 350, 337, 322, 328, 322, 326, 322, 337, 337, 322, 350, 322, 330]
133lon_pirata=[0, 0, 0, 0, -10, 12, 12, -14, 15, -19, 20, 21, 4, 4, -6, 8, -8]
134;
135lat_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;
139lon_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;
142lat=[lat_rama, lat_pirata, lat_tao]
143lon=[lon_rama, lon_pirata, lon_tao]
144;
145lat_tao=lat
146lon_tao=lon
147nn=n_elements(lat)
148;
149list=0
150for 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
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
172oaf=oaf*mask
173erai=erai*mask
174ncep2=ncep2*mask
175ncep1=ncep1*mask
176noc=noc*mask
177;
178ind=where(finite(param) and finite(noc) and finite(erai) and finite(trop) and finite(oaf) and finite(ncep2) and finite(ncep1))
179x=param(ind)
180y=trop(ind)
181param=param(ind)
182trop=trop(ind)
183erai=erai(ind)
184oaf=oaf(ind)
185ncep2=ncep2(ind)
186ncep1=ncep1(ind)
187noc=noc(ind)
188;
189statistics, param, trop, $
190                 cor, bias, std, rmsd
191print, cor, bias, std,  rmsd
192cstat_trop=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
193abs_diff=total(abs(trop-param))/n_elements(trop)
194abs_trop=string(abs_diff, format='(f5.2)')
195;
196statistics, param, oaf, $
197                 cor, bias, std, rmsd
198print, cor, bias, std,  rmsd
199cstat_oaf=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
200abs_diff=total(abs(oaf-param))/n_elements(oaf)
201abs_oaf=string(abs_diff, format='(f5.2)')
202;
203statistics, param, erai, $
204                 cor, bias, std, rmsd
205print, cor, bias, std,  rmsd
206cstat_erai=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
207abs_diff=total(abs(erai-param))/n_elements(erai)
208abs_erai=string(abs_diff, format='(f5.2)')
209;
210statistics, param, ncep2, $
211                 cor, bias, std, rmsd
212print, cor, bias, std,  rmsd
213cstat_ncep2=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
214abs_diff=total(abs(ncep2-param))/n_elements(ncep2)
215abs_ncep2=string(abs_diff, format='(f5.2)')
216;
217statistics, param, ncep1, $
218                 cor, bias, std, rmsd
219print, cor, bias, std,  rmsd
220cstat_ncep1=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
221abs_diff=total(abs(ncep1-param))/n_elements(ncep1)
222abs_ncep1=string(abs_diff, format='(f5.2)')
223;
224statistics, param, noc, $
225                 cor, bias, std, rmsd
226print, cor, bias, std,  rmsd
227cstat_noc=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
228abs_diff=total(abs(noc-param))/n_elements(noc)
229abs_noc=string(abs_diff, format='(f5.2)')
230;
231mio=0
232mao=15
233inx=1
234nx=(mao-mio)/inx+1l
235xx=mio+indgen(nx)*inx
236mis=0
237mas=15
238iny=1
239ny=(mas-mis)/iny+1l
240yy=mis+indgen(ny)*iny
241xp=4
242yp=13
243x1=0
244x2=15
245y1=x1
246y2=x2
247;
248pdf, param,trop,mio,mao,inx,mis,mas,iny, $
249    pdf,xx,yy
250scontour, 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]
253xyouts, xp, yp, cstat_trop, charsize=1
254xyouts, xp, yp-1, abs_trop, charsize=1
255;
256pdf, param,oaf,mio,mao,inx,mis,mas,iny, $
257    pdf,xx,yy
258scontour, 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]
261xyouts, xp, yp, cstat_oaf, charsize=1
262xyouts, xp, yp-1, abs_oaf, charsize=1
263;
264pdf, param,erai,mio,mao,inx,mis,mas,iny, $
265    pdf,xx,yy
266scontour, 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]
269xyouts, xp, yp, cstat_erai, charsize=1
270xyouts, xp, yp-1, abs_erai, charsize=1
271;
272pdf, param,ncep2,mio,mao,inx,mis,mas,iny, $
273    pdf,xx,yy
274scontour, 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]
277xyouts, xp, yp, cstat_ncep2, charsize=1
278xyouts, xp, yp-1, abs_ncep2, charsize=1
279;
280pdf, param,ncep1,mio,mao,inx,mis,mas,iny, $
281    pdf,xx,yy
282scontour, 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]
285xyouts, xp, yp, cstat_ncep1, charsize=1
286xyouts, xp, yp-1, abs_ncep1, charsize=1
287;
288pdf, param,noc,mio,mao,inx,mis,mas,iny, $
289    pdf,xx,yy
290scontour, 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]
293xyouts, xp, yp, cstat_noc, charsize=1
294xyouts, xp, yp-1, abs_noc, charsize=1
295;
296closeps
297;
298end
Note: See TracBrowser for help on using the repository browser.