The tar file read_millennium.tar.gz contains the source code for a set of subroutines which read the millennium simulation snapshot files, the friends of friends groups (group_tab and group_ids files), and the SubFind groups (sub_tab and sub_ids files).
These are intended to be called from Fortran 90. The Millennium files are big endian, so on little endian machines (such as PCs) the Fortran code must be compiled with the appropriate flag to ensure that input is byte swapped, e.g. use -byteswapio on the Portland compiler. The routines in readparticles.c must be compiled with the flag -DBYTESWAP to work on a little endian machine.
Additionally, the readgroups.f90 routines assume that direct access record lengths are measured in bytes. This is the default on the Sun and Portland compilers, but may require a compiler flag in some cases (eg use "-assume byterecl" on the Intel or Compaq compilers).
The snapshot files in the /data/milli?? directories have been arranged so that each snapshot is spread across a number of disks. This is intended to speed up access to the data by allowing different parts of a single snapshot to be read simultaneously. Unfortunately this means that if you want to find a particular file it isn't immediately obvious where to look.
One solution would be to set up symbolic links to the
files, with the links arranged in a more user friendly way.
However, the disk containing the links would then be
accessed whenever any Millennium file was read. Instead,
the function in file_path.f90 can be used to obtain the location
of any of the Millennium data files. It is called with:
filename = filepath(itype, isnap, ifile)
The parameters are:
INTEGER itype ! Which type of file to find (0-4)
! (0 - snapshot file
! 1 - group_tab file
! 2 - sub_tab file
! 3 - sub_ids file
! 4 - group_ids file)
INTEGER isnap ! Which output time the file belongs to (0-63)
INTEGER ifile ! Which file within the snapshot (0-511)
The fortran read routines described above take a character
string parameter 'basedir'. If this is set to 'MILLENNIUM',
files are read from the locations given by the filepath()
function (ie from the Durham data store). Otherwise,
snapshot files are read from basedir/snapdir_xxx/ and group files
are read from basedir/postproc_xxx/, where xxx is the
snapshot number.
For more information about the Millennium simulation and examples
of how to read the data in C or IDL, see
Volker's web page.