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 | ;- |
---|
38 | pro time_axe_modif_TropFlux |
---|
39 | |
---|
40 | dir_out='/Users/pkb/data/TropFlux/' |
---|
41 | ;dir_out='/Users/pkb/data/heat_budget/oscar_global/global/' |
---|
42 | file='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' |
---|
51 | fic=dir_out+file |
---|
52 | |
---|
53 | print, '' |
---|
54 | print, 'File in : ',fic |
---|
55 | print, ' ' |
---|
56 | |
---|
57 | ; |
---|
58 | ; opening the file to modify the time axis |
---|
59 | ; |
---|
60 | cdfid=NCDF_OPEN(fic,/write) |
---|
61 | NCDF_VARGET, cdfid, 'time', tt |
---|
62 | ;NCDF_VARGET, cdfid, 'tt', tt |
---|
63 | ncdf_control, cdfid ,/REDEF ; put in define mode |
---|
64 | ; |
---|
65 | ; reading attributs of time |
---|
66 | ; |
---|
67 | varid=ncdf_varid(cdfid,'time') |
---|
68 | ;varid=ncdf_varid(cdfid,'tt') |
---|
69 | |
---|
70 | ; |
---|
71 | |
---|
72 | ncdf_control, cdfid ,/endef |
---|
73 | ntt=n_elements(tt) |
---|
74 | ttt=(julday(01, 01, 1989,12)-julday(01, 01, 1950,0))+findgen(ntt) |
---|
75 | |
---|
76 | NCDF_VARPUT, cdfid, 'time', ttt |
---|
77 | ;NCDF_VARPUT, cdfid, 'tt', ttt |
---|
78 | NCDF_CLOSE, cdfid |
---|
79 | |
---|
80 | END |
---|