Dear all,

Attached is my FORTRAN subroutine for writing compound datatypes in HDF5 format and its output dumped in ascii file. The dataset "ep_data" is written without problem. However, my "den_data" dataset, which I mimicked as a simple compound type in the h5write subroutine, actually has variable length arrays and 1-member scalar fields. That is to say:

den_data(1)%biomass(5)

den_data(1)%age_start(5)

den_data(1)%mortality(5)

den_data(1)%qob(5)

den_data(1)%leading(5)

den_data(1)%vbk

den_data(1)%rec_power

den_data(1)%rel_ba

den_data(1)%Wage(120)

den_data(1)%WWa(120)

den_data(1)%survive(120)

den_data(1)%splitno(120)

and in den_data(2) the fields are also variable in length and has different lengths from the fields of den_data(1), like:

den_data(2)%biomass(3)

den_data(2)%age_start(3)

den_data(2)%mortality(3)

den_data(2)%qob(3)

den_data(2)%leading(3)

den_data(2)%vbk

den_data(2)%rec_power

den_data(2)%rel_ba

den_data(2)%Wage(90)

den_data(2)%WWa(90)

den_data(2)%survive(90)

den_data(2)%splitno(90)

and it keeps continuing up to den_data(n). I kindly ask your suggestions about storing this data as a compound type with variable length fields without using pointers as explained in h5ex_t_vlen_F03.f90 <http://www.hdfgroup.org/ftp/HDF5/examples/examples-by-api/hdf5-examples/1_8/FORTRAN/H5T/h5ex_t_vlen_F03.f90> example script on HDF GROUP web site. Thank you in advance for your concerns.

Best regards,

h5write.f95 (8.98 KB)

ep_res.txt (26.1 KB)

## 路路路

--

*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