1 | ;+ |
---|
2 | ; |
---|
3 | ; .. _time_axe_modif_tropflux_1d_1989_2010.pro: |
---|
4 | ; |
---|
5 | ; ======================================== |
---|
6 | ; time_axe_modif_tropflux_1d_1989_2010.pro |
---|
7 | ; ======================================== |
---|
8 | ; |
---|
9 | ; .. graphviz:: |
---|
10 | ; |
---|
11 | ; digraph time_axe_modif_tropflux_1d_1989_2010 { |
---|
12 | ; |
---|
13 | ; file_inout [shape=ellipse,fontname=Courier,label="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1d_1989_2010.nc"]; |
---|
14 | ; |
---|
15 | ; time_axe_modif_tropflux_1d_1989_2010 [shape=box, |
---|
16 | ; fontname=Courier, |
---|
17 | ; color=blue, |
---|
18 | ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/time_axe_modif_tropflux_1d_1989_2010.pro", |
---|
19 | ; label="${PROJECT}/src/time_axe_modif_tropflux_1d_1989_2010.pro"]; |
---|
20 | ; |
---|
21 | ; {file_inout} -> {time_axe_modif_tropflux_1d_1989_2010} -> {file_inout} |
---|
22 | ; |
---|
23 | ; } |
---|
24 | ; |
---|
25 | ; SEE ALSO |
---|
26 | ; ======== |
---|
27 | ; |
---|
28 | ; :func:`julday <saxo:julday>` |
---|
29 | ; |
---|
30 | ; :ref:`time_axe_modif_TropFlux.pro` |
---|
31 | ; |
---|
32 | ; EXAMPLES |
---|
33 | ; ======== |
---|
34 | ; |
---|
35 | ; .. code-block:: idl |
---|
36 | ; |
---|
37 | ; time_axe_modif_tropflux_1d_1989_2010 |
---|
38 | ; |
---|
39 | ; TODO |
---|
40 | ; ==== |
---|
41 | ; |
---|
42 | ; if needed include in the whole process |
---|
43 | ; |
---|
44 | ; hard coded directory - usage of ${PROJECT_ID} |
---|
45 | ; |
---|
46 | ; coding rules |
---|
47 | ; |
---|
48 | ; EVOLUTIONS |
---|
49 | ; ========== |
---|
50 | ; |
---|
51 | ; $Id$ |
---|
52 | ; |
---|
53 | ; $URL$ |
---|
54 | ; |
---|
55 | ; - fplod 20110817T084839Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
56 | ; |
---|
57 | ; * minimal header |
---|
58 | ; |
---|
59 | ; - pk 20110815 |
---|
60 | ; |
---|
61 | ; * provided to fp |
---|
62 | ; |
---|
63 | ;- |
---|
64 | pro time_axe_modif_tropflux_1d_1989_2010 |
---|
65 | ; |
---|
66 | dir_out="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/" |
---|
67 | ; |
---|
68 | file="ws_tropflux_1d_1989_2010.nc" |
---|
69 | ; |
---|
70 | fic=dir_out+file |
---|
71 | ; |
---|
72 | print, '' |
---|
73 | print, 'File in : ',fic |
---|
74 | print, ' ' |
---|
75 | ; |
---|
76 | ; opening the file to modify the time axis |
---|
77 | ; ouverture fichier dont on modifie le timeaxe |
---|
78 | ; |
---|
79 | cdfid=NCDF_OPEN(fic,/write) |
---|
80 | ; |
---|
81 | ;cdfid=NCDF_OPEN(fic,/write) |
---|
82 | NCDF_VARGET, cdfid, 'time', tt |
---|
83 | ;NCDF_VARGET, cdfid, 'tt', tt |
---|
84 | ; |
---|
85 | ncdf_control, cdfid ,/REDEF ; put in define mode |
---|
86 | ; |
---|
87 | ; reading attributs of time |
---|
88 | ; |
---|
89 | varid=ncdf_varid(cdfid,'time') |
---|
90 | ;varid=ncdf_varid(cdfid,'tt') |
---|
91 | ; |
---|
92 | ncdf_control, cdfid ,/endef |
---|
93 | ntt=n_elements(tt) |
---|
94 | ; |
---|
95 | ttt=(julday(01, 01, 1989)-julday(01, 01, 1950,0))+findgen(ntt) |
---|
96 | ; |
---|
97 | NCDF_VARPUT, cdfid, 'time', ttt |
---|
98 | ;NCDF_VARPUT, cdfid, 'tt', ttt |
---|
99 | ; |
---|
100 | NCDF_CLOSE, cdfid |
---|
101 | ; |
---|
102 | END |
---|