diff --git a/src/MNH/phys_paramn.f90 b/src/MNH/phys_paramn.f90
index 0ce34cddc81e78a31bc6f9d5ab6e2dcd7281a365..47484516199cdc71c66396817bfebfd07ba0c38a 100644
--- a/src/MNH/phys_paramn.f90
+++ b/src/MNH/phys_paramn.f90
@@ -1,4 +1,4 @@
-!MNH_LIC Copyright 1995-2022 CNRS, Meteo-France and Universite Paul Sabatier
+!MNH_LIC Copyright 1995-2023 CNRS, Meteo-France and Universite Paul Sabatier
 !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
 !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
 !MNH_LIC for details. version 1.
@@ -493,7 +493,7 @@ IKB = 1 + JPVEXT
 IKE = IKU - JPVEXT
 !
 CALL GET_INDICE_ll (IIB,IJB,IIE,IJE)
-CALL FILL_DIMPHYEX(YLDIMPHYEX, SIZE(XTHT,1), SIZE(XTHT,2), SIZE(XTHT,3),.TRUE.,NLES_TIMES)
+CALL FILL_DIMPHYEX( YLDIMPHYEX, SIZE(XTHT,1), SIZE(XTHT,2), SIZE(XTHT,3), LTURB=.TRUE., KLES_TIMES=NLES_TIMES, KLES_K=NLES_K )
 !
 ZTIME1 = 0.0_MNHTIME
 ZTIME2 = 0.0_MNHTIME
diff --git a/src/PHYEX/aux/modd_dimphyexn.f90 b/src/PHYEX/aux/modd_dimphyexn.f90
index cac698c823aa8e03727ee9d744341830f5e9ef9a..f9b5cf5f0a39d20e5345ececc6006b5dc983e5b0 100644
--- a/src/PHYEX/aux/modd_dimphyexn.f90
+++ b/src/PHYEX/aux/modd_dimphyexn.f90
@@ -1,4 +1,4 @@
-!MNH_LIC Copyright 1995-2021 CNRS, Meteo-France and Universite Paul Sabatier
+!MNH_LIC Copyright 2022-2023 CNRS, Meteo-France and Universite Paul Sabatier
 !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
 !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
 !MNH_LIC for details. version 1.
@@ -53,7 +53,7 @@ TYPE DIMPHYEX_t
                   !  1: as for Méso-NH, levels are numbered from ground to space
                   ! -1: as for AROME, levels are numbered from space to ground
   INTEGER :: NKT  ! Array total dimension
-  INTEGER :: NKLES ! Total physical k dimension (for LES diag)
+  INTEGER :: NKLES ! Number of vertical levels for LES diagnostics
   INTEGER :: NKA  ! Near ground array index (is an unphysical level if JPVEXT!=0)
   INTEGER :: NKU  ! Uppest atmosphere array index (is an unphysical level if JPVEXT!=0)
   INTEGER :: NKB  ! Near ground physical array index (e.g. equal to 1+JPVEXT if NKL==1)
diff --git a/src/PHYEX/aux/mode_fill_dimphyexn.f90 b/src/PHYEX/aux/mode_fill_dimphyexn.f90
index 5f965be18b7d6a788d424ab047032aded219485c..469ae60851a7750d02d1e5c37a652c0502c7901f 100644
--- a/src/PHYEX/aux/mode_fill_dimphyexn.f90
+++ b/src/PHYEX/aux/mode_fill_dimphyexn.f90
@@ -1,4 +1,4 @@
-!MNH_LIC Copyright 1995-2021 CNRS, Meteo-France and Universite Paul Sabatier
+!MNH_LIC Copyright 2022-2023 CNRS, Meteo-France and Universite Paul Sabatier
 !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
 !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
 !MNH_LIC for details. version 1.
@@ -6,7 +6,7 @@
 MODULE MODE_FILL_DIMPHYEX
 IMPLICIT NONE
 CONTAINS
-SUBROUTINE FILL_DIMPHYEX(YDDIMPHYEX, KIT, KJT, KKT, LTURB,KLES_TIMES)
+SUBROUTINE FILL_DIMPHYEX( YDDIMPHYEX, KIT, KJT, KKT, LTURB, KLES_TIMES, KLES_K )
 !     #########################
 !
 !!
@@ -29,6 +29,7 @@ SUBROUTINE FILL_DIMPHYEX(YDDIMPHYEX, KIT, KJT, KKT, LTURB,KLES_TIMES)
 !!    MODIFICATIONS
 !!    -------------
 !!      Original    January 2022
+!  P. Wautelet 04/10/2023: bugfix: set NKLES correctly
 !
 !-----------------------------------------------------------------
 !*       0.   DECLARATIONS
@@ -48,9 +49,11 @@ IMPLICIT NONE
 !
 TYPE(DIMPHYEX_t), INTENT(OUT) :: YDDIMPHYEX ! Structure to fill in
 INTEGER, INTENT(IN) :: KIT, KJT, KKT ! Array dimensions
-INTEGER, INTENT(IN), OPTIONAL :: KLES_TIMES  ! Number of LES data storage frequency
 LOGICAL, INTENT(IN), OPTIONAL :: LTURB ! Flag to replace array dimensions I/JB and I/JE to the full array size
                                        ! needed if computation in HALO points (e.g. in turbulence)
+INTEGER, INTENT(IN), OPTIONAL :: KLES_TIMES  ! number of LES computations in time
+INTEGER, INTENT(IN), OPTIONAL :: KLES_K      ! number of vertical levels for LES diagnostics
+
 LOGICAL :: YTURB
 !
 !*       0.2  declaration of local variables
@@ -75,7 +78,6 @@ YDDIMPHYEX%NKA=1
 YDDIMPHYEX%NKU=KKT
 YDDIMPHYEX%NKB=1+JPVEXT
 YDDIMPHYEX%NKE=KKT-JPVEXT
-YDDIMPHYEX%NKLES=KKT-2*JPVEXT
 YDDIMPHYEX%NKTB=1+JPVEXT
 YDDIMPHYEX%NKTE=KKT-JPVEXT
 !
@@ -103,6 +105,10 @@ YDDIMPHYEX%NLES_TIMES=0
 IF (PRESENT(KLES_TIMES)) THEN
   YDDIMPHYEX%NLES_TIMES = KLES_TIMES
 END IF
+YDDIMPHYEX%NKLES=0
+IF (PRESENT(KLES_K)) THEN
+  YDDIMPHYEX%NKLES = KLES_K
+END IF
 IF (LLES_MY_MASK) YDDIMPHYEX%NLESMASK = YDDIMPHYEX%NLESMASK + NLES_MASKS_USER
 IF (LLES_NEB_MASK) YDDIMPHYEX%NLESMASK = YDDIMPHYEX%NLESMASK + 2
 IF (LLES_CORE_MASK) YDDIMPHYEX%NLESMASK = YDDIMPHYEX%NLESMASK + 2