;+ ; ; .. _time_axe_modif_TropFlux.pro: ; ; =========================== ; time_axe_modif_TropFlux.pro ; =========================== ; ; .. graphviz:: ; ; digraph time_axe_modif_TropFlux { ; ; file_inout [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"]; ; ; time_axe_modif_TropFlux [shape=box, ; fontname=Courier, ; color=blue, ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/time_axe_modif_TropFlux.pro", ; label="${PROJECT}/src/time_axe_modif_TropFlux.pro"]; ; ; {file_inout} -> {time_axe_modif_TropFlux} -> {file_inout} ; ; } ; ; SEE ALSO ; ======== ; ; :func:`julday ` ; ; EXAMPLES ; ======== ; ; .. code-block:: idl ; ; time_axe_modif_tropflux ; ; TODO ; ==== ; ; hard coded directory - usage of ${PROJECT_ID} ; ; coding rules ; ; why 1950 whereas "hours since 1957-01-01 00:00:0.0" can be read in ; 20c3m_erai_t2_TROP_1989_2009.nc ; ; no change off attributs : wrong info vs data on time ; ; EVOLUTIONS ; ========== ; ; $Id$ ; ; $URL$ ; ; - fplod 20101215T114847Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * add graph in header ; ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * minimal header ; ; - pbk 2008 ; ; * creation ; ;- pro time_axe_modif_TropFlux ; dir_out='/Users/pkb/data/TropFlux/' ;dir_out='/Users/pkb/data/heat_budget/oscar_global/global/' file='TropFlux_19890101_20091231.nc' ;file='TropFlux_sst_19890101_20091231.nc' ;file='TropFlux_swr_19890101_20071231_DT_v50.nc' ;file='TropFlux_swr_19890101_20091231_NRT_v50.nc' ;file='oscar_1993_2009_intrpltd_1day.nc' ;file='oscar_19890101_20091231.nc' ;file='TropFlux_swr_19890101_20091231_BLND.nc' ;file="TropFlux_19890101_20091231_v51.nc" ;file='TropFlux_t2m_19890101_20091231_v50.nc' fic=dir_out+file ; print, '' print, 'File in : ',fic print, ' ' ; ; opening the file to modify the time axis ; 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,12)-julday(01, 01, 1950,0))+findgen(ntt) ; NCDF_VARPUT, cdfid, 'time', ttt ;NCDF_VARPUT, cdfid, 'tt', ttt NCDF_CLOSE, cdfid ; END