source: trunk/src/TropFlux_swr_BLND_19890101_20091231.pro @ 14

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

fix for graph in PDF

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