From 4f104a5fb414910ca315024f649b8f1854d1a305 Mon Sep 17 00:00:00 2001 From: schnetter Date: Wed, 29 Oct 2003 15:03:34 +0000 Subject: Be backwards compatible for group type codes when reading old checkpoint files. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@101 7842ec3a-9562-4be5-9c5b-06ba18f2b668 --- src/RecoverVar.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/RecoverVar.c b/src/RecoverVar.c index 1f80b5c..8724f7b 100644 --- a/src/RecoverVar.c +++ b/src/RecoverVar.c @@ -383,6 +383,13 @@ static int GetCommonAttributes (const cGH *GH, /* verify group type, variable type, dims, sizes and ntimelevels */ READ_ATTRIBUTE (dataset, "grouptype", H5T_NATIVE_INT, &grouptype_stored); + /* be backwards compatible */ + switch (grouptype_stored) + { + case 1: grouptype_stored = CCTK_SCALAR; break; + case 2: grouptype_stored = CCTK_GF; break; + case 3: grouptype_stored = CCTK_ARRAY; break; + } READ_ATTRIBUTE (dataset, "ntimelevels", H5T_NATIVE_INT,&numtimelevels_stored); /* get the group data */ -- cgit v1.2.3