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 | ;- |
---|
84 | pro fig4_met_var_correction_scatter |
---|
85 | @cm_general |
---|
86 | @cm_tropflux |
---|
87 | reinitplt, /z,/invert |
---|
88 | key_portrait = 1 |
---|
89 | |
---|
90 | openps, FILENAME = 'idl.ps' |
---|
91 | fi=tropflux_id_env+'sst_correction_final.txt' |
---|
92 | res=read_ascii(fi,data_start=0) |
---|
93 | ff=res.field1 |
---|
94 | cor=reform(ff(0,*)) |
---|
95 | bias=reform(ff(1,*)) |
---|
96 | std=reform(ff(2,*)) |
---|
97 | mean=reform(ff(4,*)) |
---|
98 | |
---|
99 | splot, 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 |
---|
102 | oplot, [20,32], [0,0] |
---|
103 | xx=total(std)/n_elements(std) |
---|
104 | yy=total(bias)/n_elements(bias) |
---|
105 | |
---|
106 | xyouts, 22, 0.6, 'bias=-0.05', charsize=1.1 |
---|
107 | xyouts, 22, 0.5, 'std ratio=0.989', charsize=1.1 |
---|
108 | |
---|
109 | print, xx, yy |
---|
110 | ab=linfit(mean, bias,yfit=yfit) |
---|
111 | a=float(ab(0)) & b=float(ab(1)) |
---|
112 | oplot, mean, yfit, thick=3, color=50 |
---|
113 | print, a,b |
---|
114 | |
---|
115 | ;; significant test |
---|
116 | significance_test_99,mean,bias |
---|
117 | |
---|
118 | fi=tropflux_id_env+'t2m_correction_final.txt' |
---|
119 | res=read_ascii(fi,data_start=0) |
---|
120 | ff=res.field1 |
---|
121 | cor=reform(ff(0,*)) |
---|
122 | bias=reform(ff(1,*)) |
---|
123 | std=reform(ff(2,*)) |
---|
124 | mean=reform(ff(4,*)) |
---|
125 | |
---|
126 | xx=total(std)/n_elements(std) |
---|
127 | yy=total(bias)/n_elements(bias) |
---|
128 | print, xx, yy |
---|
129 | |
---|
130 | splot, 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 |
---|
133 | oplot, [20,32], [0,0] |
---|
134 | |
---|
135 | xyouts, 22, 0.5, 'bias=-0.296', charsize=1.1 |
---|
136 | xyouts, 22, 0.4, 'std ratio=0.92', charsize=1.1 |
---|
137 | |
---|
138 | ab=linfit(mean, bias,yfit=yfit) |
---|
139 | a=float(ab(0)) & b=float(ab(1)) |
---|
140 | oplot, mean, yfit, thick=3, color=50 |
---|
141 | print, a,b |
---|
142 | |
---|
143 | ;; significant test |
---|
144 | significance_test_99,mean,bias |
---|
145 | |
---|
146 | fi=tropflux_id_env+'q2m_correction_final.txt' |
---|
147 | res=read_ascii(fi,data_start=0) |
---|
148 | ff=res.field1 |
---|
149 | cor=reform(ff(0,*)) |
---|
150 | bias=reform(ff(1,*)) |
---|
151 | std=reform(ff(2,*)) |
---|
152 | mean=reform(ff(4,*)) |
---|
153 | |
---|
154 | xx=total(std)/n_elements(std) |
---|
155 | yy=total(bias)/n_elements(bias) |
---|
156 | print, xx, yy |
---|
157 | |
---|
158 | splot, 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 |
---|
161 | oplot, [12,32], [0,0] |
---|
162 | xyouts, 14, 0.6, 'bias=-0.79', charsize=1.1 |
---|
163 | xyouts, 14, 0.5, 'std ratio=0.92', charsize=1.1 |
---|
164 | |
---|
165 | ab=linfit(mean, bias,yfit=yfit) |
---|
166 | a=float(ab(0)) & b=float(ab(1)) |
---|
167 | oplot, mean, yfit, thick=3, color=50 |
---|
168 | print, a,b |
---|
169 | |
---|
170 | ;; significant test |
---|
171 | significance_test_99,mean,bias |
---|
172 | fi=tropflux_id_env+'ws_correction_final.txt' |
---|
173 | res=read_ascii(fi,data_start=0) |
---|
174 | ff=res.field1 |
---|
175 | cor=reform(ff(0,*)) |
---|
176 | bias=reform(ff(1,*)) |
---|
177 | std=reform(ff(2,*)) |
---|
178 | mean=reform(ff(4,*)) |
---|
179 | |
---|
180 | xx=total(std)/n_elements(std) |
---|
181 | yy=total(bias)/n_elements(bias) |
---|
182 | print, xx, yy |
---|
183 | |
---|
184 | |
---|
185 | splot, 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 |
---|
188 | oplot, [0,10], [0,0] |
---|
189 | xyouts, 3, 0.7, 'bias=-0.28', charsize=1.1 |
---|
190 | xyouts, 3, 0.6, 'std ratio=0.90', charsize=1.1 |
---|
191 | |
---|
192 | ab=linfit(mean, bias,yfit=yfit) |
---|
193 | a=float(ab(0)) & b=float(ab(1)) |
---|
194 | oplot, mean, yfit, thick=3, color=50 |
---|
195 | |
---|
196 | print, a,b |
---|
197 | ;; significant test |
---|
198 | significance_test_99,mean,bias |
---|
199 | |
---|
200 | closeps |
---|
201 | |
---|
202 | fig=tropflux_od_env+'fig4_met_var_correction_scatter.ps' |
---|
203 | spawn, 'mv '+psdir+'idl.ps '+fig |
---|
204 | spawn, 'gv '+fig |
---|
205 | |
---|
206 | end |
---|