source: trunk/src/time_axe_modif_TropFlux.pro @ 85

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

restart consolidation of paper01 software

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; $Id$
57;
58; $URL$
59;
60; - fplod 20101215T114847Z aedon.locean-ipsl.upmc.fr (Darwin)
61;
62;   * add graph in header
63;
64; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
65;
66;   * minimal header
67;
68; - pbk 2008
69;
70;   * creation
71;
72;-
73pro time_axe_modif_TropFlux
74
75dir_out='/Users/pkb/data/TropFlux/'
76;dir_out='/Users/pkb/data/heat_budget/oscar_global/global/'
77file='TropFlux_19890101_20091231.nc'
78;file='TropFlux_sst_19890101_20091231.nc'
79;file='TropFlux_swr_19890101_20071231_DT_v50.nc'
80;file='TropFlux_swr_19890101_20091231_NRT_v50.nc'
81;file='oscar_1993_2009_intrpltd_1day.nc'
82;file='oscar_19890101_20091231.nc'
83;file='TropFlux_swr_19890101_20091231_BLND.nc'
84;file="TropFlux_19890101_20091231_v51.nc"
85;file='TropFlux_t2m_19890101_20091231_v50.nc'
86fic=dir_out+file
87
88print, ''
89print, 'File in : ',fic
90print, ' '
91
92;
93; opening the file to modify the time axis
94;
95cdfid=NCDF_OPEN(fic,/write)
96NCDF_VARGET, cdfid, 'time', tt
97;NCDF_VARGET, cdfid, 'tt', tt
98ncdf_control, cdfid ,/REDEF ; put in define mode
99;
100; reading attributs of time
101;
102varid=ncdf_varid(cdfid,'time')
103;varid=ncdf_varid(cdfid,'tt')
104
105;
106
107ncdf_control, cdfid ,/endef
108ntt=n_elements(tt)
109ttt=(julday(01, 01, 1989,12)-julday(01, 01, 1950,0))+findgen(ntt)
110
111NCDF_VARPUT, cdfid, 'time', ttt
112;NCDF_VARPUT, cdfid, 'tt', ttt
113NCDF_CLOSE, cdfid
114
115END
Note: See TracBrowser for help on using the repository browser.