Skip to content
Snippets Groups Projects
Commit fdf1414d authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 04/10/2023: PHYEX / LES budgets: bugfix (incorrect dimension NKLES)

parent e71554b5
No related branches found
No related tags found
No related merge requests found
!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
......
!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)
......
!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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment