source: trunk/src/paper01/fig15/fig15_timeseries_mjo.pro @ 182

Last change on this file since 182 was 182, checked in by pinsard, 12 years ago

fix some svn propset

  • Property svn:executable set to *
  • Property svn:keywords set to Id URL
File size: 6.5 KB
Line 
1;+
2; .. _fig15_timeseries_mjo.pro:
3;
4; ========================
5; fig15_timeseries_mjo.pro
6; ========================
7;
8; DESCRIPTION
9; ===========
10;
11; .. graphviz::
12;
13;    digraph fig15_timeseries_mjo {
14;
15;       tropflux_general [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/TropFlux_19890101_20091231.nc"];
16;       ncep2 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/NCEP2_flux_19890101_20090729.nc"];
17;       erai [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc"];
18;       ncep1 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/fluxe_ncep1_19890101_20091231.nc"];
19;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/shf_oafluxgrid_1985_2008.nc"];
20;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/lhf_oafluxgrid_1985_2008.nc"];
21;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/lwr_oafluxgrid_1985_2007.nc"];
22;       swr_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/swr_oafluxgrid_1985_2007.nc"];
23;       olr_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/olr_oafluxgrid_30n30s_19890101_20091231.nc"];
24;
25;       figure [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/WHOTS_validation_net_2004_2007_all_v10.ps"];
26;
27;       fig15_timeseries_mjo [shape=box,
28;       fontname=Courier,
29;       color=blue,
30;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig15/fig15_timeseries_mjo.pro",
31;       label="${TROPFLUX}/src/paper01/fig15/fig15_timeseries_mjo.pro"];
32;
33;       {tropflux_general swr_oafluxgrid lwr_oafluxgrid lhf_oafluxgrid shf_oafluxgrid ncep2 ncep1} -> {fig15_timeseries_mjo} -> {figure}
34;    }
35;
36; SEE ALSO
37; ========
38;
39; :ref:`project_profile.sh`
40; :ref:`project_init.pro`
41; :ref:`cm_project.pro`
42;
43; EXAMPLES
44; ========
45;
46; ::
47;
48;  fig15_timeseries_mjo
49;
50; TODO
51; ====
52;
53; make it work on cratos : missing data
54;
55; coding rules
56;
57; complete description
58;
59; handle IO error
60;
61; EVOLUTIONS
62; ==========
63;
64; $Id$
65;
66; $URL$
67;
68; - fplod 20110420T122720Z aedon.locean-ipsl.upmc.fr (Darwin)
69;
70;   * remove hard coding path
71;   * add graphviz
72;   * externalize functions
73;
74; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
75;
76;   * minimal header
77;
78;-
79pro fig15_timeseries_mjo
80@cm_general
81@cm_project
82reinitplt, /z,/invert
83key_portrait = 1
84;
85openps, FILENAME = project_od_env+'fig15_timeseries_mjo.ps'
86date1=20071001
87date2=20080331
88date1=19990101
89date2=20021231
90box=[50,80,-12,-5]
91;
92file_trop=project_id_env+'TropFlux_19890101_20091231.nc'
93initncdf, file_trop
94shf_trop=read_ncdf("shf", date1, date2, box=box, file=file_trop,/nostr)
95lhf_trop=read_ncdf("lhf", date1, date2, box=box, file=file_trop,/nostr)
96swr_trop=read_ncdf("swr", date1, date2, box=box, file=file_trop,/nostr)
97lwr_trop=read_ncdf("lwr", date1, date2, box=box, file=file_trop,/nostr)
98; ref_lw=-1*lwr_trop
99trop=swr_trop+(lwr_trop+lhf_trop+shf_trop)
100help, trop
101trop=grossemoyenne(trop, "xy",/nan)
102;
103file_ncep=project_id_env+'NCEP2_flux_19890101_20090729.nc'
104initncdf, file_ncep
105shf=read_ncdf("shf", date1, date2, box=box, file=file_ncep,/nostr)
106lhf=read_ncdf("lhf", date1, date2, box=box, file=file_ncep,/nostr)
107lwr=read_ncdf("lwr", date1, date2, box=box, file=file_ncep,/nostr)
108swr=read_ncdf("swr", date1, date2, box=box, file=file_ncep,/nostr)
109;
110nce2=swr-(lwr+lhf+shf)
111nce2=grossemoyenne(nce2, "xy",/nan)
112help, nce2
113;
114file_erai=project_id_env+'erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc'
115initncdf, file_erai
116shf=read_ncdf("shf", date1, date2, box=box, file=file_erai,/nostr)
117lhf=read_ncdf("lhf", date1, date2, box=box, file=file_erai,/nostr)
118lwr=read_ncdf("lwr", date1, date2, box=box, file=file_erai,/nostr)
119swr=read_ncdf("swr", date1, date2, box=box, file=file_erai,/nostr)
120swr=-1*swr
121era=swr-(lwr+lhf+shf)
122era=grossemoyenne(era, "xy",/nan)
123help, era
124;
125file=project_id_env+'fluxe_ncep1_19890101_20091231.nc'
126initncdf, file
127lwr=read_ncdf("lwr", date1, date2, box=box, file=file,/nostr)
128swr=read_ncdf("swr", date1, date2, box=box, file=file,/nostr)
129lhf=read_ncdf("lhf", date1, date2, box=box, file=file,/nostr)
130shf=read_ncdf("shf", date1, date2, box=box, file=file,/nostr)
131;
132nce=swr+shf+lhf+lwr
133nce=grossemoyenne(nce, "xy",/nan)
134help, nce
135;
136file_oaf=project_id_env+'shf_oafluxgrid_1985_2008.nc'
137initncdf, file_oaf
138shf=read_ncdf("shf", date1, date2, box=box, file=file_oaf,/nostr)
139file_oaf=project_id_env+'lhf_oafluxgrid_1985_2008.nc'
140initncdf, file_oaf
141lhf=read_ncdf("lhf", date1, date2, box=box, file=file_oaf,/nostr)
142file_oaf=project_id_env+'lwr_oafluxgrid_1985_2007.nc'
143initncdf, file_oaf
144lwr=read_ncdf("lwr", date1, date2, box=box, file=file_oaf,/nostr)
145file_oaf=project_id_env+'swr_oafluxgrid_1985_2007.nc'
146initncdf, file_oaf
147swr=read_ncdf("swr", date1, date2, box=box, file=file_oaf,/nostr)
148swr_trop=swr
149oafl=swr-(lwr+lhf+shf)
150help, oafl
151oafl=grossemoyenne(oafl, "xy",/nan)
152;
153file=project_id_env+"olr_oafluxgrid_30n30s_19890101_20091231.nc"
154initncdf, file
155olr=read_ncdf("olr", date1-1, date2, box=box, file=file,/nostr)
156olr=grossemoyenne(olr, "xy",/nan)
157;
158help, olr
159;
160save, olr,trop, nce2, era, nce, filename="netflux_sctr_1999_2002.idl"
161;
162trop_hf=trop*0.
163nce2_hf=trop*0.
164era_hf=trop*0.
165nce_hf=trop*0.
166;
167Thf=30
168Tlf=90
169tsamp=1.   ; monthly
170freq=findgen(jpt/2+1)/(jpt*tsamp)
171freq=[freq,-1.*reverse(freq(1:jpt/2))]
172peri=1./(abs(freq) > 1.e-20)*(2*(freq ge 0)-1.)
173; Variance
174     msk_spec=float((abs(peri) ge Thf) and (abs(peri) le Tlf))
175     ts=reform(trop)
176     ff_ts=fft(ts)
177     ff_ts_f=ff_ts*msk_spec
178     trop_hf=float(fft(ff_ts_f,/inverse))
179;
180    ts=reform(nce2)
181    ff_ts=fft(ts)
182    ff_ts_f=ff_ts*msk_spec
183    nce2_hf=float(fft(ff_ts_f,/inverse))
184;
185    ts=reform(era)
186    ff_ts=fft(ts)
187    ff_ts_f=ff_ts*msk_spec
188    era_hf=float(fft(ff_ts_f,/inverse))
189;
190    ts=reform(nce)
191    ff_ts=fft(ts)
192    ff_ts_f=ff_ts*msk_spec
193    nce_hf=float(fft(ff_ts_f,/inverse))
194;
195help, trop_hf, nce2_hf, era_hf, nce_hf
196nsmooth=15.
197;
198pltt, ts_smooth(olr,nsmooth,/nan), "t",/rempl, small=[1,3,1], $
199   charsize=1.1, title="a) Outgoing Longwave Radiation", subtitle=""
200;
201pltt, ts_smooth(trop,nsmooth,/nan), "t",/rempl, -70,130, $
202      small=[1,3,2],/noer, charsize=1.1, title="b) Net Heat Flux", subtitle=""
203pltt, ts_smooth(era,nsmooth,/nan), "t",/ov1d, color=250
204pltt, ts_smooth(nce2,nsmooth,/nan), "t",/ov1d, color=150
205pltt, ts_smooth(nce,nsmooth,/nan), "t",/ov1d, color=50
206;
207pltt, trop_hf, "t",/rempl, -80,80, $
208      small=[1,3,3],/noer, title="c) 30-90 day Net Heat Flux", charsize=1.1, subtitle=""
209pltt, era_hf, "t",/ov1d, color=250
210pltt, nce2_hf, "t",/ov1d, color=150
211pltt, nce_hf, "t",/ov1d, color=50
212;
213closeps
214;
215end
Note: See TracBrowser for help on using the repository browser.