1 | pro time_axe_modif_tropflux_1d_1989_2010 |
---|
2 | |
---|
3 | dir_out="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/" |
---|
4 | |
---|
5 | file="ws_tropflux_1d_1989_2010.nc" |
---|
6 | |
---|
7 | fic=dir_out+file |
---|
8 | |
---|
9 | print, '' |
---|
10 | print, 'File in : ',fic |
---|
11 | print, ' ' |
---|
12 | |
---|
13 | ; |
---|
14 | ; opening the file to modify the time axis |
---|
15 | ; ouverture fichier dont on modifie le timeaxe |
---|
16 | ; |
---|
17 | cdfid=NCDF_OPEN(fic,/write) |
---|
18 | |
---|
19 | ;cdfid=NCDF_OPEN(fic,/write) |
---|
20 | NCDF_VARGET, cdfid, 'time', tt |
---|
21 | ;NCDF_VARGET, cdfid, 'tt', tt |
---|
22 | |
---|
23 | ncdf_control, cdfid ,/REDEF ; put in define mode |
---|
24 | ; |
---|
25 | ; reading attributs of time |
---|
26 | ; |
---|
27 | varid=ncdf_varid(cdfid,'time') |
---|
28 | ;varid=ncdf_varid(cdfid,'tt') |
---|
29 | |
---|
30 | ; |
---|
31 | |
---|
32 | ncdf_control, cdfid ,/endef |
---|
33 | ntt=n_elements(tt) |
---|
34 | |
---|
35 | ttt=(julday(01, 01, 1989)-julday(01, 01, 1950,0))+findgen(ntt) |
---|
36 | |
---|
37 | NCDF_VARPUT, cdfid, 'time', ttt |
---|
38 | ;NCDF_VARPUT, cdfid, 'tt', ttt |
---|
39 | |
---|
40 | NCDF_CLOSE, cdfid |
---|
41 | |
---|
42 | END |
---|