diff options
Diffstat (limited to 'src/Write1D.c')
-rw-r--r-- | src/Write1D.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/Write1D.c b/src/Write1D.c index 999e583..7779c86 100644 --- a/src/Write1D.c +++ b/src/Write1D.c @@ -191,16 +191,20 @@ int IOASCII_Write1D (const cGH *GH, int vindex, const char *alias) return (0); } - /* get the coordinate system associated with this grid variable */ - groupname = CCTK_GroupName (gindex); - coord_system_handle = Coord_GroupSystem (GH, groupname); - free (groupname); - dir = gdata.dim < 3 ? gdata.dim : 3; - have_coords = coord_system_handle >= 0 && - Util_TableGetIntArray (coord_system_handle, dir, - 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, dir, + coord_handles, "COORDINATES") >= 0; + } if (have_coords) { /* get the coordinate functions and coordinate physical minimum */ |