Sorry, I didn't realize that your file was binary and that you
weren't including human readable information in the header.
If you redo your Fortran code so that there is readable text then it
is possible, but wouldn't it be just as easy to output a general file
from your Fortran code at the same time your outputting the dat file?
file = ./dxdata.dat
grid = 10 x 10
format = msb ieee
interleaving = record
majority = row
header = 24 bytes
field = field0
structure = scalar
type = float
dependency = positions
positions = regular, regular, 1.0, 0.1, 2.0, 0.2
end
In order to tell the dx where to search for the grid information and
position information, you have to use the keyword "marker" that
parses the file looking for some key text. So it won't work with your
type of binary file.
David
On Tue, Apr 24, 2001 at 12:51:28PM -0600, David Thompson wrote:
Our book has some information on this, but you can also find more
convoluted information in the Quickstart guide around page 87.
Thank you for your answer, I had already had a look at the
Quickstart guide and the User's Guide Appendix (B.1). However, I am
still puzzled by the whole system. I have a binary file, written in
Fortran. A simplified F95 code looks like this:
program dx_test
real, dimension(10,10)::a
call random_number(a)
open(unit=44,file="dxdata.dat",form="unformatted",status="new",action="write")
write(unit=44)10,10
write(unit=44)1.0,0.1,2.0,0.2
write(unit=44)a(:,:)
close(44)
end program dx_test
Hence, the file looks like this
[grid_size1][grid_size2][xstart][xdelta][ystart][ydelta][a 10x10 array]
The size of this file is 456 bytes (as expected, integers in Fortran are
long), so that's quite correct.
How is one suppossed to read the array whose dimensions and
positions are defined in the 24 frist bytes? My first attempt is:
file = ./dxdata.dat
grid = 0,4,0,4
format = msb ieee
interleaving = record
majority = row
field = field0
structure = scalar
type = float
dependency = positions
positions = 8,4,8,4
end
This doesn't work (apparently, the number of dimensions between
grid and positions is different).
I have tried having the "grid" and "positions" with the whole
format string, to no avail (different error). I have tried having a
header statement, again to no avail. Can anyone explain clearly how can
this thing be done?
Thanks for your time and help,
José
--
José L Gómez Dans PhD student
Tel: +44 114 222 5582 Radar & Communications Group
FAX; +44 870 132 2990 Department of Electronic Engineering
University of Sheffield UK
--
.............................................................................
David L. Thompson The University of Montana
mailto:[EMAIL PROTECTED] Computer Science Department
http://www.cs.umt.edu/u/dthompsn Missoula, MT 59812
Work Phone : (406)257-8530