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

Philippe 25/04/2017: bug correction: allocate xxx_MAX arrays if LMEAN_FIELD +...

Philippe 25/04/2017: bug correction: allocate xxx_MAX arrays if LMEAN_FIELD + initialize them to lowest possible value

(cherry picked from commit 2528125a)
parent 2e5cf480
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,9 @@ END MODULE MODI_INI_MEAN_FIELD ...@@ -47,7 +47,9 @@ END MODULE MODI_INI_MEAN_FIELD
!! MODIFICATIONS !! MODIFICATIONS
!! ------------- !! -------------
!! Original 11/12/09 !! Original 11/12/09
!! 10/2016 (C.Lac) Add max values !! Modifications 10/2016 (C.Lac) Add max values
!! 04/2017 (P. Wautelet) Initialize MAX variables to lowest possible value
!!
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
!* 0. DECLARATIONS !* 0. DECLARATIONS
...@@ -60,6 +62,10 @@ USE MODD_PARAM_n ...@@ -60,6 +62,10 @@ USE MODD_PARAM_n
IMPLICIT NONE IMPLICIT NONE
! !
REAL :: ZMIN !Largest real negative value
!
ZMIN = -HUGE(ZMIN)
!
MEAN_COUNT = 0 MEAN_COUNT = 0
XUM_MEAN = 0.0 XUM_MEAN = 0.0
...@@ -77,12 +83,12 @@ XTH2_MEAN = 0.0 ...@@ -77,12 +83,12 @@ XTH2_MEAN = 0.0
XTEMP2_MEAN = 0.0 XTEMP2_MEAN = 0.0
XPABS2_MEAN = 0.0 XPABS2_MEAN = 0.0
XUM_MAX = 0.0 XUM_MAX = ZMIN
XVM_MAX = 0.0 XVM_MAX = ZMIN
XWM_MAX = 0.0 XWM_MAX = ZMIN
XTHM_MAX = 0.0 XTHM_MAX = ZMIN
XTEMPM_MAX = 0.0 XTEMPM_MAX = ZMIN
IF (CTURB /= 'NONE') XTKEM_MAX = 0.0 IF (CTURB /= 'NONE') XTKEM_MAX = ZMIN
XPABSM_MAX = 0.0 XPABSM_MAX = ZMIN
END SUBROUTINE INI_MEAN_FIELD END SUBROUTINE INI_MEAN_FIELD
...@@ -270,7 +270,8 @@ END MODULE MODI_INI_MODEL_n ...@@ -270,7 +270,8 @@ END MODULE MODI_INI_MODEL_n
!! M.Leriche 2016 Chemistry !! M.Leriche 2016 Chemistry
!! 10/2016 M.Mazoyer New KHKO output fields !! 10/2016 M.Mazoyer New KHKO output fields
!! 10/2016 (C.Lac) Add max values !! 10/2016 (C.Lac) Add max values
!! F. Brosse Oct. 2016 add prod/loss terms computation for chemistry !! F. Brosse Oct. 2016 add prod/loss terms computation for chemistry
!! Apr. 2017 (P. Wautelet) allocate MAX variables if LMEAN_FIELD and call INI_MEAN_FIELD
!--------------------------------------------------------------------------------- !---------------------------------------------------------------------------------
! !
!* 0. DECLARATIONS !* 0. DECLARATIONS
...@@ -684,23 +685,30 @@ IF (LMEAN_FIELD) THEN ...@@ -684,23 +685,30 @@ IF (LMEAN_FIELD) THEN
! !
MEAN_COUNT = 0 MEAN_COUNT = 0
! !
ALLOCATE(XUM_MEAN(IIU,IJU,IKU)) ; XUM_MEAN = 0.0 ALLOCATE(XUM_MEAN(IIU,IJU,IKU))
ALLOCATE(XVM_MEAN(IIU,IJU,IKU)) ; XVM_MEAN = 0.0 ALLOCATE(XVM_MEAN(IIU,IJU,IKU))
ALLOCATE(XWM_MEAN(IIU,IJU,IKU)) ; XWM_MEAN = 0.0 ALLOCATE(XWM_MEAN(IIU,IJU,IKU))
ALLOCATE(XTHM_MEAN(IIU,IJU,IKU)) ; XTHM_MEAN = 0.0 ALLOCATE(XTHM_MEAN(IIU,IJU,IKU))
ALLOCATE(XTEMPM_MEAN(IIU,IJU,IKU)) ; XTEMPM_MEAN = 0.0 ALLOCATE(XTEMPM_MEAN(IIU,IJU,IKU))
IF (CTURB/='NONE') THEN IF (CTURB/='NONE') ALLOCATE(XTKEM_MEAN(IIU,IJU,IKU))
ALLOCATE(XTKEM_MEAN(IIU,IJU,IKU)) ALLOCATE(XPABSM_MEAN(IIU,IJU,IKU))
XTKEM_MEAN = 0.0 !
END IF ALLOCATE(XU2_MEAN(IIU,IJU,IKU))
ALLOCATE(XPABSM_MEAN(IIU,IJU,IKU)) ; XPABSM_MEAN = 0.0 ALLOCATE(XV2_MEAN(IIU,IJU,IKU))
! ALLOCATE(XW2_MEAN(IIU,IJU,IKU))
ALLOCATE(XU2_MEAN(IIU,IJU,IKU)) ; XU2_MEAN = 0.0 ALLOCATE(XTH2_MEAN(IIU,IJU,IKU))
ALLOCATE(XV2_MEAN(IIU,IJU,IKU)) ; XV2_MEAN = 0.0 ALLOCATE(XTEMP2_MEAN(IIU,IJU,IKU))
ALLOCATE(XW2_MEAN(IIU,IJU,IKU)) ; XW2_MEAN = 0.0 ALLOCATE(XPABS2_MEAN(IIU,IJU,IKU))
ALLOCATE(XTH2_MEAN(IIU,IJU,IKU)) ; XTH2_MEAN = 0.0 !
ALLOCATE(XTEMP2_MEAN(IIU,IJU,IKU)) ; XTEMP2_MEAN = 0.0 ALLOCATE(XUM_MAX(IIU,IJU,IKU))
ALLOCATE(XPABS2_MEAN(IIU,IJU,IKU)) ; XPABS2_MEAN = 0.0 ALLOCATE(XVM_MAX(IIU,IJU,IKU))
ALLOCATE(XWM_MAX(IIU,IJU,IKU))
ALLOCATE(XTHM_MAX(IIU,IJU,IKU))
ALLOCATE(XTEMPM_MAX(IIU,IJU,IKU))
IF (CTURB/='NONE') ALLOCATE(XTKEM_MAX(IIU,IJU,IKU))
ALLOCATE(XPABSM_MAX(IIU,IJU,IKU))
!
CALL INI_MEAN_FIELD()
! !
END IF END IF
! !
......
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