This directory contains examples of how to read and write merger tree files in
hdf5 format using Fortran-90 (specifcially, gfortran).

In most cases, the subroutines are just interfaces to equivalent C-routines in
../Library (that are, however, written in C).  However, the Library routines do
extra checking and conversion between flat arrays and tables that are hidden
from the user here.

To simpify matters, all the routines are treated as functions with integer
error return codes: ier=0 means successful completion.

You should start by looking at the main programs readtree.f90 and
dumptree.f90 which give examples of how to use the other routines.

----------------------

Helper files:

* Makefile - will need to be modified to specify the correct ${ROOT} code
  location, plus point to compilers, libraries, etc.

* makerules - compilation rules for use by make.

* README - this file.

----------------------

Directories:

* data@ - link to data directory that holds mock data

* modules/ - directory that holds compiled modules

* objects/ - directory that holds object files

----------------------

Driver routines:

* dumptree.f90 - an example of how to create and write out to an HDF5 file in
  the correct HDF5 format (mock data is read in from an existing HDF5 file).

* readtree.f90 - example program to read an existing HDF5 file and extract/print
  some data

----------------------

Modules:

* mt.f90 - interface declarations for all the functions/subroutines

* mt_data.f90 - global parameters and data

----------------------

Utility routines:

* mt_close.f90 - subroutine to close a file and exit HDF5

* mt_dump_mergertree.f90 - subroutine to write mergertree to HDF5 file

* mt_dump_snaptable.f90 - subroutine to write snapshot data to HDF5 file

* mt_open.f90 - start HDF5 and open a file

* mt_read_mergertree.f90 - subroutine to read mergertree from an HDF5 file

* mt_read_snaptable.f90 - subroutine to read snapshot data from an HDF5 file

* mt_tidy.f90 - subroutine to deallocate resources (not strictly required but
  good practice)

* read_mock_data.f90 - subroutine used by dumptree.f90 to read in some data

