From 0ae538e2bc8c6274fbf849985e67845777349505 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Riette?= <sebastien.riette@meteo.fr>
Date: Wed, 1 Dec 2021 10:40:21 +0100
Subject: [PATCH] =?UTF-8?q?S=C3=A9bastien=2001/12/2021=20cleaning=20unused?=
 =?UTF-8?q?=20code?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/arome/dummy/mask_compress.F90      |   2 -
 src/arome/gmkpack_ignored_files        |   5 +
 src/arome/micro/cart_compress.F90      | 146 ---------------------
 src/arome/micro/modi_add_bounds.F90    |   5 -
 src/arome/micro/modi_cart_compress.F90 |  18 ---
 src/arome/micro/modi_mask_compress.F90 |  18 ---
 src/mesonh/micro/cart_compress.f90     | 170 -------------------------
 7 files changed, 5 insertions(+), 359 deletions(-)
 delete mode 100644 src/arome/dummy/mask_compress.F90
 delete mode 100644 src/arome/micro/cart_compress.F90
 delete mode 100644 src/arome/micro/modi_add_bounds.F90
 delete mode 100644 src/arome/micro/modi_cart_compress.F90
 delete mode 100644 src/arome/micro/modi_mask_compress.F90
 delete mode 100644 src/mesonh/micro/cart_compress.f90

diff --git a/src/arome/dummy/mask_compress.F90 b/src/arome/dummy/mask_compress.F90
deleted file mode 100644
index 8c2c1d008..000000000
--- a/src/arome/dummy/mask_compress.F90
+++ /dev/null
@@ -1,2 +0,0 @@
-SUBROUTINE MASK_COMPRESS
-END SUBROUTINE MASK_COMPRESS
diff --git a/src/arome/gmkpack_ignored_files b/src/arome/gmkpack_ignored_files
index 3d2cd872c..6abe5cdf8 100644
--- a/src/arome/gmkpack_ignored_files
+++ b/src/arome/gmkpack_ignored_files
@@ -76,3 +76,8 @@ phyex/micro/modi_rzcolx.F90
 phyex/micro/rrcolss.F90
 phyex/micro/rscolrg.F90
 phyex/micro/rzcolx.F90
+mpa/dummy/mask_compress.F90
+phyex/micro/cart_compress.F90
+phyex/micro/modi_add_bounds.F90
+phyex/micro/modi_cart_compress.F90
+phyex/micro/modi_mask_compress.F90
diff --git a/src/arome/micro/cart_compress.F90 b/src/arome/micro/cart_compress.F90
deleted file mode 100644
index 503e428ee..000000000
--- a/src/arome/micro/cart_compress.F90
+++ /dev/null
@@ -1,146 +0,0 @@
-!     ######spl
-      FUNCTION CART_COMPRESS(PVARS) RESULT(PCOMPRESS)
-      USE PARKIND1, ONLY : JPRB
-      USE YOMHOOK , ONLY : LHOOK, DR_HOOK
-!     ###############################################
-!
-!!****  *CART_COMPRESS* - function to compress the Source in CART case.
-!!
-!!
-!!    PURPOSE
-!!    -------
-!       This function compresses or not the Source XVARS of the VARiable
-!     VAR whose budget is analysed. This compression is controlled by 3
-!     logical switches for the budget in I,J and K directions (LBU_ICP,
-!     LBU_JCP, LBU_KCP), in the budget box described by the lowest and
-!     highest values of the I,J and K indices.
-!
-!!**  METHOD
-!!    ------
-!!      The source PVARS is first transfered in a local array whose
-!!    dimensions correspond to the budget box. Then compressions
-!!    are or aren't achieved depending on the logical switches.
-!!
-!!    EXTERNAL
-!!    --------
-!!       NONE
-!!
-!!    IMPLICIT ARGUMENTS
-!!    ------------------
-!!       Module MODD_BUDGET
-!!           LBU_ICP   : switch for compression in I direction
-!!           LBU_JCP   : switch for compression in J direction
-!!           LBU_KCP   : switch for compression in K direction
-!!           NBUIL     : lowest I indice value of the budget box
-!!           NBUJL     : lowest J indice value of the budget box
-!!           NBUKL     : lowest K indice value of the budget box
-!!           NBUIH     : highest I indice value of the budget box
-!!           NBUJH     : highest J indice value of the budget box
-!!           NBUKH     : highest K indice value of the budget box
-!!           NBUIMAX   : dimension along I of the budget tabular
-!!           NBUJMAX   : dimension along J of the budget tabular
-!!           NBUKMAX   : dimension along K of the budget tabular
-!!
-!!
-!!
-!!    REFERENCE
-!!    ---------
-!!      Book2 of MESO-NH documentation (function CART_COMPRESS)
-!!
-!!
-!!    AUTHOR
-!!    ------
-!!      J. Nicolau       * Meteo France *
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Original             27/02/95
-!!      JP Pinty & J Escobar 12/10/98 Enable vectorization and remove
-!!                                     SUM functions
-!!      V. Ducrocq           4/06/99  //
-!!
-!-------------------------------------------------------------------------------
-!
-!*       0.    DECLARATIONS
-!              ------------
-!
-USE MODD_BUDGET
-!
-!
-IMPLICIT NONE
-!
-!
-!*       0.1   Declarations of arguments and result :
-!
-REAL, DIMENSION(:,:,:), INTENT(IN)       :: PVARS     ! Source
-REAL, DIMENSION(NBUIMAX,NBUJMAX,NBUKMAX) :: PCOMPRESS ! result
-!
-!*       0.2   Declarations of local variables :
-!
-!
-REAL, DIMENSION (NBUSIH-NBUSIL+1,NBUSJH-NBUSJL+1,NBUKH-NBUKL+1) :: ZVARS ! 3D Work
-                                                                     ! array
-REAL, DIMENSION (NBUSIH-NBUSIL+1,NBUKH-NBUKL+1) :: ZWORKIK ! 2D Work array
-REAL, DIMENSION (NBUSJH-NBUSJL+1,NBUKH-NBUKL+1) :: ZWORKJK ! 2D Work array
-REAL, DIMENSION (NBUSIH-NBUSIL+1,NBUSJH-NBUSJL+1) :: ZWORKIJ ! 2D Work array
-!
-INTEGER                                          :: JJ,JK   ! loop indexes
-!
-!
-!-------------------------------------------------------------------------------
-!
-!*       1.     SOURCE TRANSFERT IN A LOCAL ARRAY
-!               ---------------------------------
-REAL(KIND=JPRB) :: ZHOOK_HANDLE
-!JUAN
-IF (SIZE (PCOMPRESS) .EQ. 0 ) RETURN
-!JUAN
-!
-IF (LHOOK) CALL DR_HOOK('CART_COMPRESS',0,ZHOOK_HANDLE)
-ZVARS(1:NBUSIH-NBUSIL+1,1:NBUSJH-NBUSJL+1,1:NBUKH-NBUKL+1) = &
-            PVARS(NBUSIL:NBUSIH,NBUSJL:NBUSJH,NBUKL:NBUKH)
-!
-!-------------------------------------------------------------------------------
-!
-!*       2.     COMPRESSIONS IN I,J AND K DIRECTIONS
-!               ------------------------------------
-!
-!
-IF (LBU_ICP.AND.LBU_JCP.AND.LBU_KCP) THEN
-  PCOMPRESS(1,1,1)=SUM(ZVARS)
-!
-ELSE IF (LBU_ICP.AND.LBU_JCP.AND..NOT.LBU_KCP) THEN
-  ZWORKJK(:,:)    =SUM(ZVARS,1)
-  PCOMPRESS(1,1,:)=SUM(ZWORKJK,1)
-!
-ELSE IF (LBU_ICP.AND..NOT.LBU_JCP.AND.LBU_KCP) THEN
-  ZWORKIJ(:,:)=0.0
-  DO JK = 1,NBUKH-NBUKL+1
-    ZWORKIJ(:,:) = ZWORKIJ(:,:) + ZVARS(:,:,JK)
-  END DO
-  PCOMPRESS(1,:,1)=SUM(ZWORKIJ,1)
-!
-ELSE IF (.NOT.LBU_ICP.AND.LBU_JCP.AND.LBU_KCP) THEN
-  ZWORKIK(:,:)=0.0
-  DO JJ = 1,NBUSJH-NBUSJL+1
-    ZWORKIK(:,:) = ZWORKIK(:,:) + ZVARS(:,JJ,:)
-  END DO
-  PCOMPRESS(:,1,1)=SUM(ZWORKIK,2)
-!
-ELSE IF (LBU_ICP.AND..NOT.LBU_JCP.AND..NOT.LBU_KCP) THEN
-  PCOMPRESS(1,:,:)=SUM(ZVARS,1)
-!
-ELSE IF (.NOT.LBU_ICP.AND.LBU_JCP.AND..NOT.LBU_KCP) THEN
-  PCOMPRESS(:,1,:)=SUM(ZVARS,2)
-!
-ELSE IF (.NOT.LBU_ICP.AND..NOT.LBU_JCP.AND.LBU_KCP) THEN
-  PCOMPRESS(:,:,1)=SUM(ZVARS,3)
-!
-ELSE
-  PCOMPRESS=ZVARS
-!
-END IF
-!
-!
-IF (LHOOK) CALL DR_HOOK('CART_COMPRESS',1,ZHOOK_HANDLE)
-END FUNCTION CART_COMPRESS
diff --git a/src/arome/micro/modi_add_bounds.F90 b/src/arome/micro/modi_add_bounds.F90
deleted file mode 100644
index ecaa10489..000000000
--- a/src/arome/micro/modi_add_bounds.F90
+++ /dev/null
@@ -1,5 +0,0 @@
-      MODULE MODI_ADD_BOUNDS
-              ! dead code
-END MODULE MODI_ADD_BOUNDS
-
-
diff --git a/src/arome/micro/modi_cart_compress.F90 b/src/arome/micro/modi_cart_compress.F90
deleted file mode 100644
index 92298b66f..000000000
--- a/src/arome/micro/modi_cart_compress.F90
+++ /dev/null
@@ -1,18 +0,0 @@
-!     ######spl
- MODULE MODI_CART_COMPRESS
-!#########################
-!
-INTERFACE
-!
-FUNCTION CART_COMPRESS(PVARS) RESULT(PCOMPRESS)
-!
-USE MODD_BUDGET
-!
-REAL, DIMENSION(:,:,:), INTENT(IN)       :: PVARS     ! Source
-REAL, DIMENSION(NBUIMAX,NBUJMAX,NBUKMAX) :: PCOMPRESS ! result
-!
-END FUNCTION CART_COMPRESS
-!
-END INTERFACE
-!
-END MODULE MODI_CART_COMPRESS
diff --git a/src/arome/micro/modi_mask_compress.F90 b/src/arome/micro/modi_mask_compress.F90
deleted file mode 100644
index c0c921e70..000000000
--- a/src/arome/micro/modi_mask_compress.F90
+++ /dev/null
@@ -1,18 +0,0 @@
-!     ######spl
- MODULE MODI_MASK_COMPRESS
-!#########################
-!
-INTERFACE
-!
-FUNCTION MASK_COMPRESS(PVARS) RESULT(PCOMPRESS)
-!
-USE MODD_BUDGET
-!
-REAL, DIMENSION(:,:,:), INTENT(IN) :: PVARS     ! Source 
-REAL, DIMENSION(NBUKMAX,NBUMASK)   :: PCOMPRESS ! result
-!
-END FUNCTION MASK_COMPRESS
-!
-END INTERFACE
-!
-END MODULE MODI_MASK_COMPRESS
diff --git a/src/mesonh/micro/cart_compress.f90 b/src/mesonh/micro/cart_compress.f90
deleted file mode 100644
index d1e922e9b..000000000
--- a/src/mesonh/micro/cart_compress.f90
+++ /dev/null
@@ -1,170 +0,0 @@
-!MNH_LIC Copyright 1994-2014 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.
-!-----------------------------------------------------------------
-!--------------- special set of characters for RCS information
-!-----------------------------------------------------------------
-! $Source$ $Revision$
-! masdev4_7 BUG2 2007/06/29 16:52:14
-!-----------------------------------------------------------------
-!#########################
- MODULE MODI_CART_COMPRESS
-!#########################
-!
-INTERFACE
-!
-FUNCTION CART_COMPRESS(PVARS) RESULT(PCOMPRESS)
-!
-USE MODD_BUDGET
-!
-REAL, DIMENSION(:,:,:), INTENT(IN)       :: PVARS     ! Source
-REAL, DIMENSION(NBUIMAX,NBUJMAX,NBUKMAX) :: PCOMPRESS ! result
-!
-END FUNCTION CART_COMPRESS
-!
-END INTERFACE
-!
-END MODULE MODI_CART_COMPRESS
-!     ###############################################
-      FUNCTION CART_COMPRESS(PVARS) RESULT(PCOMPRESS) 
-!     ###############################################
-!
-!!****  *CART_COMPRESS* - function to compress the Source in CART case. 
-!!                           
-!!
-!!    PURPOSE
-!!    -------
-!       This function compresses or not the Source XVARS of the VARiable
-!     VAR whose budget is analysed. This compression is controlled by 3 
-!     logical switches for the budget in I,J and K directions (LBU_ICP,
-!     LBU_JCP, LBU_KCP), in the budget box described by the lowest and
-!     highest values of the I,J and K indices.  
-!
-!!**  METHOD
-!!    ------
-!!      The source PVARS is first transfered in a local array whose 
-!!    dimensions correspond to the budget box. Then compressions
-!!    are or aren't achieved depending on the logical switches.
-!!
-!!    EXTERNAL
-!!    --------
-!!       NONE
-!!
-!!    IMPLICIT ARGUMENTS
-!!    ------------------
-!!       Module MODD_BUDGET
-!!           LBU_ICP   : switch for compression in I direction
-!!           LBU_JCP   : switch for compression in J direction
-!!           LBU_KCP   : switch for compression in K direction
-!!           NBUIL     : lowest I indice value of the budget box
-!!           NBUJL     : lowest J indice value of the budget box
-!!           NBUKL     : lowest K indice value of the budget box
-!!           NBUIH     : highest I indice value of the budget box
-!!           NBUJH     : highest J indice value of the budget box
-!!           NBUKH     : highest K indice value of the budget box
-!!           NBUIMAX   : dimension along I of the budget tabular
-!!           NBUJMAX   : dimension along J of the budget tabular
-!!           NBUKMAX   : dimension along K of the budget tabular
-!!          
-!!
-!!
-!!    REFERENCE
-!!    ---------
-!!      Book2 of MESO-NH documentation (function CART_COMPRESS)
-!!
-!!
-!!    AUTHOR
-!!    ------
-!!	J. Nicolau       * Meteo France *
-!!
-!!    MODIFICATIONS
-!!    -------------
-!!      Original             27/02/95
-!!      JP Pinty & J Escobar 12/10/98 Enable vectorization and remove 
-!!                                     SUM functions
-!!      V. Ducrocq           4/06/99  //
-!!
-!-------------------------------------------------------------------------------
-!
-!*       0.    DECLARATIONS
-!              ------------
-!
-USE MODD_BUDGET
-USE MODD_PARAMETERS , ONLY : JPVEXT
-!
-!
-IMPLICIT NONE
-!  
-!  
-!*       0.1   Declarations of arguments and result :
-!
-REAL, DIMENSION(:,:,:), INTENT(IN)       :: PVARS     ! Source 
-REAL, DIMENSION(NBUIMAX,NBUJMAX,NBUKMAX) :: PCOMPRESS ! result
-!
-!*       0.2   Declarations of local variables :
-! 
-! 
-REAL, DIMENSION (NBUSIH-NBUSIL+1,NBUSJH-NBUSJL+1,NBUKH-NBUKL+1) :: ZVARS ! 3D Work 
-                                                                     ! array
-REAL, DIMENSION (NBUSIH-NBUSIL+1,NBUKH-NBUKL+1) :: ZWORKIK ! 2D Work array
-REAL, DIMENSION (NBUSJH-NBUSJL+1,NBUKH-NBUKL+1) :: ZWORKJK ! 2D Work array
-REAL, DIMENSION (NBUSIH-NBUSIL+1,NBUSJH-NBUSJL+1) :: ZWORKIJ ! 2D Work array
-! 
-INTEGER                                          :: JJ,JK   ! loop indexes 
-! 
-!
-!-------------------------------------------------------------------------------
-!
-!*	 1.     SOURCE TRANSFERT IN A LOCAL ARRAY 
-!	        ---------------------------------
-!JUAN
-IF (SIZE (PCOMPRESS) .EQ. 0 ) RETURN
-!JUAN
-!
-ZVARS(1:NBUSIH-NBUSIL+1,1:NBUSJH-NBUSJL+1,1:NBUKH-NBUKL+1) = &
-            PVARS(NBUSIL:NBUSIH,NBUSJL:NBUSJH,NBUKL+JPVEXT:NBUKH+JPVEXT)
-!
-!-------------------------------------------------------------------------------
-!
-!*       2.     COMPRESSIONS IN I,J AND K DIRECTIONS
-!	        ------------------------------------
-!                                 
-!
-IF (LBU_ICP.AND.LBU_JCP.AND.LBU_KCP) THEN
-  PCOMPRESS(1,1,1)=SUM(ZVARS)
-!
-ELSE IF (LBU_ICP.AND.LBU_JCP.AND..NOT.LBU_KCP) THEN
-  ZWORKJK(:,:)    =SUM(ZVARS,1)
-  PCOMPRESS(1,1,:)=SUM(ZWORKJK,1)
-!
-ELSE IF (LBU_ICP.AND..NOT.LBU_JCP.AND.LBU_KCP) THEN
-  ZWORKIJ(:,:)=0.0
-  DO JK = 1,NBUKH-NBUKL+1
-    ZWORKIJ(:,:) = ZWORKIJ(:,:) + ZVARS(:,:,JK)
-  END DO
-  PCOMPRESS(1,:,1)=SUM(ZWORKIJ,1)
-!
-ELSE IF (.NOT.LBU_ICP.AND.LBU_JCP.AND.LBU_KCP) THEN
-  ZWORKIK(:,:)=0.0
-  DO JJ = 1,NBUSJH-NBUSJL+1
-    ZWORKIK(:,:) = ZWORKIK(:,:) + ZVARS(:,JJ,:)
-  END DO
-  PCOMPRESS(:,1,1)=SUM(ZWORKIK,2)
-!
-ELSE IF (LBU_ICP.AND..NOT.LBU_JCP.AND..NOT.LBU_KCP) THEN 
-  PCOMPRESS(1,:,:)=SUM(ZVARS,1)
-!
-ELSE IF (.NOT.LBU_ICP.AND.LBU_JCP.AND..NOT.LBU_KCP) THEN
-  PCOMPRESS(:,1,:)=SUM(ZVARS,2)
-!
-ELSE IF (.NOT.LBU_ICP.AND..NOT.LBU_JCP.AND.LBU_KCP) THEN
-  PCOMPRESS(:,:,1)=SUM(ZVARS,3)
-!
-ELSE  
-  PCOMPRESS=ZVARS
-!
-END IF
-!
-!
-END FUNCTION CART_COMPRESS                           
-- 
GitLab