;+ ; ; .. _time_axe_modif_TropFlux.pro: ; ; =========================== ; time_axe_modif_TropFlux.pro ; =========================== ; ; SEE ALSO ; ======== ; ; EXAMPLES ; ======== ; ; :: ; ; IDL> time_axe_modif_tropflux ; ; TODO ; ==== ; ; hard coded directory - usage of ${TROPFLUX_ID} ; ; coding rules ; ; EVOLUTIONS ; ========== ; ; - 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