PLUTO  4.0
 All Data Structures Files Functions Variables Enumerations Macros Pages
Functions
hdf5_io.c File Reference

HDF5 I/O main driver. More...

#include "pluto.h"
#include "hdf5.h"

Functions

void WriteHDF5 (Output *output, Grid *grid)
 
void ReadHDF5 (Output *output, Grid *grid)
 

Detailed Description

This file provides I/O functionality for HDF5 data format. The output suffix is ".h5".

The WriteHDF5() function allows to write data in serial or parallel mode in either single or double precision.

The ReadHDF5() function allows to read double precision data in serial or parrallel mode.

Note
By turning "MPI_POSIX" to "YES", HDF5 uses another parallel IO driver called MPI POSIX which is a "combination" MPI-2 and posix I/O driver. It uses MPI for coordinating the actions of several processes and posix I/O calls to do the actual I/O to the disk. There is no collective I/O mode with this driver. This will almost certainly not work correctly for files accessed on distributed parallel systems with the file located on a non-parallel filesystem. On some systems, Using MPI POSIX driver may perform better than using MPI-IO driver with independent IO mode.
For more info take a look at http://www.hdfgroup.org/HDF5/PHDF5/parallelhdf5hints.pdf
Todo:
This format does not yet support writing of supplementary variables.
Authors
C. Zanni (zanni.nosp@m.@oat.nosp@m.o.ina.nosp@m.f.it)
G. Musicanisi (g.mus.nosp@m.cian.nosp@m.isi@c.nosp@m.inec.nosp@m.a.it)
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
Nov 9, 2012

Function Documentation

void ReadHDF5 ( Output output,
Grid grid 
)

Read data from disk using hdf5 format

Parameters
[in]outputthe output structure associated with HDF5 format
[in]grida pointer to an array of Grid structures
Returns
This function has no return value.
void WriteHDF5 ( Output output,
Grid grid 
)

Write data to disk using hdf5 format in single or double precision.

Parameters
[in]outputthe output structure associated with HDF5 format
[in]grida pointer to an array of Grid structures
Returns
This function has no return value.
Note
Writing of staggered magnetic fields: Here we follow the same convention used by ArrayLib, where internal points that lie on the grid boundary between processors are owned by the left processor. For this reason, only the leftmost processor writes one additional point in the direction of staggering while the other processors write the same amount of zones as for cell-centered data. Also, keep in mind that the data array Vs starts from -1 (instead of 0) in the staggered direction.