From 99e84c76561477e73404f57c5b26e0d01ec5f58e Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Thu, 5 Jan 2017 14:35:09 +0100
Subject: [PATCH] Philippe 05/01/2017: minor bug correction: print field list
 for output only if at least 1 output

---
 src/LIB/SURCOUCHE/src/mode_io_manage_struct.f90 | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/LIB/SURCOUCHE/src/mode_io_manage_struct.f90 b/src/LIB/SURCOUCHE/src/mode_io_manage_struct.f90
index 155417349..01e960ef5 100644
--- a/src/LIB/SURCOUCHE/src/mode_io_manage_struct.f90
+++ b/src/LIB/SURCOUCHE/src/mode_io_manage_struct.f90
@@ -274,11 +274,15 @@ DO IMI = 1, NMODEL
   DO JOUT = 1,IOUT_NUMB
     WRITE(*,'( I9 F12.3 )'  ) OUT_MODEL(IMI)%TOUTPUTN(JOUT)%NSTEP,OUT_MODEL(IMI)%TOUTPUTN(JOUT)%XTIME
   END DO
-  PRINT *,'Field list:'
-  DO JOUT = 1,SIZE(OUT_MODEL(IMI)%TOUTPUTN(1)%NFIELDLIST)
-    IDX=OUT_MODEL(IMI)%TOUTPUTN(1)%NFIELDLIST(JOUT)
-    PRINT *,'  ',TRIM(TFIELDLIST(IDX)%CMNHNAME)
-  END DO
+  !
+  IF (IOUT_NUMB>0) THEN
+    PRINT *,'Field list:'
+    DO JOUT = 1,SIZE(OUT_MODEL(IMI)%TOUTPUTN(1)%NFIELDLIST)
+      IDX=OUT_MODEL(IMI)%TOUTPUTN(1)%NFIELDLIST(JOUT)
+      PRINT *,'  ',TRIM(TFIELDLIST(IDX)%CMNHNAME)
+    END DO
+  END IF
+  !
   PRINT *,'-------------------------'
   END IF
   !
-- 
GitLab