diff options
Diffstat (limited to 'src/Output3D.c')
-rw-r--r-- | src/Output3D.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Output3D.c b/src/Output3D.c index 92a1119..886cd75 100644 --- a/src/Output3D.c +++ b/src/Output3D.c @@ -117,8 +117,12 @@ int IOASCII_Output3DVarAs (const cGH *GH, const char *fullname, const char *alia retval = -1; vindex = CCTK_VarIndex (fullname); - - if (CheckOutputVar (vindex) == 0) + if (vindex<0) + { + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, + "There is no such variable %s. Ignoring IOASCII 3D output.", + fullname); + } else if (CheckOutputVar (vindex) == 0) { retval = IOASCII_Write3D (GH, vindex, alias); } |