Hi Marco,

I think the example program h5ex_t_vlen_F03.f90  at,

https://www.hdfgroup.org/HDF5/examples/api18-fortran.html

shows how to handle this.

Scot


On Jun 9, 2015, at 5:42 AM, marco restelli 
<[email protected]<mailto:[email protected]>> wrote:

Hi all,
  I am not very experienced with HDF5 and I need some advice for the
following problem.

Consider the fortran code

type :: t_data
integer :: i
real, allocatable :: vals(:)
end type t_data

type(t_data) :: data(100) ! the array which I want to save

where the vals component has a different dimension for each element:

allocate( data(1)%vals(3) )
allocate( data(2)%vals(1) )
allocate( data(3)%vals(0) )
allocate( data(4)%vals(10) )
...

How could I save the array data in an HDF5 file? I read that there are
"ragged arrays" as well as "fractal arrays", but I can't find any
example about how to use them. Can anybody give my any reference?

Thank you!
Marco

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]<mailto:[email protected]>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to