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 | ;- |
---|
92 | pro fig16_timeseries_nino3 |
---|
93 | ; |
---|
94 | @cm_4cal |
---|
95 | @cm_4data |
---|
96 | @cm_4mesh |
---|
97 | @cm_4data |
---|
98 | @cm_project |
---|
99 | |
---|
100 | reinitplt, /z,/invert |
---|
101 | key_portrait = 1 |
---|
102 | |
---|
103 | openps, FILENAME = project_od_env+'fig16_timeseries_nino3.ps' |
---|
104 | date1=19940101 |
---|
105 | date2=20071231 |
---|
106 | box=[240,330,-5,5] |
---|
107 | |
---|
108 | file_trop=project_od_env+'TropFlux_sst_19890101_20091231.nc' |
---|
109 | initncdf, file_trop |
---|
110 | sst=read_ncdf("sst", date1, date2, box=box, file=file_trop,/nostr) |
---|
111 | sst=grossemoyenne(sst, "xy",/nan) |
---|
112 | restore, filename=project_od_env+'netflux_nino3_1989_2007.idl" |
---|
113 | help, trop, oafl, nce2, era, nce, sst |
---|
114 | ;; creating climatology |
---|
115 | ny=(2007-1994)+1 |
---|
116 | nt=365*ny |
---|
117 | nsmooth=30. |
---|
118 | |
---|
119 | trop_nclim=total(reform(trop(0:nt-1),365,ny),2)/ny |
---|
120 | oafl_nclim=total(reform(oafl(0:nt-1),365,ny),2)/ny |
---|
121 | nce2_nclim=total(reform(nce2(0:nt-1),365,ny),2)/ny |
---|
122 | era_nclim=total(reform(era(0:nt-1),365,ny),2)/ny |
---|
123 | nce_nclim=total(reform(nce(0:nt-1),365,ny),2)/ny |
---|
124 | sst_nclim=total(reform(sst(0:nt-1),365,ny),2)/ny |
---|
125 | |
---|
126 | trop_nclim=[trop_nclim ,trop_nclim, trop_nclim] |
---|
127 | trop_nclim=smooth(trop_nclim,nsmooth,/nan) |
---|
128 | trop_nclim=trop_nclim[365:365+364] |
---|
129 | oafl_nclim=[oafl_nclim ,oafl_nclim, oafl_nclim] |
---|
130 | oafl_nclim=smooth(oafl_nclim,nsmooth,/nan) |
---|
131 | oafl_nclim=oafl_nclim[365:365+364] |
---|
132 | nce2_nclim=[nce2_nclim ,nce2_nclim ,nce2_nclim] |
---|
133 | nce2_nclim=smooth(nce2_nclim,nsmooth,/nan) |
---|
134 | nce2_nclim=nce2_nclim[365:365+364] |
---|
135 | era_nclim=[era_nclim ,era_nclim, era_nclim] |
---|
136 | era_nclim=smooth(era_nclim,nsmooth,/nan) |
---|
137 | era_nclim=era_nclim[365:365+364] |
---|
138 | nce_nclim=[nce_nclim ,nce_nclim ,nce_nclim] |
---|
139 | nce_nclim=smooth(nce_nclim,nsmooth,/nan) |
---|
140 | nce_nclim=nce_nclim[365:365+364] |
---|
141 | sst_nclim=[sst_nclim ,sst_nclim ,sst_nclim] |
---|
142 | sst_nclim=smooth(sst_nclim,nsmooth,/nan) |
---|
143 | sst_nclim=sst_nclim[365:365+364] |
---|
144 | |
---|
145 | time=time |
---|
146 | jpt=n_elements(time) |
---|
147 | |
---|
148 | caldat, time,mon,day,yea |
---|
149 | trop_clim=trop*0. |
---|
150 | era_clim=trop*0. |
---|
151 | oafl_clim=trop*0. |
---|
152 | nce_clim=trop*0. |
---|
153 | nce2_clim=trop*0. |
---|
154 | sst_clim=trop*0. |
---|
155 | |
---|
156 | for 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) |
---|
164 | endfor |
---|
165 | |
---|
166 | trop_ano=trop-trop_clim |
---|
167 | oafl_ano=oafl-oafl_clim |
---|
168 | nce2_ano=nce2-nce2_clim |
---|
169 | era_ano=era-era_clim |
---|
170 | nce_ano=nce-nce_clim |
---|
171 | sst_ano=sst-sst_clim |
---|
172 | |
---|
173 | trop_hf=trop*0. |
---|
174 | nce2_hf=trop*0. |
---|
175 | oafl_hf=trop*0. |
---|
176 | era_hf=trop*0. |
---|
177 | nce_hf=trop*0. |
---|
178 | |
---|
179 | Thf=1 |
---|
180 | Tlf=90 |
---|
181 | tsamp=1. ; monthly |
---|
182 | freq=findgen(jpt/2+1)/(jpt*tsamp) |
---|
183 | freq=[freq,-1.*reverse(freq(1:jpt/2))] |
---|
184 | peri=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 | ; |
---|
212 | help, trop_hf, nce2_hf, era_hf, nce_hf |
---|
213 | |
---|
214 | trop_ano=trop_ano-trop_hf |
---|
215 | oafl_ano=oafl_ano-oafl_hf |
---|
216 | nce2_ano=nce2_ano-nce2_hf |
---|
217 | era_ano=era_ano-era_hf |
---|
218 | nce_ano=nce_ano-nce_hf |
---|
219 | |
---|
220 | nsmooth=30. |
---|
221 | marge=[-3,-3,0,4] |
---|
222 | |
---|
223 | pltt, 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 | |
---|
227 | nsmooth=90. |
---|
228 | |
---|
229 | pltt, 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 |
---|
232 | pltt, ts_smooth(oafl,nsmooth,/nan), "t",/ov1d, color=145 |
---|
233 | pltt, ts_smooth(era,nsmooth,/nan), "t",/ov1d, color=190 |
---|
234 | pltt, ts_smooth(nce2,nsmooth,/nan), "t",/ov1d, color=250 |
---|
235 | pltt, ts_smooth(nce,nsmooth,/nan), "t",/ov1d, color=65 |
---|
236 | |
---|
237 | nsmooth=120 |
---|
238 | pltt, 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="" |
---|
241 | pltt, ts_smooth(oafl_ano,nsmooth,/nan), "t",/ov1d, color=145 |
---|
242 | pltt, ts_smooth(era_ano,nsmooth,/nan), "t",/ov1d, color=190 |
---|
243 | pltt, ts_smooth(nce2_ano,nsmooth,/nan), "t",/ov1d, color=250 |
---|
244 | pltt, ts_smooth(nce_ano,nsmooth,/nan), "t",/ov1d, color=65 |
---|
245 | |
---|
246 | closeps |
---|
247 | end |
---|