source: trunk/src/paper01/fig6/icoads_sst_stats_paper.pro @ 41

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

add paper01 materials

File size: 6.8 KB
Line 
1pro icoads_sst_stats_paper
2@common
3;-----------------------------------------------
4reinitplt, /z,/invert
5key_portrait = 1
6coefpalit=.9
7
8openps, FILENAME = 'idl.ps'
9;------------------------------------------------------------
10; partie a changer
11;------------------------------------------------------------
12marge=[-2,-2, -4,2]
13st=19890101 & en=20091231
14domdef, box
15
16file="/Volumes/Sanathana/ICOADS/Median/sst_monthly_1960_2010_oafluxgrid.nc"
17initncdf, file
18icoads=read_ncdf("sst", st-1, en , file=file,/nostr, box=box)
19help, icoads
20
21dir="/Volumes/Sanathana/monthly_met_var/"
22file=dir+"sst_TropFlux_global_monthly_1989_2009.nc"
23initncdf, file
24trop=read_ncdf("sst", st, en , file=file,/nostr, box=box)-273.15
25help, trop
26
27file=dir+"sst_OAFlux_global_monthly_1989_2009.nc"
28initncdf, file
29oaf=read_ncdf("sst", st, en , file=file,/nostr, box=box)
30help, oaf
31
32file=dir+"sst_ERAI_global_monthly_1989_2009.nc"
33initncdf, file
34erai=read_ncdf("sst", st, en , file=file,/nostr, box=box)-273.15
35help, erai
36
37file=dir+"sst_NCEP2_global_monthly_1989_2009.nc"
38initncdf, file
39ncep2=read_ncdf("sst", st, en , file=file,/nostr, box=box)-273.15
40help, ncep2
41
42file="/Volumes/Sanathana/NOC_v2/oaflux_grid/nocv2_sst_19890101_20091231_oafluxgrid.nc"
43initncdf, file
44noc=read_ncdf("sst", st, en , file=file,/nostr, box=box)
45help, noc
46
47file=dir+"sst_NCEP1_global_monthly_1989_2009.nc"
48initncdf, file
49ncep1=read_ncdf("sst", st, en , file=file,/nostr, box=box)-273.15
50help, ncep1
51
52
53si=size(trop) & nt=si(3)
54
55lat_rama=[67, 55, 55, 80.5, 80.5, 80.5, 80.5, 90, 90, 90, 90, 90, 90, 90, 95]
56lon_rama=[-8, -12, -8,-8, -1.5, 0, 1.5, -1.5, 0, 1.5, 4, 8, 12, 15, -5]
57
58lat_pirata=[0, 350, 337, 325, 350, 337, 322, 328, 322, 326, 322, 337, 337, 322, 350, 322, 330]
59lon_pirata=[0, 0, 0, 0, -10, 12, 12, -14, 15, -19, 20, 21, 4, 4, -6, 8, -8]
60
61lat_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, $
62         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, $
63         156, 165, 180, 190, 220, 235, 250, 265]
64
65lon_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, $
66          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]
67
68lat=[lat_rama, lat_pirata, lat_tao]
69lon=[lon_rama, lon_pirata, lon_tao]
70
71lat_tao=lat & lon_tao=lon
72nn=n_elements(lat)
73
74list=0
75for n=0, nn-1 do begin
76  x=lat_tao(n)
77  y=lon_tao(n)
78  dx=abs(reform(glamt-x)) & dy=abs(reform(gphit)-y)
79  ind=where((dx le 0.5) and (dy le 0.5))
80  if (total(ind) ge 0.) then begin
81    list=[list,ind]
82  endif
83endfor
84
85msk=replicate(1,nxt,nyt)
86msk(list)=!Values.f_nan
87
88mask=trop*0
89for jt=0,jpt-1 do begin
90  t=reform(msk(*,*))
91  mask(*,*,jt)=t
92endfor
93
94param=icoads*mask
95trop=trop*mask & oaf=oaf*mask & erai=erai*mask
96ncep2=ncep2*mask & ncep1=ncep1*mask
97noc=noc*mask
98
99ind=where(finite(param) and finite(erai) and finite(trop) and finite(oaf) and finite(ncep2) and finite(ncep1))
100x=param(ind) & y=trop(ind)
101param=param(ind) & trop=trop(ind) & erai=erai(ind) & oaf=oaf(ind) & ncep2=ncep2(ind) & ncep1=ncep1(ind)
102noc=noc(ind)
103
104;
105statistics, param, trop, $
106                 cor, bias, std, rmsd
107print, cor, bias, std,  rmsd
108cstat_trop=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
109abs_diff=total(abs(trop-param))/n_elements(trop)
110abs_trop=string(abs_diff, format='(f5.2)')
111
112statistics, param, oaf, $
113                 cor, bias, std, rmsd
114print, cor, bias, std,  rmsd
115cstat_oaf=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
116abs_diff=total(abs(oaf-param))/n_elements(oaf)
117abs_oaf=string(abs_diff, format='(f5.2)')
118
119;
120statistics, param, erai, $
121                 cor, bias, std, rmsd
122print, cor, bias, std,  rmsd
123cstat_erai=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
124abs_diff=total(abs(erai-param))/n_elements(erai)
125abs_erai=string(abs_diff, format='(f5.2)')
126
127;
128statistics, param, ncep2, $
129                 cor, bias, std, rmsd
130print, cor, bias, std,  rmsd
131cstat_ncep2=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
132abs_diff=total(abs(ncep2-param))/n_elements(ncep2)
133abs_ncep2=string(abs_diff, format='(f5.2)')
134;
135statistics, param, ncep1, $
136                 cor, bias, std, rmsd
137print, cor, bias, std,  rmsd
138cstat_ncep1=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
139abs_diff=total(abs(ncep1-param))/n_elements(ncep1)
140abs_ncep1=string(abs_diff, format='(f5.2)')
141;
142statistics, param, noc, $
143                 cor, bias, std, rmsd
144print, cor, bias, std,  rmsd
145cstat_noc=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)')
146abs_diff=total(abs(noc-param))/n_elements(noc)
147abs_noc=string(abs_diff, format='(f5.2)')
148
149;
150mio=15 & mao=32 & inx=1 & nx=(mao-mio)/inx+1l & xx=mio+indgen(nx)*inx
151mis=15 & mas=32 & iny=1 & ny=(mas-mis)/iny+1l & yy=mis+indgen(ny)*iny
152xp=18 & yp=16.5
153x1=15 & x2=32 & y1=x1 & y2=x2
154;
155pdf, param,trop,mio,mao,inx,mis,mas,iny, $
156    pdf,xx,yy
157scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $
158    title="sst - ICOADS/TropFlux", small=[2,3,1], $
159    xrange=[x1, x2], yrange=[y1, y2]
160xyouts, xp, yp, cstat_trop, charsize=1
161xyouts, xp, yp-1, abs_trop, charsize=1
162
163;
164pdf, param,oaf,mio,mao,inx,mis,mas,iny, $
165    pdf,xx,yy
166scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $
167    title="sst - ICOADS/OAFlux", small=[2,3,2], $
168     xrange=[x1, x2], yrange=[y1, y2]
169xyouts, xp, yp, cstat_oaf, charsize=1
170xyouts, xp, yp-1, abs_oaf, charsize=1
171
172;
173pdf, param,erai,mio,mao,inx,mis,mas,iny, $
174    pdf,xx,yy
175scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $
176    title="sst - ICOADS/ERAI", small=[2,3,3], $
177    xrange=[x1, x2], yrange=[y1, y2]
178xyouts, xp, yp, cstat_erai, charsize=1
179xyouts, xp, yp-1, abs_erai, charsize=1
180
181;
182pdf, param,ncep2,mio,mao,inx,mis,mas,iny, $
183    pdf,xx,yy
184scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $
185    title="sst - ICOADS/NCEP2", small=[2,3,4], $
186    xrange=[x1, x2], yrange=[y1, y2]
187xyouts, xp, yp, cstat_ncep2, charsize=1
188xyouts, xp, yp-1, abs_ncep2, charsize=1
189
190;
191pdf, param,ncep1,mio,mao,inx,mis,mas,iny, $
192    pdf,xx,yy
193scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $
194    title="sst - ICOADS/NCEP1", small=[2,3,5], $
195    xrange=[x1, x2], yrange=[y1, y2]
196xyouts, xp, yp, cstat_ncep1, charsize=1
197xyouts, xp, yp-1, abs_ncep1, charsize=1
198
199pdf, param,noc,mio,mao,inx,mis,mas,iny, $
200    pdf,xx,yy
201scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $
202    title="sst - ICOADS/NOC", small=[2,3,6], $
203    xrange=[x1, x2], yrange=[y1, y2]
204xyouts, xp, yp, cstat_noc, charsize=1
205xyouts, xp, yp-1, abs_noc, charsize=1
206
207;------------------------------------------------------------
208closeps
209fig="icoads_sst_stats_paper.ps"
210spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
211spawn, 'gv '+cpsdir+fig
212;------------------------------------------------------------
213return
214end
Note: See TracBrowser for help on using the repository browser.