Index: /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbclv.F90
===================================================================
--- /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbclv.F90	(revision 3373)
+++ /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbclv.F90	(revision 3374)
@@ -133,6 +133,6 @@
                   newpt%lon = glamt(ji,jj)         ! at t-point (centre of the cell)
                   newpt%lat = gphit(ji,jj)
-                  newpt%xi  = REAL( nimpp+ji-1, wp )
-                  newpt%yj  = REAL( njmpp+jj-1, wp )
+                  newpt%xi  = REAL( mig(ji), wp )
+                  newpt%yj  = REAL( mjg(jj), wp )
                   !
                   newpt%uvel = 0._wp               ! initially at rest
Index: /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbdyn.F90
===================================================================
--- /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbdyn.F90	(revision 3373)
+++ /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbdyn.F90	(revision 3374)
@@ -194,8 +194,8 @@
       !
       ! map into current processor
-      ii0 = ii0 - nimpp + 1
-      ij0 = ij0 - njmpp + 1
-      ii  = ii  - nimpp + 1
-      ij  = ij  - njmpp + 1
+      ii0 = mi1( ii0 )
+      ij0 = mj1( ij0 )
+      ii  = mi1( ii  )
+      ij  = mj1( ij  )
       !
       IF(  tmask(ii,ij,1)  /=   0._wp  )   RETURN           ! berg reach a new t-cell, but an ocean one
Index: /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90
===================================================================
--- /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90	(revision 3373)
+++ /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90	(revision 3374)
@@ -106,6 +106,5 @@
          DO ji = 1, jpi
             src_calving_hflx(ji,jj) = narea
-            src_calving     (ji,jj) = nicbpack * (njmpp+jj-1) + nimpp+ji-1   !!gm use here mjg(jj) and mig(ji)...
-!!gm        src_calving     (ji,jj) = nicbpack * mjg(jj) + mig(ji)
+            src_calving     (ji,jj) = nicbpack * mjg(jj) + mig(ji)
          END DO
       END DO
@@ -124,5 +123,5 @@
          i1 = i3 - i2*nicbpack
          i3 = INT( src_calving_hflx(ji,jj) )
-         IF( i1 == nimpp+ji-1 .AND. i3 == narea ) THEN
+         IF( i1 == mig(ji) .AND. i3 == narea ) THEN
             IF( nicbdi < 0 ) THEN   ;   nicbdi = ji
             ELSE                    ;   nicbei = ji
@@ -140,5 +139,5 @@
          i1 = i3 - i2*nicbpack
          i3 = INT( src_calving_hflx(ji,jj) )
-         IF( i2 == njmpp+jj-1 .AND. i3 == narea ) THEN
+         IF( i2 == mjg(jj) .AND. i3 == narea ) THEN
             IF( nicbdj < 0 ) THEN   ;   nicbdj = jj
             ELSE                    ;   nicbej = jj
@@ -300,6 +299,6 @@
                 rn_test_box(3) < gphit(ji,jj) .AND. gphit(ji,jj) < rn_test_box(4) ) THEN
                localberg%mass_scaling = rn_mass_scaling(iberg)
-               localpt%xi = REAL( nimpp+ji-1, wp )
-               localpt%yj = REAL( njmpp+jj-1, wp )
+               localpt%xi = REAL( mig(ji), wp )
+               localpt%yj = REAL( mjg(jj), wp )
                localpt%lon = icb_utl_bilin(glamt, localpt%xi, localpt%yj, 'T', 0, 0 )
                localpt%lat = icb_utl_bilin(gphit, localpt%xi, localpt%yj, 'T', 0, 0 )
Index: /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icblbc.F90
===================================================================
--- /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icblbc.F90	(revision 3373)
+++ /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icblbc.F90	(revision 3374)
@@ -93,7 +93,7 @@
             pt => this%current_point
             iine = INT( pt%xi + 0.5 )
-            IF( iine > nimpp+nicbei-1 ) THEN
+            IF( iine > mig(nicbei) ) THEN
                pt%xi = ricb_right + MOD(pt%xi, 1._wp ) - 1._wp
-            ELSE IF( iine < nimpp+nicbdi-1 ) THEN
+            ELSE IF( iine < mig(nicbdi) ) THEN
                pt%xi = ricb_left + MOD(pt%xi, 1._wp )
             ENDIF
@@ -129,8 +129,8 @@
          pt => this%current_point
          ijne = INT( pt%yj + 0.5 )
-         IF( ijne .GT. njmpp+nicbej-1 ) THEN
+         IF( ijne .GT. mjg(nicbej) ) THEN
             !
             iine = INT( pt%xi + 0.5 )
-            ipts  = nicbfldpts (iine-nimpp+1)
+            ipts  = nicbfldpts (mi1(iine))
             !
             ! moving across the cut line means both position and
@@ -236,5 +236,5 @@
             pt => this%current_point
             iine = INT( pt%xi + 0.5 )
-            IF( ipe_E >= 0 .AND. iine > nimpp+nicbei-1 ) THEN
+            IF( ipe_E >= 0 .AND. iine > mig(nicbei) ) THEN
                tmpberg => this
                this => this%next
@@ -249,5 +249,5 @@
                CALL icb_pack_into_buffer( tmpberg, obuffer_e, ibergs_to_send_e)
                CALL icb_utl_delete(first_berg, tmpberg)
-            ELSE IF( ipe_W >= 0 .AND. iine < nimpp+nicbdi-1 ) THEN
+            ELSE IF( ipe_W >= 0 .AND. iine < mig(nicbdi) ) THEN
                tmpberg => this
                this => this%next
@@ -374,5 +374,5 @@
             pt => this%current_point
             ijne = INT( pt%yj + 0.5 )
-            IF( ipe_N >= 0 .AND. ijne .GT. njmpp+nicbej-1 ) THEN
+            IF( ipe_N >= 0 .AND. ijne .GT. mjg(nicbej) ) THEN
                tmpberg => this
                this => this%next
@@ -384,5 +384,5 @@
                CALL icb_pack_into_buffer( tmpberg, obuffer_n, ibergs_to_send_n)
                CALL icb_utl_delete(first_berg, tmpberg)
-            ELSE IF( ipe_S >= 0 .AND. ijne .LT. njmpp+nicbdj-1 ) THEN
+            ELSE IF( ipe_S >= 0 .AND. ijne .LT. mjg(nicbdj) ) THEN
                tmpberg => this
                this => this%next
@@ -542,9 +542,8 @@
             iine = INT( pt%xi + 0.5 )
             ijne = INT( pt%yj + 0.5 )
-!           CALL check_position(grd, this, 'exchange (bot)')
-            IF( iine .LT. nimpp+nicbdi-1 .OR. &
-                iine .GT. nimpp+nicbei-1 .OR. &
-                ijne .LT. njmpp+nicbdj-1 .OR. &
-                ijne .GT. njmpp+nicbej-1) THEN
+            IF( iine .LT. mig(nicbdi) .OR. &
+                iine .GT. mig(nicbei) .OR. &
+                ijne .LT. mjg(nicbdj) .OR. &
+                ijne .GT. mjg(nicbej)) THEN
                i = i + 1
                WRITE(numicb,*) 'berg lost in halo: ', this%number(:),iine,ijne
@@ -607,7 +606,7 @@
                iine = INT( pt%xi + 0.5 )
                ijne = INT( pt%yj + 0.5 )
-               ipts  = nicbfldpts (iine-nimpp+1)
-               iproc = nicbflddest(iine-nimpp+1)
-               IF( ijne .GT. njmpp+nicbej-1 ) THEN
+               ipts  = nicbfldpts (mi1(iine))
+               iproc = nicbflddest(mi1(iine))
+               IF( ijne .GT. mjg(nicbej) ) THEN
                   IF( iproc == ifldproc ) THEN
                      !
Index: /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbthm.F90
===================================================================
--- /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbthm.F90	(revision 3373)
+++ /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbthm.F90	(revision 3374)
@@ -82,6 +82,8 @@
          zxi  = pt%xi                                      ! position in (i,j) referential
          zyj  = pt%yj
-         ii  = INT( zxi + 0.5 ) - nimpp + 1                    ! t-cell of the berg
-         ij  = INT( zyj + 0.5 ) - njmpp + 1
+         ii  = INT( zxi + 0.5 )                            ! T-cell of the berg
+         ii  = mi1( ii )
+         ij  = INT( zyj + 0.5 )              
+         ij  = mi1( ij )
          zVol = zT * zW * zL
          zdt = berg_dt   ;   z1_dt = 1._wp / zdt
Index: /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbutl.F90
===================================================================
--- /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbutl.F90	(revision 3373)
+++ /branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbutl.F90	(revision 3374)
@@ -215,6 +215,6 @@
       !
       ! find position in this processor
-      ii = ii - nimpp + 1
-      ij = ij - njmpp + 1
+      ii = mi1( ii )
+      ij = mj1( ij )
       !
       icb_utl_bilin = ( pfld(ii,ij  ) * (1.-zi) + pfld(ii+1,ij  ) * zi ) * (1.-zj)   &
@@ -253,6 +253,6 @@
       !
       ! find position in this processor          !!gm use here mig, mjg arrays
-      ii = ii - nimpp + 1
-      ij = ij - njmpp + 1
+      ii = mi1( ii )
+      ij = mj1( ij )
       z4(1) = pfld(ii  ,ij  )
       z4(2) = pfld(ii+1,ij  )
@@ -303,6 +303,6 @@
 
       ! find position in this processor
-      ii = ii - nimpp + 1
-      ij = ij - njmpp + 1
+      ii = mi1( ii )
+      ij = mj1( ij )
 
       IF(    0.0_wp <= zi .AND. zi < 0.5_wp   ) THEN
