source: trunk/src/time_axe_modif_tropflux_1d_1989_2010.pro @ 82

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

add new tools from PK

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