Index: utils/tools/DOMAINcfg/src/domcfg.f90
===================================================================
--- utils/tools/DOMAINcfg/src/domcfg.f90	(revision 9621)
+++ utils/tools/DOMAINcfg/src/domcfg.f90	(revision 12414)
@@ -15,5 +15,4 @@
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distributed memory computing library
-   USE timing          ! Timing
 
    IMPLICIT NONE
@@ -36,6 +35,4 @@
       !!
       !!----------------------------------------------------------------------
-      !
-      IF( nn_timing == 1 )  CALL timing_start('dom_cfg')
       !
       IF(lwp) THEN                   ! Control print
@@ -60,8 +57,5 @@
       CALL dom_glo                   ! global domain versus zoom and/or local domain
       !
-      IF( nn_timing == 1 )  CALL timing_stop('dom_cfg')
-      !
    END SUBROUTINE dom_cfg
-
 
    SUBROUTINE dom_glo
@@ -69,131 +63,64 @@
       !!                     ***  ROUTINE dom_glo  ***
       !!
-      !! ** Purpose :   initialization for global domain, zoom and local domain
+      !! ** Purpose :   initialization of global domain <--> local domain indices
       !!
       !! ** Method  :   
       !!
-      !! ** Action  : - mig  , mjg : 
-      !!              - mi0  , mi1   :
-      !!              - mj0, , mj1   :
+      !! ** Action  : - mig , mjg : local  domain indices ==> global domain indices
+      !!              - mi0 , mi1 : global domain indices ==> local  domain indices
+      !!              - mj0,, mj1   (global point not in the local domain ==> mi0>mi1 and/or mj0>mj1)
       !!----------------------------------------------------------------------
       INTEGER ::   ji, jj   ! dummy loop argument
       !!----------------------------------------------------------------------
-      !                              ! recalculate jpizoom/jpjzoom given lat/lon
       !
-      !                        ! ============== !
-      !                        !  Local domain  ! 
-      !                        ! ============== !
-      DO ji = 1, jpi                 ! local domain indices ==> data domain indices
-        mig(ji) = ji + jpizoom - 1 + nimpp - 1
+      DO ji = 1, jpi                 ! local domain indices ==> global domain indices
+        mig(ji) = ji + nimpp - 1
       END DO
       DO jj = 1, jpj
-        mjg(jj) = jj + jpjzoom - 1 + njmpp - 1
+        mjg(jj) = jj + njmpp - 1
       END DO
-      !
-      !                              ! data domain indices ==> local domain indices
+      !                              ! global domain indices ==> local domain indices
       !                                   ! (return (m.0,m.1)=(1,0) if data domain gridpoint is to the west/south of the 
-      !                                   !local domain, or (m.0,m.1)=(jp.+1,jp.) to the east/north of local domain. 
-      DO ji = 1, jpidta
-        mi0(ji) = MAX( 1, MIN( ji - jpizoom + 1 - nimpp + 1, jpi+1 ) )
-        mi1(ji) = MAX( 0, MIN( ji - jpizoom + 1 - nimpp + 1, jpi   ) )
+      !                                   ! local domain, or (m.0,m.1)=(jp.+1,jp.) to the east/north of local domain. 
+      DO ji = 1, jpiglo
+        mi0(ji) = MAX( 1 , MIN( ji - nimpp + 1, jpi+1 ) )
+        mi1(ji) = MAX( 0 , MIN( ji - nimpp + 1, jpi   ) )
       END DO
-      DO jj = 1, jpjdta
-        mj0(jj) = MAX( 1, MIN( jj - jpjzoom + 1 - njmpp + 1, jpj+1 ) )
-        mj1(jj) = MAX( 0, MIN( jj - jpjzoom + 1 - njmpp + 1, jpj   ) )
+      DO jj = 1, jpjglo
+        mj0(jj) = MAX( 1 , MIN( jj - njmpp + 1, jpj+1 ) )
+        mj1(jj) = MAX( 0 , MIN( jj - njmpp + 1, jpj   ) )
       END DO
       IF(lwp) THEN                   ! control print
          WRITE(numout,*)
-         WRITE(numout,*) 'dom_glo : domain: data / local '
+         WRITE(numout,*) 'dom_glo : domain: global <<==>> local '
          WRITE(numout,*) '~~~~~~~ '
-         WRITE(numout,*) '          data input domain    : jpidta = ', jpidta,   &
-            &                                            ' jpjdta = ', jpjdta, ' jpkdta = ', jpkdta
-         WRITE(numout,*) '          global or zoom domain: jpiglo = ', jpiglo,   &
-            &                                            ' jpjglo = ', jpjglo, ' jpk    = ', jpk
-         WRITE(numout,*) '          local domain         : jpi    = ', jpi   ,   &
-            &                                            ' jpj    = ', jpj   , ' jpk    = ', jpk
+         WRITE(numout,*) '   global domain:   jpiglo = ', jpiglo, ' jpjglo = ', jpjglo, ' jpkglo = ', jpkglo
+         WRITE(numout,*) '   local  domain:   jpi    = ', jpi   , ' jpj    = ', jpj   , ' jpk    = ', jpk
          WRITE(numout,*)
-         WRITE(numout,*) '          south-west indices    jpizoom = ', jpizoom,   &
-            &                                           ' jpjzoom = ', jpjzoom
+         WRITE(numout,*) '   conversion from local to global domain indices (and vise versa) done'
          IF( nn_print >= 1 ) THEN
             WRITE(numout,*)
-            WRITE(numout,*) '          conversion local  ==> data i-index domain'
+            WRITE(numout,*) '          conversion local  ==> global i-index domain (mig)'
             WRITE(numout,25)              (mig(ji),ji = 1,jpi)
             WRITE(numout,*)
-            WRITE(numout,*) '          conversion data   ==> local  i-index domain'
-            WRITE(numout,*) '             starting index'
-            WRITE(numout,25)              (mi0(ji),ji = 1,jpidta)
-            WRITE(numout,*) '             ending index'
-            WRITE(numout,25)              (mi1(ji),ji = 1,jpidta)
+            WRITE(numout,*) '          conversion global ==> local  i-index domain'
+            WRITE(numout,*) '             starting index (mi0)'
+            WRITE(numout,25)              (mi0(ji),ji = 1,jpiglo)
+            WRITE(numout,*) '             ending index (mi1)'
+            WRITE(numout,25)              (mi1(ji),ji = 1,jpiglo)
             WRITE(numout,*)
-            WRITE(numout,*) '          conversion local  ==> data j-index domain'
+            WRITE(numout,*) '          conversion local  ==> global j-index domain (mjg)'
             WRITE(numout,25)              (mjg(jj),jj = 1,jpj)
             WRITE(numout,*)
-            WRITE(numout,*) '          conversion data  ==> local j-index domain'
-            WRITE(numout,*) '             starting index'
-            WRITE(numout,25)              (mj0(jj),jj = 1,jpjdta)
-            WRITE(numout,*) '             ending index'
-            WRITE(numout,25)              (mj1(jj),jj = 1,jpjdta)
+            WRITE(numout,*) '          conversion global ==> local  j-index domain'
+            WRITE(numout,*) '             starting index (mj0)'
+            WRITE(numout,25)              (mj0(jj),jj = 1,jpjglo)
+            WRITE(numout,*) '             ending index (mj1)'
+            WRITE(numout,25)              (mj1(jj),jj = 1,jpjglo)
          ENDIF
       ENDIF
  25   FORMAT( 100(10x,19i4,/) )
-
-      !                        ! ============== !
-      !                        !  Zoom domain   !
-      !                        ! ============== !
-      !                              ! zoom control
-      IF( jpiglo + jpizoom - 1  >  jpidta .OR.   &
-          jpjglo + jpjzoom - 1  >  jpjdta      ) &
-          &   CALL ctl_stop( ' global or zoom domain exceed the data domain ! ' )
-
-      !                              ! set zoom flag
-      IF( jpiglo < jpidta .OR. jpjglo < jpjdta )   lzoom = .TRUE.
-
-      !                              ! set zoom type flags
-      IF( lzoom .AND. jpizoom /= 1 )   lzoom_w = .TRUE.                     ! 
-      IF( lzoom .AND. jpjzoom /= 1 )   lzoom_s = .TRUE.
-      IF( lzoom .AND. jpiglo + jpizoom -1 /= jpidta )   lzoom_e = .TRUE.
-      IF( lzoom .AND. jpjglo + jpjzoom -1 /= jpjdta )   lzoom_n = .TRUE.
-      IF(lwp) THEN
-         WRITE(numout,*)
-         WRITE(numout,*) '          zoom flags : '
-         WRITE(numout,*) '             lzoom   = ', lzoom  , ' (T = zoom, F = global )'
-         WRITE(numout,*) '             lzoom_e = ', lzoom_e, ' (T = forced closed east  boundary)'
-         WRITE(numout,*) '             lzoom_w = ', lzoom_w, ' (T = forced closed west  boundary)'
-         WRITE(numout,*) '             lzoom_s = ', lzoom_s, ' (T = forced closed South boundary)'
-         WRITE(numout,*) '             lzoom_n = ', lzoom_n, ' (T = forced closed North boundary)'
-      ENDIF
-      IF(  ( lzoom_e .OR. lzoom_w )  .AND.  ( jperio == 1 .OR. jperio == 4 .OR. jperio == 6 )  )   &
-           &   CALL ctl_stop( ' Your zoom choice is inconsistent with east-west cyclic boundary condition' )
-      IF(  lzoom_n  .AND.  ( 3 <= jperio .AND. jperio <= 6 )  )   &
-           &   CALL ctl_stop( ' Your zoom choice is inconsistent with North fold boundary condition' )
-
-      !                              ! Pre-defined arctic/antarctic zoom of ORCA configuration flag
-      IF( cp_cfg == "orca" ) THEN
-         SELECT CASE ( jp_cfg )
-         CASE ( 2 )                               !  ORCA_R2 configuration
-            IF(  cp_cfz == "arctic"    .AND. jpiglo  == 142    .AND. jpjglo  ==  53 .AND.   &
-               & jpizoom ==  21    .AND. jpjzoom ==  97         )   THEN
-              IF(lwp) WRITE(numout,*) '          ORCA configuration: arctic zoom '
-            ENDIF
-            IF(  cp_cfz == "antarctic" .AND. jpiglo  == jpidta .AND. jpjglo  ==  50 .AND.   &
-               & jpizoom ==   1    .AND. jpjzoom ==   1         )   THEN
-              IF(lwp) WRITE(numout,*) '          ORCA configuration: antarctic zoom '
-            ENDIF
-            !                             
-         CASE ( 05 )                              !  ORCA_R05 configuration
-            IF(    cp_cfz == "arctic"    .AND. jpiglo  == 562    .AND. jpjglo  == 202 .AND.   &
-               & jpizoom ==  81    .AND. jpjzoom == 301         )   THEN
-              IF(lwp) WRITE(numout,*) '          ORCA configuration: arctic zoom '
-            ENDIF
-            IF(    cp_cfz == "antarctic" .AND. jpiglo  == jpidta .AND. jpjglo  == 187 .AND.   &
-               & jpizoom ==   1    .AND. jpjzoom ==   1         )   THEN
-              IF(lwp) WRITE(numout,*) '          ORCA configuration: antarctic zoom '
-            ENDIF
-         END SELECT
-         !
-      ENDIF
       !
    END SUBROUTINE dom_glo
-
    !!======================================================================
 END MODULE domcfg
