How can I write time series of data to one HDF5 dataset

Hi Folks,

I am a newby in HDF5, and after having already successfully written (and also
plotted) one singel time step of a variable into an HDF5 dataset, I would like
to know how I can write time series of a 3-d variable into one single HDF5
dataset? Do I need to have the tiem as fouhrth dimension?

An explaing example in C would be welcome.

Best wishes

Alexander

Dear Alexander,

Please see if the attached example C code helps. It is an example from HDF web site.

Best,

Ekin

h5ex_t_array.c (4.84 KB)

···

On 03/21/2012 01:55 PM, Alexander Beck-Ratzka wrote:

Hi Folks,

I am a newby in HDF5, and after having already successfully written (and also
plotted) one singel time step of a variable into an HDF5 dataset, I would like
to know how I can write time series of a 3-d variable into one single HDF5
dataset? Do I need to have the tiem as fouhrth dimension?

An explaing example in C would be welcome.

Best wishes

Alexander

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

--
*Ekin Akoglu*

Research Assistant

Institute of Marine Sciences
Middle East Technical University
P.O. Box 28, 33731
Erdemli, Mersin
Turkey

Web: www.ims.metu.edu.tr
Email: ekin@ims.metu.edu.tr <mailto:ekin@ims.metu.edu.tr>
Phone: +90 324 521 34 34
GSM: +90 506 554 03 90
Fax: +90 324 521 23 27

Alexander,

  an option might be to use the F5 library (F5.origo.ethz.ch) which was
designed to work with Cactus/Carpet AMR mesh refinement and to use the
XDMF extractor tool which extracts the F5 metadata as XML. We used that
a couple of years ago to get F5-data into Paraview, I would assume it
would be similar with Visit. Let me know if you're interested in that,
I'd need to contact the developer of that XDMF extractor tool as I don't
have it myself at the moment, but it would be a good occasion to revive
this tool.

    Werner

BTW.: F5 is storing time-dependent 3D data as a series of 3D instances,
       not as a 4D field, such that the data structures may vary over time,
       which is the case for AMR data usually.

···

On Wed, 21 Mar 2012 07:46:18 -0500, Alexander Beck-Ratzka <alexander.beck-ratzka@aei.mpg.de> wrote:

On Wednesday 21 March 2012 14:05:04 Ekin Akoglu wrote:

I am afraid I have not described what I want to have clear enough....

I have a 3-d not always regular mesh (we are working with mesh refinement). On
this mesh I have several variables, and again for each variable several time
steps. To make plots of these variable, and also to create time series plots I
would like to use VisIt, which uses XDMF as a reader for HDF5 data.

In order to get the plots of VisIt correct, the HDF5 datasets must be
populated as follows:

1) x coordinates
2) y coordinates
3) z coordinates
(all the coordinates as 3-d arrays)

and finally 4) the data.

How can I add seveals time steps of these data? Must I always add the
coordinates in advance or not? Have I a possiblity to mark the time step?

The example given by Ekin only shows how to add one 3-d field, nothing about
coordinates and about time steps. I hope my problem is more clear now ..

Best wishes

Alexander

Dear Alexander,

Please see if the attached example C code helps. It is an example from
HDF web site.

Best,

Ekin

On 03/21/2012 01:55 PM, Alexander Beck-Ratzka wrote:
> Hi Folks,
>
> I am a newby in HDF5, and after having already successfully written (and
> also plotted) one singel time step of a variable into an HDF5 dataset,
> I would like to know how I can write time series of a 3-d variable into
> one single HDF5 dataset? Do I need to have the tiem as fouhrth
> dimension?
>
> An explaing example in C would be welcome.
>
> Best wishes
>
> Alexander
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Laboratory for Creative Arts and Technology (LCAT)
Center for Computation & Technology at Louisiana State University (CCT/LSU)
211 Johnston Hall, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362

The easiest way that I would suggest is to use the silo library. It will handle
writing the hdf files for you.

https://wci.llnl.gov/codes/silo/

It works very well with VisIT.

···

On 2012-03-21 08:46, Alexander Beck-Ratzka wrote:

On Wednesday 21 March 2012 14:05:04 Ekin Akoglu wrote:

I am afraid I have not described what I want to have clear enough....

I have a 3-d not always regular mesh (we are working with mesh
refinement). On
this mesh I have several variables, and again for each variable several time
steps. To make plots of these variable, and also to create time
series plots I
would like to use VisIt, which uses XDMF as a reader for HDF5 data.

In order to get the plots of VisIt correct, the HDF5 datasets must be
populated as follows:

1) x coordinates
2) y coordinates
3) z coordinates
(all the coordinates as 3-d arrays)

and finally 4) the data.

How can I add seveals time steps of these data? Must I always add the
coordinates in advance or not? Have I a possiblity to mark the time step?

The example given by Ekin only shows how to add one 3-d field, nothing about
coordinates and about time steps. I hope my problem is more clear now ..

Best wishes

Alexander

Dear Alexander,

Please see if the attached example C code helps. It is an example from
HDF web site.

Best,

Ekin

On 03/21/2012 01:55 PM, Alexander Beck-Ratzka wrote:
> Hi Folks,
>
> I am a newby in HDF5, and after having already successfully written (and
> also plotted) one singel time step of a variable into an HDF5 dataset,
> I would like to know how I can write time series of a 3-d variable into
> one single HDF5 dataset? Do I need to have the tiem as fouhrth
> dimension?
>
> An explaing example in C would be welcome.
>
> Best wishes
>
> Alexander
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

I am afraid I have not described what I want to have clear enough....

I have a 3-d not always regular mesh (we are working with mesh refinement). On
this mesh I have several variables, and again for each variable several time
steps. To make plots of these variable, and also to create time series plots I
would like to use VisIt, which uses XDMF as a reader for HDF5 data.

In order to get the plots of VisIt correct, the HDF5 datasets must be
populated as follows:

1) x coordinates
2) y coordinates
3) z coordinates
(all the coordinates as 3-d arrays)

and finally 4) the data.

How can I add seveals time steps of these data? Must I always add the
coordinates in advance or not? Have I a possiblity to mark the time step?

The example given by Ekin only shows how to add one 3-d field, nothing about
coordinates and about time steps. I hope my problem is more clear now ..

Best wishes

Alexander

···

On Wednesday 21 March 2012 14:05:04 Ekin Akoglu wrote:

Dear Alexander,

Please see if the attached example C code helps. It is an example from
HDF web site.

Best,

Ekin

On 03/21/2012 01:55 PM, Alexander Beck-Ratzka wrote:
> Hi Folks,
>
> I am a newby in HDF5, and after having already successfully written (and
> also plotted) one singel time step of a variable into an HDF5 dataset,
> I would like to know how I can write time series of a 3-d variable into
> one single HDF5 dataset? Do I need to have the tiem as fouhrth
> dimension?
>
> An explaing example in C would be welcome.
>
> Best wishes
>
> Alexander
>
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Hi Werner,

can you provide an example, including the files reuqired for the visualization
with VisIT?

Best wishes

Alexander

···

Alexander,

  an option might be to use the F5 library (F5.origo.ethz.ch) which was
designed to work with Cactus/Carpet AMR mesh refinement and to use the
XDMF extractor tool which extracts the F5 metadata as XML. We used that
a couple of years ago to get F5-data into Paraview, I would assume it
would be similar with Visit. Let me know if you're interested in that,
I'd need to contact the developer of that XDMF extractor tool as I don't
have it myself at the moment, but it would be a good occasion to revive
this tool.

    Werner

BTW.: F5 is storing time-dependent 3D data as a series of 3D instances,
       not as a 4D field, such that the data structures may vary over time,
       which is the case for AMR data usually.

On Wed, 21 Mar 2012 07:46:18 -0500, Alexander Beck-Ratzka > > <alexander.beck-ratzka@aei.mpg.de> wrote:
> On Wednesday 21 March 2012 14:05:04 Ekin Akoglu wrote:
>
> I am afraid I have not described what I want to have clear enough....
>
> I have a 3-d not always regular mesh (we are working with mesh
> refinement). On
> this mesh I have several variables, and again for each variable several
> time
> steps. To make plots of these variable, and also to create time series
> plots I
> would like to use VisIt, which uses XDMF as a reader for HDF5 data.
>
> In order to get the plots of VisIt correct, the HDF5 datasets must be
> populated as follows:
>
> 1) x coordinates
> 2) y coordinates
> 3) z coordinates
> (all the coordinates as 3-d arrays)
>
> and finally 4) the data.
>
> How can I add seveals time steps of these data? Must I always add the
> coordinates in advance or not? Have I a possiblity to mark the time
> step?
>
> The example given by Ekin only shows how to add one 3-d field, nothing
> about
> coordinates and about time steps. I hope my problem is more clear now ..
>
> Best wishes
>
> Alexander
>
>> Dear Alexander,
>>
>> Please see if the attached example C code helps. It is an example from
>> HDF web site.
>>
>> Best,
>>
>> Ekin
>>
>> On 03/21/2012 01:55 PM, Alexander Beck-Ratzka wrote:
>> > Hi Folks,
>> >
>> > I am a newby in HDF5, and after having already successfully
>> > written
>>
>> (and
>>
>> > also plotted) one singel time step of a variable into an HDF5
>> > dataset,
>> > I would like to know how I can write time series of a 3-d variable
>>
>> into
>>
>> > one single HDF5 dataset? Do I need to have the tiem as fouhrth
>> > dimension?
>> >
>> > An explaing example in C would be welcome.
>> >
>> > Best wishes
>> >
>> > Alexander
>> >
>> >
>> > _______________________________________________
>> > Hdf-forum is for HDF software users discussion.
>> > Hdf-forum@hdfgroup.org
>> > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

An example would be very welcome. Now I have a new documentation withe more
then 250 pages to read; that's really heavy.

The best would be an example as in the examples code I am attaching to this
Email. THos is short C example which writes data to HDF5 and also creates teh
XML bases XDMF specification file. I can visualize these data using VisIt. I
would like to have such an example for several time steps, and for a mesh
including mesh refinement. Does exits such an example for silo?

Best wishes

Alexander

creator.c (5.11 KB)

···

On Wednesday 21 March 2012 09:37:51 brtnfld@hdfgroup.org wrote:

The easiest way that I would suggest is to use the silo library. It
will handle
writing the hdf files for you.

https://wci.llnl.gov/codes/silo/

It works very well with VisIT.

On 2012-03-21 08:46, Alexander Beck-Ratzka wrote:
> On Wednesday 21 March 2012 14:05:04 Ekin Akoglu wrote:
>
> I am afraid I have not described what I want to have clear enough....
>
> I have a 3-d not always regular mesh (we are working with mesh
> refinement). On
> this mesh I have several variables, and again for each variable
> several time
> steps. To make plots of these variable, and also to create time
> series plots I
> would like to use VisIt, which uses XDMF as a reader for HDF5 data.
>
> In order to get the plots of VisIt correct, the HDF5 datasets must be
> populated as follows:
>
> 1) x coordinates
> 2) y coordinates
> 3) z coordinates
> (all the coordinates as 3-d arrays)
>
> and finally 4) the data.
>
> How can I add seveals time steps of these data? Must I always add the
> coordinates in advance or not? Have I a possiblity to mark the time
> step?
>
> The example given by Ekin only shows how to add one 3-d field,
> nothing about
> coordinates and about time steps. I hope my problem is more clear now
> ..
>
> Best wishes
>
> Alexander
>
>> Dear Alexander,
>>
>> Please see if the attached example C code helps. It is an example
>> from
>> HDF web site.
>>
>> Best,
>>
>> Ekin
>>
>> On 03/21/2012 01:55 PM, Alexander Beck-Ratzka wrote:
>> > Hi Folks,
>> >
>> > I am a newby in HDF5, and after having already successfully
>>
>> written (and
>>
>> > also plotted) one singel time step of a variable into an HDF5
>>
>> dataset,
>>
>> > I would like to know how I can write time series of a 3-d variable
>>
>> into
>>
>> > one single HDF5 dataset? Do I need to have the tiem as fouhrth
>> > dimension?
>> >
>> > An explaing example in C would be welcome.
>> >
>> > Best wishes
>> >
>> > Alexander
>> >
>> >
>> > _______________________________________________
>> > Hdf-forum is for HDF software users discussion.
>> > Hdf-forum@hdfgroup.org
>> > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Hi Alexander,

  an AMR writing example comes with the F5 SVN, which also includes some Cactus
thorns for writing F5 natively; a newer version that also supports various
kinds of staggering (known as Arakawa grids http://en.wikipedia.org/wiki/Arakawa_grids)
is under development.

For the XDMF extractor, I need to contact someone. Let me get back to you
once I got reply.

     Werner

···

On Wed, 21 Mar 2012 09:03:17 -0500, Alexander Beck-Ratzka <alexander.beck-ratzka@aei.mpg.de> wrote:

Hi Werner,

can you provide an example, including the files reuqired for the visualization
with VisIT?

Best wishes

Alexander

Alexander,

  an option might be to use the F5 library (F5.origo.ethz.ch) which was
designed to work with Cactus/Carpet AMR mesh refinement and to use the
XDMF extractor tool which extracts the F5 metadata as XML. We used that
a couple of years ago to get F5-data into Paraview, I would assume it
would be similar with Visit. Let me know if you're interested in that,
I'd need to contact the developer of that XDMF extractor tool as I don't
have it myself at the moment, but it would be a good occasion to revive
this tool.

    Werner

BTW.: F5 is storing time-dependent 3D data as a series of 3D instances,
       not as a 4D field, such that the data structures may vary over time,
       which is the case for AMR data usually.

On Wed, 21 Mar 2012 07:46:18 -0500, Alexander Beck-Ratzka >> >> <alexander.beck-ratzka@aei.mpg.de> wrote:
> On Wednesday 21 March 2012 14:05:04 Ekin Akoglu wrote:
>
> I am afraid I have not described what I want to have clear enough....
>
> I have a 3-d not always regular mesh (we are working with mesh
> refinement). On
> this mesh I have several variables, and again for each variable several
> time
> steps. To make plots of these variable, and also to create time series
> plots I
> would like to use VisIt, which uses XDMF as a reader for HDF5 data.
>
> In order to get the plots of VisIt correct, the HDF5 datasets must be
> populated as follows:
>
> 1) x coordinates
> 2) y coordinates
> 3) z coordinates
> (all the coordinates as 3-d arrays)
>
> and finally 4) the data.
>
> How can I add seveals time steps of these data? Must I always add the
> coordinates in advance or not? Have I a possiblity to mark the time
> step?
>
> The example given by Ekin only shows how to add one 3-d field, nothing
> about
> coordinates and about time steps. I hope my problem is more clear now ..
>
> Best wishes
>
> Alexander
>
>> Dear Alexander,
>>
>> Please see if the attached example C code helps. It is an example from
>> HDF web site.
>>
>> Best,
>>
>> Ekin
>>
>> On 03/21/2012 01:55 PM, Alexander Beck-Ratzka wrote:
>> > Hi Folks,
>> >
>> > I am a newby in HDF5, and after having already successfully
>> > written
>>
>> (and
>>
>> > also plotted) one singel time step of a variable into an HDF5
>> > dataset,
>> > I would like to know how I can write time series of a 3-d variable
>>
>> into
>>
>> > one single HDF5 dataset? Do I need to have the tiem as fouhrth
>> > dimension?
>> >
>> > An explaing example in C would be welcome.
>> >
>> > Best wishes
>> >
>> > Alexander
>> >
>> > _______________________________________________
>> > Hdf-forum is for HDF software users discussion.
>> > Hdf-forum@hdfgroup.org
>> > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Laboratory for Creative Arts and Technology (LCAT)
Center for Computation & Technology at Louisiana State University (CCT/LSU)
211 Johnston Hall, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362