From 20de6ec5eb58924304d35f5afec8001b4a1340ad Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Thu, 12 Nov 2020 09:33:45 +0100
Subject: [PATCH] Philippe 12/11/2020: IO: bugfix: return dummy argument was
 not set in IO_Dim_find_byname_nc4

---
 LIBTOOLS/tools/lfi2cdf/src/mode_util.f90    | 2 +-
 src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90 | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/LIBTOOLS/tools/lfi2cdf/src/mode_util.f90 b/LIBTOOLS/tools/lfi2cdf/src/mode_util.f90
index fd7bf5097..4337a8d8f 100644
--- a/LIBTOOLS/tools/lfi2cdf/src/mode_util.f90
+++ b/LIBTOOLS/tools/lfi2cdf/src/mode_util.f90
@@ -1629,7 +1629,7 @@ END DO
       END IF
       IF (TRIM(TPREC%TDIMS(JJ)%cname)/='time' .AND. &
         TPREC%TDIMS(JJ)%nlen /= TPREC%NDIMSIZES_FILE(JJ)) THEN
-        CALL PRINT_MSG(NVERB_WARNING,'IO','IO_FILL_DIMS_NC4','problem with dimensions for '//TPREC%TFIELD%CMNHNAME)
+        CALL PRINT_MSG(NVERB_WARNING,'IO','IO_Dims_fill_nc4','problem with dimensions for '//TPREC%TFIELD%CMNHNAME)
         KRESP = -3
         EXIT
       END IF
diff --git a/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90 b/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90
index ecd39b6fd..29317bc5e 100644
--- a/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90
+++ b/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90
@@ -44,7 +44,6 @@ character(len=*), intent(in)  :: hdimname
 type(tdimnc),     intent(out) :: tpdim
 integer,          intent(out) :: kresp
 
-integer :: idx
 integer :: ji
 
 call Print_msg( NVERB_DEBUG, 'IO', 'IO_Dim_find_byname_nc4', 'called for dimension name ' // Trim( hdimname ) )
@@ -63,10 +62,9 @@ if ( .not.Allocated( tpfile%tncdims%tdims ) ) then
   return
 end if
 
-idx = -1
 do ji = 1, tpfile%tncdims%nmaxdims
   if ( Trim( hdimname ) == Trim( tpfile%tncdims%tdims(ji)%cname ) ) then
-    idx = ji
+    tpdim = tpfile%tncdims%tdims(ji)
     kresp = 0
     exit
   end if
-- 
GitLab