date: Thu Feb 22 10:11:16 2001 from: Tim Osborn subject: Re: verification results to: Scott Rutherford Scott, it was in fact just a binary (unformatted file), rather than anything specific to IDL. The program supplied almost worked for me, just needed an extra bit to convert to big_endian (which our Compaq/DEC Alphas use) - so it must've been written on a little_endian computer. The IDL code to read it, display it, save the picture to a PNG image file, and output the data to an ASCII file is below. The 2D array is 2048 by 1024, first point is at the south pole, dateline, then working eastwards then northwards. I've saved it as 2048 columns of data, format 2048I8. The files are gzipped and on holocene anonymous ftp: scott.asc.gz - ascii data file scott.png.gz - PNG image file ; to input data from the binary file to a data array win_xsize=2048 win_ysize=1024 data_array=fltarr(win_xsize,win_ysize) ; filename=' ' ; read,'Enter your file name: ',filename filename='binannualpp' openr,1,filename,/swap_if_little_endian readu,1,data_array close,1 ; to display the image for the data file loadct,30 window,0,color=256,xsize=win_xsize/2,ysize=win_ysize/2,title=filename ; tvscl,rebin(data_array,win_xsize/2,win_ysize/2,/sample) qtv,data_array,/scale ; ; save the image as a PNG file tvlct,r,g,b,/get write_png,'scott.png',tvrd(),r,g,b ; output the data set to an ascii file openw,1,'scott.asc' printf,1,data_array,format='(2048I8)' close,1 end