Yes, you can do this. Have two writes to two different files -- one for an ASCII header and the other for the binary data. The native DX format has one or more headers each of which points to an array. The arrays can be in the same or different files. There is a byte offset that indicates where to start reading the data whether the array is in the same file or not. If not, then a file name is given.
This is described in considerable detail in Appendix B.2 of the DX User's Guide (ftp://ftp.software.ibm.com/software/dataexplorer/products/dx314A/docs/usrguide.ps.Z) On-line, take a look at http://www.research.ibm.com/dx/docs/legacyhtml/pages/usrgu065.htm The number of items is the number of elements in the array being referenced. If the n data sets are to viewed as a single array then the number of items should be n x m, where m is the number of elements in each data set. On the other hand, if you are talking about a series of n such arrays then you should define n such arrays, each of which has m items. In the dx header you can specify how to aggregate each of the arrays (e.g., as a series). -------------------------- Lloyd A. Treinish Deep Computing Institute IBM Thomas J. Watson Research Center P. O. Box 218 Yorktown Heights, NY 10598 914-945-2770 (voice) 914-945-3434 (facsimile) [EMAIL PROTECTED] http://www.research.ibm.com/people/l/lloydt/ http://www.research.ibm.com/weather Thomas Ruedas <[EMAIL PROTECTED]>@opendx.watson.ibm.com on 08/23/2000 12:37:02 PM Please respond to [email protected] Sent by: [EMAIL PROTECTED] To: OpenDX mailing list <[email protected]> cc: Subject: [opendx-users] Newbie: DX native format - header + data? This is probably quite trivial, but anyway, here goes: My FORTRAN 77 program stores the spatial distribution of temperature on a regular orthogonal grid in a 3D array t(i,j,k), and I want to change my code in such a way that it writes this array every n time steps in DX's native file format in one file which includes both header and data. Looking at the DX example file temperature.dx suggests that the header is written formatted, but the data unformatted, if binary output is selected (which I would strongly prefer). So my trivial question is: is there anywhere an example of FORTRAN code where such kind of header+data output is generated? Is it possible at all? The point is that I couldn't figure out how to do that, because one can't write formatted and unformatted data to the same file, and tricking around with reopening didn't seem to work either. The only way seems to be to write 2 files and cat them together, but that couldn't be done by the program itself, which thus is not very practical. The other question is about the items flag in object 1 class array type float rank 0 items 2800 msb ieee data 0 In this example items is the total number of grid points; however, I am writing a series of n such datasets. It didn't become quite clear to me from the user guide if I would have to set items to n times the number of grid points then, and if it is possible (and sensible) at all to put all n datasets in the same file. I will be most grateful for some information about this, as well as for pointers to additional online/downloadable references especially concerning the data format. -- ------------------------------------------------------------------------ Thomas Ruedas Institute of Meteorology and Geophysics, J.W.Goethe University Frankfurt e-mail: [EMAIL PROTECTED] http://www.geophysik.uni-frankfurt.de/~ruedas/ ------------------------------------------------------------------------
