aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Write.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/Write.c b/src/Write.c
index f4a15db..0d0215d 100644
--- a/src/Write.c
+++ b/src/Write.c
@@ -78,7 +78,7 @@ int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias)
char *fullname;
int extent_int[3];
CCTK_INT mapping;
- CCTK_INT origin[3], extent[3], direction[6], hsize[2];
+ CCTK_INT origin[3], extent[2], direction[6], hsize[2];
void *hdata;
CCTK_REAL min, max;
const CCTK_INT htype = CCTK_VARIABLE_REAL;
@@ -151,10 +151,8 @@ int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias)
}
/* set the extent vector */
- for (i = 0; i < 3; i++)
- {
- extent[i] = extent_int[i];
- }
+ extent[0] = extent_int[dir_i];
+ extent[1] = extent_int[dir_j];
/* set the origin using the slice center from IOUtil */
memset (origin, 0, sizeof (origin));
@@ -173,16 +171,16 @@ int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias)
if (mapping < 0)
{
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "IOJpeg_Write: Failed to define hyperslab mapping for "
- "variable '%s'", fullname);
+ "Failed to define hyperslab mapping for variable '%s'",
+ fullname);
continue;
}
total_hsize = hsize[0] * hsize[1];
if (total_hsize <= 0)
{
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "IOJpeg_Write: selected hyperslab has zero size for "
- "variable '%s' direction %d", fullname, dir);
+ "Selected hyperslab has zero size for variable '%s' "
+ "direction %d", fullname, dir);
Hyperslab_FreeMapping (mapping);
continue;
}
@@ -199,8 +197,7 @@ int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias)
if (i != 1)
{
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "IOJpeg_Write: Failed to extract hyperslab for variable '%s'",
- fullname);
+ "Failed to extract hyperslab for variable '%s'", fullname);
}
/* release the mapping structure */