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

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

restart consolidation of paper01 software

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