avReadArray 3D

avReadArray 3D

I am having trouble reading a 3D array (actually dset from the file astrojet.h5 that comes with the AV distribution). I can open the file, and view it, and get the extents of dset, but avReadArray() returns status = -1.

character(*), parameter :: dsetpath = '/dset'
integer :: nExtent3(3), status
real, allocatable :: dset(:,:,:)
character(*), parameter :: template_filename = 'astrojet.h5'

print *, "Opening the file: ", template_filename
call avOpen(template_filename, 0, status)

call avGetExtent(dsetpath, 1, nExtent3(1))
call avGetExtent(dsetpath, 2, nExtent3(2))
call avGetExtent(dsetpath, 3, nExtent3(3))

print *, "Extent of ", dsetpath, " is: ", nExtent3

! Allocate memory to read the dataset values into

! Read the dataset
call avReadArray(LOC(dset), dsetpath, status)
write(*,*) 'avReadArray status: ',status

Am I doing something wrong?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I have discovered that although avReadArray returns an error condition (status = -1) the array is read successfully. I don't know if the status value is wrong, or if some other error has been detected.

Leave a Comment

Please sign in to add a comment. Not a member? Join today