source: trunk/src/TropFlux_swr_BLND_19890101_20091231.pro @ 9

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

add some graph - io - in headers (cont.)

File size: 3.6 KB
Line 
1;+
2;
3; .. _TropFlux_swr_BLND_19890101_20091231.pro:
4;
5; =======================================
6; TropFlux_swr_BLND_19890101_20091231.pro
7; =======================================
8;
9; .. only:: man
10;
11; Figure is visible on PDF and HTML documents only.
12;
13; .. only:: html
14;
15;     .. graphviz::
16;
17;        digraph TropFlux_swr_BLND_19890101_20091231 {
18;           graph [
19;           rankdir="LR",
20;           ]
21;           file_dt [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc"];
22;           file_nrt [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"];
23;           file_gustiness [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_gustiness_19890101_20091231_v50.nc"];
24;
25;           ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_BLND.nc"];
26;
27;           TropFlux_swr_BLND_19890101_20091231 [shape=box,
28;           fontname=Courier,
29;           color=blue,
30;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_swr_BLND_19890101_20091231.pro",
31;           label="${TROPFLUX}/src/TropFlux_swr_BLND_19890101_20091231.pro"];
32;           {file_dt file_nrt file_gustiness} -> {TropFlux_swr_BLND_19890101_20091231} ->{ ncfile}
33;
34;       }
35;
36; SEE ALSO
37; ========
38;
39; EXAMPLES
40; ========
41;
42; ::
43;
44;  IDL> tropflux_swr_blnd_19890101_20091231
45;
46;
47; TODO
48; ====
49;
50; hard coded directory - usage of ${TROPFLUX_ID}
51;
52; coding rules
53;
54; EVOLUTIONS
55; ==========
56;
57; - fplod 20101215T085754Z aedon.locean-ipsl.upmc.fr (Darwin)
58;
59;   * add graph in header
60;
61; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
62;
63;   * minimal header
64;
65; - pbk 2008
66;
67;   * creation
68;
69;-
70pro TropFlux_swr_BLND_19890101_20091231
71@common
72dir="/Users/pkb/data/TropFlux/"
73
74file=dir+"TropFlux_swr_19890101_20071231_DT_v50.nc"
75initncdf, file
76dt=read_ncdf("swr", 19890101, 20071231, file=file,/nostr)
77help, dt
78
79file=dir+"TropFlux_swr_19890101_20091231_NRT_v50.nc"
80initncdf, file
81nrt=read_ncdf("sw", 20080100, 20100112, file=file,/nostr)
82help, nrt
83
84swr_nrt=read_ncdf("sw", 19880101, 20100112, file=file,/nostr)
85
86swr_dt=[[[dt]],[[nrt]]]
87help, swr_dt, swr_nrt
88
89swr_merged=swr_dt*0.
90
91time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time)
92
93a=interpol([1.,0.],[julday(10,01,2007),julday(12,31,2007)],time)
94a=((a > 0.) < 1.)
95for jt=0,jpt-1 do swr_merged(*,*,jt)=swr_dt(*,*,jt)*a(jt)+(1-a(jt))*swr_nrt(*,*,jt)
96
97file=dir+"TropFlux_gustiness_19890101_20091231_v50.nc"
98initncdf, file
99time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time)
100lat=reform(gphit(0,0:jpj-1))
101lon=reform(glamt(0:jpi-1,0))
102cda0=string(jul2date(time(0)),format='(i8.8)')
103cda1=string(jul2date(time(jpt-1)),format='(i8.8)')
104
105time=time-julday(1,1,1950,00,00)
106ncfile='!/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_BLND.nc
107lon_attr={units:'degrees_east',long_name:'Longitude'}
108lat_attr={units:'degrees_north',long_name:'Latitude'}
109time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'}
110sw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Shortwave Radiation',short_name:'swr',axis:'TYX'}
111globattr={source:'ISCCP based SWR until 2007, after 2007 timeseries is completed with OLR based SWR.  A linear transition is applied from ISCCP based SWR to OLR based SWR'}
112
113ncfields = 'swr[longitude,latitude,time]=swr_merged:sw_attr; ' $
114                      + 'longitude[]=lon:lon_attr; ' $
115                      + 'latitude[]=lat:lat_attr; ' $
116                      + 'time[*time]=time:time_attr ' $
117                      + ' @ globattr'
118
119@ncdf_quickwrite
120
121end
Note: See TracBrowser for help on using the repository browser.