From 11f810d0287b72031898fe8a3cea7644ad0082f3 Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 8 Jun 2004 16:34:00 +0000 Subject: Add "name", "timelevel", "iteration" attributes to 2D IEEEIO output files. This closes PR CactusPUGHIO/1756: "ieee->hdf5 converter problem for 2D files". git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@324 ebee0441-1374-4afa-a3b5-247f3ba15b9a --- src/Write2D.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Write2D.c b/src/Write2D.c index ff4ae45..c4d4933 100644 --- a/src/Write2D.c +++ b/src/Write2D.c @@ -81,6 +81,7 @@ int IOFlexIO_Write2D (const cGH *GH, int vindex, const char *alias) int total_hsize, mapping, dir_i, dir_j, coord_system_handle, retval; int extent_int[3], extent_flexio[2]; CCTK_INT origin[3], extent[2], direction[6], hsize[2], coord_handles[3]; + CCTK_INT4 itmp; void *data; char *fullname, *groupname; @@ -325,6 +326,15 @@ int IOFlexIO_Write2D (const cGH *GH, int vindex, const char *alias) max_ext_attr[1] = max_ext[dir_j]; delta_attr[0] = GH->cctk_delta_space[dir_i]; delta_attr[1] = GH->cctk_delta_space[dir_j]; + + FLEXIO_ERROR (IOwriteAttribute (IEEEfile_2D[dir], "name", FLEXIO_CHAR, + strlen (fullname) + 1, fullname)); + itmp = GH->cctk_iteration; + FLEXIO_ERROR (IOwriteAttribute (IEEEfile_2D[dir], "iteration", + FLEXIO_INT4, 1, &itmp)); + itmp = 0; + FLEXIO_ERROR (IOwriteAttribute (IEEEfile_2D[dir], "timelevel", + FLEXIO_INT4, 1, &itmp)); FLEXIO_ERROR (IOwriteAttribute (IEEEfile_2D[dir], "time", FLEXIO_REAL, 1, &GH->cctk_time)); FLEXIO_ERROR (IOwriteAttribute (IEEEfile_2D[dir], "origin", -- cgit v1.2.3