From 06dbc97860fc966b20642180f97fa4bc7ab60a37 Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Tue, 24 Nov 2020 09:31:23 +0100
Subject: [PATCH] Philippe 24/11/2020: rename NMNHDIM_BUDGET_MASK_TIME ->
 NMNHDIM_BUDGET_TIME and time_mask -> time_budget

---
 src/LIB/SURCOUCHE/src/modd_field.f90        | 5 +++--
 src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90 | 8 ++++----
 src/MNH/write_budget.f90                    | 8 ++++----
 src/MNH/write_diachro.f90                   | 4 ++--
 4 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/LIB/SURCOUCHE/src/modd_field.f90 b/src/LIB/SURCOUCHE/src/modd_field.f90
index f2289401e..28558a41a 100644
--- a/src/LIB/SURCOUCHE/src/modd_field.f90
+++ b/src/LIB/SURCOUCHE/src/modd_field.f90
@@ -57,8 +57,9 @@ integer, parameter :: NMNHDIM_BUDGET_CART_LEVEL_W = 19
 
 integer, parameter :: NMNHDIM_BUDGET_MASK_LEVEL   = 20
 integer, parameter :: NMNHDIM_BUDGET_MASK_LEVEL_W = 21
-integer, parameter :: NMNHDIM_BUDGET_MASK_TIME    = 22
-integer, parameter :: NMNHDIM_BUDGET_MASK_NBUMASK = 23
+integer, parameter :: NMNHDIM_BUDGET_MASK_NBUMASK = 22
+
+integer, parameter :: NMNHDIM_BUDGET_TIME         = 23
 
 integer, parameter :: NMNHDIM_BUDGET_LES_TIME     = 24
 integer, parameter :: NMNHDIM_BUDGET_LES_AVG_TIME = 25
diff --git a/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90 b/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90
index 29317bc5e..44507857b 100644
--- a/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90
+++ b/src/LIB/SURCOUCHE/src/mode_io_tools_nc4.f90
@@ -253,8 +253,8 @@ use modd_field,         only: NMNHDIM_NI, NMNHDIM_NJ, NMNHDIM_NI_U, NMNHDIM_NJ_U
                               NMNHDIM_BUDGET_CART_NI, NMNHDIM_BUDGET_CART_NJ, NMNHDIM_BUDGET_CART_NI_U,         &
                               NMNHDIM_BUDGET_CART_NJ_U, NMNHDIM_BUDGET_CART_NI_V, NMNHDIM_BUDGET_CART_NJ_V,     &
                               NMNHDIM_BUDGET_CART_LEVEL, NMNHDIM_BUDGET_CART_LEVEL_W,                           &
-                              NMNHDIM_BUDGET_MASK_LEVEL, NMNHDIM_BUDGET_MASK_LEVEL_W, NMNHDIM_BUDGET_MASK_TIME, &
-                              NMNHDIM_BUDGET_MASK_NBUMASK,                                                      &
+                              NMNHDIM_BUDGET_MASK_LEVEL, NMNHDIM_BUDGET_MASK_LEVEL_W,                           &
+                              NMNHDIM_BUDGET_MASK_NBUMASK, NMNHDIM_BUDGET_TIME,                                 &
                               NMNHDIM_BUDGET_LES_TIME, NMNHDIM_BUDGET_LES_AVG_TIME, NMNHDIM_BUDGET_LES_LEVEL,   &
                               NMNHDIM_BUDGET_LES_SV,                                                            &
                               NMNHDIM_SPECTRA_2PTS_NI, NMNHDIM_SPECTRA_2PTS_NJ,                                 &
@@ -348,7 +348,7 @@ if ( tpfile%ctype == 'MNHDIACHRONIC' ) then
   else if ( cbutype == 'MASK' ) then
     if ( nbukmax > 0 ) call IO_Add_dim_nc4( tpfile, NMNHDIM_BUDGET_MASK_LEVEL,   'mask_level',   nbukmax )
     if ( nbukmax > 0 ) call IO_Add_dim_nc4( tpfile, NMNHDIM_BUDGET_MASK_LEVEL_W, 'mask_level_w', nbukmax )
-    if ( nbuwrnb > 0 ) call IO_Add_dim_nc4( tpfile, NMNHDIM_BUDGET_MASK_TIME,    'time_mask',    nbuwrnb )
+    if ( nbuwrnb > 0 ) call IO_Add_dim_nc4( tpfile, NMNHDIM_BUDGET_TIME,         'time_budget',  nbuwrnb )
     if ( nbumask > 0 ) call IO_Add_dim_nc4( tpfile, NMNHDIM_BUDGET_MASK_NBUMASK, 'nbumask',      nbumask )
   end if
 
@@ -476,7 +476,7 @@ use modd_field,  only: NMNHDIM_UNKNOWN, NMNHDIM_ONE, NMNHDIM_COMPLEX,
                        NMNHDIM_BUDGET_CART_NJ_U,    NMNHDIM_BUDGET_CART_NI_V, NMNHDIM_BUDGET_CART_NJ_V, &
                        NMNHDIM_BUDGET_CART_LEVEL,   NMNHDIM_BUDGET_CART_LEVEL_W,                        &
                        NMNHDIM_BUDGET_MASK_LEVEL,   NMNHDIM_BUDGET_MASK_LEVEL_W,                        &
-                       NMNHDIM_BUDGET_MASK_TIME,    NMNHDIM_BUDGET_MASK_NBUMASK,                        &
+                       NMNHDIM_BUDGET_MASK_NBUMASK, NMNHDIM_BUDGET_TIME,                                &
                        NMNHDIM_BUDGET_LES_AVG_TIME, NMNHDIM_BUDGET_LES_TIME,                            &
                        NMNHDIM_BUDGET_LES_LEVEL,    NMNHDIM_BUDGET_LES_SV,                              &
                        NMNHDIM_SPECTRA_2PTS_NI,     NMNHDIM_SPECTRA_2PTS_NJ,                            &
diff --git a/src/MNH/write_budget.f90 b/src/MNH/write_budget.f90
index 69158b670..5448dcf9d 100644
--- a/src/MNH/write_budget.f90
+++ b/src/MNH/write_budget.f90
@@ -358,7 +358,7 @@ subroutine Store_one_budget_rho( tpdiafile, tpdates, tprhodj, kp, knocompress, p
                                     NMNHDIM_BUDGET_CART_NJ_U,  NMNHDIM_BUDGET_CART_NI_V, NMNHDIM_BUDGET_CART_NJ_V, &
                                     NMNHDIM_BUDGET_CART_LEVEL, NMNHDIM_BUDGET_CART_LEVEL_W,                        &
                                     NMNHDIM_BUDGET_MASK_LEVEL, NMNHDIM_BUDGET_MASK_LEVEL_W,                        &
-                                    NMNHDIM_BUDGET_MASK_TIME,  NMNHDIM_BUDGET_MASK_NBUMASK,                        &
+                                    NMNHDIM_BUDGET_MASK_NBUMASK, NMNHDIM_BUDGET_TIME,                              &
                                     NMNHDIM_UNUSED, NMNHDIM_UNKNOWN
   use modd_io,                only: tfiledata
   use modd_lunit_n,           only: tluout
@@ -489,7 +489,7 @@ subroutine Store_one_budget_rho( tpdiafile, tpdates, tprhodj, kp, knocompress, p
       case ( 4 )
         tzfield%ndimlist(3)  = NMNHDIM_BUDGET_MASK_LEVEL_W
     end select
-    tzfield%ndimlist(4) = NMNHDIM_BUDGET_MASK_TIME
+    tzfield%ndimlist(4) = NMNHDIM_BUDGET_TIME
     tzfield%ndimlist(5) = NMNHDIM_BUDGET_MASK_NBUMASK
     tzfield%ndimlist(6) = NMNHDIM_UNUSED
 
@@ -517,7 +517,7 @@ subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, knocompress,
                                     NMNHDIM_BUDGET_CART_NJ_U,  NMNHDIM_BUDGET_CART_NI_V, NMNHDIM_BUDGET_CART_NJ_V, &
                                     NMNHDIM_BUDGET_CART_LEVEL, NMNHDIM_BUDGET_CART_LEVEL_W,                        &
                                     NMNHDIM_BUDGET_MASK_LEVEL, NMNHDIM_BUDGET_MASK_LEVEL_W,                        &
-                                    NMNHDIM_BUDGET_MASK_TIME,  NMNHDIM_BUDGET_MASK_NBUMASK,                        &
+                                    NMNHDIM_BUDGET_MASK_NBUMASK, NMNHDIM_BUDGET_TIME,                              &
                                     NMNHDIM_BUDGET_NGROUPS,    NMNHDIM_UNUSED, NMNHDIM_UNKNOWN,                    &
                                     TYPEREAL
   use modd_io,                only: tfiledata
@@ -714,7 +714,7 @@ subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, knocompress,
         case ( 4 )
           tzfields(jproc)%ndimlist(3)  = NMNHDIM_BUDGET_MASK_LEVEL_W
       end select
-      tzfields(jproc)%ndimlist(4) = NMNHDIM_BUDGET_MASK_TIME
+      tzfields(jproc)%ndimlist(4) = NMNHDIM_BUDGET_TIME
       tzfields(jproc)%ndimlist(5) = NMNHDIM_BUDGET_MASK_NBUMASK
       tzfields(jproc)%ndimlist(6) = NMNHDIM_BUDGET_NGROUPS
 
diff --git a/src/MNH/write_diachro.f90 b/src/MNH/write_diachro.f90
index cd87aa263..d4302b030 100644
--- a/src/MNH/write_diachro.f90
+++ b/src/MNH/write_diachro.f90
@@ -1216,7 +1216,7 @@ select case ( idims )
       deallocate( zdata3d )
     else if (  ( tpfields(1)%ndimlist(3) == NMNHDIM_BUDGET_MASK_LEVEL &
                   .or. tpfields(1)%ndimlist(3) == NMNHDIM_BUDGET_MASK_LEVEL_W ) &
-       .and.    tpfields(1)%ndimlist(4) == NMNHDIM_BUDGET_MASK_TIME &
+       .and.    tpfields(1)%ndimlist(4) == NMNHDIM_BUDGET_TIME &
        .and. tpfields(1)%ndimlist(5) == NMNHDIM_BUDGET_MASK_NBUMASK      ) then
       !Correspond to Store_one_budget_rho (MASK)
       if ( Size( tpfields ) /= 1 ) call Print_msg( NVERB_FATAL, 'IO', 'Write_diachro_nc4', &
@@ -1566,7 +1566,7 @@ select case ( idims )
 
     elseif (  ( tpfields(1)%ndimlist(3) == NMNHDIM_BUDGET_MASK_LEVEL &
                   .or. tpfields(1)%ndimlist(3) == NMNHDIM_BUDGET_MASK_LEVEL_W ) &
-       .and.    tpfields(1)%ndimlist(4) == NMNHDIM_BUDGET_MASK_TIME &
+       .and.    tpfields(1)%ndimlist(4) == NMNHDIM_BUDGET_TIME &
        .and. tpfields(1)%ndimlist(5) == NMNHDIM_BUDGET_MASK_NBUMASK &
        .and. tpfields(1)%ndimlist(6) == NMNHDIM_BUDGET_NGROUPS      ) then
       !Correspond to Store_one_budget (MASK)
-- 
GitLab