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