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

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

going on consolidation of paper01 materials

File size: 7.5 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;       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;-
79pro icoads_q2m_stats_paper
80@cm_general
81@cm_tropflux
82reinitplt, /z,/invert
83key_portrait = 1
84coefpalit=.9
85
86openps, FILENAME = 'idl.ps'
87; partie a changer
88marge=[-2,-2, -4,2]
89st=19890101 & en=20091231
90domdef, box
91
92file=tropflux_id_env+'sphum_monthly_1960_2010_oafluxgrid.nc'
93initncdf, file
94icoads=read_ncdf("sphum", st, en , file=file,/nostr, box=box)
95help, icoads
96
97file=tropflux_id_env+'q2m_TropFlux_global_monthly_1989_2009.nc'
98initncdf, file
99trop=read_ncdf("q2m", st, en , file=file,/nostr, box=box)
100help, trop
101
102file=tropflux_id_env+"q2m_OAFlux_global_monthly_1989_2009.nc"
103initncdf, file
104oaf=read_ncdf("q2m", st, en , file=file,/nostr, box=box)
105help, oaf
106
107file=tropflux_id_env+"q2m_ERAI_global_monthly_1989_2009.nc"
108initncdf, file
109erai=read_ncdf("q2m", st, en , file=file,/nostr, box=box)
110help, erai
111
112file=tropflux_id_env+"q2m_NCEP2_global_monthly_1989_2009.nc"
113initncdf, file
114ncep2=1000*read_ncdf("q2m", st, en , file=file,/nostr, box=box)
115help, ncep2
116
117file=tropflux_id_env+"q2m_NCEP1_global_monthly_1989_2009.nc"
118initncdf, file
119ncep1=1000*read_ncdf("q2m", st, en , file=file,/nostr, box=box)
120help, ncep1
121
122
123si=size(trop) & nt=si(3)
124
125lat_rama=[67, 55, 55, 80.5, 80.5, 80.5, 80.5, 90, 90, 90, 90, 90, 90, 90, 95]
126lon_rama=[-8, -12, -8,-8, -1.5, 0, 1.5, -1.5, 0, 1.5, 4, 8, 12, 15, -5]
127
128lat_pirata=[0, 350, 337, 325, 350, 337, 322, 328, 322, 326, 322, 337, 337, 322, 350, 322, 330]
129lon_pirata=[0, 0, 0, 0, -10, 12, 12, -14, 15, -19, 20, 21, 4, 4, -6, 8, -8]
130
131lat_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
135lon_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
138lat=[lat_rama, lat_pirata, lat_tao]
139lon=[lon_rama, lon_pirata, lon_tao]
140
141lat_tao=lat & lon_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)) & 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
153endfor
154
155msk=replicate(1,nxt,nyt)
156msk(list)=!Values.f_nan
157
158mask=trop*0
159for jt=0,jpt-1 do begin
160  t=reform(msk(*,*))
161  mask(*,*,jt)=t
162endfor
163
164param=icoads*mask
165trop=trop*mask & oaf=oaf*mask & erai=erai*mask
166ncep2=ncep2*mask & ncep1=ncep1*mask
167
168
169ind=where(finite(param) and finite(erai) and finite(trop) and finite(oaf) and finite(ncep2) and finite(ncep1))
170x=param(ind) & y=trop(ind)
171param=param(ind) & trop=trop(ind) & erai=erai(ind) & oaf=oaf(ind) & ncep2=ncep2(ind) & ncep1=ncep1(ind)
172
173;
174statistics, param, trop, $
175                 cor, bias, std, rmsd
176print, cor, bias, std,  rmsd
177cstat_trop=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
178abs_diff=total(abs(trop-param))/n_elements(trop)
179abs_trop=string(abs_diff, format='(f5.2)')
180;
181statistics, param, oaf, $
182                 cor, bias, std, rmsd
183print, cor, bias, std,  rmsd
184cstat_oaf=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
185abs_diff=total(abs(oaf-param))/n_elements(oaf)
186abs_oaf=string(abs_diff, format='(f5.2)')
187
188;
189statistics, param, erai, $
190                 cor, bias, std, rmsd
191print, cor, bias, std,  rmsd
192cstat_erai=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
193abs_diff=total(abs(erai-param))/n_elements(erai)
194abs_erai=string(abs_diff, format='(f5.2)')
195
196;
197statistics, param, ncep2, $
198                 cor, bias, std, rmsd
199print, cor, bias, std,  rmsd
200cstat_ncep2=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
201abs_diff=total(abs(ncep2-param))/n_elements(ncep2)
202abs_ncep2=string(abs_diff, format='(f5.2)')
203
204;
205statistics, param, ncep1, $
206                 cor, bias, std, rmsd
207print, cor, bias, std,  rmsd
208cstat_ncep1=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
209abs_diff=total(abs(ncep1-param))/n_elements(ncep1)
210abs_ncep1=string(abs_diff, format='(f5.2)')
211
212;
213mio=4 & mao=24 & inx=1 & nx=(mao-mio)/inx+1l & xx=mio+indgen(nx)*inx
214mis=4 & mas=24 & iny=1 & ny=(mas-mis)/iny+1l & yy=mis+indgen(ny)*iny
215;
216pdf, param,trop,mio,mao,inx,mis,mas,iny, $
217    pdf,xx,yy
218scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $
219    title="q2m - ICOADS/TropFlux", small=[2,3,1]
220xyouts, 10, 6, cstat_trop, charsize=1
221xyouts, 10, 4, abs_trop, charsize=1
222
223;
224pdf, param,oaf,mio,mao,inx,mis,mas,iny, $
225    pdf,xx,yy
226scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $
227    title="q2m - ICOADS/OAFlux", small=[2,3,2]
228xyouts, 10, 6, cstat_oaf, charsize=1
229xyouts, 10, 4, abs_oaf, charsize=1
230
231;
232pdf, param,erai,mio,mao,inx,mis,mas,iny, $
233    pdf,xx,yy
234scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $
235    title="q2m - ICOADS/ERAI", small=[2,3,3]
236xyouts, 10, 6, cstat_erai, charsize=1
237xyouts, 10, 4, abs_erai, charsize=1
238
239;
240pdf, param,ncep2,mio,mao,inx,mis,mas,iny, $
241    pdf,xx,yy
242scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $
243    title="q2m - ICOADS/NCEP2", small=[2,3,4]
244xyouts, 10, 6, cstat_ncep2, charsize=1
245xyouts, 10, 4, abs_ncep2, charsize=1
246
247;
248pdf, param,ncep1,mio,mao,inx,mis,mas,iny, $
249    pdf,xx,yy
250scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $
251    title="q2m - ICOADS/NCEP1", small=[2,3,5]
252xyouts, 10, 6, cstat_ncep1, charsize=1
253xyouts, 10, 4, abs_ncep1, charsize=1
254
255closeps
256fig=tropflux_od_env+"icoads_q2m_stats_paper.ps"
257spawn, 'mv '+psdir+'idl.ps '+fig
258spawn, 'gv '+fig
259return
260end
Note: See TracBrowser for help on using the repository browser.