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

Philippe 05/04/2018: deallocate_model1: do not deallocate XXHAT, XYHAT and XZHAT

because they are often needed later (and they do not consume a lot of memory)
parent 9c8a5164
No related branches found
No related tags found
No related merge requests found
......@@ -219,14 +219,16 @@ IF ( ASSOCIATED(XLON) .AND. KCALL == 3 ) THEN
END IF
!
IF ( KCALL == 3 ) THEN
DEALLOCATE(XXHAT)
!Philippe W.: do not deallocate XXHAT, XYHAT and XZHAT because they are needed later on
!As they are 1D, their memory footprint is negligible
! DEALLOCATE(XXHAT)
DEALLOCATE(XDXHAT)
DEALLOCATE(XYHAT)
! DEALLOCATE(XYHAT)
DEALLOCATE(XDYHAT)
DEALLOCATE(XZS)
DEALLOCATE(XZSMT)
DEALLOCATE(XZZ)
DEALLOCATE(XZHAT)
! DEALLOCATE(XZHAT)
END IF
!
IF ( KCALL == 2 ) THEN
......
......@@ -163,9 +163,6 @@ REAL, DIMENSION(:,:), ALLOCATABLE :: ZINPRG_LS
REAL, DIMENSION(:,:), ALLOCATABLE :: ZACPRG_LS
REAL, DIMENSION(:,:), ALLOCATABLE :: ZINPRH_LS
REAL, DIMENSION(:,:), ALLOCATABLE :: ZACPRH_LS
REAL, DIMENSION(:), ALLOCATABLE :: ZXHAT
REAL, DIMENSION(:), ALLOCATABLE :: ZYHAT
REAL, DIMENSION(:), ALLOCATABLE :: ZZHAT
INTEGER :: IMI
!
!20131105 add vars related to ADD3DFIELD and UPDATE_HALO
......@@ -290,18 +287,6 @@ END IF
!
!-------------------------------------------------------------------------------
!
!* 4. SAVE FIELDS STORED IN MODEL1 MODULE already INITIALIZED in PREP_REAL_CASE
! -------------------------------------------------------------------------
!
ALLOCATE(ZXHAT(SIZE(XXHAT)))
ALLOCATE(ZYHAT(SIZE(XYHAT)))
ALLOCATE(ZZHAT(SIZE(XZHAT)))
ZXHAT(:) = XXHAT(:)
ZYHAT(:) = XYHAT(:)
ZZHAT(:) = XZHAT(:)
!
!-------------------------------------------------------------------------------
!
!* 5. DEALLOCATIONS OF FIELDS OF MODEL1
! ---------------------------------
!
......@@ -317,16 +302,6 @@ DEALLOCATE(XTHVREFZ)
!* 6. RECOVERS FIELDS STORED IN MODEL1 MODULE already INITIALIZED in PREP_REAL_CASE
! -----------------------------------------------------------------------------
!
ALLOCATE(XXHAT(SIZE(ZXHAT)))
ALLOCATE(XYHAT(SIZE(ZYHAT)))
ALLOCATE(XZHAT(SIZE(ZZHAT)))
XXHAT(:) = ZXHAT(:)
XYHAT(:) = ZYHAT(:)
XZHAT(:) = ZZHAT(:)
DEALLOCATE(ZXHAT)
DEALLOCATE(ZYHAT)
DEALLOCATE(ZZHAT)
!
IF (ALLOCATED(ZINPRC_LS)) THEN
ALLOCATE(XINPRC(IIU,IJU))
ALLOCATE(XACPRC(IIU,IJU))
......
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