source: trunk/src/time_axe_modif_TropFlux.pro @ 7

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

minimal header in .pro

File size: 1.5 KB
Line 
1;+
2;
3; .. _time_axe_modif_TropFlux.pro:
4;
5; ===========================
6; time_axe_modif_TropFlux.pro
7; ===========================
8;
9; SEE ALSO
10; ========
11;
12; EXAMPLES
13; ========
14;
15; ::
16;
17;  IDL> time_axe_modif_tropflux
18;
19; TODO
20; ====
21;
22; hard coded directory - usage of ${TROPFLUX_ID}
23;
24; coding rules
25;
26; EVOLUTIONS
27; ==========
28;
29; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
30;
31;   * minimal header
32;
33; - pbk 2008
34;
35;   * creation
36;
37;-
38pro time_axe_modif_TropFlux
39
40dir_out='/Users/pkb/data/TropFlux/'
41;dir_out='/Users/pkb/data/heat_budget/oscar_global/global/'
42file='TropFlux_19890101_20091231.nc'
43;file='TropFlux_sst_19890101_20091231.nc'
44;file='TropFlux_swr_19890101_20071231_DT_v50.nc'
45;file='TropFlux_swr_19890101_20091231_NRT_v50.nc'
46;file='oscar_1993_2009_intrpltd_1day.nc'
47;file='oscar_19890101_20091231.nc'
48;file='TropFlux_swr_19890101_20091231_BLND.nc'
49;file="TropFlux_19890101_20091231_v51.nc"
50;file='TropFlux_t2m_19890101_20091231_v50.nc'
51fic=dir_out+file
52
53print, ''
54print, 'File in : ',fic
55print, ' '
56
57;
58; opening the file to modify the time axis
59;
60cdfid=NCDF_OPEN(fic,/write)
61NCDF_VARGET, cdfid, 'time', tt
62;NCDF_VARGET, cdfid, 'tt', tt
63ncdf_control, cdfid ,/REDEF ; put in define mode
64;
65; reading attributs of time
66;
67varid=ncdf_varid(cdfid,'time')
68;varid=ncdf_varid(cdfid,'tt')
69
70;
71
72ncdf_control, cdfid ,/endef
73ntt=n_elements(tt)
74ttt=(julday(01, 01, 1989,12)-julday(01, 01, 1950,0))+findgen(ntt)
75
76NCDF_VARPUT, cdfid, 'time', ttt
77;NCDF_VARPUT, cdfid, 'tt', ttt
78NCDF_CLOSE, cdfid
79
80END
Note: See TracBrowser for help on using the repository browser.