source: trunk/src/time_axe_modif_TropFlux.pro @ 15

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

fix for graph in PDF

File size: 2.2 KB
Line 
1;+
2;
3; .. _time_axe_modif_TropFlux.pro:
4;
5; ===========================
6; time_axe_modif_TropFlux.pro
7; ===========================
8;
9;     .. graphviz::
10;
11;        digraph time_axe_modif_TropFlux {
12;           graph [
13;           rankdir="LR",
14;           ]
15;
16;           file_inout [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"];
17;
18;           time_axe_modif_TropFlux  [shape=box,
19;           fontname=Courier,
20;           color=blue,
21;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/time_axe_modif_TropFlux.pro",
22;           label="${TROPFLUX}/src/time_axe_modif_TropFlux.pro"];
23;
24;           {file_inout} -> {time_axe_modif_TropFlux} -> {file_inout}
25;
26;        }
27;
28;
29; SEE ALSO
30; ========
31;
32; EXAMPLES
33; ========
34;
35; ::
36;
37;  IDL> time_axe_modif_tropflux
38;
39; TODO
40; ====
41;
42; hard coded directory - usage of ${TROPFLUX_ID}
43;
44; coding rules
45;
46; EVOLUTIONS
47; ==========
48;
49; - fplod 20101215T114847Z aedon.locean-ipsl.upmc.fr (Darwin)
50;
51;   * add graph in header
52;
53; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
54;
55;   * minimal header
56;
57; - pbk 2008
58;
59;   * creation
60;
61;-
62pro time_axe_modif_TropFlux
63
64dir_out='/Users/pkb/data/TropFlux/'
65;dir_out='/Users/pkb/data/heat_budget/oscar_global/global/'
66file='TropFlux_19890101_20091231.nc'
67;file='TropFlux_sst_19890101_20091231.nc'
68;file='TropFlux_swr_19890101_20071231_DT_v50.nc'
69;file='TropFlux_swr_19890101_20091231_NRT_v50.nc'
70;file='oscar_1993_2009_intrpltd_1day.nc'
71;file='oscar_19890101_20091231.nc'
72;file='TropFlux_swr_19890101_20091231_BLND.nc'
73;file="TropFlux_19890101_20091231_v51.nc"
74;file='TropFlux_t2m_19890101_20091231_v50.nc'
75fic=dir_out+file
76
77print, ''
78print, 'File in : ',fic
79print, ' '
80
81;
82; opening the file to modify the time axis
83;
84cdfid=NCDF_OPEN(fic,/write)
85NCDF_VARGET, cdfid, 'time', tt
86;NCDF_VARGET, cdfid, 'tt', tt
87ncdf_control, cdfid ,/REDEF ; put in define mode
88;
89; reading attributs of time
90;
91varid=ncdf_varid(cdfid,'time')
92;varid=ncdf_varid(cdfid,'tt')
93
94;
95
96ncdf_control, cdfid ,/endef
97ntt=n_elements(tt)
98ttt=(julday(01, 01, 1989,12)-julday(01, 01, 1950,0))+findgen(ntt)
99
100NCDF_VARPUT, cdfid, 'time', ttt
101;NCDF_VARPUT, cdfid, 'tt', ttt
102NCDF_CLOSE, cdfid
103
104END
Note: See TracBrowser for help on using the repository browser.