pro read_nctime, infile, d ;==================================================== ; Check arguments ;==================================================== if n_elements(infile) eq 0 then begin print, 'Provide input file name' progexit endif dummy = findfile(infile, count=count) if (count eq 0) then begin print,'Input file: '+infile+' cannot be found' progexit endif ;open the netcdf file id = ncdf_open(infile) ;get the time in seconds vid = ncdf_varid( id, 'TimeSec') ncdf_varget, id, vid, val t = double( transpose(val) ) ;close the netcdf file ncdf_close, id d = t ;======================================== return end