diff --git a/src/SURFEX/get_type_dimn.F90 b/src/SURFEX/get_type_dimn.F90
index b3b98462276242e11e3e7f37dc6cbc980aea6adc..05c60f73b86f8f402d50e74c1027f4e0a674dadf 100644
--- a/src/SURFEX/get_type_dimn.F90
+++ b/src/SURFEX/get_type_dimn.F90
@@ -1,6 +1,6 @@
-!SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
+!SFX_LIC Copyright 2004-2019 CNRS, Meteo-France and Universite Paul Sabatier
 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
-!SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt  
+!SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
 !SFX_LIC for details. version 1.
 !     #####################################
       SUBROUTINE GET_TYPE_DIM_n (DTCO, U, &
@@ -26,6 +26,7 @@
 !!    MODIFICATIONS
 !!    -------------
 !!      Original    01/2004
+!  P. Wautelet 15/02/2019: move computation of ZLAND (to prevent use of non initialized values)
 !-------------------------------------------------------------------------------
 !
 !*       0.    DECLARATIONS
@@ -99,7 +100,6 @@ ELSE
   ZWATER  = U%XWATER
   ZTOWN   = U%XTOWN
 END IF
-ZLAND = ZTOWN + ZNATURE
 !
 ALLOCATE(ZFULL(ILU))
 ZFULL=1.
@@ -124,6 +124,7 @@ SELECT CASE (HTYPE)
    KDIM = COUNT(ZWATER(:) > 0.)
    !
   CASE ('LAND  ')
+   ZLAND = ZTOWN + ZNATURE
    KDIM = COUNT(ZLAND(:) > 0.)
    !
 END SELECT