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
RevLine 
[43]1;+
2; .. _fig15_timeseries_mjo.pro:
3;
4; ========================
5; fig15_timeseries_mjo.pro
6; ========================
7;
8; DESCRIPTION
9; ===========
10;
[46]11; .. graphviz::
12;
13;    digraph fig15_timeseries_mjo {
[85]14;
[50]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"];
[46]24;
[50]25;       figure [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/WHOTS_validation_net_2004_2007_all_v10.ps"];
[46]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;
[43]36; SEE ALSO
37; ========
38;
[50]39; :ref:`project_profile.sh`
40; :ref:`project_init.pro`
41; :ref:`cm_project.pro`
[43]42;
43; EXAMPLES
44; ========
45;
46; ::
47;
[180]48;  fig15_timeseries_mjo
[43]49;
[46]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;
[43]61; EVOLUTIONS
62; ==========
63;
64; $Id$
65;
[85]66; $URL$
67;
[46]68; - fplod 20110420T122720Z aedon.locean-ipsl.upmc.fr (Darwin)
69;
70;   * remove hard coding path
71;   * add graphviz
72;   * externalize functions
73;
[43]74; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
75;
76;   * minimal header
77;
78;-
[41]79pro fig15_timeseries_mjo
[46]80@cm_general
[50]81@cm_project
[41]82reinitplt, /z,/invert
83key_portrait = 1
[97]84;
[85]85openps, FILENAME = project_od_env+'fig15_timeseries_mjo.ps'
[97]86date1=20071001
[94]87date2=20080331
[97]88date1=19990101
[94]89date2=20021231
[41]90box=[50,80,-12,-5]
[97]91;
[50]92file_trop=project_id_env+'TropFlux_19890101_20091231.nc'
[41]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)
[97]97lwr_trop=read_ncdf("lwr", date1, date2, box=box, file=file_trop,/nostr)
98; ref_lw=-1*lwr_trop
[41]99trop=swr_trop+(lwr_trop+lhf_trop+shf_trop)
100help, trop
101trop=grossemoyenne(trop, "xy",/nan)
[97]102;
[50]103file_ncep=project_id_env+'NCEP2_flux_19890101_20090729.nc'
[41]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)
[97]109;
[41]110nce2=swr-(lwr+lhf+shf)
111nce2=grossemoyenne(nce2, "xy",/nan)
112help, nce2
[97]113;
[50]114file_erai=project_id_env+'erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc'
[41]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)
[97]119swr=read_ncdf("swr", date1, date2, box=box, file=file_erai,/nostr)
[94]120swr=-1*swr
[41]121era=swr-(lwr+lhf+shf)
122era=grossemoyenne(era, "xy",/nan)
123help, era
[97]124;
[50]125file=project_id_env+'fluxe_ncep1_19890101_20091231.nc'
[41]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)
[97]131;
[41]132nce=swr+shf+lhf+lwr
133nce=grossemoyenne(nce, "xy",/nan)
134help, nce
[97]135;
[50]136file_oaf=project_id_env+'shf_oafluxgrid_1985_2008.nc'
[41]137initncdf, file_oaf
138shf=read_ncdf("shf", date1, date2, box=box, file=file_oaf,/nostr)
[50]139file_oaf=project_id_env+'lhf_oafluxgrid_1985_2008.nc'
[41]140initncdf, file_oaf
141lhf=read_ncdf("lhf", date1, date2, box=box, file=file_oaf,/nostr)
[50]142file_oaf=project_id_env+'lwr_oafluxgrid_1985_2007.nc'
[41]143initncdf, file_oaf
144lwr=read_ncdf("lwr", date1, date2, box=box, file=file_oaf,/nostr)
[50]145file_oaf=project_id_env+'swr_oafluxgrid_1985_2007.nc'
[41]146initncdf, file_oaf
[97]147swr=read_ncdf("swr", date1, date2, box=box, file=file_oaf,/nostr)
[94]148swr_trop=swr
[41]149oafl=swr-(lwr+lhf+shf)
150help, oafl
151oafl=grossemoyenne(oafl, "xy",/nan)
[97]152;
[50]153file=project_id_env+"olr_oafluxgrid_30n30s_19890101_20091231.nc"
[41]154initncdf, file
155olr=read_ncdf("olr", date1-1, date2, box=box, file=file,/nostr)
156olr=grossemoyenne(olr, "xy",/nan)
[97]157;
[41]158help, olr
[97]159;
[41]160save, olr,trop, nce2, era, nce, filename="netflux_sctr_1999_2002.idl"
[97]161;
162trop_hf=trop*0.
[94]163nce2_hf=trop*0.
[97]164era_hf=trop*0.
[94]165nce_hf=trop*0.
[97]166;
167Thf=30
[94]168Tlf=90
[41]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.
[97]197;
[41]198pltt, ts_smooth(olr,nsmooth,/nan), "t",/rempl, small=[1,3,1], $
199   charsize=1.1, title="a) Outgoing Longwave Radiation", subtitle=""
[97]200;
[41]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
[97]206;
[41]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
[97]212;
[41]213closeps
[97]214;
[41]215end
Note: See TracBrowser for help on using the repository browser.