source: trunk/src/TropFlux_swr_BLND_19890101_20091231.pro @ 70

Last change on this file since 70 was 50, checked in by pinsard, 13 years ago

replace TROPFLUX by PROJECT

File size: 3.7 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="${PROJECT}/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; :func:`initncdf <saxo:initncdf>`
34; :func:`read_ncdf <saxo:read_ncdf>`
35; :func:`julday <saxo:julday>`
36; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>`
37;
38; EXAMPLES
39; ========
40;
41; ::
42;
43;  IDL> tropflux_swr_blnd_19890101_20091231
44;
45;
46; TODO
47; ====
48;
49; hard coded directory - usage of ${PROJECT_ID}
50;
51; coding rules
52;
53; EVOLUTIONS
54; ==========
55;
56; - fplod 20101215T085754Z aedon.locean-ipsl.upmc.fr (Darwin)
57;
58;   * add graph in header
59;
60; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
61;
62;   * minimal header
63;
64; - pbk 2008
65;
66;   * creation
67;
68;-
69pro TropFlux_swr_BLND_19890101_20091231
70@common
71dir="/Users/pkb/data/TropFlux/"
72
73file=dir+"TropFlux_swr_19890101_20071231_DT_v50.nc"
74initncdf, file
75dt=read_ncdf("swr", 19890101, 20071231, file=file,/nostr)
76help, dt
77
78file=dir+"TropFlux_swr_19890101_20091231_NRT_v50.nc"
79initncdf, file
80nrt=read_ncdf("sw", 20080100, 20100112, file=file,/nostr)
81help, nrt
82
83swr_nrt=read_ncdf("sw", 19880101, 20100112, file=file,/nostr)
84
85swr_dt=[[[dt]],[[nrt]]]
86help, swr_dt, swr_nrt
87
88swr_merged=swr_dt*0.
89
90time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time)
91
92a=interpol([1.,0.],[julday(10,01,2007),julday(12,31,2007)],time)
93a=((a > 0.) < 1.)
94for jt=0,jpt-1 do swr_merged(*,*,jt)=swr_dt(*,*,jt)*a(jt)+(1-a(jt))*swr_nrt(*,*,jt)
95
96file=dir+"TropFlux_gustiness_19890101_20091231_v50.nc"
97initncdf, file
98time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time)
99lat=reform(gphit(0,0:jpj-1))
100lon=reform(glamt(0:jpi-1,0))
101cda0=string(jul2date(time(0)),format='(i8.8)')
102cda1=string(jul2date(time(jpt-1)),format='(i8.8)')
103
104time=time-julday(1,1,1950,00,00)
105ncfile='!/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_BLND.nc
106lon_attr={units:'degrees_east',long_name:'Longitude'}
107lat_attr={units:'degrees_north',long_name:'Latitude'}
108time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'}
109sw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Shortwave Radiation',short_name:'swr',axis:'TYX'}
110globattr={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'}
111
112ncfields = 'swr[longitude,latitude,time]=swr_merged:sw_attr; ' $
113                      + 'longitude[]=lon:lon_attr; ' $
114                      + 'latitude[]=lat:lat_attr; ' $
115                      + 'time[*time]=time:time_attr ' $
116                      + ' @ globattr'
117
118@ncdf_quickwrite
119
120end
Note: See TracBrowser for help on using the repository browser.