aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DumpUtils.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/DumpUtils.c b/src/DumpUtils.c
index ad5c2f9..0791fb0 100644
--- a/src/DumpUtils.c
+++ b/src/DumpUtils.c
@@ -60,7 +60,7 @@ int IOHDF5Util_DumpGH (cGH *GH,
DECLARE_CCTK_PARAMETERS
int vindex;
int maxdim;
- int timelevel, current_timelevel;
+ int timelevel;
int old_out_single;
ioGH *ioUtilGH;
const char *thorn;
@@ -158,14 +158,12 @@ int IOHDF5Util_DumpGH (cGH *GH,
request.sdim = request.vdim = CCTK_GroupDimFromVarI (vindex);
- /* get timelevels to dump away */
- current_timelevel = CCTK_NumTimeLevelsFromVarI (vindex) - 1;
- timelevel = current_timelevel > 0 ? 1 : 0;
-
- /* now dump away all timelevels */
- while (timelevel <= current_timelevel)
+ /* now dump all timelevels, if there is more than one timelevel
+ we don't dump the oldest */
+ for (timelevel = 0; timelevel < CCTK_NumTimeLevelsFromVarI (vindex);
+ timelevel++)
{
- IOHDF5Util_DumpVar (GH, vindex, timelevel++, &request, file, 0);
+ IOHDF5Util_DumpVar (GH, vindex, timelevel, &request, file, 0);
}
} /* end of loop over all variables */