[83] | 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 | ; |
---|
| 26 | ; SEE ALSO |
---|
| 27 | ; ======== |
---|
| 28 | ; |
---|
| 29 | ; :func:`julday <saxo:julday>` |
---|
| 30 | ; |
---|
| 31 | ; :ref:`time_axe_modif_TropFlux.pro` |
---|
| 32 | ; |
---|
| 33 | ; EXAMPLES |
---|
| 34 | ; ======== |
---|
| 35 | ; |
---|
| 36 | ; :: |
---|
| 37 | ; |
---|
| 38 | ; IDL> time_axe_modif_tropflux_1d_1989_2010 |
---|
| 39 | ; |
---|
| 40 | ; TODO |
---|
| 41 | ; ==== |
---|
| 42 | ; |
---|
| 43 | ; if needed include in the whole process |
---|
| 44 | ; |
---|
| 45 | ; hard coded directory - usage of ${PROJECT_ID} |
---|
| 46 | ; |
---|
| 47 | ; coding rules |
---|
| 48 | ; |
---|
| 49 | ; EVOLUTIONS |
---|
| 50 | ; ========== |
---|
| 51 | ; |
---|
| 52 | ; $Id$ |
---|
| 53 | ; |
---|
| 54 | ; $URL$ |
---|
| 55 | ; |
---|
| 56 | ; - fplod 20110817T084839Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 57 | ; |
---|
| 58 | ; * minimal header |
---|
| 59 | ; |
---|
| 60 | ; - pk 20110815 |
---|
| 61 | ; |
---|
| 62 | ; * provided to fp |
---|
| 63 | ; |
---|
| 64 | ;- |
---|
[82] | 65 | pro time_axe_modif_tropflux_1d_1989_2010 |
---|
| 66 | |
---|
| 67 | dir_out="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/" |
---|
| 68 | |
---|
| 69 | file="ws_tropflux_1d_1989_2010.nc" |
---|
| 70 | |
---|
| 71 | fic=dir_out+file |
---|
| 72 | |
---|
| 73 | print, '' |
---|
| 74 | print, 'File in : ',fic |
---|
| 75 | print, ' ' |
---|
| 76 | |
---|
| 77 | ; |
---|
| 78 | ; opening the file to modify the time axis |
---|
| 79 | ; ouverture fichier dont on modifie le timeaxe |
---|
| 80 | ; |
---|
| 81 | cdfid=NCDF_OPEN(fic,/write) |
---|
| 82 | |
---|
| 83 | ;cdfid=NCDF_OPEN(fic,/write) |
---|
| 84 | NCDF_VARGET, cdfid, 'time', tt |
---|
| 85 | ;NCDF_VARGET, cdfid, 'tt', tt |
---|
| 86 | |
---|
| 87 | ncdf_control, cdfid ,/REDEF ; put in define mode |
---|
| 88 | ; |
---|
[83] | 89 | ; reading attributs of time |
---|
[82] | 90 | ; |
---|
| 91 | varid=ncdf_varid(cdfid,'time') |
---|
| 92 | ;varid=ncdf_varid(cdfid,'tt') |
---|
| 93 | |
---|
| 94 | ; |
---|
| 95 | |
---|
| 96 | ncdf_control, cdfid ,/endef |
---|
| 97 | ntt=n_elements(tt) |
---|
| 98 | |
---|
| 99 | ttt=(julday(01, 01, 1989)-julday(01, 01, 1950,0))+findgen(ntt) |
---|
| 100 | |
---|
| 101 | NCDF_VARPUT, cdfid, 'time', ttt |
---|
| 102 | ;NCDF_VARPUT, cdfid, 'tt', ttt |
---|
| 103 | |
---|
| 104 | NCDF_CLOSE, cdfid |
---|
| 105 | |
---|
| 106 | END |
---|