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