From d8eddeee1f71581a116071c426c80450d4a7d226 Mon Sep 17 00:00:00 2001 From: Uwe Schulzweida <uwe.schulzweida@mpimet.mpg.de> Date: Fri, 17 Aug 2018 14:52:24 +0200 Subject: [PATCH] cgribexDefGrid: print warning message only once. --- src/stream_cgribex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stream_cgribex.c b/src/stream_cgribex.c index e38117ea9..fb58e158e 100644 --- a/src/stream_cgribex.c +++ b/src/stream_cgribex.c @@ -1833,8 +1833,11 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI } default: { + static bool lwarn = true; ISEC1_Sec2Or3Flag = 0; - Warning("CGRIBEX library doesn't support %s grids, grid information will be lost!", gridNamePtr(gridtype)); + if (lwarn) + Warning("CGRIBEX library doesn't support %s grids, grid information will be lost!", gridNamePtr(gridtype)); + lwarn = false; break; } } -- GitLab