source: trunk/src/paper01/fig6/icoads_q2m_stats_paper.pro @ 94

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

get rid of multistatement lines

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