aboutsummaryrefslogtreecommitdiff
path: root/src/Write3D.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Write3D.c')
-rw-r--r--src/Write3D.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/Write3D.c b/src/Write3D.c
index d4304f5..52fe554 100644
--- a/src/Write3D.c
+++ b/src/Write3D.c
@@ -157,15 +157,19 @@ int IOASCII_Write3D (const cGH *GH, int vindex, const char *alias)
return (-1);
}
- /* get the coordinate system associated with this grid variable */
vindices[0] = vindex;
- groupname = CCTK_GroupName (gindex);
- coord_system_handle = Coord_GroupSystem (GH, groupname);
- free (groupname);
-
- have_coords = coord_system_handle >= 0 &&
- Util_TableGetIntArray (coord_system_handle, 3,
- coord_handles, "COORDINATES") >= 0;
+ have_coords = CCTK_IsFunctionAliased ("Coord_GroupSystem");
+ if (have_coords)
+ {
+ /* get the coordinate system associated with this grid variable */
+ groupname = CCTK_GroupName (gindex);
+ coord_system_handle = Coord_GroupSystem (GH, groupname);
+ free (groupname);
+
+ have_coords = coord_system_handle >= 0 &&
+ Util_TableGetIntArray (coord_system_handle, 3,
+ coord_handles, "COORDINATES") >= 0;
+ }
if (have_coords)
{
/* get the coordinate functions and coordinate physical minimum */