source: trunk/src/paper01/fig4/fig4_met_var_correction_scatter.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: 4.9 KB
Line 
1;+
2; .. _fig4_met_var_correction_scatter.pro:
3;
4; ===================================
5; fig4_met_var_correction_scatter.pro
6; ===================================
7;
8; DESCRIPTION
9; ===========
10;
11; .. graphviz::
12;
13;    digraph fig4_met_var_correction_scatter {
14;       graph [
15;       rankdir="LR",
16;       ]
17;       sst [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_correction_final.txt"];
18;       t2m [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/t2m_correction_final.txt"];
19;       q2m [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_correction_final.txt"];
20;       ws  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_correction_final.txt"];
21;
22;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/fig4_met_var_correction_scatter.ps"];
23;
24;       fig4_met_var_correction_scatter [shape=box,
25;       fontname=Courier,
26;       color=blue,
27;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig4/fig4_met_var_correction_scatter.pro",
28;       label="${TROPFLUX}/src/paper01/fig4/fig4_met_var_correction_scatter.pro"];
29;
30;       {sst t2m q2m ws} -> {fig4_met_var_correction_scatter} -> {figure}
31;    }
32;
33; SEE ALSO
34; ========
35;
36; :ref:`tropflux_profile.sh`
37; :ref:`tropflux_init.pro`
38;
39; :ref:`significance_test_99.pro`
40;
41; EXAMPLES
42; ========
43;
44; ::
45;
46;  IDL> @tropflux_init
47;  IDL> fig4_met_var_correction_scatter
48;
49; TODO
50; ====
51;
52; check results
53;
54; improve plot
55;
56; coding rules
57;
58; get rid of spwan
59;
60; complete description
61;
62; handle IO error
63;
64; EVOLUTIONS
65; ==========
66;
67; $Id$
68;
69; - pinsard 2011-04-20T15:27:24Z loholt1.ipsl.polytechnique.fr (Linux)
70;
71;   * work on loholt1
72;
73; - fplod 20110420T085113Z aedon.locean-ipsl.upmc.fr (Darwin)
74;
75;   * make it work on cratos
76;   * remove hard coding path
77;   * add graphviz
78;
79; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
80;
81;   * minimal header
82;
83;-
84pro fig4_met_var_correction_scatter
85@cm_general
86@cm_tropflux
87reinitplt, /z,/invert
88key_portrait = 1
89
90openps, FILENAME = 'idl.ps'
91fi=tropflux_id_env+'sst_correction_final.txt'
92res=read_ascii(fi,data_start=0)
93ff=res.field1
94cor=reform(ff(0,*))
95bias=reform(ff(1,*))
96std=reform(ff(2,*))
97mean=reform(ff(4,*))
98
99splot, mean, bias, small=[2,3,1],/noer, xtitle='Mean ERAI SST', ytitle='ERAI SST bias', $
100       psym=2, charsize=1.,  $
101       xrange=[20,33], yrange=[-0.7,0.7], xmin=1, ymin=1
102oplot, [20,32], [0,0]
103xx=total(std)/n_elements(std)
104yy=total(bias)/n_elements(bias)
105
106xyouts, 22, 0.6, 'bias=-0.05', charsize=1.1
107xyouts, 22, 0.5, 'std ratio=0.989', charsize=1.1
108
109print, xx, yy
110ab=linfit(mean, bias,yfit=yfit)
111a=float(ab(0)) & b=float(ab(1))
112oplot, mean, yfit, thick=3, color=50
113print, a,b
114
115;; significant test
116significance_test_99,mean,bias
117
118fi=tropflux_id_env+'t2m_correction_final.txt'
119res=read_ascii(fi,data_start=0)
120ff=res.field1
121cor=reform(ff(0,*))
122bias=reform(ff(1,*))
123std=reform(ff(2,*))
124mean=reform(ff(4,*))
125
126xx=total(std)/n_elements(std)
127yy=total(bias)/n_elements(bias)
128print, xx, yy
129
130splot, mean, bias, small=[2,3,2],/noer, xtitle='Mean ERAI T2m', ytitle='ERAI T2m bias', $
131       psym=2, charsize=1.,  $
132       xrange=[20,31], yrange=[-1,0.6], xmin=1, ymin=1
133oplot, [20,32], [0,0]
134
135xyouts, 22, 0.5, 'bias=-0.296', charsize=1.1
136xyouts, 22, 0.4, 'std ratio=0.92', charsize=1.1
137
138ab=linfit(mean, bias,yfit=yfit)
139a=float(ab(0)) & b=float(ab(1))
140oplot, mean, yfit, thick=3, color=50
141print, a,b
142
143;; significant test
144significance_test_99,mean,bias
145
146fi=tropflux_id_env+'q2m_correction_final.txt'
147res=read_ascii(fi,data_start=0)
148ff=res.field1
149cor=reform(ff(0,*))
150bias=reform(ff(1,*))
151std=reform(ff(2,*))
152mean=reform(ff(4,*))
153
154xx=total(std)/n_elements(std)
155yy=total(bias)/n_elements(bias)
156print, xx, yy
157
158splot, mean, bias, small=[2,3,3],/noer, xtitle='Mean ERAI Q2m', ytitle='ERAI Q2m bias', $
159       psym=2, charsize=1.,  $
160       xrange=[12,21], yrange=[-1.5,0.8], xmin=1,ymin=1
161oplot, [12,32], [0,0]
162xyouts, 14, 0.6, 'bias=-0.79', charsize=1.1
163xyouts, 14, 0.5, 'std ratio=0.92', charsize=1.1
164
165ab=linfit(mean, bias,yfit=yfit)
166a=float(ab(0)) & b=float(ab(1))
167oplot, mean, yfit, thick=3, color=50
168print, a,b
169
170;; significant test
171significance_test_99,mean,bias
172fi=tropflux_id_env+'ws_correction_final.txt'
173res=read_ascii(fi,data_start=0)
174ff=res.field1
175cor=reform(ff(0,*))
176bias=reform(ff(1,*))
177std=reform(ff(2,*))
178mean=reform(ff(4,*))
179
180xx=total(std)/n_elements(std)
181yy=total(bias)/n_elements(bias)
182print, xx, yy
183
184
185splot, mean, bias, small=[2,3,4],/noer, xtitle='Mean ERAI WS', ytitle='ERAI WS bias', $
186        psym=2, charsize=1.,  $
187       xrange=[2,9], yrange=[-1,0.8], xmin=1, ymin=1
188oplot, [0,10], [0,0]
189xyouts, 3, 0.7, 'bias=-0.28', charsize=1.1
190xyouts, 3, 0.6, 'std ratio=0.90', charsize=1.1
191
192ab=linfit(mean, bias,yfit=yfit)
193a=float(ab(0)) & b=float(ab(1))
194oplot, mean, yfit, thick=3, color=50
195
196print, a,b
197;; significant test
198significance_test_99,mean,bias
199
200closeps
201
202fig=tropflux_od_env+'fig4_met_var_correction_scatter.ps'
203spawn, 'mv '+psdir+'idl.ps '+fig
204spawn, 'gv '+fig
205
206end
Note: See TracBrowser for help on using the repository browser.