source: trunk/src/TropFlux_NRT_ncdf.pro @ 11

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

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

File size: 3.8 KB
Line 
1;+
2;
3; .. _TropFlux_NRT_ncdf_v50.pro:
4;
5; =========================
6; TropFlux_NRT_ncdf_v50.pro
7; =========================
8;
9;
10; .. only:: man
11;
12; Figure is visible on PDF and HTML documents only.
13;
14; .. only:: html
15;
16;     .. graphviz::
17;
18;        digraph TropFlux_NRT_ncdf_v50 {
19;           graph [
20;           rankdir="LR",
21;           ]
22;           file1 [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_BLND.nc"];
23;           file2 [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_lwr_19890101_20091231_v50.nc"];
24;           file3 [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231_v51.nc"];
25;           ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"];
26;           TropFlux_NRT_ncdf_v50  [shape=box,
27;           fontname=Courier,
28;           color=blue,
29;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_NRT_ncdf_v50.pro",
30;           label="${TROPFLUX}/src/TropFlux_NRT_ncdf_v50.pro" ];
31;           {file1 file2 file3} -> {TropFlux_NRT_ncdf_v50} -> {ncfile}
32;          }
33;
34; SEE ALSO
35; ========
36;
37; EXAMPLES
38; ========
39;
40; ::
41;
42;  IDL> tropflux_nrt_ncdf_v50
43;
44; TODO
45; ====
46;
47; hard coded directory - usage of ${TROPFLUX_ID}
48;
49; coding rules
50;
51; EVOLUTIONS
52; ==========
53;
54; - fplod 20101214T112526Z aedon.locean-ipsl.upmc.fr (Darwin)
55;
56;   * add graph
57; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
58;
59;   * minimal header
60;
61; - pbk 2008
62;
63;   * creation
64;
65;-
66pro TropFlux_NRT_ncdf_v50
67@common
68
69dir="/Users/pkb/data/TropFlux/"
70file=dir+"TropFlux_swr_19890101_20091231_BLND.nc"
71initncdf, file
72st=19800101 & en=20101231
73
74swr=read_ncdf("swr", st, en, file=file,/nostr)
75
76file=dir+"TropFlux_lwr_19890101_20091231_v50.nc"
77initncdf, file
78lwr=read_ncdf("lwr", st, en, file=file,/nostr)
79
80file=dir+"TropFlux_19890101_20091231_v51.nc"
81initncdf, file
82lhf=read_ncdf("lhf", st, en, file=file,/nostr)
83shf=read_ncdf("shf", st, en, file=file,/nostr)
84
85help, swr, lwr, lhf, shf
86
87;time=julday(1,1,1989)+lindgen(7670)+0.5 & jpt=n_elements(time)
88time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time)
89
90cda0=string(jul2date(time(0)),format='(i8.8)')
91cda1=string(jul2date(time(jpt-1)),format='(i8.8)')
92
93time=time-julday(1,1,1950,00,00)
94;
95lat=reform(gphit(0,0:jpj-1))
96lon=reform(glamt(0:jpi-1,0))
97
98ncfile='!/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc'
99lon_attr={units:'degrees_east',long_name:'Longitude'}
100lat_attr={units:'degrees_north',long_name:'Latitude'}
101time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'}
102sw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Shortwave Radiation',short_name:'swr',axis:'TYX'}
103lw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Longwave Radiation',short_name:'lwr',axis:'TYX'}
104sh_attr={units:'w/m^2',missing_value:1.e20,long_name:'Sensible Heat Flux',short_name:'shf',axis:'TYX'}
105lh_attr={units:'w/m^2',missing_value:1.e20,long_name:'Latent Heat Flux',short_name:'lhf',axis:'TYX'}
106
107globattr={Source:'TropFlux - Air-Sea Fluxes for the Global Tropics', Resolution:'1 x 1 degree and daily', IDL_program_name:'TropFlux_ncdf.pro',Timerange:cda0+' - '+cda1, More_Info:'ISCCP based SWR until 2007 and OLR based SWR after that with a 90 day linear transition between the two'}
108
109
110ncfields = 'swr[longitude,latitude,time]=swr:sw_attr; ' $
111          +'lwr[longitude,latitude,time]=lwr:lw_attr; ' $
112          +'lhf[longitude,latitude,time]=lhf:lh_attr; ' $
113          +'shf[longitude,latitude,time]=shf:sh_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.