Filling compund data types in Fortran

How do I fill a dataset containing a compound type in Fortran? For example

TYPE MYTYPE
   INTEGER ,DIMENSION(100) :: INTS
   CHARACTER(LEN=1000) :: STR
END TYPE

The H5Pset_fill_value_f routine seems to be overloaded for integer, real and character. Calling it with an integer fill value sets all the INTS(1) in the dataset to this value, everything else is junk.

Thanks

Rod Cook

I've just realised that you have to do the fill field at a time. Sorry for wasting anybody's time.

Rod Cook

···

On 25/01/2012 14:08, Rod Cook wrote:

How do I fill a dataset containing a compound type in Fortran? For example

TYPE MYTYPE
  INTEGER ,DIMENSION(100) :: INTS
  CHARACTER(LEN=1000) :: STR
END TYPE

The H5Pset_fill_value_f routine seems to be overloaded for integer, real and character. Calling it with an integer fill value sets all the INTS(1) in the dataset to this value, everything else is junk.

Thanks

Rod Cook

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

In release 1.8.8 (build with --enable-fortran2003) you can pass the compound datatype type_id directly. An example how to do this is in "SUBROUTINE test_create" in fortran/test/tH5P_F03.f90 of the hdf5 source.

···

On 25.01.2012 11:42, Rod Cook wrote:

I've just realised that you have to do the fill field at a time.
Sorry for wasting anybody's time.

Rod Cook

On 25/01/2012 14:08, Rod Cook wrote:

How do I fill a dataset containing a compound type in Fortran? For example

TYPE MYTYPE
  INTEGER ,DIMENSION(100) :: INTS
  CHARACTER(LEN=1000) :: STR
END TYPE

The H5Pset_fill_value_f routine seems to be overloaded for integer, real and character. Calling it with an integer fill value sets all the INTS(1) in the dataset to this value, everything else is junk.

Thanks

Rod Cook

_______________________________________________
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