source: trunk/src/time_axe_modif_TropFlux.pro @ 79

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

replace TROPFLUX by PROJECT

File size: 2.4 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="${PROJECT}/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; :func:`julday <saxo:julday>`
33;
34; EXAMPLES
35; ========
36;
37; ::
38;
39;  IDL> time_axe_modif_tropflux
40;
41; TODO
42; ====
43;
44; hard coded directory - usage of ${PROJECT_ID}
45;
46; coding rules
47;
48; why 1950 whereas "hours since 1957-01-01 00:00:0.0" can be read in
49; 20c3m_erai_t2_TROP_1989_2009.nc
50;
51; no change off attributs : wrong info vs data on time
52;
53; EVOLUTIONS
54; ==========
55;
56; - fplod 20101215T114847Z 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 time_axe_modif_TropFlux
70
71dir_out='/Users/pkb/data/TropFlux/'
72;dir_out='/Users/pkb/data/heat_budget/oscar_global/global/'
73file='TropFlux_19890101_20091231.nc'
74;file='TropFlux_sst_19890101_20091231.nc'
75;file='TropFlux_swr_19890101_20071231_DT_v50.nc'
76;file='TropFlux_swr_19890101_20091231_NRT_v50.nc'
77;file='oscar_1993_2009_intrpltd_1day.nc'
78;file='oscar_19890101_20091231.nc'
79;file='TropFlux_swr_19890101_20091231_BLND.nc'
80;file="TropFlux_19890101_20091231_v51.nc"
81;file='TropFlux_t2m_19890101_20091231_v50.nc'
82fic=dir_out+file
83
84print, ''
85print, 'File in : ',fic
86print, ' '
87
88;
89; opening the file to modify the time axis
90;
91cdfid=NCDF_OPEN(fic,/write)
92NCDF_VARGET, cdfid, 'time', tt
93;NCDF_VARGET, cdfid, 'tt', tt
94ncdf_control, cdfid ,/REDEF ; put in define mode
95;
96; reading attributs of time
97;
98varid=ncdf_varid(cdfid,'time')
99;varid=ncdf_varid(cdfid,'tt')
100
101;
102
103ncdf_control, cdfid ,/endef
104ntt=n_elements(tt)
105ttt=(julday(01, 01, 1989,12)-julday(01, 01, 1950,0))+findgen(ntt)
106
107NCDF_VARPUT, cdfid, 'time', ttt
108;NCDF_VARPUT, cdfid, 'tt', ttt
109NCDF_CLOSE, cdfid
110
111END
Note: See TracBrowser for help on using the repository browser.