;+ ; ; .. _time_axe_modif_tropflux_1d_1989_2010.pro: ; ; ======================================== ; time_axe_modif_tropflux_1d_1989_2010.pro ; ======================================== ; ; .. graphviz:: ; ; digraph time_axe_modif_tropflux_1d_1989_2010 { ; ; file_inout [shape=ellipse,fontname=Courier,label="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1d_1989_2010.nc"]; ; ; time_axe_modif_tropflux_1d_1989_2010 [shape=box, ; fontname=Courier, ; color=blue, ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/time_axe_modif_tropflux_1d_1989_2010.pro", ; label="${PROJECT}/src/time_axe_modif_tropflux_1d_1989_2010.pro"]; ; ; {file_inout} -> {time_axe_modif_tropflux_1d_1989_2010} -> {file_inout} ; ; } ; ; SEE ALSO ; ======== ; ; :func:`julday ` ; ; :ref:`time_axe_modif_TropFlux.pro` ; ; EXAMPLES ; ======== ; ; .. code-block:: idl ; ; time_axe_modif_tropflux_1d_1989_2010 ; ; TODO ; ==== ; ; if needed include in the whole process ; ; hard coded directory - usage of ${PROJECT_ID} ; ; coding rules ; ; EVOLUTIONS ; ========== ; ; $Id$ ; ; $URL$ ; ; - fplod 20110817T084839Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * minimal header ; ; - pk 20110815 ; ; * provided to fp ; ;- pro time_axe_modif_tropflux_1d_1989_2010 ; dir_out="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/" ; file="ws_tropflux_1d_1989_2010.nc" ; fic=dir_out+file ; print, '' print, 'File in : ',fic print, ' ' ; ; opening the file to modify the time axis ; ouverture fichier dont on modifie le timeaxe ; cdfid=NCDF_OPEN(fic,/write) ; ;cdfid=NCDF_OPEN(fic,/write) NCDF_VARGET, cdfid, 'time', tt ;NCDF_VARGET, cdfid, 'tt', tt ; ncdf_control, cdfid ,/REDEF ; put in define mode ; ; reading attributs of time ; varid=ncdf_varid(cdfid,'time') ;varid=ncdf_varid(cdfid,'tt') ; ncdf_control, cdfid ,/endef ntt=n_elements(tt) ; ttt=(julday(01, 01, 1989)-julday(01, 01, 1950,0))+findgen(ntt) ; NCDF_VARPUT, cdfid, 'time', ttt ;NCDF_VARPUT, cdfid, 'tt', ttt ; NCDF_CLOSE, cdfid ; END