source: trunk/src/paper01/fig16/fig16_timeseries_nino3.pro @ 97

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

suppress blank lines trailing blank

  • Property svn:executable set to *
  • Property svn:keywords set to URL
File size: 6.2 KB
Line 
1;+
2; .. _fig16_timeseries_nino3.pro:
3;
4; ==========================
5; fig16_timeseries_nino3.pro
6; ==========================
7;
8; DESCRIPTION
9; ===========
10;
11; :file:`${PROJECT_OD}/TropFlux_sst_19890101_20091231.nc`
12; containing
13; sst corrected on OAFLUX grid
14; has been produced by
15; :ref:`sst_correction_ncdf.pro`.
16;
17; :file:`${PROJECT_OD}/netflux_nino3_1989_2007.idl`
18; containing
19; ++
20; has been produced by
21; :ref:`++`.
22;
23; .. graphviz::
24;
25;    digraph fig16_timeseries_nino3 {
26;
27;       tropflux_sst [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_sst_19890101_20091231.nc"];
28;       figure [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/WHOTS_validation_net_2004_2007_all_v10.ps"];
29;
30;       fig16_timeseries_nino3 [shape=box,
31;       fontname=Courier,
32;       color=blue,
33;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig16/fig16_timeseries_nino3.pro",
34;       label="${TROPFLUX}/src/paper01/fig16/fig16_timeseries_nino3.pro"];
35;
36;       {tropflux_sst} -> {fig16_timeseries_nino3} -> {figure}
37;    }
38;
39; SEE ALSO
40; ========
41;
42; :ref:`project_profile.sh`
43; :ref:`project_init.pro`
44; :ref:`cm_project.pro`
45;
46; :func:`x_site_location`
47; :func:`y_site_location`
48;
49; EXAMPLES
50; ========
51;
52; ::
53;
54;  IDL> fig16_timeseries_nino3
55;
56; TODO
57; ====
58;
59; make it work : missing :file:`${PROJECT_OD}/netflux_nino3_1989_2007.idl`
60;
61; coding rules
62;
63; get rid of restore
64;
65; complete description
66;
67; handle IO error
68;
69; EVOLUTIONS
70; ==========
71;
72; $Id$
73;
74; $URL$
75;
76; - fplod 20110817T102957Z aedon.locean-ipsl.upmc.fr (Darwin)
77;
78;   * add PROJECT_OD to restored file
79;   * replace PROJECT_ID by PROJECT_OD
80;
81; - fplod 20110420T123110Z aedon.locean-ipsl.upmc.fr (Darwin)
82;
83;   * remove hard coding path
84;   * add graphviz
85;   * externalize functions
86;
87; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
88;
89;   * minimal header
90;
91;-
92pro fig16_timeseries_nino3
93;
94@cm_4cal
95@cm_4data
96@cm_4mesh
97@cm_4data
98@cm_project
99;
100reinitplt, /z,/invert
101key_portrait = 1
102;
103openps, FILENAME = project_od_env+'fig16_timeseries_nino3.ps'
104date1=19940101
105date2=20071231
106box=[240,330,-5,5]
107;
108file_trop=project_od_env+'TropFlux_sst_19890101_20091231.nc'
109initncdf, file_trop
110sst=read_ncdf("sst", date1, date2, box=box, file=file_trop,/nostr)
111sst=grossemoyenne(sst, "xy",/nan)
112restore, filename=project_od_env+'netflux_nino3_1989_2007.idl'
113help, trop, oafl, nce2, era, nce, sst
114; creating climatology
115ny=(2007-1994)+1
116nt=365*ny
117nsmooth=30.
118;
119trop_nclim=total(reform(trop(0:nt-1),365,ny),2)/ny
120oafl_nclim=total(reform(oafl(0:nt-1),365,ny),2)/ny
121nce2_nclim=total(reform(nce2(0:nt-1),365,ny),2)/ny
122era_nclim=total(reform(era(0:nt-1),365,ny),2)/ny
123nce_nclim=total(reform(nce(0:nt-1),365,ny),2)/ny
124sst_nclim=total(reform(sst(0:nt-1),365,ny),2)/ny
125;
126trop_nclim=[trop_nclim ,trop_nclim, trop_nclim]
127trop_nclim=smooth(trop_nclim,nsmooth,/nan)
128trop_nclim=trop_nclim[365:365+364]
129oafl_nclim=[oafl_nclim ,oafl_nclim, oafl_nclim]
130oafl_nclim=smooth(oafl_nclim,nsmooth,/nan)
131oafl_nclim=oafl_nclim[365:365+364]
132nce2_nclim=[nce2_nclim ,nce2_nclim ,nce2_nclim]
133nce2_nclim=smooth(nce2_nclim,nsmooth,/nan)
134nce2_nclim=nce2_nclim[365:365+364]
135era_nclim=[era_nclim ,era_nclim, era_nclim]
136era_nclim=smooth(era_nclim,nsmooth,/nan)
137era_nclim=era_nclim[365:365+364]
138nce_nclim=[nce_nclim ,nce_nclim ,nce_nclim]
139nce_nclim=smooth(nce_nclim,nsmooth,/nan)
140nce_nclim=nce_nclim[365:365+364]
141sst_nclim=[sst_nclim ,sst_nclim ,sst_nclim]
142sst_nclim=smooth(sst_nclim,nsmooth,/nan)
143sst_nclim=sst_nclim[365:365+364]
144;
145time=time
146jpt=n_elements(time)
147;
148caldat, time,mon,day,yea
149trop_clim=trop*0.
150era_clim=trop*0.
151oafl_clim=trop*0.
152nce_clim=trop*0.
153nce2_clim=trop*0.
154sst_clim=trop*0.
155;
156for jt=0,jpt-1 do begin
157  jtt=(time(jt)-julday(1,1,yea(jt))) < 364
158  trop_clim(jt)=trop_nclim(jtt)
159  oafl_clim(jt)=oafl_nclim(jtt)
160  nce2_clim(jt)=nce2_nclim(jtt)
161  era_clim(jt)=era_nclim(jtt)
162  nce_clim(jt)=nce_nclim(jtt)
163  sst_clim(jt)=sst_nclim(jtt)
164endfor
165;
166trop_ano=trop-trop_clim
167oafl_ano=oafl-oafl_clim
168nce2_ano=nce2-nce2_clim
169era_ano=era-era_clim
170nce_ano=nce-nce_clim
171sst_ano=sst-sst_clim
172;
173trop_hf=trop*0.
174nce2_hf=trop*0.
175oafl_hf=trop*0.
176era_hf=trop*0.
177nce_hf=trop*0.
178;
179Thf=1
180Tlf=90
181tsamp=1.   ; monthly
182freq=findgen(jpt/2+1)/(jpt*tsamp)
183freq=[freq,-1.*reverse(freq(1:jpt/2))]
184peri=1./(abs(freq) > 1.e-20)*(2*(freq ge 0)-1.)
185; Variance
186     msk_spec=float((abs(peri) ge Thf) and (abs(peri) le Tlf))
187     ts=reform(trop_ano)
188     ff_ts=fft(ts)
189     ff_ts_f=ff_ts*msk_spec
190     trop_hf=float(fft(ff_ts_f,/inverse))
191;
192    ts=reform(nce2_ano)
193    ff_ts=fft(ts)
194    ff_ts_f=ff_ts*msk_spec
195    nce2_hf=float(fft(ff_ts_f,/inverse))
196;
197    ts=reform(era_ano)
198    ff_ts=fft(ts)
199    ff_ts_f=ff_ts*msk_spec
200    era_hf=float(fft(ff_ts_f,/inverse))
201;
202    ts=reform(nce_ano)
203    ff_ts=fft(ts)
204    ff_ts_f=ff_ts*msk_spec
205    nce_hf=float(fft(ff_ts_f,/inverse))
206;
207    ts=reform(oafl_ano)
208    ff_ts=fft(ts)
209    ff_ts_f=ff_ts*msk_spec
210    oafl_hf=float(fft(ff_ts_f,/inverse))
211;
212help, trop_hf, nce2_hf, era_hf, nce_hf
213;
214trop_ano=trop_ano-trop_hf
215oafl_ano=oafl_ano-oafl_hf
216nce2_ano=nce2_ano-nce2_hf
217era_ano=era_ano-era_hf
218nce_ano=nce_ano-nce_hf
219;
220nsmooth=30.
221marge=[-3,-3,0,4]
222;
223pltt, ts_smooth(sst_ano,nsmooth,/nan), "t",/rempl,/nocolorb, $
224      small=[1,3,1], title="a) Nino 3 index ", subtitle="", $
225      ytitle="(degree Celcius)", marge=marge, linethick=1.3, charsize=1.1, xmin=-1, ymin=-1
226;
227nsmooth=90.
228;
229pltt, ts_smooth(trop,nsmooth,/nan), "t",/rempl,/nocolorb, 0,150, $
230      small=[1,3,2], title="b) Net Heat Flux", subtitle="", color=30, $
231      ytitle="(W/m2)", marge=marge, linethick=1.3, charsize=1.1,/noer, xmin=-1, ymin=-1
232pltt, ts_smooth(oafl,nsmooth,/nan), "t",/ov1d, color=145
233pltt, ts_smooth(era,nsmooth,/nan), "t",/ov1d, color=190
234pltt, ts_smooth(nce2,nsmooth,/nan), "t",/ov1d, color=250
235pltt, ts_smooth(nce,nsmooth,/nan), "t",/ov1d, color=65
236;
237nsmooth=120
238pltt, ts_smooth(trop_ano,nsmooth,/nan), "t",/rempl,/nocolorb, -45,30, color=30, $
239      small=[1,3,3], ytitle="(W/m2)", marge=marge, linethick=1.3, xmin=-1, ymin=-1, $
240      title="c) Interannual Net Flux",/noer,  charsize=1.1, subtitle=""
241pltt, ts_smooth(oafl_ano,nsmooth,/nan), "t",/ov1d, color=145
242pltt, ts_smooth(era_ano,nsmooth,/nan), "t",/ov1d, color=190
243pltt, ts_smooth(nce2_ano,nsmooth,/nan), "t",/ov1d, color=250
244pltt, ts_smooth(nce_ano,nsmooth,/nan), "t",/ov1d, color=65
245;
246closeps
247;
248end
Note: See TracBrowser for help on using the repository browser.