Question

I don't really use IDL but am using a model written in IDL. I have some pre-established scripts that extract the output from .dat to .tif but now I would like to look at some intermediate files. Essentially the code is as follows:

openw, 1, file.dat
var_cube=assoc(1,fltarr(ncols,nrows))
for i=0,num_elements do begin
ivar=doi(i)
var_cube[i]=allvar_cube[ivar]
endfor

What is the format of file.dat? flat binary, little endian? I don't quite understand all the syntax in the model but var_cube would be a 3-d array where ncols,nrows is a spatial domain and the 3rd D are time slices. I would like to open these files in any other program, for example R to view the raster slices.

Was it helpful?

Solution

Since there was no specific keywords on the OPEN for the endianness, such as SWAP_IF_BIG_ENDIAN or SWAP_IF_LITTLE_ENDIAN, the file will be created in the native endianness of the machine the code is run on.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top