Index: branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90
===================================================================
--- branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90	(revision 4015)
+++ branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90	(revision 4064)
@@ -51,4 +51,6 @@
    END INTERFACE
 
+   REAL(wp) :: r_inf = 1e+36
+
    !! Substitutions
 #  include "domzgr_substitute.h90"
@@ -60,5 +62,5 @@
       
       INTEGER  ::  ji, jj, jk                   ! dummy loop indices
-      INTEGER  ::  ijie,ijis,ijje,ijjs
+      INTEGER  ::  ijie,ijis,ijje,ijjs,ij,je_2
       REAL(wp) ::  zmask
       
@@ -69,13 +71,39 @@
       umask_crs(:,:,:) = 0.0
       fmask_crs(:,:,:) = 0.0
-      
+  
+            
+      IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+         IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+            je_2 = mje_crs(2)   ;  ij = je_2
+         ENDIF
+      ELSE
+         je_2 = mje_crs(2)      ;  ij = mjs_crs(2) 
+      ENDIF
       DO jk = 1, jpkm1
          DO ji = 2, nlei_crs  
-            ijie = mie_crs(ji)
-            ijis = mis_crs(ji)
-            DO jj = nldj_crs, nlej_crs 
-               ijje = mje_crs(jj) 
-               ijjs = mjs_crs(jj) 
-                                 
+            ijis = mis_crs(ji)  ;  ijie = mie_crs(ji)    
+            !          
+            zmask = 0.0
+            zmask = SUM( tmask(ijis:ijie,ij:je_2,jk) ) 
+            IF ( zmask > 0.0 ) tmask_crs(ji,2,jk) = 1.0
+               
+            zmask = 0.0
+            zmask = SUM( vmask(ijis:ijie,je_2     ,jk) )  
+            IF ( zmask > 0.0 ) vmask_crs(ji,2,jk) = 1.0
+               
+            zmask = 0.0
+            zmask = SUM(umask(ijie,ij:je_2,jk))   
+            IF ( zmask > 0.0 ) umask_crs(ji,2,jk) = 1.0
+               
+            fmask_crs(ji,je_2,jk) = fmask(ijie,2,jk)
+         ENDDO
+      ENDDO
+      !
+      DO jk = 1, jpkm1
+         DO ji = 2, nlei_crs  
+            ijis = mis_crs(ji)     ;   ijie = mie_crs(ji)       
+            DO jj = 3, nlej_crs
+               ijjs = mjs_crs(jj)  ;   ijje = mje_crs(jj)
+                          
                zmask = 0.0
                zmask = SUM( tmask(ijis:ijie,ijjs:ijje,jk) ) 
@@ -91,8 +119,8 @@
                
                fmask_crs(ji,jj,jk) = fmask(ijie,ijje,jk)  
-
             ENDDO
          ENDDO
       ENDDO
+
       !
       CALL crs_lbc_lnk( tmask_crs, 'T', 1.0 )
@@ -195,12 +223,5 @@
             ENDDO
       END SELECT
-
-      !                                             ! Fill i=1, i=jpi at j=1
-      p_gphi_crs(1      ,1) = p_gphi(jpi_crsm1,1)
-      p_glam_crs(1      ,1) = p_glam(jpi_crsm1,1)
-      !                                             ! Fill upper-right corner i=1, j=jpj_crs
-      p_gphi_crs(jpi_crs,1) = p_gphi(2        ,1)
-      p_glam_crs(jpi_crs,1) = p_glam(2        ,1)
-      !                                            
+      !
    END SUBROUTINE crs_dom_coordinates
 
@@ -233,5 +254,5 @@
       !! Local variables
       INTEGER :: ji, jj, jk     ! dummy loop indices
-      INTEGER :: ijie,ijis,ijje,ijjs,ijrs
+      INTEGER :: ijie,ijje,ijrs
   
       !!----------------------------------------------------------------  
@@ -241,9 +262,6 @@
          DO ji = 2, nlei_crs
             ijie = mie_crs(ji)
-            ijis = mis_crs(ji)
             DO jj = nldj_crs, nlej_crs
-               ijje = mje_crs(jj) 
-               ijjs = mjs_crs(jj)                   
-               ijrs =  mje_crs(jj) - mjs_crs(jj)
+               ijje = mje_crs(jj)   ;   ijrs =  mje_crs(jj) - mjs_crs(jj)
                ! Only for a factro 3 coarsening
                SELECT CASE ( cd_type )
@@ -335,11 +353,13 @@
       !! Local variables
       REAL(wp)                                :: zdAm
-      INTEGER                                 :: ji, jj, jk       ! dummy loop indices
-      INTEGER                                 :: ii, ij, ijie,ijje
-
-      REAL(wp), DIMENSION(:,:,:), POINTER     :: zvol      
+      INTEGER                                 :: ji, jj, jk , ii, ij, je_2
+
+      REAL(wp), DIMENSION(:,:,:), POINTER     :: zvol, zmask      
       !!----------------------------------------------------------------  
    
-      CALL wrk_alloc( jpi, jpj, jpk, zvol )
+      CALL wrk_alloc( jpi, jpj, jpk, zvol, zmask )
+
+      p_fld1_crs(:,:,:) = 0.0
+      p_fld2_crs(:,:,:) = 0.0
 
       DO jk = 1, jpk
@@ -347,102 +367,91 @@
       ENDDO
 
+      zmask(:,:,:) = 0.0
+      IF( cd_type == 'W' ) THEN
+         zmask(:,:,1) = p_mask(:,:,1) 
+         DO jk = 2, jpk
+            zmask(:,:,jk) = p_mask(:,:,jk-1) 
+         ENDDO
+      ELSE
+         DO jk = 1, jpk
+             zmask(:,:,jk) = p_mask(:,:,jk) 
+         ENDDO
+      ENDIF
+
+      IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+         IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+            je_2 = mje_crs(2)
+            DO jk = 1, jpk           
+               DO ji = nistr, niend, nn_factx
+                  ii   = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
+                  p_fld1_crs(ii,2,jk) =  zvol(ji,je_2  ,jk) + zvol(ji+1,je_2  ,jk) + zvol(ji+2,je_2  ,jk)  &
+                     &                 + zvol(ji,je_2-1,jk) + zvol(ji+1,je_2-1,jk) + zvol(ji+2,je_2-1,jk) 
+                  !
+                  zdAm =  zvol(ji  ,je_2,jk) * zmask(ji  ,je_2,jk)  &
+                    &   + zvol(ji+1,je_2,jk) * zmask(ji+1,je_2,jk)  &
+                    &   + zvol(ji+2,je_2,jk) * zmask(ji+2,je_2,jk) 
+                  ! 
+                  p_fld2_crs(ii,2,jk) = zdAm / p_fld1_crs(ii,2,jk) 
+               ENDDO
+            ENDDO
+         ENDIF
+      ELSE
+         je_2 = mjs_crs(2)
+         DO jk = 1, jpk           
+            DO ji = nistr, niend, nn_factx
+               ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+               p_fld1_crs(ii,2,jk) =  zvol(ji,je_2  ,jk) + zvol(ji+1,je_2  ,jk) + zvol(ji+2,je_2  ,jk)  &
+                   &                + zvol(ji,je_2+1,jk) + zvol(ji+1,je_2+1,jk) + zvol(ji+2,je_2+1,jk)  &
+                   &                + zvol(ji,je_2+2,jk) + zvol(ji+1,je_2+2,jk) + zvol(ji+2,je_2+2,jk)  
+              !
+               zdAm = zvol(ji  ,je_2  ,jk) * zmask(ji  ,je_2  ,jk)  &
+                 &  + zvol(ji+1,je_2  ,jk) * zmask(ji+1,je_2  ,jk)  &
+                 &  + zvol(ji+2,je_2  ,jk) * zmask(ji+2,je_2  ,jk)  &
+                 &  + zvol(ji  ,je_2+1,jk) * zmask(ji  ,je_2+1,jk)  &
+                 &  + zvol(ji+1,je_2+1,jk) * zmask(ji+1,je_2+1,jk)  &
+                 &  + zvol(ji+2,je_2+1,jk) * zmask(ji+2,je_2+1,jk)  &
+                 &  + zvol(ji  ,je_2+2,jk) * zmask(ji  ,je_2+2,jk)  &
+                 &  + zvol(ji+1,je_2+2,jk) * zmask(ji+1,je_2+2,jk)  &
+                 &  + zvol(ji+2,je_2+2,jk) * zmask(ji+2,je_2+2,jk)
+                 ! 
+                 p_fld2_crs(ii,2,jk) = zdAm / p_fld1_crs(ii,2,jk) 
+            ENDDO
+         ENDDO
+      ENDIF
+
       DO jk = 1, jpk           
-         DO ji = nistr, niend, nn_factx
-            DO jj   = njstr, njend, nn_facty
-               ii   = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
-               ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-               ijje = mje_crs(ij)
-               ijie = mie_crs(ii)
+         DO jj  = njstr, njend, nn_facty
+            DO ji = nistr, niend, nn_factx
+               ii  = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
+               ij  = ( jj - njstr ) * rfacty_r + 3
                !
                p_fld1_crs(ii,ij,jk) =  zvol(ji,jj  ,jk) + zvol(ji+1,jj  ,jk) + zvol(ji+2,jj  ,jk)  &
                    &                 + zvol(ji,jj+1,jk) + zvol(ji+1,jj+1,jk) + zvol(ji+2,jj+1,jk)  &
-                   &                 + zvol(ji,jj+2,jk) + zvol(ji+1,jj+2,jk) + zvol(ji+2,jj+2,jk)  
+                   &                 + zvol(ji,jj+2,jk) + zvol(ji+1,jj+2,jk) + zvol(ji+2,jj+2,jk) 
+               !
+               zdAm =  zvol(ji  ,jj  ,jk) * zmask(ji  ,jj  ,jk)  &
+                 &   + zvol(ji+1,jj  ,jk) * zmask(ji+1,jj  ,jk)  &
+                 &   + zvol(ji+2,jj  ,jk) * zmask(ji+2,jj  ,jk)  &
+                 &   + zvol(ji  ,jj+1,jk) * zmask(ji  ,jj+1,jk)  &
+                 &   + zvol(ji+1,jj+1,jk) * zmask(ji+1,jj+1,jk)  &
+                 &   + zvol(ji+2,jj+1,jk) * zmask(ji+2,jj+1,jk)  &
+                 &   + zvol(ji  ,jj+2,jk) * zmask(ji  ,jj+2,jk)  &
+                 &   + zvol(ji+1,jj+2,jk) * zmask(ji+1,jj+2,jk)  &
+                 &   + zvol(ji+2,jj+2,jk) * zmask(ji+2,jj+2,jk)
+                 ! 
+                p_fld2_crs(ii,ij,jk) = zdAm / p_fld1_crs(ii,ij,jk) 
             ENDDO
          ENDDO
       ENDDO
-
-      IF( cd_type == 'T' ) THEN
-         DO jk = 1, jpk           
-            DO ji = nistr, niend, nn_factx
-               DO jj   = njstr, njend, nn_facty
-                  ii   = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
-                  ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                  ijje = mje_crs(ij)
-                  ijie = mie_crs(ii)
-                  !
-                  zdAm =  zvol(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk)  &
-                    &   + zvol(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk)  &
-                    &   + zvol(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk)  &
-                    &   + zvol(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk)  &
-                    &   + zvol(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk)  &
-                    &   + zvol(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk)  &
-                    &   + zvol(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk)  &
-                    &   + zvol(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk)  &
-                    &   + zvol(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk)
-                    ! 
-                   IF( p_fld1_crs(ii,ij,jk) /= 0._wp ) p_fld2_crs(ii,ij,jk) = zdAm / p_fld1_crs(ii,ij,jk) 
-                   ! 
-               ENDDO
-            ENDDO
-         ENDDO
-      ENDIF
-      !
-      IF( cd_type == 'W' ) THEN
-         DO jk = 2, jpk           
-            DO ji = nistr, niend, nn_factx
-               DO jj   = njstr, njend, nn_facty
-                  ii   = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
-                  ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                  ijje = mje_crs(ij)
-                  ijie = mie_crs(ii)
-                  !
-                  zdAm =  zvol(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk-1)  &
-                    &   + zvol(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk-1)  &
-                    &   + zvol(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk-1)  &
-                    &   + zvol(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk-1)  &
-                    &   + zvol(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk-1)  &
-                    &   + zvol(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk-1)  &
-                    &   + zvol(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk-1)  &
-                    &   + zvol(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk-1)  &
-                    &   + zvol(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk-1)
-                  !
-                  IF( p_fld1_crs(ii,ij,jk) /= 0._wp ) p_fld2_crs(ii,ij,jk) = zdAm / p_fld1_crs(ii,ij,jk) 
-                  !
-               ENDDO
-            ENDDO
-         ENDDO
-         DO ji = nistr, niend, nn_factx
-            DO jj   = njstr, njend, nn_facty
-               ii   = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
-               ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-               ijje = mje_crs(ij)
-               ijie = mie_crs(ii)
-               !
-               zdAm =  zvol(ji  ,jj  ,1) * p_mask(ji  ,jj  ,1)  &
-                 &   + zvol(ji+1,jj  ,1) * p_mask(ji+1,jj  ,1)  &
-                 &   + zvol(ji+2,jj  ,1) * p_mask(ji+2,jj  ,1)  &
-                 &   + zvol(ji  ,jj+1,1) * p_mask(ji  ,jj+1,1)  &
-                 &   + zvol(ji+1,jj+1,1) * p_mask(ji+1,jj+1,1)  &
-                 &   + zvol(ji+2,jj+1,1) * p_mask(ji+2,jj+1,1)  &
-                 &   + zvol(ji  ,jj+2,1) * p_mask(ji  ,jj+2,1)  &
-                 &   + zvol(ji+1,jj+2,1) * p_mask(ji+1,jj+2,1)  &
-                 &   + zvol(ji+2,jj+2,1) * p_mask(ji+2,jj+2,1)
-               ! 
-               IF( p_fld1_crs(ii,ij,1) /= 0._wp ) p_fld2_crs(ii,ij,1) = zdAm / p_fld2_crs(ii,ij,1) 
-               ! 
-            ENDDO
-         ENDDO
-      ENDIF
-      
       !                                             !  Retroactively add back the boundary halo cells.
       CALL crs_lbc_lnk( p_fld1_crs, cd_type, 1.0 ) 
       CALL crs_lbc_lnk( p_fld2_crs, cd_type, 1.0 ) 
       !
-      CALL wrk_dealloc( jpi, jpj, jpk, zvol )
+      CALL wrk_dealloc( jpi, jpj, jpk, zvol, zmask )
       !
    END SUBROUTINE crs_dom_facvol
 
 
-   SUBROUTINE crs_dom_ope_3d( p_fld, cd_op, cd_type, p_mask, p_fld_crs, p_e12, p_e3, p_surf_crs, p_mask_crs )
+   SUBROUTINE crs_dom_ope_3d( p_fld, cd_op, cd_type, p_mask, p_fld_crs, p_e12, p_e3, p_surf_crs, p_mask_crs, psgn )
       !!----------------------------------------------------------------
       !!               *** SUBROUTINE crsfun_UV ***
@@ -476,17 +485,18 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk),         INTENT(in), OPTIONAL :: p_e3     ! Parent grid vertical level thickness (fse3u, fse3v)
       REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(in), OPTIONAL :: p_surf_crs ! Coarse grid area-weighting denominator    
-      REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(in), OPTIONAL :: p_mask_crs    ! Coarse grid T,U,V mask
+      REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(in), OPTIONAL :: p_mask_crs    ! Coarse grid T,U,V maska
+      REAL(wp),                                 INTENT(in)           :: psgn    ! sign 
+
 
       REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(out)          :: p_fld_crs ! Coarse grid box 3D quantity 
 
       !! Local variables
-      INTEGER  :: ji, jj, jk                 ! dummy loop indices
-      INTEGER  :: ijie, ijje, ii, ij
+      INTEGER  :: ji, jj, jk 
+      INTEGER  :: ii, ij, ijie, ijje, je_2
       REAL(wp) :: zflcrs, zsfcrs   
-      REAL(wp) :: zeps = 1.e20    
-      REAL(wp), DIMENSION(:,:,:), POINTER :: zsurf   
-
+      REAL(wp), DIMENSION(:,:,:), POINTER :: zsurf, zsurfmsk, zmask  
       !!----------------------------------------------------------------  
    
+      p_fld_crs(:,:,:) = 0.0
 
       SELECT CASE ( cd_op )
@@ -494,159 +504,344 @@
          CASE ( 'VOL' )
       
-            CALL wrk_alloc( jpi, jpj, jpk, zsurf )
-            DO jk = 1, jpk
-              zsurf(:,:,jk) =  p_e12(:,:) * p_e3(:,:,jk)
-            ENDDO
+            CALL wrk_alloc( jpi, jpj, jpk, zsurf, zsurfmsk )
          
             SELECT CASE ( cd_type )
             
-               CASE( 'T' )
+               CASE( 'T', 'W' )
+                  IF( cd_type == 'T' ) THEN
+                     DO jk = 1, jpk
+                        zsurf   (:,:,jk) =  p_e12(:,:) * p_e3(:,:,jk) *  p_mask(:,:,jk) 
+                        zsurfmsk(:,:,jk) =  zsurf(:,:,jk) 
+                    ENDDO
+                  ELSE
+                     zsurf   (:,:,1) =  p_e12(:,:) * p_e3(:,:,1)
+                     zsurfmsk(:,:,1) =  zsurf(:,:,1) *  p_mask(:,:,1) 
+                     DO jk = 2, jpk
+                        zsurf   (:,:,jk) =  p_e12(:,:) * p_e3(:,:,jk)
+                        zsurfmsk(:,:,jk) =  zsurf(:,:,jk) * p_mask(:,:,jk-1) 
+                     ENDDO
+                  ENDIF
          
-                  DO jk = 1, jpk
-                    
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)                  
+                  IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        je_2 = mje_crs(2)
+                        DO jk = 1, jpk           
+                           DO ji = nistr, niend, nn_factx
+                              ii   = ( ji - mis_crs(2) ) * rfactx_r + 2       
+                              zflcrs =  p_fld(ji  ,je_2,jk) * zsurfmsk(ji  ,je_2,jk)   &
+                                &     + p_fld(ji+1,je_2,jk) * zsurfmsk(ji+1,je_2,jk)   &
+                                &     + p_fld(ji+2,je_2,jk) * zsurfmsk(ji+2,je_2,jk) 
  
-                           zflcrs =  p_fld(ji  ,jj  ,jk) * zsurf(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk) &
-                             &     + p_fld(ji+1,jj  ,jk) * zsurf(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk) &
-                             &     + p_fld(ji+2,jj  ,jk) * zsurf(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk) &
-                             &     + p_fld(ji  ,jj+1,jk) * zsurf(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk) &
-                             &     + p_fld(ji+1,jj+1,jk) * zsurf(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk) &
-                             &     + p_fld(ji+2,jj+1,jk) * zsurf(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk) &
-                             &     + p_fld(ji  ,jj+2,jk) * zsurf(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk) &
-                             &     + p_fld(ji+1,jj+2,jk) * zsurf(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk) &
-                             &     + p_fld(ji+2,jj+2,jk) * zsurf(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk) 
- 
-                           zsfcrs =  zsurf(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk) &
-                             &     + zsurf(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk) &
-                             &     + zsurf(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk) &
-                             &     + zsurf(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk) &
-                             &     + zsurf(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk) &
-                             &     + zsurf(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk) &
-                             &     + zsurf(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk) &
-                             &     + zsurf(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk) &
-                             &     + zsurf(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk) 
-                           !
+                              zsfcrs =  zsurf(ji,je_2,jk) + zsurf(ji+1,je_2,jk) + zsurf(ji+2,je_2,jk) 
+                              !
+                              p_fld_crs(ii,2,jk) = zflcrs
+                              IF( zsfcrs /= 0.0 )  p_fld_crs(ii,2,jk) = zflcrs / zsfcrs
+                           ENDDO
+                        ENDDO
+                     ENDIF
+                  ELSE
+                     je_2 = mjs_crs(2)
+                     DO jk = 1, jpk           
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2   
+                           zflcrs =  p_fld(ji  ,je_2  ,jk) * zsurfmsk(ji  ,je_2  ,jk) &
+                             &     + p_fld(ji+1,je_2  ,jk) * zsurfmsk(ji+1,je_2  ,jk) &
+                             &     + p_fld(ji+2,je_2  ,jk) * zsurfmsk(ji+2,je_2  ,jk) &
+                             &     + p_fld(ji  ,je_2+1,jk) * zsurfmsk(ji  ,je_2+1,jk) &
+                             &     + p_fld(ji+1,je_2+1,jk) * zsurfmsk(ji+1,je_2+1,jk) &
+                             &     + p_fld(ji+2,je_2+1,jk) * zsurfmsk(ji+2,je_2+1,jk) &
+                             &     + p_fld(ji  ,je_2+2,jk) * zsurfmsk(ji  ,je_2+2,jk) &
+                             &     + p_fld(ji+1,je_2+2,jk) * zsurfmsk(ji+1,je_2+2,jk) &
+                             &     + p_fld(ji+2,je_2+2,jk) * zsurfmsk(ji+2,je_2+2,jk) 
+
+                           zsfcrs =  zsurf(ji,je_2  ,jk) + zsurf(ji+1,je_2  ,jk) + zsurf(ji+2,je_2  ,jk) &
+                             &     + zsurf(ji,je_2+1,jk) + zsurf(ji+1,je_2+1,jk) + zsurf(ji+2,je_2+1,jk) &
+                             &     + zsurf(ji,je_2+2,jk) + zsurf(ji+1,je_2+2,jk) + zsurf(ji+2,je_2+2,jk) 
+                            !
+                            p_fld_crs(ii,2,jk) = zflcrs
+                            IF( zsfcrs /= 0.0 )  p_fld_crs(ii,2,jk) = zflcrs / zsfcrs
+                        ENDDO
+                     ENDDO
+                  ENDIF
+                  !
+                  DO jk = 1, jpk           
+                     DO jj  = njstr, njend, nn_facty
+                        DO ji = nistr, niend, nn_factx
+                           ii = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
+                           ij = ( jj - njstr ) * rfacty_r + 3
+                           zflcrs =  p_fld(ji  ,jj  ,jk) * zsurfmsk(ji  ,jj  ,jk) &
+                             &     + p_fld(ji+1,jj  ,jk) * zsurfmsk(ji+1,jj  ,jk) &
+                             &     + p_fld(ji+2,jj  ,jk) * zsurfmsk(ji+2,jj  ,jk) &
+                             &     + p_fld(ji  ,jj+1,jk) * zsurfmsk(ji  ,jj+1,jk) &
+                             &     + p_fld(ji+1,jj+1,jk) * zsurfmsk(ji+1,jj+1,jk) &
+                             &     + p_fld(ji+2,jj+1,jk) * zsurfmsk(ji+2,jj+1,jk) &
+                             &     + p_fld(ji  ,jj+2,jk) * zsurfmsk(ji  ,jj+2,jk) &
+                             &     + p_fld(ji+1,jj+2,jk) * zsurfmsk(ji+1,jj+2,jk) &
+                             &     + p_fld(ji+2,jj+2,jk) * zsurfmsk(ji+2,jj+2,jk) 
+
+                           zsfcrs =  zsurf(ji,jj  ,jk) + zsurf(ji+1,jj  ,jk) + zsurf(ji+2,jj  ,jk) &
+                             &     + zsurf(ji,jj+1,jk) + zsurf(ji+1,jj+1,jk) + zsurf(ji+2,jj+1,jk) &
+                             &     + zsurf(ji,jj+2,jk) + zsurf(ji+1,jj+2,jk) + zsurf(ji+2,jj+2,jk) 
+                            !
                            p_fld_crs(ii,ij,jk) = zflcrs
                            IF( zsfcrs /= 0.0 )  p_fld_crs(ii,ij,jk) = zflcrs / zsfcrs
-
+                        ENDDO      
+                     ENDDO
+                  ENDDO  
+               CASE DEFAULT
+                    STOP
+               END SELECT
+
+              CALL wrk_dealloc( jpi, jpj, jpk, zsurf, zsurfmsk )
+
+         CASE ( 'SUM' )
+         
+            CALL wrk_alloc( jpi, jpj, jpk, zsurfmsk )
+
+            SELECT CASE ( cd_type )
+              CASE( 'W' )
+                  IF( PRESENT( p_e3 ) ) THEN
+                    zsurfmsk(:,:,1) =  p_e12(:,:) * p_e3(:,:,1) * p_mask(:,:,1) 
+                    DO jk = 2, jpk
+                      zsurfmsk(:,:,jk) =  p_e12(:,:) * p_e3(:,:,jk) * p_mask(:,:,jk-1) 
+                    ENDDO
+                 ELSE
+                    zsurfmsk(:,:,1) =  p_e12(:,:) * p_mask(:,:,1) 
+                    DO jk = 2, jpk
+                      zsurfmsk(:,:,jk) =  p_e12(:,:) * p_mask(:,:,jk-1) 
+                    ENDDO
+                 ENDIF
+              CASE DEFAULT
+                 IF( PRESENT( p_e3 ) ) THEN
+                    DO jk = 1, jpk
+                      zsurfmsk(:,:,jk) =  p_e12(:,:) * p_e3(:,:,jk) * p_mask(:,:,jk) 
+                    ENDDO
+                 ELSE
+                    DO jk = 1, jpk
+                      zsurfmsk(:,:,jk) =  p_e12(:,:) * p_mask(:,:,jk) 
+                    ENDDO
+                 ENDIF
+              END SELECT
+
+            SELECT CASE ( cd_type )
+            
+               CASE( 'T', 'W' )
+         
+                  IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        je_2 = mje_crs(2)
+                        DO jk = 1, jpk           
+                           DO ji = nistr, niend, nn_factx
+                              ii   = ( ji - mis_crs(2) ) * rfactx_r + 2          
+                              zflcrs  =  p_fld(ji  ,je_2,jk) * zsurfmsk(ji  ,je_2,jk) &
+                                &      + p_fld(ji+1,je_2,jk) * zsurfmsk(ji+1,je_2,jk) &
+                                &      + p_fld(ji+2,je_2,jk) * zsurfmsk(ji+2,je_2,jk) 
+                               !
+                              p_fld_crs(ii,2,jk) = zflcrs
+                           ENDDO
+                        ENDDO
+                      ENDIF
+                  ELSE
+                     je_2 = mjs_crs(2)
+                     DO jk = 1, jpk           
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2   
+                           zflcrs  =  p_fld(ji  ,je_2  ,jk) * zsurfmsk(ji  ,je_2  ,jk)  &
+                             &      + p_fld(ji+1,je_2  ,jk) * zsurfmsk(ji+1,je_2  ,jk)  &
+                             &      + p_fld(ji+2,je_2  ,jk) * zsurfmsk(ji+2,je_2  ,jk)  &
+                             &      + p_fld(ji  ,je_2+1,jk) * zsurfmsk(ji  ,je_2+1,jk)  &
+                             &      + p_fld(ji+1,je_2+1,jk) * zsurfmsk(ji+1,je_2+1,jk)  &
+                             &      + p_fld(ji+2,je_2+1,jk) * zsurfmsk(ji+2,je_2+1,jk)  &
+                             &      + p_fld(ji  ,je_2+2,jk) * zsurfmsk(ji  ,je_2+2,jk)  &
+                             &      + p_fld(ji+1,je_2+2,jk) * zsurfmsk(ji+1,je_2+2,jk)  &
+                             &      + p_fld(ji+2,je_2+2,jk) * zsurfmsk(ji+2,je_2+2,jk)  
+                            !
+                            p_fld_crs(ii,2,jk) = zflcrs
+                        ENDDO
+                     ENDDO
+                  ENDIF
+                  !
+                  DO jk = 1, jpk           
+                     DO jj  = njstr, njend, nn_facty
+                        DO ji = nistr, niend, nn_factx
+                           ii  = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
+                           ij  = ( jj - njstr ) * rfacty_r + 3
+                           zflcrs  =  p_fld(ji  ,jj  ,jk) * zsurfmsk(ji  ,jj  ,jk)  &
+                             &      + p_fld(ji+1,jj  ,jk) * zsurfmsk(ji+1,jj  ,jk)  &
+                             &      + p_fld(ji+2,jj  ,jk) * zsurfmsk(ji+2,jj  ,jk)  &
+                             &      + p_fld(ji  ,jj+1,jk) * zsurfmsk(ji  ,jj+1,jk)  &
+                             &      + p_fld(ji+1,jj+1,jk) * zsurfmsk(ji+1,jj+1,jk)  &
+                             &      + p_fld(ji+2,jj+1,jk) * zsurfmsk(ji+2,jj+1,jk)  &
+                             &      + p_fld(ji  ,jj+2,jk) * zsurfmsk(ji  ,jj+2,jk)  &
+                             &      + p_fld(ji+1,jj+2,jk) * zsurfmsk(ji+1,jj+2,jk)  &
+                             &      + p_fld(ji+2,jj+2,jk) * zsurfmsk(ji+2,jj+2,jk)  
+                            !
+                            p_fld_crs(ii,ij,jk) = zflcrs
+                            ! 
                         ENDDO      
                      ENDDO
                   ENDDO   
             
-               CASE( 'W' )
-         
-                  DO jk = 2, jpk
-                    
+               CASE( 'V' )
+
+                  IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        ijje = mje_crs(2)
+                     ENDIF
+                  ELSE
+                     ijje = mjs_crs(2)
+                  ENDIF
+                  !
+                  DO jk = 1, jpk           
                      DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
+                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                        zflcrs  =  p_fld(ji  ,ijje,jk) * zsurfmsk(ji  ,ijje,jk) &
+                          &      + p_fld(ji+1,ijje,jk) * zsurfmsk(ji+1,ijje,jk) &
+                          &      + p_fld(ji+2,ijje,jk) * zsurfmsk(ji+2,ijje,jk) 
+                          !
+                        p_fld_crs(ii,2,jk) = zflcrs
+                     ENDDO
+                  ENDDO
+                  !
+                  DO jk = 1, jpk           
+                     DO jj  = njstr, njend, nn_facty
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
+                           ij   = ( jj - njstr ) * rfacty_r + 3
                            ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)                  
- 
-                           zflcrs =  p_fld(ji  ,jj  ,jk) * zsurf(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk-1) &
-                             &     + p_fld(ji+1,jj  ,jk) * zsurf(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk-1) &
-                             &     + p_fld(ji+2,jj  ,jk) * zsurf(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk-1) &
-                             &     + p_fld(ji  ,jj+1,jk) * zsurf(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk-1) &
-                             &     + p_fld(ji+1,jj+1,jk) * zsurf(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk-1) &
-                             &     + p_fld(ji+2,jj+1,jk) * zsurf(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk-1) &
-                             &     + p_fld(ji  ,jj+2,jk) * zsurf(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk-1) &
-                             &     + p_fld(ji+1,jj+2,jk) * zsurf(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk-1) &
-                             &     + p_fld(ji+2,jj+2,jk) * zsurf(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk-1) 
- 
-                           zsfcrs =  zsurf(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk-1) &
-                             &     + zsurf(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk-1) &
-                             &     + zsurf(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk-1) &
-                             &     + zsurf(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk-1) &
-                             &     + zsurf(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk-1) &
-                             &     + zsurf(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk-1) &
-                             &     + zsurf(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk-1) &
-                             &     + zsurf(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk-1) &
-                             &     + zsurf(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk-1) 
-                           !
+                           zflcrs  =  p_fld(ji  ,ijje,jk) * zsurfmsk(ji  ,ijje,jk) &
+                             &      + p_fld(ji+1,ijje,jk) * zsurfmsk(ji+1,ijje,jk) &
+                             &      + p_fld(ji+2,ijje,jk) * zsurfmsk(ji+2,ijje,jk) 
+                             !
                            p_fld_crs(ii,ij,jk) = zflcrs
-                           IF( zsfcrs /= 0.0 )  p_fld_crs(ii,ij,jk) = zflcrs / zsfcrs
-
+                           ! 
                         ENDDO      
                      ENDDO
                   ENDDO   
-
-                  DO ji = nistr, niend, nn_factx
-                     DO jj = njstr, njend, nn_facty
-                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                        ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                        ijje = mje_crs(ij)
-                        ijie = mie_crs(ii)                  
-
-                          zflcrs =   p_fld(ji  ,jj  ,1) * zsurf(ji  ,jj  ,1) * p_mask(ji  ,jj  ,1) &
-                             &     + p_fld(ji+1,jj  ,1) * zsurf(ji+1,jj  ,1) * p_mask(ji+1,jj  ,1) &
-                             &     + p_fld(ji+2,jj  ,1) * zsurf(ji+2,jj  ,1) * p_mask(ji+2,jj  ,1) &
-                             &     + p_fld(ji  ,jj+1,1) * zsurf(ji  ,jj+1,1) * p_mask(ji  ,jj+1,1) &
-                             &     + p_fld(ji+1,jj+1,1) * zsurf(ji+1,jj+1,1) * p_mask(ji+1,jj+1,1) &
-                             &     + p_fld(ji+2,jj+1,1) * zsurf(ji+2,jj+1,1) * p_mask(ji+2,jj+1,1) &
-                             &     + p_fld(ji  ,jj+2,1) * zsurf(ji  ,jj+2,1) * p_mask(ji  ,jj+2,1) &
-                             &     + p_fld(ji+1,jj+2,1) * zsurf(ji+1,jj+2,1) * p_mask(ji+1,jj+2,1) &
-                             &     + p_fld(ji+2,jj+2,1) * zsurf(ji+2,jj+2,1) * p_mask(ji+2,jj+2,1) 
- 
-                           zsfcrs =  zsurf(ji  ,jj  ,1) * p_mask(ji  ,jj  ,1) &
-                             &     + zsurf(ji+1,jj  ,1) * p_mask(ji+1,jj  ,1) &
-                             &     + zsurf(ji+2,jj  ,1) * p_mask(ji+2,jj  ,1) &
-                             &     + zsurf(ji  ,jj+1,1) * p_mask(ji  ,jj+1,1) &
-                             &     + zsurf(ji+1,jj+1,1) * p_mask(ji+1,jj+1,1) &
-                             &     + zsurf(ji+2,jj+1,1) * p_mask(ji+2,jj+1,1) &
-                             &     + zsurf(ji  ,jj+2,1) * p_mask(ji  ,jj+2,1) &
-                             &     + zsurf(ji+1,jj+2,1) * p_mask(ji+1,jj+2,1) &
-                             &     + zsurf(ji+2,jj+2,1) * p_mask(ji+2,jj+2,1) 
-                         
-                        p_fld_crs(ii,ij,1) = zflcrs
-                        IF( zsfcrs /= 0.0 )  p_fld_crs(ii,ij,1) = zflcrs / zsfcrs
-
-                     ENDDO      
+            
+               CASE( 'U' )
+
+                  IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        je_2 = mje_crs(2)
+                        DO jk = 1, jpk           
+                           DO ji = nistr, niend, nn_factx
+                              ii   = ( ji - mis_crs(2) ) * rfactx_r + 2  
+                              ijie = mie_crs(ii)
+                              zflcrs  =  p_fld(ijie,je_2,jk) * zsurfmsk(ijie,je_2,jk)  
+                              p_fld_crs(ii,2,jk) = zflcrs
+                           ENDDO
+                        ENDDO
+                      ENDIF
+                  ELSE
+                     je_2 = mjs_crs(2)
+                     DO jk = 1, jpk           
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2   
+                           ijie = mie_crs(ii)
+                           zflcrs =  p_fld(ijie,je_2  ,jk) * zsurfmsk(ijie,je_2  ,jk)  &
+                             &     + p_fld(ijie,je_2+1,jk) * zsurfmsk(ijie,je_2+1,jk)  &
+                             &     + p_fld(ijie,je_2+2,jk) * zsurfmsk(ijie,je_2+2,jk) 
+
+                           p_fld_crs(ii,2,jk) = zflcrs
+                        ENDDO
+                     ENDDO
+                  ENDIF
+                  !
+                  DO jk = 1, jpk           
+                     DO jj  = njstr, njend, nn_facty
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                           ij   = ( jj - njstr ) * rfacty_r + 3
+                           ijie = mie_crs(ii)
+                           zflcrs =  p_fld(ijie,jj  ,jk) * zsurfmsk(ijie,jj  ,jk)  &
+                              &    + p_fld(ijie,jj+1,jk) * zsurfmsk(ijie,jj+1,jk)  &
+                              &    + p_fld(ijie,jj+2,jk) * zsurfmsk(ijie,jj+2,jk) 
+                             !
+                           p_fld_crs(ii,ij,jk) = zflcrs
+                           ! 
+                        ENDDO      
+                     ENDDO
+                  ENDDO   
+
+              END SELECT
+
+              IF( PRESENT( p_surf_crs ) ) THEN
+                 WHERE ( p_surf_crs /= 0.0 ) p_fld_crs(:,:,:) = p_fld_crs(:,:,:) / p_surf_crs(:,:,:)
+              ENDIF
+
+              CALL wrk_dealloc( jpi, jpj, jpk, zsurfmsk )
+
+         CASE ( 'MAX' )    !  search the max of unmasked grid cells
+
+            CALL wrk_alloc( jpi, jpj, jpk, zmask )
+
+            SELECT CASE ( cd_type )
+              CASE( 'W' )
+                  zmask(:,:,1) = p_mask(:,:,1) 
+                  DO jk = 2, jpk
+                     zmask(:,:,jk) = p_mask(:,:,jk-1) 
                   ENDDO
-
-              END SELECT
-
-              CALL wrk_dealloc( jpi, jpj, jpk, zsurf )
-
-         CASE ( 'SUM' )
-         
-            CALL wrk_alloc( jpi, jpj, jpk, zsurf )
-
-            IF( PRESENT( p_e3 ) ) THEN
-               DO jk = 1, jpk
-                 zsurf(:,:,jk) =  p_e12(:,:) * p_e3(:,:,jk)
-               ENDDO
-            ELSE
-               DO jk = 1, jpk
-                 zsurf(:,:,jk) =  p_e12(:,:) 
-               ENDDO
-            ENDIF
+              CASE ( 'T' )
+                  DO jk = 1, jpk
+                     zmask(:,:,jk) = p_mask(:,:,jk) 
+                  ENDDO
+            END SELECT
 
             SELECT CASE ( cd_type )
             
-               CASE( 'T' )
+               CASE( 'T', 'W' )
          
-                  DO jk = 1, jpk
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)                  
- 
-                           zflcrs  =  p_fld(ji  ,jj  ,jk) * zsurf(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk) &
-                             &      + p_fld(ji+1,jj  ,jk) * zsurf(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk) &
-                             &      + p_fld(ji+2,jj  ,jk) * zsurf(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk) &
-                             &      + p_fld(ji  ,jj+1,jk) * zsurf(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk) &
-                             &      + p_fld(ji+1,jj+1,jk) * zsurf(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk) &
-                             &      + p_fld(ji+2,jj+1,jk) * zsurf(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk) &
-                             &      + p_fld(ji  ,jj+2,jk) * zsurf(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk) &
-                             &      + p_fld(ji+1,jj+2,jk) * zsurf(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk) &
-                             &      + p_fld(ji+2,jj+2,jk) * zsurf(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk) 
+                  IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        je_2 = mje_crs(2)
+                        DO jk = 1, jpk           
+                           DO ji = nistr, niend, nn_factx
+                              ii   = ( ji - mis_crs(2) ) * rfactx_r + 2        
+                              zflcrs =  &
+                                & MAX( p_fld(ji  ,je_2,jk) * zmask(ji  ,je_2,jk) - ( 1.- zmask(ji  ,je_2,jk) ) * r_inf ,  &
+                                &      p_fld(ji+1,je_2,jk) * zmask(ji+1,je_2,jk) - ( 1.- zmask(ji+1,je_2,jk) ) * r_inf ,  &
+                                &      p_fld(ji+2,je_2,jk) * zmask(ji+2,je_2,jk) - ( 1.- zmask(ji+2,je_2,jk) ) * r_inf  )
+                              !
+                              p_fld_crs(ii,2,jk) = zflcrs
+                           ENDDO
+                        ENDDO
+                      ENDIF
+                  ELSE
+                     je_2 = mjs_crs(2)
+                     DO jk = 1, jpk           
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2   
+                           zflcrs =  &
+                             & MAX( p_fld(ji  ,je_2  ,jk) * zmask(ji  ,je_2  ,jk) - ( 1.- zmask(ji  ,je_2  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,je_2  ,jk) * zmask(ji+1,je_2  ,jk) - ( 1.- zmask(ji+1,je_2  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,je_2  ,jk) * zmask(ji+2,je_2  ,jk) - ( 1.- zmask(ji+2,je_2  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji  ,je_2+1,jk) * zmask(ji  ,je_2+1,jk) - ( 1.- zmask(ji  ,je_2+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,je_2+1,jk) * zmask(ji+1,je_2+1,jk) - ( 1.- zmask(ji+1,je_2+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,je_2+1,jk) * zmask(ji+2,je_2+1,jk) - ( 1.- zmask(ji+2,je_2+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji  ,je_2+2,jk) * zmask(ji  ,je_2+2,jk) - ( 1.- zmask(ji  ,je_2+2,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,je_2+2,jk) * zmask(ji+1,je_2+2,jk) - ( 1.- zmask(ji+1,je_2+2,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,je_2+2,jk) * zmask(ji+2,je_2+2,jk) - ( 1.- zmask(ji+2,je_2+2,jk) ) * r_inf   )
+                           !
+                           p_fld_crs(ii,2,jk) = zflcrs
+                        ENDDO
+                     ENDDO
+                  ENDIF
+                  !
+                  DO jk = 1, jpk           
+                     DO jj  = njstr, njend, nn_facty
+                        DO ji = nistr, niend, nn_factx
+                           ii  = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
+                           ij  = ( jj - njstr ) * rfacty_r + 3
+                           zflcrs =  &
+                             & MAX( p_fld(ji  ,jj  ,jk) * zmask(ji  ,jj  ,jk) - ( 1.- zmask(ji  ,jj  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,jj  ,jk) * zmask(ji+1,jj  ,jk) - ( 1.- zmask(ji+1,jj  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,jj  ,jk) * zmask(ji+2,jj  ,jk) - ( 1.- zmask(ji+2,jj  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji  ,jj+1,jk) * zmask(ji  ,jj+1,jk) - ( 1.- zmask(ji  ,jj+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,jj+1,jk) * zmask(ji+1,jj+1,jk) - ( 1.- zmask(ji+1,jj+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,jj+1,jk) * zmask(ji+2,jj+1,jk) - ( 1.- zmask(ji+2,jj+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji  ,jj+2,jk) * zmask(ji  ,jj+2,jk) - ( 1.- zmask(ji  ,jj+2,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,jj+2,jk) * zmask(ji+1,jj+2,jk) - ( 1.- zmask(ji+1,jj+2,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,jj+2,jk) * zmask(ji+2,jj+2,jk) - ( 1.- zmask(ji+2,jj+2,jk) ) * r_inf   )
                            !
                            p_fld_crs(ii,ij,jk) = zflcrs
@@ -656,23 +851,37 @@
                   ENDDO   
             
-               CASE( 'W' )
-         
-                  DO jk = 2, jpk
+               CASE( 'V' )
+
+                 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        ijje = mje_crs(2)
+                      ENDIF
+                  ELSE
+                     ijje = mjs_crs(2)
+                  ENDIF
+
+                  DO jk = 1, jpk
                      DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
+                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                        zflcrs = &
+                          & MAX( p_fld(ji  ,ijje,jk) * p_mask(ji  ,ijje,jk) - ( 1.- p_mask(ji,ijje,jk) ) * r_inf ,  &
+                          &      p_fld(ji+1,ijje,jk) * p_mask(ji+1,ijje,jk) - ( 1.- p_mask(ji,ijje,jk) ) * r_inf ,  &
+                          &      p_fld(ji+2,ijje,jk) * p_mask(ji+2,ijje,jk) - ( 1.- p_mask(ji,ijje,jk) ) * r_inf )
+                          !
+                        p_fld_crs(ii,2,jk) = zflcrs
+                     ENDDO
+                  ENDDO
+                  !
+                  DO jk = 1, jpk           
+                     DO jj  = njstr, njend, nn_facty
+                        DO ji = nistr, niend, nn_factx
+                           ii  = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
+                           ij  = ( jj - njstr ) * rfacty_r + 3
                            ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)
                            !                  
-                           zflcrs  =  p_fld(ji  ,jj  ,jk) * zsurf(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk-1) &
-                             &      + p_fld(ji+1,jj  ,jk) * zsurf(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk-1) &
-                             &      + p_fld(ji+2,jj  ,jk) * zsurf(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk-1) &
-                             &      + p_fld(ji  ,jj+1,jk) * zsurf(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk-1) &
-                             &      + p_fld(ji+1,jj+1,jk) * zsurf(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk-1) &
-                             &      + p_fld(ji+2,jj+1,jk) * zsurf(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk-1) &
-                             &      + p_fld(ji  ,jj+2,jk) * zsurf(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk-1) &
-                             &      + p_fld(ji+1,jj+2,jk) * zsurf(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk-1) &
-                             &      + p_fld(ji+2,jj+2,jk) * zsurf(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk-1) 
+                           zflcrs = &
+                             & MAX( p_fld(ji  ,ijje,jk) * p_mask(ji  ,ijje,jk) - ( 1.- p_mask(ji,ijje,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,ijje,jk) * p_mask(ji+1,ijje,jk) - ( 1.- p_mask(ji,ijje,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,ijje,jk) * p_mask(ji+2,ijje,jk) - ( 1.- p_mask(ji,ijje,jk) ) * r_inf )
                            !
                            p_fld_crs(ii,ij,jk) = zflcrs
@@ -682,63 +891,49 @@
                   ENDDO   
 
-                  DO ji = nistr, niend, nn_factx
-                     DO jj = njstr, njend, nn_facty
-                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                        ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                        ijje = mje_crs(ij)
-                        ijie = mie_crs(ii)                  
-                        !
-                        zflcrs  =   p_fld(ji  ,jj  ,1) * zsurf(ji  ,jj  ,1) * p_mask(ji  ,jj  ,1) &
-                           &      + p_fld(ji+1,jj  ,1) * zsurf(ji+1,jj  ,1) * p_mask(ji+1,jj  ,1) &
-                           &      + p_fld(ji+2,jj  ,1) * zsurf(ji+2,jj  ,1) * p_mask(ji+2,jj  ,1) &
-                           &      + p_fld(ji  ,jj+1,1) * zsurf(ji  ,jj+1,1) * p_mask(ji  ,jj+1,1) &
-                           &      + p_fld(ji+1,jj+1,1) * zsurf(ji+1,jj+1,1) * p_mask(ji+1,jj+1,1) &
-                           &      + p_fld(ji+2,jj+1,1) * zsurf(ji+2,jj+1,1) * p_mask(ji+2,jj+1,1) &
-                           &      + p_fld(ji  ,jj+2,1) * zsurf(ji  ,jj+2,1) * p_mask(ji  ,jj+2,1) &
-                           &      + p_fld(ji+1,jj+2,1) * zsurf(ji+1,jj+2,1) * p_mask(ji+1,jj+2,1) &
-                           &      + p_fld(ji+2,jj+2,1) * zsurf(ji+2,jj+2,1) * p_mask(ji+2,jj+2,1) 
-                        !
-                        p_fld_crs(ii,ij,1) = zflcrs
-                        !
-                     ENDDO      
-                  ENDDO
-           
-               CASE( 'V' )
-         
-                  DO jk = 1, jpk
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)
-                           !                  
-                           zflcrs  =  p_fld(ji  ,ijje,jk) * zsurf(ji  ,ijje,jk) * p_mask(ji  ,ijje,jk) &
-                             &      + p_fld(ji+1,ijje,jk) * zsurf(ji+1,ijje,jk) * p_mask(ji+1,ijje,jk) &
-                             &      + p_fld(ji+2,ijje,jk) * zsurf(ji+2,ijje,jk) * p_mask(ji+2,ijje,jk) 
-                           !
-                           p_fld_crs(ii,ij,jk) = zflcrs
-                           !
-                         ENDDO      
-                     ENDDO
-                  ENDDO   
-
             
                CASE( 'U' )
-         
-                  DO jk = 1, jpk
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
+
+                 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        je_2 = mje_crs(2)
+                        DO jk = 1, jpk           
+                           DO ji = nistr, niend, nn_factx
+                              ii   = ( ji - mis_crs(2) ) * rfactx_r + 2  
+                              ijie = mie_crs(ii)
+                              zflcrs = p_fld(ijie,je_2,jk) * p_mask(ijie,je_2,jk) - ( 1.- p_mask(ijie,je_2,jk) ) * r_inf 
+                              !
+                              p_fld_crs(ii,2,jk) = zflcrs
+                            ENDDO
+                        ENDDO
+                      ENDIF
+                  ELSE
+                     je_2 = mjs_crs(2)
+                     DO jk = 1, jpk           
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2   
+                           ijie = mie_crs(ii)
+                           zflcrs = &
+                             & MAX( p_fld(ijie,je_2  ,jk) * p_mask(ijie,je_2  ,jk) - ( 1.- p_mask(ijie,je_2,jk) ) * r_inf ,  &
+                             &      p_fld(ijie,je_2+1,jk) * p_mask(ijie,je_2+1,jk) - ( 1.- p_mask(ijie,je_2,jk) ) * r_inf ,  &
+                             &      p_fld(ijie,je_2+2,jk) * p_mask(ijie,je_2+2,jk) - ( 1.- p_mask(ijie,je_2,jk) ) * r_inf  )
+                            !
+                           p_fld_crs(ii,2,jk) = zflcrs
+                        ENDDO
+                     ENDDO
+                  ENDIF
+                  !
+                  DO jk = 1, jpk           
+                     DO jj  = njstr, njend, nn_facty
+                        DO ji = nistr, niend, nn_factx
                            ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
+                           ij   = ( jj - njstr ) * rfacty_r + 3
                            ijie = mie_crs(ii)
-                           !                  
-                           zflcrs =  p_fld(ijie,jj  ,jk) * zsurf(ijie,jj  ,jk) * p_mask(ijie,jj  ,jk) &
-                             &     + p_fld(ijie,jj+1,jk) * zsurf(ijie,jj+1,jk) * p_mask(ijie,jj+1,jk) &
-                             &     + p_fld(ijie,jj+2,jk) * zsurf(ijie,jj+2,jk) * p_mask(ijie,jj+2,jk)
-                           !
+                           zflcrs =  &
+                             & MAX( p_fld(ijie,jj  ,jk) * p_mask(ijie,jj  ,jk) - ( 1.- p_mask(ijie,jj,jk) ) * r_inf ,  &
+                             &      p_fld(ijie,jj+1,jk) * p_mask(ijie,jj+1,jk) - ( 1.- p_mask(ijie,jj,jk) ) * r_inf ,  &
+                             &      p_fld(ijie,jj+2,jk) * p_mask(ijie,jj+2,jk) - ( 1.- p_mask(ijie,jj,jk) ) * r_inf  )
+                           ! 
                            p_fld_crs(ii,ij,jk) = zflcrs
-                           !
+                           ! 
                         ENDDO      
                      ENDDO
@@ -747,33 +942,77 @@
               END SELECT
 
-              IF( PRESENT( p_surf_crs ) ) THEN
-                 WHERE ( p_surf_crs /= 0.0 ) p_fld_crs(:,:,:) = p_fld_crs(:,:,:) / p_surf_crs(:,:,:)
-              ENDIF
-
-              CALL wrk_dealloc( jpi, jpj, jpk, zsurf )
-
-         CASE ( 'MAX' )
+              CALL wrk_dealloc( jpi, jpj, jpk, zmask )
+
+         CASE ( 'MIN' )      !   Search the min of unmasked grid cells
+
+            CALL wrk_alloc( jpi, jpj, jpk, zmask )
+
+            SELECT CASE ( cd_type )
+              CASE( 'W' )
+                  zmask(:,:,1) = p_mask(:,:,1) 
+                  DO jk = 2, jpk
+                     zmask(:,:,jk) = p_mask(:,:,jk-1) 
+                  ENDDO
+              CASE ( 'T' )
+                  DO jk = 1, jpk
+                     zmask(:,:,jk) = p_mask(:,:,jk) 
+                  ENDDO
+            END SELECT
+
+            SELECT CASE ( cd_type )
+
+               CASE( 'T', 'W' )
          
-            SELECT CASE ( cd_type )
-            
-               CASE( 'T' )
-         
-                  DO jk = 1, jpk
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)                  
- 
-                           zflcrs =  MAX( p_fld(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk),  &
-                             &            p_fld(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk),  &
-                             &            p_fld(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk),  &
-                             &            p_fld(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk),  &
-                             &            p_fld(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk),  &
-                             &            p_fld(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk),  &
-                             &            p_fld(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk),  &
-                             &            p_fld(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk),  &
-                             &            p_fld(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk)   )
+                  IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        je_2 = mje_crs(2)
+                        DO jk = 1, jpk           
+                           DO ji = nistr, niend, nn_factx
+                              ii   = ( ji - mis_crs(2) ) * rfactx_r + 2        
+                              zflcrs =  &
+                                & MIN( p_fld(ji  ,je_2,jk) * zmask(ji  ,je_2,jk) + ( 1.- zmask(ji  ,je_2,jk) ) * r_inf ,  &
+                                &      p_fld(ji+1,je_2,jk) * zmask(ji+1,je_2,jk) + ( 1.- zmask(ji+1,je_2,jk) ) * r_inf ,  &
+                                &      p_fld(ji+2,je_2,jk) * zmask(ji+2,je_2,jk) + ( 1.- zmask(ji+2,je_2,jk) ) * r_inf  )
+                              !
+                              p_fld_crs(ii,2,jk) = zflcrs
+                           ENDDO
+                        ENDDO
+                      ENDIF
+                  ELSE
+                     je_2 = mjs_crs(2)
+                     DO jk = 1, jpk           
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2   
+                           zflcrs =  &
+                             & MIN( p_fld(ji  ,je_2  ,jk) * zmask(ji  ,je_2  ,jk) + ( 1.- zmask(ji  ,je_2  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,je_2  ,jk) * zmask(ji+1,je_2  ,jk) + ( 1.- zmask(ji+1,je_2  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,je_2  ,jk) * zmask(ji+2,je_2  ,jk) + ( 1.- zmask(ji+2,je_2  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji  ,je_2+1,jk) * zmask(ji  ,je_2+1,jk) + ( 1.- zmask(ji  ,je_2+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,je_2+1,jk) * zmask(ji+1,je_2+1,jk) + ( 1.- zmask(ji+1,je_2+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,je_2+1,jk) * zmask(ji+2,je_2+1,jk) + ( 1.- zmask(ji+2,je_2+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji  ,je_2+2,jk) * zmask(ji  ,je_2+2,jk) + ( 1.- zmask(ji  ,je_2+2,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,je_2+2,jk) * zmask(ji+1,je_2+2,jk) + ( 1.- zmask(ji+1,je_2+2,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,je_2+2,jk) * zmask(ji+2,je_2+2,jk) + ( 1.- zmask(ji+2,je_2+2,jk) ) * r_inf   )
+                           !
+                           p_fld_crs(ii,2,jk) = zflcrs
+                        ENDDO
+                     ENDDO
+                  ENDIF
+                  !
+                  DO jk = 1, jpk           
+                     DO jj  = njstr, njend, nn_facty
+                        DO ji = nistr, niend, nn_factx
+                           ii  = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
+                           ij  = ( jj - njstr ) * rfacty_r + 3
+                           zflcrs =  &
+                             & MIN( p_fld(ji  ,jj  ,jk) * zmask(ji  ,jj  ,jk) + ( 1.- zmask(ji  ,jj  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,jj  ,jk) * zmask(ji+1,jj  ,jk) + ( 1.- zmask(ji+1,jj  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,jj  ,jk) * zmask(ji+2,jj  ,jk) + ( 1.- zmask(ji+2,jj  ,jk) ) * r_inf ,  &
+                             &      p_fld(ji  ,jj+1,jk) * zmask(ji  ,jj+1,jk) + ( 1.- zmask(ji  ,jj+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,jj+1,jk) * zmask(ji+1,jj+1,jk) + ( 1.- zmask(ji+1,jj+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,jj+1,jk) * zmask(ji+2,jj+1,jk) + ( 1.- zmask(ji+2,jj+1,jk) ) * r_inf ,  &
+                             &      p_fld(ji  ,jj+2,jk) * zmask(ji  ,jj+2,jk) + ( 1.- zmask(ji  ,jj+2,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,jj+2,jk) * zmask(ji+1,jj+2,jk) + ( 1.- zmask(ji+1,jj+2,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,jj+2,jk) * zmask(ji+2,jj+2,jk) + ( 1.- zmask(ji+2,jj+2,jk) ) * r_inf   )
                            !
                            p_fld_crs(ii,ij,jk) = zflcrs
@@ -783,23 +1022,36 @@
                   ENDDO   
             
-               CASE( 'W' )
-         
-                  DO jk = 2, jpk
+               CASE( 'V' )
+
+                  IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        ijje = mje_crs(2)
+                      ENDIF
+                  ELSE
+                     ijje = mjs_crs(2)
+                  ENDIF
+
+                  DO jk = 1, jpk
                      DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
+                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                        zflcrs = &
+                          & MIN( p_fld(ji  ,ijje,jk) * p_mask(ji  ,ijje,jk) + ( 1.- p_mask(ji,ijje,jk) ) * r_inf ,  &
+                          &      p_fld(ji+1,ijje,jk) * p_mask(ji+1,ijje,jk) + ( 1.- p_mask(ji,ijje,jk) ) * r_inf ,  &
+                          &      p_fld(ji+2,ijje,jk) * p_mask(ji+2,ijje,jk) + ( 1.- p_mask(ji,ijje,jk) ) * r_inf )
+                          !
+                        p_fld_crs(ii,2,jk) = zflcrs
+                     ENDDO
+                  ENDDO
+                  !
+                  DO jk = 1, jpk           
+                     DO jj  = njstr, njend, nn_facty
+                        DO ji = nistr, niend, nn_factx
+                           ii  = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
+                           ij  = ( jj - njstr ) * rfacty_r + 3
                            ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)
-                           !                  
-                           zflcrs =  MAX( p_fld(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk-1),  &
-                             &            p_fld(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk-1),  &
-                             &            p_fld(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk-1),  &
-                             &            p_fld(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk-1),  &
-                             &            p_fld(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk-1),  &
-                             &            p_fld(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk-1),  &
-                             &            p_fld(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk-1),  &
-                             &            p_fld(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk-1),  &
-                             &            p_fld(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk-1) )
+                           zflcrs = &
+                             & MIN( p_fld(ji  ,ijje,jk) * p_mask(ji  ,ijje,jk) + ( 1.- p_mask(ji,ijje,jk) ) * r_inf ,  &
+                             &      p_fld(ji+1,ijje,jk) * p_mask(ji+1,ijje,jk) + ( 1.- p_mask(ji,ijje,jk) ) * r_inf ,  &
+                             &      p_fld(ji+2,ijje,jk) * p_mask(ji+2,ijje,jk) + ( 1.- p_mask(ji,ijje,jk) ) * r_inf )
                            !
                            p_fld_crs(ii,ij,jk) = zflcrs
@@ -809,196 +1061,64 @@
                   ENDDO   
 
-                  DO ji = nistr, niend, nn_factx
-                     DO jj = njstr, njend, nn_facty
-                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                        ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                        ijje = mje_crs(ij)
-                        ijie = mie_crs(ii)                  
-                        !
-                        zflcrs = MAX( p_fld(ji  ,jj  ,1) * p_mask(ji  ,jj  ,1),  &
-                           &          p_fld(ji+1,jj  ,1) * p_mask(ji+1,jj  ,1),  &
-                           &          p_fld(ji+2,jj  ,1) * p_mask(ji+2,jj  ,1),  &
-                           &          p_fld(ji  ,jj+1,1) * p_mask(ji  ,jj+1,1),  &
-                           &          p_fld(ji+1,jj+1,1) * p_mask(ji+1,jj+1,1),  &
-                           &          p_fld(ji+2,jj+1,1) * p_mask(ji+2,jj+1,1),  &
-                           &          p_fld(ji  ,jj+2,1) * p_mask(ji  ,jj+2,1),  &
-                           &          p_fld(ji+1,jj+2,1) * p_mask(ji+1,jj+2,1),  &
-                           &          p_fld(ji+2,jj+2,1) * p_mask(ji+2,jj+2,1)  ) 
-                         !
-                         p_fld_crs(ii,ij,1) = zflcrs
-                         !
-                     ENDDO      
-                  ENDDO
-           
-               CASE( 'V' )
-         
-                  DO jk = 1, jpk
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
+            
+               CASE( 'U' )
+
+                 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        je_2 = mje_crs(2)
+                        DO jk = 1, jpk           
+                           DO ji = nistr, niend, nn_factx
+                              ii   = ( ji - mis_crs(2) ) * rfactx_r + 2  
+                              ijie = mie_crs(ii)
+                              zflcrs = p_fld(ijie,je_2,jk) * p_mask(ijie,je_2,jk) + ( 1.- p_mask(ijie,je_2,jk) ) * r_inf 
+                              !
+                              p_fld_crs(ii,2,jk) = zflcrs
+                            ENDDO
+                        ENDDO
+                      ENDIF
+                  ELSE
+                     je_2 = mjs_crs(2)
+                     DO jk = 1, jpk           
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2   
+                           ijie = mie_crs(ii)
+                           zflcrs = &
+                             & MIN( p_fld(ijie,je_2  ,jk) * p_mask(ijie,je_2  ,jk) + ( 1.- p_mask(ijie,je_2,jk) ) * r_inf ,  &
+                             &      p_fld(ijie,je_2+1,jk) * p_mask(ijie,je_2+1,jk) + ( 1.- p_mask(ijie,je_2,jk) ) * r_inf ,  &
+                             &      p_fld(ijie,je_2+2,jk) * p_mask(ijie,je_2+2,jk) + ( 1.- p_mask(ijie,je_2,jk) ) * r_inf  )
+                            !
+                           p_fld_crs(ii,2,jk) = zflcrs
+                        ENDDO
+                     ENDDO
+                  ENDIF
+                  !
+                  DO jk = 1, jpk           
+                     DO jj  = njstr, njend, nn_facty
+                        DO ji = nistr, niend, nn_factx
                            ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
+                           ij   = ( jj - njstr ) * rfacty_r + 3
                            ijie = mie_crs(ii)
-                           !                  
-                           zflcrs = MAX( p_fld(ji  ,ijje,jk) * p_mask(ji  ,ijje,jk),  &
-                             &           p_fld(ji+1,ijje,jk) * p_mask(ji+1,ijje,jk),  &
-                             &           p_fld(ji+2,ijje,jk) * p_mask(ji+2,ijje,jk) )
-                           !
+                           zflcrs = &
+                             & MIN( p_fld(ijie,jj  ,jk) * p_mask(ijie,jj  ,jk) + ( 1.- p_mask(ijie,jj,jk) ) * r_inf ,  &
+                             &      p_fld(ijie,jj+1,jk) * p_mask(ijie,jj+1,jk) + ( 1.- p_mask(ijie,jj,jk) ) * r_inf ,  &
+                             &      p_fld(ijie,jj+2,jk) * p_mask(ijie,jj+2,jk) + ( 1.- p_mask(ijie,jj,jk) ) * r_inf  )
+                           ! 
                            p_fld_crs(ii,ij,jk) = zflcrs
-                           !
+                           ! 
                         ENDDO      
                      ENDDO
                   ENDDO   
-
-            
-               CASE( 'U' )
-         
-                  DO jk = 1, jpk
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)
-                           !                  
-                           Zflcrs = MAX( p_fld(ijie,jj  ,jk) * p_mask(ijie,jj  ,jk),  &
-                             &           p_fld(ijie,jj+1,jk) * p_mask(ijie,jj+1,jk),  &
-                             &           p_fld(ijie,jj+2,jk) * p_mask(ijie,jj+2,jk) )
-                           !
-                           p_fld_crs(ii,ij,jk) = zflcrs
-                           !
-                        ENDDO      
-                     ENDDO
-                  ENDDO   
-
-              END SELECT
-
-         CASE ( 'MIN' )
-            !   Search the min of masked grid cells
-            SELECT CASE ( cd_type )
-            
-               CASE( 'T' )
-         
-                  DO jk = 1, jpk
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)                  
-                           
-                           zflcrs =  MIN( p_fld(ji  ,jj  ,jk) * ( 1. + ( 1. - p_mask(ji  ,jj  ,jk) ) * zeps ),  &
-                             &            p_fld(ji+1,jj  ,jk) * ( 1. + ( 1. - p_mask(ji+1,jj  ,jk) ) * zeps ),  &
-                             &            p_fld(ji+2,jj  ,jk) * ( 1. + ( 1. - p_mask(ji+2,jj  ,jk) ) * zeps ),  &
-                             &            p_fld(ji  ,jj+1,jk) * ( 1. + ( 1. - p_mask(ji  ,jj  ,jk) ) * zeps ),  &
-                             &            p_fld(ji+1,jj+1,jk) * ( 1. + ( 1. - p_mask(ji+1,jj+1,jk) ) * zeps ),  &
-                             &            p_fld(ji+2,jj+1,jk) * ( 1. + ( 1. - p_mask(ji+2,jj+2,jk) ) * zeps ),  &
-                             &            p_fld(ji  ,jj+2,jk) * ( 1. + ( 1. - p_mask(ji  ,jj  ,jk) ) * zeps ),  &
-                             &            p_fld(ji+1,jj+2,jk) * ( 1. + ( 1. - p_mask(ji+1,jj+1,jk) ) * zeps ),  &
-                             &            p_fld(ji+2,jj+2,jk) * ( 1. + ( 1. - p_mask(ji+2,jj+2,jk) ) * zeps )   )
-                           !
-                           p_fld_crs(ii,ij,jk) = zflcrs * p_mask_crs(ii,ij,jk)
-                           !
-                        ENDDO      
-                     ENDDO
-                  ENDDO   
-           
-               CASE( 'W' )
-         
-                  DO jk = 2, jpk
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)                  
-                           
-                           zflcrs =  MIN( p_fld(ji  ,jj  ,jk) * ( 1. + ( 1. - p_mask(ji  ,jj  ,jk-1) ) * zeps ),  &
-                             &            p_fld(ji+1,jj  ,jk) * ( 1. + ( 1. - p_mask(ji+1,jj  ,jk-1) ) * zeps ),  &
-                             &            p_fld(ji+2,jj  ,jk) * ( 1. + ( 1. - p_mask(ji+2,jj  ,jk-1) ) * zeps ),  &
-                             &            p_fld(ji  ,jj+1,jk) * ( 1. + ( 1. - p_mask(ji  ,jj  ,jk-1) ) * zeps ),  &
-                             &            p_fld(ji+1,jj+1,jk) * ( 1. + ( 1. - p_mask(ji+1,jj+1,jk-1) ) * zeps ),  &
-                             &            p_fld(ji+2,jj+1,jk) * ( 1. + ( 1. - p_mask(ji+2,jj+2,jk-1) ) * zeps ),  &
-                             &            p_fld(ji  ,jj+2,jk) * ( 1. + ( 1. - p_mask(ji  ,jj  ,jk-1) ) * zeps ),  &
-                             &            p_fld(ji+1,jj+2,jk) * ( 1. + ( 1. - p_mask(ji+1,jj+1,jk-1) ) * zeps ),  &
-                             &            p_fld(ji+2,jj+2,jk) * ( 1. + ( 1. - p_mask(ji+2,jj+2,jk-1) ) * zeps )   )
-                           !
-                           p_fld_crs(ii,ij,jk) = zflcrs * p_mask_crs(ii,ij,jk)
-                           !
-                        ENDDO      
-                     ENDDO
-                  ENDDO  
- 
-                  DO ji = nistr, niend, nn_factx
-                     DO jj = njstr, njend, nn_facty
-                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                        ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                        ijje = mje_crs(ij)
-                        ijie = mie_crs(ii)                  
-                        
-                        zflcrs =  MIN( p_fld(ji  ,jj  ,1) * ( 1. + ( 1. - p_mask(ji  ,jj  ,1) ) * zeps ),  &
-                          &            p_fld(ji+1,jj  ,1) * ( 1. + ( 1. - p_mask(ji+1,jj  ,1) ) * zeps ),  &
-                          &            p_fld(ji+2,jj  ,1) * ( 1. + ( 1. - p_mask(ji+2,jj  ,1) ) * zeps ),  &
-                          &            p_fld(ji  ,jj+1,1) * ( 1. + ( 1. - p_mask(ji  ,jj  ,1) ) * zeps ),  &
-                          &            p_fld(ji+1,jj+1,1) * ( 1. + ( 1. - p_mask(ji+1,jj+1,1) ) * zeps ),  &
-                          &            p_fld(ji+2,jj+1,1) * ( 1. + ( 1. - p_mask(ji+2,jj+2,1) ) * zeps ),  &
-                          &            p_fld(ji  ,jj+2,1) * ( 1. + ( 1. - p_mask(ji  ,jj  ,1) ) * zeps ),  &
-                          &            p_fld(ji+1,jj+2,1) * ( 1. + ( 1. - p_mask(ji+1,jj+1,1) ) * zeps ),  &
-                          &            p_fld(ji+2,jj+2,1) * ( 1. + ( 1. - p_mask(ji+2,jj+2,1) ) * zeps )   )
-                        !
-                        p_fld_crs(ii,ij,1) = zflcrs * p_mask_crs(ii,ij,1)
-                        !
-                     ENDDO      
-                  ENDDO
-
-               CASE( 'V' )
-         
-                  DO jk = 1, jpk
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)                  
-                           
-                           zflcrs =  MIN( p_fld(ji  ,ijje,jk) * ( 1. + ( 1. - p_mask(ji  ,ijje,jk) ) * zeps ),  &
-                             &            p_fld(ji+1,ijje,jk) * ( 1. + ( 1. - p_mask(ji+1,ijje,jk) ) * zeps ),  &
-                             &            p_fld(ji+2,ijje,jk) * ( 1. + ( 1. - p_mask(ji+2,ijje,jk) ) * zeps )   )
-                           !
-                           p_fld_crs(ii,ij,jk) = zflcrs * p_mask_crs(ii,ij,jk)
-                           !
-                        ENDDO      
-                     ENDDO
-                  ENDDO  
-
-
-               CASE( 'U' )
-         
-                  DO jk = 1, jpk
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)                  
-                           
-                           zflcrs =  MIN( p_fld(ijie,jj  ,jk) * ( 1. + ( 1. - p_mask(ijie,jj  ,jk) ) * zeps ),  &
-                             &            p_fld(ijie,jj+1,jk) * ( 1. + ( 1. - p_mask(ijie,jj+1,jk) ) * zeps ),  &
-                             &            p_fld(ijie,jj+2,jk) * ( 1. + ( 1. - p_mask(ijie,jj+2,jk) ) * zeps )   )
-                           !
-                           p_fld_crs(ii,ij,jk) = zflcrs * p_mask_crs(ii,ij,jk)
-                           !
-                        ENDDO      
-                     ENDDO
-                  ENDDO  
+          
             END SELECT
+            !
+            CALL wrk_dealloc( jpi, jpj, jpk, zmask )
             !
          END SELECT
          !
-         CALL crs_lbc_lnk( p_fld_crs, cd_type, 1.0 )
+         CALL crs_lbc_lnk( p_fld_crs, cd_type, psgn )
          !
     END SUBROUTINE crs_dom_ope_3d
 
-    SUBROUTINE crs_dom_ope_2d( p_fld, cd_op, cd_type, p_mask, p_fld_crs, p_e12, p_e3, p_surf_crs, p_mask_crs )
+    SUBROUTINE crs_dom_ope_2d( p_fld, cd_op, cd_type, p_mask, p_fld_crs, p_e12, p_e3, p_surf_crs, p_mask_crs, psgn )
       !!----------------------------------------------------------------
       !!               *** SUBROUTINE crsfun_UV ***
@@ -1033,4 +1153,5 @@
       REAL(wp), DIMENSION(jpi_crs,jpj_crs)    , INTENT(in), OPTIONAL :: p_surf_crs ! Coarse grid area-weighting denominator    
       REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(in), OPTIONAL :: p_mask_crs    ! Coarse grid T,U,V mask
+      REAL(wp),                                 INTENT(in)           :: psgn   
 
       REAL(wp), DIMENSION(jpi_crs,jpj_crs)    , INTENT(out)          :: p_fld_crs ! Coarse grid box 3D quantity 
@@ -1038,172 +1159,306 @@
       !! Local variables
       INTEGER  :: ji, jj, jk                 ! dummy loop indices
-      INTEGER  :: ijie, ijje, ii, ij
+      INTEGER  :: ijie, ijje, ii, ij, je_2
       REAL(wp) :: zflcrs, zsfcrs   
-      REAL(wp) :: zeps = 1.e20    
-      REAL(wp), DIMENSION(:,:), POINTER :: zsurf   
+      REAL(wp), DIMENSION(:,:), POINTER :: zsurfmsk   
 
       !!----------------------------------------------------------------  
    
+      p_fld_crs(:,:) = 0.0
 
       SELECT CASE ( cd_op )
       
-         CASE ( 'VOL' )
+        CASE ( 'VOL' )
       
-           CALL wrk_alloc( jpi, jpj, zsurf )
-           zsurf(:,:) =  p_e12(:,:) * p_e3(:,:,1) * p_mask(:,:,1)
-                    
-           DO ji = nistr, niend, nn_factx
-              DO jj = njstr, njend, nn_facty
-                 ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                 ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                 ijje = mje_crs(ij)
-                 ijie = mie_crs(ii)                  
- 
-                 zflcrs =  p_fld(ji  ,jj  ) * zsurf(ji  ,jj  )  &
-                   &     + p_fld(ji+1,jj  ) * zsurf(ji+1,jj  )  &
-                   &     + p_fld(ji+2,jj  ) * zsurf(ji+2,jj  )  &
-                   &     + p_fld(ji  ,jj+1) * zsurf(ji  ,jj+1)  &
-                   &     + p_fld(ji+1,jj+1) * zsurf(ji+1,jj+1)  &
-                   &     + p_fld(ji+2,jj+1) * zsurf(ji+2,jj+1)  &
-                   &     + p_fld(ji  ,jj+2) * zsurf(ji  ,jj+2)  &
-                   &     + p_fld(ji+1,jj+2) * zsurf(ji+1,jj+2)  &
-                   &     + p_fld(ji+2,jj+2) * zsurf(ji+2,jj+2)  
-
-                 zsfcrs =  zsurf(ji,jj  ) + zsurf(ji+1,jj  ) + zsurf(ji+2,jj  )  &
-                   &     + zsurf(ji,jj+1) + zsurf(ji+1,jj+1) + zsurf(ji+2,jj+1)  &
-                   &     + zsurf(ji,jj+2) + zsurf(ji+1,jj+2) + zsurf(ji+2,jj+2)  
-                 !
-                 p_fld_crs(ii,ij) = zflcrs
-                 IF( zsfcrs /= 0.0 )  p_fld_crs(ii,ij) = zflcrs / zsfcrs
-
-              ENDDO      
-           ENDDO
-            
-           CALL wrk_dealloc( jpi, jpj, zsurf )
+            CALL wrk_alloc( jpi, jpj, zsurfmsk )
+            zsurfmsk(:,:) =  p_e12(:,:) * p_e3(:,:,1) * p_mask(:,:,1)
+
+            IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+               IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                  je_2 = mje_crs(2)
+                  DO ji = nistr, niend, nn_factx
+                     ii   = ( ji - mis_crs(2) ) * rfactx_r + 2       
+                     zflcrs =  p_fld(ji  ,je_2) * zsurfmsk(ji  ,je_2)   &
+                       &     + p_fld(ji+1,je_2) * zsurfmsk(ji+1,je_2)   &
+                       &     + p_fld(ji+2,je_2) * zsurfmsk(ji+2,je_2) 
+
+                     zsfcrs =  zsurfmsk(ji,je_2) + zsurfmsk(ji+1,je_2) + zsurfmsk(ji+2,je_2) 
+                     !
+                     p_fld_crs(ii,2) = zflcrs
+                     IF( zsfcrs /= 0.0 )  p_fld_crs(ii,2) = zflcrs / zsfcrs
+                  ENDDO
+               ENDIF
+            ELSE
+               je_2 = mjs_crs(2)
+               DO ji = nistr, niend, nn_factx
+                  ii   = ( ji - mis_crs(2) ) * rfactx_r + 2   
+                  zflcrs =  p_fld(ji  ,je_2  ) * zsurfmsk(ji  ,je_2  ) &
+                    &     + p_fld(ji+1,je_2  ) * zsurfmsk(ji+1,je_2  ) &
+                    &     + p_fld(ji+2,je_2  ) * zsurfmsk(ji+2,je_2  ) &
+                    &     + p_fld(ji  ,je_2+1) * zsurfmsk(ji  ,je_2+1) &
+                    &     + p_fld(ji+1,je_2+1) * zsurfmsk(ji+1,je_2+1) &
+                    &     + p_fld(ji+2,je_2+1) * zsurfmsk(ji+2,je_2+1) &
+                    &     + p_fld(ji  ,je_2+2) * zsurfmsk(ji  ,je_2+2) &
+                    &     + p_fld(ji+1,je_2+2) * zsurfmsk(ji+1,je_2+2) &
+                    &     + p_fld(ji+2,je_2+2) * zsurfmsk(ji+2,je_2+2) 
+
+                   zsfcrs =  zsurfmsk(ji,je_2  ) + zsurfmsk(ji+1,je_2  ) + zsurfmsk(ji+2,je_2  ) &
+                     &     + zsurfmsk(ji,je_2+1) + zsurfmsk(ji+1,je_2+1) + zsurfmsk(ji+2,je_2+1) &
+                     &     + zsurfmsk(ji,je_2+2) + zsurfmsk(ji+1,je_2+2) + zsurfmsk(ji+2,je_2+2) 
+                    !
+                    p_fld_crs(ii,2) = zflcrs
+                    IF( zsfcrs /= 0.0 )  p_fld_crs(ii,2) = zflcrs / zsfcrs
+                ENDDO
+            ENDIF
+                  !
+            DO jj  = njstr, njend, nn_facty
+               DO ji = nistr, niend, nn_factx
+                  ii  = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
+                  ij  = ( jj - njstr ) * rfacty_r + 3
+                  zflcrs =  p_fld(ji  ,jj  ) * zsurfmsk(ji  ,jj  ) &
+                    &     + p_fld(ji+1,jj  ) * zsurfmsk(ji+1,jj  ) &
+                    &     + p_fld(ji+2,jj  ) * zsurfmsk(ji+2,jj  ) &
+                    &     + p_fld(ji  ,jj+1) * zsurfmsk(ji  ,jj+1) &
+                    &     + p_fld(ji+1,jj+1) * zsurfmsk(ji+1,jj+1) &
+                    &     + p_fld(ji+2,jj+1) * zsurfmsk(ji+2,jj+1) &
+                    &     + p_fld(ji  ,jj+2) * zsurfmsk(ji  ,jj+2) &
+                    &     + p_fld(ji+1,jj+2) * zsurfmsk(ji+1,jj+2) &
+                    &     + p_fld(ji+2,jj+2) * zsurfmsk(ji+2,jj+2) 
+  
+                  zsfcrs =  zsurfmsk(ji,jj  ) + zsurfmsk(ji+1,jj  ) + zsurfmsk(ji+2,jj  ) &
+                    &     + zsurfmsk(ji,jj+1) + zsurfmsk(ji+1,jj+1) + zsurfmsk(ji+2,jj+1) &
+                    &     + zsurfmsk(ji,jj+2) + zsurfmsk(ji+1,jj+2) + zsurfmsk(ji+2,jj+2) 
+                   !
+                  p_fld_crs(ii,ij) = zflcrs
+                  IF( zsfcrs /= 0.0 )  p_fld_crs(ii,ij) = zflcrs / zsfcrs
+               ENDDO      
+            ENDDO
+
+            CALL wrk_dealloc( jpi, jpj, zsurfmsk )
 
          CASE ( 'SUM' )
          
-            CALL wrk_alloc( jpi, jpj, zsurf )
+            CALL wrk_alloc( jpi, jpj, zsurfmsk )
             IF( PRESENT( p_e3 ) ) THEN
-               zsurf(:,:) =  p_e12(:,:) * p_e3(:,:,1) * p_mask(:,:,1)
+               zsurfmsk(:,:) =  p_e12(:,:) * p_e3(:,:,1) * p_mask(:,:,1)
             ELSE
-               zsurf(:,:) =  p_e12(:,:) * p_mask(:,:,1)
+               zsurfmsk(:,:) =  p_e12(:,:) * p_mask(:,:,1)
             ENDIF
+
+            SELECT CASE ( cd_type )
+
+               CASE( 'T', 'W' )
+
+                   IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                      IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                         je_2 = mje_crs(2)
+                         DO ji = nistr, niend, nn_factx
+                            ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                            zflcrs  =  p_fld(ji  ,je_2) * zsurfmsk(ji  ,je_2) &
+                              &      + p_fld(ji+1,je_2) * zsurfmsk(ji+1,je_2) &
+                              &      + p_fld(ji+2,je_2) * zsurfmsk(ji+2,je_2) 
+                              !
+                             p_fld_crs(ii,2) = zflcrs
+                         ENDDO
+                      ENDIF
+                   ELSE
+                      je_2 = mjs_crs(2)
+                      DO ji = nistr, niend, nn_factx
+                         ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                         zflcrs  =  p_fld(ji  ,je_2  ) * zsurfmsk(ji  ,je_2  )  &
+                           &      + p_fld(ji+1,je_2  ) * zsurfmsk(ji+1,je_2  )  &
+                           &      + p_fld(ji+2,je_2  ) * zsurfmsk(ji+2,je_2  )  &
+                           &      + p_fld(ji  ,je_2+1) * zsurfmsk(ji  ,je_2+1)  &
+                           &      + p_fld(ji+1,je_2+1) * zsurfmsk(ji+1,je_2+1)  &
+                           &      + p_fld(ji+2,je_2+1) * zsurfmsk(ji+2,je_2+1)  &
+                           &      + p_fld(ji  ,je_2+2) * zsurfmsk(ji  ,je_2+2)  &
+                           &      + p_fld(ji+1,je_2+2) * zsurfmsk(ji+1,je_2+2)  &
+                           &      + p_fld(ji+2,je_2+2) * zsurfmsk(ji+2,je_2+2)  
+                            !
+                            p_fld_crs(ii,2) = zflcrs
+                      ENDDO
+                   ENDIF
+                     !
+                   DO jj = njstr, njend, nn_facty
+                      DO ji = nistr, niend, nn_factx
+                         ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                         ij   = ( jj - njstr ) * rfacty_r + 3
+                         zflcrs  =  p_fld(ji  ,jj  ) * zsurfmsk(ji  ,jj  )  &
+                           &      + p_fld(ji+1,jj  ) * zsurfmsk(ji+1,jj  )  &
+                           &      + p_fld(ji+2,jj  ) * zsurfmsk(ji+2,jj  )  &
+                           &      + p_fld(ji  ,jj+1) * zsurfmsk(ji  ,jj+1)  &
+                           &      + p_fld(ji+1,jj+1) * zsurfmsk(ji+1,jj+1)  &
+                           &      + p_fld(ji+2,jj+1) * zsurfmsk(ji+2,jj+1)  &
+                           &      + p_fld(ji  ,jj+2) * zsurfmsk(ji  ,jj+2)  &
+                           &      + p_fld(ji+1,jj+2) * zsurfmsk(ji+1,jj+2)  &
+                           &      + p_fld(ji+2,jj+2) * zsurfmsk(ji+2,jj+2)  
+                           !
+                          p_fld_crs(ii,ij) = zflcrs
+                          ! 
+                      ENDDO      
+                   ENDDO
+            
+               CASE( 'V' )
+
+                  IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        ijje = mje_crs(2)
+                      ENDIF
+                  ELSE
+                     ijje = mjs_crs(2)
+                  ENDIF
+
+                  DO ji = nistr, niend, nn_factx
+                     ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                     zflcrs  =  p_fld(ji  ,ijje) * zsurfmsk(ji  ,ijje) &
+                       &      + p_fld(ji+1,ijje) * zsurfmsk(ji+1,ijje) &
+                       &      + p_fld(ji+2,ijje) * zsurfmsk(ji+2,ijje) 
+                            !
+                     p_fld_crs(ii,2) = zflcrs
+                  ENDDO
+
+                  DO jj = njstr, njend, nn_facty
+                     DO ji = nistr, niend, nn_factx
+                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                        ij   = ( jj - njstr ) * rfacty_r + 3
+                        ijje = mje_crs(ij)
+                        zflcrs  =  p_fld(ji  ,ijje) * zsurfmsk(ji  ,ijje) &
+                          &      + p_fld(ji+1,ijje) * zsurfmsk(ji+1,ijje) &
+                          &      + p_fld(ji+2,ijje) * zsurfmsk(ji+2,ijje) 
+                          !
+                        p_fld_crs(ii,ij) = zflcrs
+                        ! 
+                     ENDDO      
+                  ENDDO
+            
+               CASE( 'U' )
+
+                  IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        je_2 = mje_crs(2)
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                           ijie = mie_crs(ii)
+                           zflcrs  =  p_fld(ijie,je_2) * zsurfmsk(ijie,je_2)  
+                           p_fld_crs(ii,2) = zflcrs
+                        ENDDO
+                     ENDIF
+                  ELSE
+                     je_2 = mjs_crs(2)
+                     DO ji = nistr, niend, nn_factx
+                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                        ijie = mie_crs(ii)
+                        zflcrs =  p_fld(ijie,je_2  ) * zsurfmsk(ijie,je_2  )  &
+                          &     + p_fld(ijie,je_2+1) * zsurfmsk(ijie,je_2+1)  &
+                          &     + p_fld(ijie,je_2+2) * zsurfmsk(ijie,je_2+2) 
+   
+                        p_fld_crs(ii,2) = zflcrs
+                     ENDDO
+                 ENDIF
+
+                 DO jj = njstr, njend, nn_facty
+                    DO ji = nistr, niend, nn_factx
+                       ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                       ij   = ( jj - njstr ) * rfacty_r + 3
+                       ijie = mie_crs(ii)
+                       zflcrs =  p_fld(ijie,jj  ) * zsurfmsk(ijie,jj  )  &
+                          &    + p_fld(ijie,jj+1) * zsurfmsk(ijie,jj+1)  &
+                          &    + p_fld(ijie,jj+2) * zsurfmsk(ijie,jj+2) 
+                         !
+                       p_fld_crs(ii,ij) = zflcrs
+                       ! 
+                    ENDDO      
+                 ENDDO
+
+              END SELECT
+
+              IF( PRESENT( p_surf_crs ) ) THEN
+                 WHERE ( p_surf_crs /= 0.0 ) p_fld_crs(:,:) = p_fld_crs(:,:) / p_surf_crs(:,:)
+              ENDIF
+
+              CALL wrk_dealloc( jpi, jpj, zsurfmsk )
+
+         CASE ( 'MAX' )
 
             SELECT CASE ( cd_type )
             
                CASE( 'T', 'W' )
-         
-                  DO ji = nistr, niend, nn_factx
-                     DO jj = njstr, njend, nn_facty
-                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                        ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                        ijje = mje_crs(ij)
-                        ijie = mie_crs(ii)                  
-
-                        zflcrs  =  p_fld(ji  ,jj  ) * zsurf(ji  ,jj  )  &
-                          &      + p_fld(ji+1,jj  ) * zsurf(ji+1,jj  )  &
-                          &      + p_fld(ji+2,jj  ) * zsurf(ji+2,jj  )  &
-                          &      + p_fld(ji  ,jj+1) * zsurf(ji  ,jj+1)  &
-                          &      + p_fld(ji+1,jj+1) * zsurf(ji+1,jj+1)  &
-                          &      + p_fld(ji+2,jj+1) * zsurf(ji+2,jj+1)  &
-                          &      + p_fld(ji  ,jj+2) * zsurf(ji  ,jj+2)  &
-                          &      + p_fld(ji+1,jj+2) * zsurf(ji+1,jj+2)  &
-                          &      + p_fld(ji+2,jj+2) * zsurf(ji+2,jj+2)  
-                        !
-                        p_fld_crs(ii,ij) = zflcrs
-                        !
-                     ENDDO      
-                  ENDDO
+  
+                   IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                      IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                         je_2 = mje_crs(2)
+                         DO ji = nistr, niend, nn_factx
+                            ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                            zflcrs =  &
+                              & MAX( p_fld(ji  ,je_2) * p_mask(ji  ,je_2,1) - ( 1.- p_mask(ji  ,je_2,1) ) * r_inf ,  &
+                             &       p_fld(ji+1,je_2) * p_mask(ji+1,je_2,1) - ( 1.- p_mask(ji+1,je_2,1) ) * r_inf ,  &
+                             &       p_fld(ji+2,je_2) * p_mask(ji+2,je_2,1) - ( 1.- p_mask(ji+2,je_2,1) ) * r_inf  )
+                            !
+                            p_fld_crs(ii,2) = zflcrs
+                         ENDDO
+                      ENDIF
+                   ELSE
+                      je_2 = mjs_crs(2) 
+                      zflcrs =  &
+                        &  MAX( p_fld(ji  ,je_2  ) * p_mask(ji  ,je_2  ,1) - ( 1.- p_mask(ji  ,je_2  ,1) ) * r_inf ,  &
+                        &       p_fld(ji+1,je_2  ) * p_mask(ji+1,je_2  ,1) - ( 1.- p_mask(ji+1,je_2  ,1) ) * r_inf ,  &
+                        &       p_fld(ji+2,je_2  ) * p_mask(ji+2,je_2  ,1) - ( 1.- p_mask(ji+2,je_2  ,1) ) * r_inf ,  &
+                        &       p_fld(ji  ,je_2+1) * p_mask(ji  ,je_2+1,1) - ( 1.- p_mask(ji  ,je_2+1,1) ) * r_inf ,  &
+                        &       p_fld(ji+1,je_2+1) * p_mask(ji+1,je_2+1,1) - ( 1.- p_mask(ji+1,je_2+1,1) ) * r_inf ,  &
+                        &       p_fld(ji+2,je_2+1) * p_mask(ji+2,je_2+1,1) - ( 1.- p_mask(ji+2,je_2+1,1) ) * r_inf ,  &
+                        &       p_fld(ji  ,je_2+2) * p_mask(ji  ,je_2+2,1) - ( 1.- p_mask(ji  ,je_2+2,1) ) * r_inf ,  &
+                        &       p_fld(ji+1,je_2+2) * p_mask(ji+1,je_2+2,1) - ( 1.- p_mask(ji+1,je_2+2,1) ) * r_inf ,  &
+                        &       p_fld(ji+2,je_2+2) * p_mask(ji+2,je_2+2,1) - ( 1.- p_mask(ji+2,je_2+2,1) ) * r_inf   )
+                      !
+                      p_fld_crs(ii,2) = zflcrs
+                   ENDIF
+
+                   DO jj = njstr, njend, nn_facty
+                      DO ji = nistr, niend, nn_factx
+                         ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                         ij   = ( jj - njstr ) * rfacty_r + 3
+                         zflcrs = &
+                          &  MAX( p_fld(ji  ,jj  ) * p_mask(ji  ,jj  ,1) - ( 1.- p_mask(ji  ,jj  ,1) ) * r_inf ,  &
+                          &       p_fld(ji+1,jj  ) * p_mask(ji+1,jj  ,1) - ( 1.- p_mask(ji+1,jj  ,1) ) * r_inf ,  &
+                          &       p_fld(ji+2,jj  ) * p_mask(ji+2,jj  ,1) - ( 1.- p_mask(ji+2,jj  ,1) ) * r_inf ,  &
+                          &       p_fld(ji  ,jj+1) * p_mask(ji  ,jj+1,1) - ( 1.- p_mask(ji  ,jj+1,1) ) * r_inf ,  &
+                          &       p_fld(ji+1,jj+1) * p_mask(ji+1,jj+1,1) - ( 1.- p_mask(ji+1,jj+1,1) ) * r_inf ,  &
+                          &       p_fld(ji+2,jj+1) * p_mask(ji+2,jj+1,1) - ( 1.- p_mask(ji+2,jj+1,1) ) * r_inf ,  &
+                          &       p_fld(ji  ,jj+2) * p_mask(ji  ,jj+2,1) - ( 1.- p_mask(ji  ,jj+2,1) ) * r_inf ,  &
+                          &       p_fld(ji+1,jj+2) * p_mask(ji+1,jj+2,1) - ( 1.- p_mask(ji+1,jj+2,1) ) * r_inf ,  &
+                          &       p_fld(ji+2,jj+2) * p_mask(ji+2,jj+2,1) - ( 1.- p_mask(ji+2,jj+2,1) ) * r_inf   )
+                         !
+                         p_fld_crs(ii,ij) = zflcrs
+                         !
+                      ENDDO      
+                   ENDDO
             
                CASE( 'V' )
-         
-                  DO jk = 1, jpk
+
+                  IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        ijje = mje_crs(2)
+                      ENDIF
+                  ELSE
+                     ijje = mjs_crs(2)
+                  ENDIF
+
+                  DO ji = nistr, niend, nn_factx
+                     ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                     zflcrs = MAX( p_fld(ji  ,ijje) * p_mask(ji  ,ijje,1) - ( 1.- p_mask(ji,ijje,1) ) * r_inf ,  &
+                       &           p_fld(ji+1,ijje) * p_mask(ji+1,ijje,1) - ( 1.- p_mask(ji,ijje,1) ) * r_inf ,  &
+                       &           p_fld(ji+2,ijje) * p_mask(ji+2,ijje,1) - ( 1.- p_mask(ji,ijje,1) ) * r_inf )
+                       !
+                     p_fld_crs(ii,2) = zflcrs
+                  ENDDO      
+                  DO jj = njstr, njend, nn_facty
                      DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)
-                           !                  
-                           zflcrs  =  p_fld(ji  ,ijje) * zsurf(ji  ,ijje)  &
-                             &      + p_fld(ji+1,ijje) * zsurf(ji+1,ijje)  &
-                             &      + p_fld(ji+2,ijje) * zsurf(ji+2,ijje)  
-                           !
-                           p_fld_crs(ii,ij) = zflcrs
-                           !
-                         ENDDO      
-                     ENDDO
-                  ENDDO   
-
-            
-               CASE( 'U' )
-         
-                  DO jk = 1, jpk
-                     DO ji = nistr, niend, nn_factx
-                        DO jj = njstr, njend, nn_facty
-                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                           ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                           ijje = mje_crs(ij)
-                           ijie = mie_crs(ii)
-                           !                  
-                           zflcrs =  p_fld(ijie,jj  ) * zsurf(ijie,jj  )  &
-                             &     + p_fld(ijie,jj+1) * zsurf(ijie,jj+1)  &
-                             &     + p_fld(ijie,jj+2) * zsurf(ijie,jj+2) 
-                           !
-                           p_fld_crs(ii,ij) = zflcrs
-                           !
-                        ENDDO      
-                     ENDDO
-                  ENDDO   
-
-              END SELECT
-
-              IF( PRESENT( p_surf_crs ) ) THEN
-                 WHERE ( p_surf_crs /= 0.0 ) p_fld_crs(:,:) = p_fld_crs(:,:) / p_surf_crs(:,:)
-              ENDIF
-
-              CALL wrk_dealloc( jpi, jpj, zsurf )
-
-         CASE ( 'MAX' )
-         
-            SELECT CASE ( cd_type )
-            
-               CASE( 'T', 'W' )
-         
-                  DO ji = nistr, niend, nn_factx
-                     DO jj = njstr, njend, nn_facty
-                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                        ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                        ijje = mje_crs(ij)
-                        ijie = mie_crs(ii)                  
-
-                        zflcrs =  MAX( p_fld(ji  ,jj  ) * p_mask(ji  ,jj  ,1),  &
-                          &            p_fld(ji+1,jj  ) * p_mask(ji+1,jj  ,1),  &
-                          &            p_fld(ji+2,jj  ) * p_mask(ji+2,jj  ,1),  &
-                          &            p_fld(ji  ,jj+1) * p_mask(ji  ,jj+1,1),  &
-                          &            p_fld(ji+1,jj+1) * p_mask(ji+1,jj+1,1),  &
-                          &            p_fld(ji+2,jj+1) * p_mask(ji+2,jj+1,1),  &
-                          &            p_fld(ji  ,jj+2) * p_mask(ji  ,jj+2,1),  &
-                          &            p_fld(ji+1,jj+2) * p_mask(ji+1,jj+2,1),  &
-                          &            p_fld(ji+2,jj+2) * p_mask(ji+2,jj+2,1)   )
-                        !
-                        p_fld_crs(ii,ij) = zflcrs
-                        !
-                     ENDDO      
-                  ENDDO
-            
-               CASE( 'V' )
-         
-                  DO ji = nistr, niend, nn_factx
-                     DO jj = njstr, njend, nn_facty
-                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                        ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                        ijje = mje_crs(ij)
-                        ijie = mie_crs(ii)
+                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                        ij   = ( jj - njstr ) * rfacty_r + 3               
+                        ijje = mje_crs(ij) 
                         !                  
-                        zflcrs = MAX( p_fld(ji  ,ijje) * p_mask(ji  ,ijje,1),  &
-                          &           p_fld(ji+1,ijje) * p_mask(ji+1,ijje,1),  &
-                          &           p_fld(ji+2,ijje) * p_mask(ji+2,ijje,1) )
+                        zflcrs = MAX( p_fld(ji  ,ijje) * p_mask(ji  ,ijje,1) - ( 1.- p_mask(ji,ijje,1) ) * r_inf ,  &
+                          &           p_fld(ji+1,ijje) * p_mask(ji+1,ijje,1) - ( 1.- p_mask(ji,ijje,1) ) * r_inf ,  &
+                          &           p_fld(ji+2,ijje) * p_mask(ji+2,ijje,1) - ( 1.- p_mask(ji,ijje,1) ) * r_inf )
                         !
                         p_fld_crs(ii,ij) = zflcrs
@@ -1213,15 +1468,125 @@
             
                CASE( 'U' )
-         
+
+                 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        je_2 = mje_crs(2)
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                           ijie = mie_crs(ii)
+                           zflcrs  =  p_fld(ijie,je_2) * p_mask(ijie,je_2,1) - ( 1.- p_mask(ijie,je_2,1) ) * r_inf 
+                           p_fld_crs(ii,2) = zflcrs
+                        ENDDO
+                     ENDIF
+                 ELSE
+                     je_2 = mjs_crs(2)
+                     DO ji = nistr, niend, nn_factx
+                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                        ijie = mie_crs(ii)
+                        zflcrs =  &
+                          &  MAX( p_fld(ijie,je_2  ) * p_mask(ijie,je_2  ,1) - ( 1.- p_mask(ijie,je_2,1) ) * r_inf ,  &
+                          &       p_fld(ijie,je_2+1) * p_mask(ijie,je_2+1,1) - ( 1.- p_mask(ijie,je_2,1) ) * r_inf ,  &
+                          &       p_fld(ijie,je_2+2) * p_mask(ijie,je_2+2,1) - ( 1.- p_mask(ijie,je_2,1) ) * r_inf  )
+                        p_fld_crs(ii,2) = zflcrs
+                     ENDDO
+                 ENDIF
+                 DO jj = njstr, njend, nn_facty
+                    DO ji = nistr, niend, nn_factx
+                       ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                       ij   = ( jj - njstr ) * rfacty_r + 3
+                       ijie = mie_crs(ii)
+                       zflcrs =  &
+                         &  MAX( p_fld(ijie,jj  ) * p_mask(ijie,jj  ,1) - ( 1.- p_mask(ijie,jj,1) ) * r_inf ,  &
+                         &       p_fld(ijie,jj+1) * p_mask(ijie,jj+1,1) - ( 1.- p_mask(ijie,jj,1) ) * r_inf ,  &
+                          &      p_fld(ijie,jj+2) * p_mask(ijie,jj+2,1) - ( 1.- p_mask(ijie,jj,1) ) * r_inf  )
+                        p_fld_crs(ii,ij) = zflcrs
+                        ! 
+                     ENDDO      
+                  ENDDO
+
+              END SELECT
+
+         CASE ( 'MIN' )      !   Search the min of unmasked grid cells
+
+           SELECT CASE ( cd_type )
+
+              CASE( 'T', 'W' )
+  
+                   IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                      IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                         je_2 = mje_crs(2)
+                         DO ji = nistr, niend, nn_factx
+                            ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                            zflcrs =  &
+                              & MIN( p_fld(ji  ,je_2) * p_mask(ji  ,je_2,1) + ( 1.- p_mask(ji  ,je_2,1) ) * r_inf ,  &
+                             &       p_fld(ji+1,je_2) * p_mask(ji+1,je_2,1) + ( 1.- p_mask(ji+1,je_2,1) ) * r_inf ,  &
+                             &       p_fld(ji+2,je_2) * p_mask(ji+2,je_2,1) + ( 1.- p_mask(ji+2,je_2,1) ) * r_inf  )
+                            !
+                            p_fld_crs(ii,2) = zflcrs
+                         ENDDO
+                      ENDIF
+                   ELSE
+                      je_2 = mjs_crs(2) 
+                      zflcrs =  &
+                        &  MIN( p_fld(ji  ,je_2  ) * p_mask(ji  ,je_2  ,1) + ( 1.- p_mask(ji  ,je_2  ,1) ) * r_inf ,  &
+                        &       p_fld(ji+1,je_2  ) * p_mask(ji+1,je_2  ,1) + ( 1.- p_mask(ji+1,je_2  ,1) ) * r_inf ,  &
+                        &       p_fld(ji+2,je_2  ) * p_mask(ji+2,je_2  ,1) + ( 1.- p_mask(ji+2,je_2  ,1) ) * r_inf ,  &
+                        &       p_fld(ji  ,je_2+1) * p_mask(ji  ,je_2+1,1) + ( 1.- p_mask(ji  ,je_2+1,1) ) * r_inf ,  &
+                        &       p_fld(ji+1,je_2+1) * p_mask(ji+1,je_2+1,1) + ( 1.- p_mask(ji+1,je_2+1,1) ) * r_inf ,  &
+                        &       p_fld(ji+2,je_2+1) * p_mask(ji+2,je_2+1,1) + ( 1.- p_mask(ji+2,je_2+1,1) ) * r_inf ,  &
+                        &       p_fld(ji  ,je_2+2) * p_mask(ji  ,je_2+2,1) + ( 1.- p_mask(ji  ,je_2+2,1) ) * r_inf ,  &
+                        &       p_fld(ji+1,je_2+2) * p_mask(ji+1,je_2+2,1) + ( 1.- p_mask(ji+1,je_2+2,1) ) * r_inf ,  &
+                        &       p_fld(ji+2,je_2+2) * p_mask(ji+2,je_2+2,1) + ( 1.- p_mask(ji+2,je_2+2,1) ) * r_inf   )
+                      !
+                      p_fld_crs(ii,2) = zflcrs
+                   ENDIF
+
+                   DO jj = njstr, njend, nn_facty
+                      DO ji = nistr, niend, nn_factx
+                         ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                         ij   = ( jj - njstr ) * rfacty_r + 3
+                         zflcrs = &
+                          &  MIN( p_fld(ji  ,jj  ) * p_mask(ji  ,jj  ,1) + ( 1.- p_mask(ji  ,jj  ,1) ) * r_inf ,  &
+                          &       p_fld(ji+1,jj  ) * p_mask(ji+1,jj  ,1) + ( 1.- p_mask(ji+1,jj  ,1) ) * r_inf ,  &
+                          &       p_fld(ji+2,jj  ) * p_mask(ji+2,jj  ,1) + ( 1.- p_mask(ji+2,jj  ,1) ) * r_inf ,  &
+                          &       p_fld(ji  ,jj+1) * p_mask(ji  ,jj+1,1) + ( 1.- p_mask(ji  ,jj+1,1) ) * r_inf ,  &
+                          &       p_fld(ji+1,jj+1) * p_mask(ji+1,jj+1,1) + ( 1.- p_mask(ji+1,jj+1,1) ) * r_inf ,  &
+                          &       p_fld(ji+2,jj+1) * p_mask(ji+2,jj+1,1) + ( 1.- p_mask(ji+2,jj+1,1) ) * r_inf ,  &
+                          &       p_fld(ji  ,jj+2) * p_mask(ji  ,jj+2,1) + ( 1.- p_mask(ji  ,jj+2,1) ) * r_inf ,  &
+                          &       p_fld(ji+1,jj+2) * p_mask(ji+1,jj+2,1) + ( 1.- p_mask(ji+1,jj+2,1) ) * r_inf ,  &
+                          &       p_fld(ji+2,jj+2) * p_mask(ji+2,jj+2,1) + ( 1.- p_mask(ji+2,jj+2,1) ) * r_inf   )
+                         !
+                         p_fld_crs(ii,ij) = zflcrs
+                         !
+                      ENDDO      
+                   ENDDO
+            
+               CASE( 'V' )
+
+                  IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        ijje = mje_crs(2)
+                      ENDIF
+                  ELSE
+                     ijje = mjs_crs(2)
+                  ENDIF
+
                   DO ji = nistr, niend, nn_factx
-                     DO jj = njstr, njend, nn_facty
-                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                        ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                        ijje = mje_crs(ij)
-                        ijie = mie_crs(ii)
+                     ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                     zflcrs = MIN( p_fld(ji  ,ijje) * p_mask(ji  ,ijje,1) + ( 1.- p_mask(ji,ijje,1) ) * r_inf ,  &
+                       &           p_fld(ji+1,ijje) * p_mask(ji+1,ijje,1) + ( 1.- p_mask(ji,ijje,1) ) * r_inf ,  &
+                       &           p_fld(ji+2,ijje) * p_mask(ji+2,ijje,1) + ( 1.- p_mask(ji,ijje,1) ) * r_inf )
+                       !
+                     p_fld_crs(ii,2) = zflcrs
+                  ENDDO      
+                  DO jj = njstr, njend, nn_facty
+                     DO ji = nistr, niend, nn_factx
+                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                        ij   = ( jj - njstr ) * rfacty_r + 3               
+                        ijje = mje_crs(ij) 
                         !                  
-                        zflcrs = MAX( p_fld(ijie,jj  ) * p_mask(ijie,jj  ,1),  &
-                          &           p_fld(ijie,jj+1) * p_mask(ijie,jj+1,1),  &
-                          &           p_fld(ijie,jj+2) * p_mask(ijie,jj+2,1) )
+                        zflcrs = MIN( p_fld(ji  ,ijje) * p_mask(ji  ,ijje,1) + ( 1.- p_mask(ji,ijje,1) ) * r_inf ,  &
+                          &           p_fld(ji+1,ijje) * p_mask(ji+1,ijje,1) + ( 1.- p_mask(ji,ijje,1) ) * r_inf ,  &
+                          &           p_fld(ji+2,ijje) * p_mask(ji+2,ijje,1) + ( 1.- p_mask(ji,ijje,1) ) * r_inf )
                         !
                         p_fld_crs(ii,ij) = zflcrs
@@ -1229,75 +1594,49 @@
                      ENDDO      
                   ENDDO
-
-              END SELECT
-
-         CASE ( 'MIN' )
-            !   Search the min of masked grid cells
-            SELECT CASE ( cd_type )
             
-               CASE( 'T', 'W' )
-         
-                  DO ji = nistr, niend, nn_factx
-                     DO jj = njstr, njend, nn_facty
-                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                        ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                        ijje = mje_crs(ij)
-                        ijie = mie_crs(ii)                  
-                        
-                        zflcrs =  MIN( p_fld(ji  ,jj  ) * ( 1. + ( 1. - p_mask(ji  ,jj  ,1) ) * zeps ),  &
-                          &            p_fld(ji+1,jj  ) * ( 1. + ( 1. - p_mask(ji+1,jj  ,1) ) * zeps ),  &
-                          &            p_fld(ji+2,jj  ) * ( 1. + ( 1. - p_mask(ji+2,jj  ,1) ) * zeps ),  &
-                          &            p_fld(ji  ,jj+1) * ( 1. + ( 1. - p_mask(ji  ,jj  ,1) ) * zeps ),  &
-                          &            p_fld(ji+1,jj+1) * ( 1. + ( 1. - p_mask(ji+1,jj+1,1) ) * zeps ),  &
-                          &            p_fld(ji+2,jj+1) * ( 1. + ( 1. - p_mask(ji+2,jj+2,1) ) * zeps ),  &
-                          &            p_fld(ji  ,jj+2) * ( 1. + ( 1. - p_mask(ji  ,jj  ,1) ) * zeps ),  &
-                          &            p_fld(ji+1,jj+2) * ( 1. + ( 1. - p_mask(ji+1,jj+1,1) ) * zeps ),  &
-                          &            p_fld(ji+2,jj+2) * ( 1. + ( 1. - p_mask(ji+2,jj+2,1) ) * zeps )   )
-                        !
-                        p_fld_crs(ii,ij) = zflcrs * p_mask_crs(ii,ij,1)
-                        !
+               CASE( 'U' )
+
+                 IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+                     IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+                        je_2 = mje_crs(2)
+                        DO ji = nistr, niend, nn_factx
+                           ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                           ijie = mie_crs(ii)
+                           zflcrs  =  p_fld(ijie,je_2) * p_mask(ijie,je_2,1) + ( 1.- p_mask(ijie,je_2,1) ) * r_inf 
+ 
+                           p_fld_crs(ii,2) = zflcrs
+                        ENDDO
+                     ENDIF
+                 ELSE
+                     je_2 = mjs_crs(2)
+                     DO ji = nistr, niend, nn_factx
+                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2    
+                        ijie = mie_crs(ii)
+                        zflcrs =  &
+                          &  MIN( p_fld(ijie,je_2  ) * p_mask(ijie,je_2  ,1) + ( 1.- p_mask(ijie,je_2,1) ) * r_inf ,  &
+                          &       p_fld(ijie,je_2+1) * p_mask(ijie,je_2+1,1) + ( 1.- p_mask(ijie,je_2,1) ) * r_inf ,  &
+                          &       p_fld(ijie,je_2+2) * p_mask(ijie,je_2+2,1) + ( 1.- p_mask(ijie,je_2,1) ) * r_inf  )
+                        p_fld_crs(ii,2) = zflcrs
+                     ENDDO
+                 ENDIF
+                 DO jj = njstr, njend, nn_facty
+                    DO ji = nistr, niend, nn_factx
+                       ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                       ij   = ( jj - njstr ) * rfacty_r + 3
+                       ijie = mie_crs(ii)
+                       zflcrs =  &
+                         &  MIN( p_fld(ijie,jj  ) * p_mask(ijie,jj  ,1) + ( 1.- p_mask(ijie,jj,1) ) * r_inf ,  &
+                         &       p_fld(ijie,jj+1) * p_mask(ijie,jj+1,1) + ( 1.- p_mask(ijie,jj,1) ) * r_inf ,  &
+                          &      p_fld(ijie,jj+2) * p_mask(ijie,jj+2,1) + ( 1.- p_mask(ijie,jj,1) ) * r_inf  )
+                        p_fld_crs(ii,ij) = zflcrs
+                        ! 
                      ENDDO      
                   ENDDO
- 
-               CASE( 'V' )
-         
-                  DO ji = nistr, niend, nn_factx
-                     DO jj = njstr, njend, nn_facty
-                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                        ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                        ijje = mje_crs(ij)
-                        ijie = mie_crs(ii)                  
-                        
-                        zflcrs =  MIN( p_fld(ji  ,ijje) * ( 1. + ( 1. - p_mask(ji  ,ijje,1) ) * zeps ),  &
-                          &            p_fld(ji+1,ijje) * ( 1. + ( 1. - p_mask(ji+1,ijje,1) ) * zeps ),  &
-                          &            p_fld(ji+2,ijje) * ( 1. + ( 1. - p_mask(ji+2,ijje,1) ) * zeps )   )
-                        !
-                        p_fld_crs(ii,ij) = zflcrs * p_mask_crs(ii,ij,1)
-                        !
-                     ENDDO      
-                  ENDDO
-
-               CASE( 'U' )
-         
-                  DO ji = nistr, niend, nn_factx
-                     DO jj = njstr, njend, nn_facty
-                        ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                        ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                        ijje = mje_crs(ij)
-                        ijie = mie_crs(ii)                  
-                        
-                        zflcrs =  MIN( p_fld(ijie,jj  ) * ( 1. + ( 1. - p_mask(ijie,jj  ,1) ) * zeps ),  &
-                          &            p_fld(ijie,jj+1) * ( 1. + ( 1. - p_mask(ijie,jj+1,1) ) * zeps ),  &
-                          &            p_fld(ijie,jj+2) * ( 1. + ( 1. - p_mask(ijie,jj+2,1) ) * zeps )   )
-                        !
-                        p_fld_crs(ii,ij) = zflcrs * p_mask_crs(ii,ij,1)
-                        !
-                     ENDDO      
-                  ENDDO
-            END SELECT
-            !
+
+              END SELECT
+             !
          END SELECT
          !
-         CALL crs_lbc_lnk( p_fld_crs, cd_type, 1.0 )
+         CALL crs_lbc_lnk( p_fld_crs, cd_type, psgn )
          !
    END SUBROUTINE crs_dom_ope_2d
@@ -1316,123 +1655,120 @@
       !! Local variables
       INTEGER ::  ji, jj, jk                   ! dummy loop indices
-      INTEGER ::  ijie, ijje, ii, ij
+      INTEGER ::  ijie, ijje, ii, ij, je_2
       REAL(wp) :: ze3crs  
+      REAL(wp), DIMENSION(:,:,:), POINTER :: zmask, zsurf   
 
       !!----------------------------------------------------------------  
+
+       p_e3_crs    (:,:,:) = 0.
+       p_e3_max_crs(:,:,:) = 1.
    
-      SELECT CASE ( cd_type )
-      
-         CASE ('T', 'U', 'V')
-         
-            DO jk = 1 , jpk
-               DO ji = nistr, niend, nn_factx
-                  DO jj = njstr, njend, nn_facty
-                     ii   = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
-                     ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                     ijje = mje_crs(ij)
-                     ijie = mie_crs(ii)
-                     ! 
-                     ze3crs =  p_e3(ji  ,jj  ,jk) * p_e1(ji  ,jj  ) * p_e2(ji  ,jj  ) * p_mask(ji  ,jj  ,jk) +  &
-                        &      p_e3(ji+1,jj  ,jk) * p_e1(ji+1,jj  ) * p_e2(ji+1,jj  ) * p_mask(ji+1,jj  ,jk) +  &
-                        &      p_e3(ji+2,jj  ,jk) * p_e1(ji+2,jj  ) * p_e2(ji+2,jj  ) * p_mask(ji+2,jj  ,jk) +  &
-                        &      p_e3(ji  ,jj+1,jk) * p_e1(ji  ,jj+1) * p_e2(ji  ,jj+1) * p_mask(ji  ,jj+1,jk) +  &
-                        &      p_e3(ji+1,jj+1,jk) * p_e1(ji+1,jj+1) * p_e2(ji+1,jj+1) * p_mask(ji+1,jj+1,jk) +  &
-                        &      p_e3(ji+2,jj+1,jk) * p_e1(ji+2,jj+1) * p_e2(ji+2,jj+1) * p_mask(ji+2,jj+1,jk) +  &
-                        &      p_e3(ji  ,jj+2,jk) * p_e1(ji  ,jj+2) * p_e2(ji  ,jj+2) * p_mask(ji  ,jj+2,jk) +  &
-                        &      p_e3(ji+1,jj+2,jk) * p_e1(ji+1,jj+2) * p_e2(ji+1,jj+2) * p_mask(ji+1,jj+2,jk) +  &
-                        &      p_e3(ji+2,jj+2,jk) * p_e1(ji+2,jj+2) * p_e2(ji+2,jj+2) * p_mask(ji+2,jj+2,jk)
- 
-                     p_e3_crs(ii,ij,jk) = ze3crs / p_sfc_crs(ii,ij,jk)
-                     !
-                     ze3crs = MAX( p_e3(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk),  &
-                        &          p_e3(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk),  &
-                        &          p_e3(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk),  &
-                        &          p_e3(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk),  &
-                        &          p_e3(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk),  &
-                        &          p_e3(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk),  &
-                        &          p_e3(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk),  &
-                        &          p_e3(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk),  &
-                        &          p_e3(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk) )
-                    
-                     p_e3_max_crs(ii,ij,jk) = ze3crs
-                  ENDDO
-               ENDDO
-            ENDDO
- 
-         CASE ('W')
-         
-            DO jk = 2 , jpk
-               DO ji = nistr, niend, nn_factx
-                  DO jj = njstr, njend, nn_facty
-                     ii   = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
-                     ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                     ijje = mje_crs(ij)
-                     ijie = mie_crs(ii)
-                     !  
-                     ze3crs =  p_e3(ji  ,jj  ,jk) * p_e1(ji  ,jj  ) * p_e2(ji  ,jj  ) * p_mask(ji  ,jj  ,jk-1) +  &
-                        &      p_e3(ji+1,jj  ,jk) * p_e1(ji+1,jj  ) * p_e2(ji+1,jj  ) * p_mask(ji+1,jj  ,jk-1) +  &
-                        &      p_e3(ji+2,jj  ,jk) * p_e1(ji+2,jj  ) * p_e2(ji+2,jj  ) * p_mask(ji+2,jj  ,jk-1) +  &
-                        &      p_e3(ji  ,jj+1,jk) * p_e1(ji  ,jj+1) * p_e2(ji  ,jj+1) * p_mask(ji  ,jj+1,jk-1) +  &
-                        &      p_e3(ji+1,jj+1,jk) * p_e1(ji+1,jj+1) * p_e2(ji+1,jj+1) * p_mask(ji+1,jj+1,jk-1) +  &
-                        &      p_e3(ji+2,jj+1,jk) * p_e1(ji+2,jj+1) * p_e2(ji+2,jj+1) * p_mask(ji+2,jj+1,jk-1) +  &
-                        &      p_e3(ji  ,jj+2,jk) * p_e1(ji  ,jj+2) * p_e2(ji  ,jj+2) * p_mask(ji  ,jj+2,jk-1) +  &
-                        &      p_e3(ji+1,jj+2,jk) * p_e1(ji+1,jj+2) * p_e2(ji+1,jj+2) * p_mask(ji+1,jj+2,jk-1) +  &
-                        &      p_e3(ji+2,jj+2,jk) * p_e1(ji+2,jj+2) * p_e2(ji+2,jj+2) * p_mask(ji+2,jj+2,jk-1)
-                        
-                     p_e3_crs(ii,ij,jk) = ze3crs / p_sfc_crs(ii,ij,jk)
-                     !
-                     ze3crs = MAX( p_e3(ji  ,jj  ,jk) * p_mask(ji  ,jj  ,jk-1),  &
-                        &          p_e3(ji+1,jj  ,jk) * p_mask(ji+1,jj  ,jk-1),  &
-                        &          p_e3(ji+2,jj  ,jk) * p_mask(ji+2,jj  ,jk-1),  &
-                        &          p_e3(ji  ,jj+1,jk) * p_mask(ji  ,jj+1,jk-1),  &
-                        &          p_e3(ji+1,jj+1,jk) * p_mask(ji+1,jj+1,jk-1),  &
-                        &          p_e3(ji+2,jj+1,jk) * p_mask(ji+2,jj+1,jk-1),  &
-                        &          p_e3(ji  ,jj+2,jk) * p_mask(ji  ,jj+2,jk-1),  &
-                        &          p_e3(ji+1,jj+2,jk) * p_mask(ji+1,jj+2,jk-1),  &
-                        &          p_e3(ji+2,jj+2,jk) * p_mask(ji+2,jj+2,jk-1) )
-                    
-                     p_e3_max_crs(ii,ij,jk) = ze3crs
-                  ENDDO
-               ENDDO
-            ENDDO
-             
-            DO ji = nistr, niend, nn_factx
-               DO jj = njstr, njend, nn_facty
-                  ii   = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
-                  ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                  ijje = mje_crs(ij)
-                  ijie = mie_crs(ii)
-                  !  
-                   ze3crs =  p_e3(ji  ,jj  ,1) * p_e1(ji  ,jj  ) * p_e2(ji  ,jj  ) * p_mask(ji  ,jj  ,1) +  &
-                        &    p_e3(ji+1,jj  ,1) * p_e1(ji+1,jj  ) * p_e2(ji+1,jj  ) * p_mask(ji+1,jj  ,1) +  &
-                        &    p_e3(ji+2,jj  ,1) * p_e1(ji+2,jj  ) * p_e2(ji+2,jj  ) * p_mask(ji+2,jj  ,1) +  &
-                        &    p_e3(ji  ,jj+1,1) * p_e1(ji  ,jj+1) * p_e2(ji  ,jj+1) * p_mask(ji  ,jj+1,1) +  &
-                        &    p_e3(ji+1,jj+1,1) * p_e1(ji+1,jj+1) * p_e2(ji+1,jj+1) * p_mask(ji+1,jj+1,1) +  &
-                        &    p_e3(ji+2,jj+1,1) * p_e1(ji+2,jj+1) * p_e2(ji+2,jj+1) * p_mask(ji+2,jj+1,1) +  &
-                        &    p_e3(ji  ,jj+2,1) * p_e1(ji  ,jj+2) * p_e2(ji  ,jj+2) * p_mask(ji  ,jj+2,1) +  &
-                        &    p_e3(ji+1,jj+2,1) * p_e1(ji+1,jj+2) * p_e2(ji+1,jj+2) * p_mask(ji+1,jj+2,1) +  &
-                        &    p_e3(ji+2,jj+2,1) * p_e1(ji+2,jj+2) * p_e2(ji+2,jj+2) * p_mask(ji+2,jj+2,1)
-                        
-                  p_e3_crs(ii,ij,1) = ze3crs / p_sfc_crs(ii,ij,1)
-                  !
-                  ze3crs = MAX( p_e3(ji  ,jj  ,1) * p_mask(ji  ,jj  ,1),  &
-                     &          p_e3(ji+1,jj  ,1) * p_mask(ji+1,jj  ,1),  &
-                     &          p_e3(ji+2,jj  ,1) * p_mask(ji+2,jj  ,1),  &
-                     &          p_e3(ji  ,jj+1,1) * p_mask(ji  ,jj+1,1),  &
-                     &          p_e3(ji+1,jj+1,1) * p_mask(ji+1,jj+1,1),  &
-                     &          p_e3(ji+2,jj+1,1) * p_mask(ji+2,jj+1,1),  &
-                     &          p_e3(ji  ,jj+2,1) * p_mask(ji  ,jj+2,1),  &
-                     &          p_e3(ji+1,jj+2,1) * p_mask(ji+1,jj+2,1),  &
-                     &          p_e3(ji+2,jj+2,1) * p_mask(ji+2,jj+2,1) )
-                 
-                  p_e3_max_crs(ii,ij,1) = ze3crs
-               ENDDO
-            ENDDO
-            
-         END SELECT 
-         !              
-         CALL crs_lbc_lnk( p_e3_crs    , cd_type, 1.0, pval=1.0 )  
-         CALL crs_lbc_lnk( p_e3_max_crs, cd_type, 1.0, pval=1.0 )  
-         !              
+
+       CALL wrk_alloc( jpi, jpj, jpk, zmask, zsurf )
+
+       SELECT CASE ( cd_type )
+          CASE( 'W' )
+              zmask(:,:,1) = p_mask(:,:,1) 
+              DO jk = 2, jpk
+                 zmask(:,:,jk) = p_mask(:,:,jk-1) 
+              ENDDO
+           CASE DEFAULT
+              DO jk = 1, jpk
+                 zmask(:,:,jk) = p_mask(:,:,jk) 
+              ENDDO
+       END SELECT
+
+       DO jk = 1, jpk
+          zsurf(:,:,jk) = p_e1(:,:) * p_e2(:,:) * p_e3(:,:,jk) 
+       ENDDO
+
+       IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+          IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+             je_2 = mje_crs(2)
+             DO jk = 1 , jpk
+                DO ji = nistr, niend, nn_factx
+                   ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                   ze3crs =   zsurf(ji  ,je_2,jk) * zmask(ji  ,je_2,jk)   &
+                        &   + zsurf(ji+1,je_2,jk) * zmask(ji+1,je_2,jk)   &
+                        &   + zsurf(ji+2,je_2,jk) * zmask(ji+2,je_2,jk) 
+
+                   p_e3_crs(ii,2,jk) = ze3crs / p_sfc_crs(ii,ij,jk)
+                   !
+                   ze3crs = MAX( p_e3(ji  ,je_2,jk) * zmask(ji  ,je_2,jk),  &
+                      &          p_e3(ji+1,je_2,jk) * zmask(ji+1,je_2,jk),  &
+                      &          p_e3(ji+2,je_2,jk) * zmask(ji+2,je_2,jk)  )
+                   !
+                   p_e3_max_crs(ii,2,jk) = ze3crs
+                ENDDO
+             ENDDO
+          ENDIF
+       ELSE
+          je_2 = mjs_crs(2)
+          DO jk = 1 , jpk
+             DO ji = nistr, niend, nn_factx
+                ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
+                ze3crs =  zsurf(ji  ,je_2  ,jk) * zmask(ji  ,je_2  ,jk)   &
+                   &    + zsurf(ji+1,je_2  ,jk) * zmask(ji+1,je_2  ,jk)   &
+                   &    + zsurf(ji+2,je_2  ,jk) * zmask(ji+2,je_2  ,jk)   &
+                   &    + zsurf(ji  ,je_2+1,jk) * zmask(ji  ,je_2+1,jk)   &
+                   &    + zsurf(ji+1,je_2+1,jk) * zmask(ji+1,je_2+1,jk)   &
+                   &    + zsurf(ji+2,je_2+1,jk) * zmask(ji+2,je_2+1,jk)   &
+                   &    + zsurf(ji  ,je_2+2,jk) * zmask(ji  ,je_2+2,jk)   &
+                   &    + zsurf(ji+1,je_2+2,jk) * zmask(ji+1,je_2+2,jk)   &
+                   &    + zsurf(ji+2,je_2+2,jk) * zmask(ji+2,je_2+2,jk)
+
+                p_e3_crs(ii,2,jk) = ze3crs / p_sfc_crs(ii,2,jk)
+                !
+                ze3crs = MAX( p_e3(ji  ,je_2  ,jk) * zmask(ji  ,je_2  ,jk),  &
+                   &          p_e3(ji+1,je_2  ,jk) * zmask(ji+1,je_2  ,jk),  &
+                   &          p_e3(ji+2,je_2  ,jk) * zmask(ji+2,je_2  ,jk),  &
+                   &          p_e3(ji  ,je_2+1,jk) * zmask(ji  ,je_2+1,jk),  &
+                   &          p_e3(ji+1,je_2+1,jk) * zmask(ji+1,je_2+1,jk),  &
+                   &          p_e3(ji+2,je_2+1,jk) * zmask(ji+2,je_2+1,jk),  &
+                   &          p_e3(ji  ,je_2+2,jk) * zmask(ji  ,je_2+2,jk),  &
+                   &          p_e3(ji+1,je_2+2,jk) * zmask(ji+1,je_2+2,jk),  &
+                   &          p_e3(ji+2,je_2+2,jk) * zmask(ji+2,je_2+2,jk) )
+               
+                p_e3_max_crs(ii,2,jk) = ze3crs
+                ENDDO
+             ENDDO
+          ENDIF
+          DO jk = 1 , jpk
+             DO jj = njstr, njend, nn_facty
+                DO ji = nistr, niend, nn_factx
+                   ii   = ( ji - mis_crs(2) ) * rfactx_r + 2          
+                   ij   = ( jj - njstr ) * rfacty_r + 3
+                   ze3crs =   zsurf(ji  ,jj  ,jk) * zmask(ji  ,jj  ,jk)   &
+                   &        + zsurf(ji+1,jj  ,jk) * zmask(ji+1,jj  ,jk)   &
+                   &        + zsurf(ji+2,jj  ,jk) * zmask(ji+2,jj  ,jk)   &
+                   &        + zsurf(ji  ,jj+1,jk) * zmask(ji  ,jj+1,jk)   &
+                   &        + zsurf(ji+1,jj+1,jk) * zmask(ji+1,jj+1,jk)   &
+                   &        + zsurf(ji+2,jj+1,jk) * zmask(ji+2,jj+1,jk)   &
+                   &        + zsurf(ji  ,jj+2,jk) * zmask(ji  ,jj+2,jk)   &
+                   &        + zsurf(ji+1,jj+2,jk) * zmask(ji+1,jj+2,jk)   &
+                   &        + zsurf(ji+2,jj+2,jk) * zmask(ji+2,jj+2,jk)
+
+                p_e3_crs(ii,ij,jk) = ze3crs / p_sfc_crs(ii,ij,jk)
+                !
+                ze3crs = MAX( p_e3(ji  ,jj  ,jk) * zmask(ji  ,jj  ,jk),  &
+                   &          p_e3(ji+1,jj  ,jk) * zmask(ji+1,jj  ,jk),  &
+                   &          p_e3(ji+2,jj  ,jk) * zmask(ji+2,jj  ,jk),  &
+                   &          p_e3(ji  ,jj+1,jk) * zmask(ji  ,jj+1,jk),  &
+                   &          p_e3(ji+1,jj+1,jk) * zmask(ji+1,jj+1,jk),  &
+                   &          p_e3(ji+2,jj+1,jk) * zmask(ji+2,jj+1,jk),  &
+                   &          p_e3(ji  ,jj+2,jk) * zmask(ji  ,jj+2,jk),  &
+                   &          p_e3(ji+1,jj+2,jk) * zmask(ji+1,jj+2,jk),  &
+                   &          p_e3(ji+2,jj+2,jk) * zmask(ji+2,jj+2,jk) )
+               
+                p_e3_max_crs(ii,ij,jk) = ze3crs
+             ENDDO
+          ENDDO
+       ENDDO
+                  
+       CALL crs_lbc_lnk( p_e3_crs    , cd_type, 1.0, pval=1.0 )  
+       CALL crs_lbc_lnk( p_e3_max_crs, cd_type, 1.0, pval=1.0 )  
+       !              
+       CALL wrk_dealloc( jpi, jpj, jpk, zsurf, zmask )
+       !
    END SUBROUTINE crs_dom_e3
 
@@ -1440,149 +1776,110 @@
 
       !!  Arguments
-      CHARACTER(len=1),                 INTENT(in) :: cd_type      ! grid type T, W ( U, V, F)
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in) :: p_mask       ! Parent grid T mask
-      REAL(wp), DIMENSION(jpi,jpj)    , INTENT(in), OPTIONAL :: p_e1, p_e2         ! 3D tracer T or W on parent grid
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL :: p_e3         ! 3D tracer T or W on parent grid
-      REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(out):: p_surf_crs ! Coarse grid box east or north face quantity 
-      REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(out):: p_surf_crs_msk ! Coarse grid box east or north face quantity 
+      CHARACTER(len=1),                         INTENT(in)           :: cd_type      ! grid type T, W ( U, V, F)
+      REAL(wp), DIMENSION(jpi,jpj,jpk)        , INTENT(in)           :: p_mask       ! Parent grid T mask
+      REAL(wp), DIMENSION(jpi,jpj)            , INTENT(in), OPTIONAL :: p_e1, p_e2         ! 3D tracer T or W on parent grid
+      REAL(wp), DIMENSION(jpi,jpj,jpk)        , INTENT(in), OPTIONAL :: p_e3         ! 3D tracer T or W on parent grid
+      REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(out)          :: p_surf_crs ! Coarse grid box east or north face quantity 
+      REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(out)          :: p_surf_crs_msk ! Coarse grid box east or north face quantity 
 
       !! Local variables
       INTEGER  :: ji, jj, jk                   ! dummy loop indices
-      INTEGER  :: ijie, ijje, ii, ij
-      REAL(wp), DIMENSION(:,:)  , POINTER :: zsurf   
-      REAL(wp), DIMENSION(:,:,:), POINTER :: zsurf3d   
-      REAL(wp) :: zsfcrs, zsfcrs_msk
+      INTEGER  :: ii, ij, je_2
+      REAL(wp), DIMENSION(:,:,:), POINTER :: zsurf, zsurfmsk   
       !!----------------------------------------------------------------  
       ! Initialize
 
 
+      CALL wrk_alloc( jpi, jpj, jpk, zsurf, zsurfmsk )
       !
       SELECT CASE ( cd_type )
       
-         CASE ('W')
-      
-           CALL wrk_alloc( jpi, jpj, zsurf )
-           zsurf(:,:) =  p_e1(:,:) * p_e2(:,:)
-        
-            DO ji = nistr, niend, nn_factx
-               DO jj   = njstr, njend, nn_facty
-                  ii   = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
-                  ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                  ijje = mje_crs(ij)
-                  ijie = mie_crs(ii)
+         CASE ('W')    
+            DO jk = 1, jpk
+               zsurf(:,:,jk) = p_e1(:,:) * p_e2(:,:) 
+            ENDDO
+            zsurfmsk(:,:,1) = zsurf(:,:,1) * p_mask(:,:,1) 
+            DO jk = 2, jpk
+               zsurfmsk(:,:,jk) = zsurf(:,:,jk) * p_mask(:,:,jk-1) 
+            ENDDO
+
+         CASE ('V')     
+            DO jk = 1, jpk
+               zsurf(:,:,jk) = p_e1(:,:) * p_e3(:,:,jk) 
+            ENDDO
+            DO jk = 1, jpk
+               zsurfmsk(:,:,jk) = zsurf(:,:,jk) * p_mask(:,:,jk) 
+            ENDDO
+
+         CASE ('U')     
+            DO jk = 1, jpk
+               zsurf(:,:,jk) = p_e2(:,:) * p_e3(:,:,jk) 
+            ENDDO
+            DO jk = 1, jpk
+               zsurfmsk(:,:,jk) = zsurf(:,:,jk) * p_mask(:,:,jk) 
+            ENDDO
+
+         CASE DEFAULT
+            DO jk = 1, jpk
+               zsurf(:,:,jk) = p_e1(:,:) * p_e2(:,:) 
+            ENDDO
+            DO jk = 1, jpk
+               zsurfmsk(:,:,jk) = zsurf(:,:,jk) * p_mask(:,:,jk) 
+            ENDDO
+      END SELECT
+
+      IF( nldj_crs == 1 .AND. ( ( mje_crs(2) - mjs_crs(2) ) < 2 ) ) THEN     !!cc bande du sud style ORCA2
+         IF( mje_crs(2) - mjs_crs(2) == 1 ) THEN
+            je_2 = mje_crs(2)
+            DO jk = 1, jpk
+               DO ji = nistr, niend, nn_factx
+                  ii   = ( ji - mis_crs(2) ) * rfactx_r + 2 
+                  !    
+                  p_surf_crs    (ii,2,jk) =  zsurf(ji,je_2  ,jk) + zsurf(ji+1,je_2  ,jk) + zsurf(ji+2,je_2  ,jk) &
+                    &                      + zsurf(ji,je_2-1,jk) + zsurf(ji+1,je_2-1,jk) + zsurf(ji+2,je_2-1,jk)  ! Why ?????
                   !
-                  zsfcrs     =  zsurf(ji,jj  ) + zsurf(ji+1,jj  ) + zsurf(ji+2,jj  )  &
-                    &         + zsurf(ji,jj+1) + zsurf(ji+1,jj+1) + zsurf(ji+2,jj+1)  &
-                    &         + zsurf(ji,jj+2) + zsurf(ji+1,jj+2) + zsurf(ji+2,jj+2)  
-                  !
-                  zsfcrs_msk =  zsurf(ji  ,jj  ) * p_mask(ji  ,jj  ,1)  &
-                    &         + zsurf(ji+1,jj  ) * p_mask(ji+1,jj  ,1)  &
-                    &         + zsurf(ji+2,jj  ) * p_mask(ji+2,jj  ,1)  &
-                    &         + zsurf(ji  ,jj+1) * p_mask(ji  ,jj+1,1)  &
-                    &         + zsurf(ji+1,jj+1) * p_mask(ji+1,jj+1,1)  &
-                    &         + zsurf(ji+2,jj+1) * p_mask(ji+2,jj+1,1)  &
-                    &         + zsurf(ji  ,jj+2) * p_mask(ji  ,jj+2,1)  &
-                    &         + zsurf(ji+1,jj+2) * p_mask(ji+1,jj+2,1)  &
-                    &         + zsurf(ji+2,jj+2) * p_mask(ji+2,jj+2,1)
-                  !
-                  p_surf_crs    (ii,ij,1) = zsfcrs
-                  p_surf_crs_msk(ii,ij,1) = zsfcrs_msk
+                  p_surf_crs_msk(ii,2,jk) =  zsurfmsk(ji,je_2,jk) + zsurfmsk(ji+1,je_2,jk) + zsurfmsk(ji+2,je_2,jk) 
                   !
                ENDDO
             ENDDO
-            DO jk = 2, jpk
+         ENDIF
+      ELSE
+         je_2 = mjs_crs(2)
+         DO jk = 1, jpk
+            DO ji = nistr, niend, nn_factx
+               ii   = ( ji - mis_crs(2) ) * rfactx_r + 2 
+               !  
+               p_surf_crs    (ii,2,jk) =  zsurf(ji,je_2  ,jk) + zsurf(ji+1,je_2  ,jk) + zsurf(ji+2,je_2  ,jk)  &
+                    &                   + zsurf(ji,je_2+1,jk) + zsurf(ji+1,je_2+1,jk) + zsurf(ji+2,je_2+1,jk)  &
+                    &                   + zsurf(ji,je_2+2,jk) + zsurf(ji+1,je_2+2,jk) + zsurf(ji+2,je_2+2,jk)  
+
+               p_surf_crs_msk(ii,2,jk) =  zsurfmsk(ji,je_2  ,jk) + zsurfmsk(ji+1,je_2  ,jk) + zsurfmsk(ji+2,je_2  ,jk)  &
+                    &                   + zsurfmsk(ji,je_2+1,jk) + zsurfmsk(ji+1,je_2+1,jk) + zsurfmsk(ji+2,je_2+1,jk)  &
+                    &                   + zsurfmsk(ji,je_2+2,jk) + zsurfmsk(ji+1,je_2+2,jk) + zsurfmsk(ji+2,je_2+2,jk)  
+                ENDDO
+            ENDDO
+      ENDIF
+         
+      DO jk = 1, jpk
+         DO jj = njstr, njend, nn_facty
+            DO ji = nistr, niend, nn_factx
+               ii = ( ji - mis_crs(2) ) * rfactx_r + 2  
+               ij = ( jj - njstr ) * rfacty_r + 3
                !
-               p_surf_crs(:,:,jk) = p_surf_crs(:,:,1)
-               !
-               DO ji = nistr, niend, nn_factx
-                  DO jj   = njstr, njend, nn_facty
-                     ii   = ( ji - mis_crs(2) ) * rfactx_r + 2                 ! cordinate in parent grid
-                     ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                     ijje = mje_crs(ij)
-                     ijie = mie_crs(ii)
-                     !
-                     zsfcrs_msk =  zsurf(ji  ,jj  ) * p_mask(ji  ,jj  ,jk-1)  &
-                       &         + zsurf(ji+1,jj  ) * p_mask(ji+1,jj  ,jk-1)  &
-                       &         + zsurf(ji+2,jj  ) * p_mask(ji+2,jj  ,jk-1)  &
-                       &         + zsurf(ji  ,jj+1) * p_mask(ji  ,jj+1,jk-1)  &
-                       &         + zsurf(ji+1,jj+1) * p_mask(ji+1,jj+1,jk-1)  &
-                       &         + zsurf(ji+2,jj+1) * p_mask(ji+2,jj+1,jk-1)  &
-                       &         + zsurf(ji  ,jj+2) * p_mask(ji  ,jj+2,jk-1)  &
-                       &         + zsurf(ji+1,jj+2) * p_mask(ji+1,jj+2,jk-1)  &
-                       &         + zsurf(ji+2,jj+2) * p_mask(ji+2,jj+2,jk-1)
-                       !
-                       p_surf_crs_msk(ii,ij,jk) = zsfcrs_msk
-                       !
-                   ENDDO
-                ENDDO
-            ENDDO
-                        
-            CALL wrk_dealloc( jpi, jpj, zsurf )
-          
-         CASE( 'V' )
-           
-           CALL wrk_alloc( jpi, jpj, jpk, zsurf3d )
-           DO jk = 1, jpk
-              zsurf3d(:,:,jk) =  p_e1(:,:) * p_e3(:,:,jk)
-           ENDDO
-         
-           DO jk = 1, jpk
-              DO ji = nistr, niend, nn_factx
-                 DO jj = njstr, njend, nn_facty
-                    ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                    ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                    ijje = mje_crs(ij)
-                    ijie = mie_crs(ii)
-                    !                  
-                    zsfcrs      =  zsurf3d(ji,ijje,jk) + zsurf3d(ji+1,ijje,jk) + zsurf3d(ji+2,ijje,jk)
-                    !
-                    zsfcrs_msk  =  zsurf3d(ji  ,ijje,jk) * p_mask(ji  ,ijje,jk) &
-                      &          + zsurf3d(ji+1,ijje,jk) * p_mask(ji+1,ijje,jk) &
-                      &          + zsurf3d(ji+2,ijje,jk) * p_mask(ji+2,ijje,jk) 
-                    !
-                    p_surf_crs    (ii,ij,jk) = zsfcrs
-                    p_surf_crs_msk(ii,ij,jk) = zsfcrs_msk
-                    !
-                  ENDDO      
-              ENDDO
-           ENDDO   
-
-           CALL wrk_dealloc( jpi, jpj, jpk, zsurf3d )
-            
-         CASE( 'U' )
-         
-           CALL wrk_alloc( jpi, jpj, jpk, zsurf3d )
-           DO jk = 1, jpk
-              zsurf3d(:,:,jk) =  p_e2(:,:) * p_e3(:,:,jk)
-           ENDDO
-         
-           DO jk = 1, jpk
-              DO ji = nistr, niend, nn_factx
-                 DO jj = njstr, njend, nn_facty
-                    ii   = ( ji - mis_crs(2) ) * rfactx_r + 2     
-                    ij   = ( jj - mjs_crs(2) ) * rfacty_r + 2
-                    ijje = mje_crs(ij)
-                    ijie = mie_crs(ii)
-                    !                  
-                    zsfcrs      =  zsurf3d(ijie,jj,jk) + zsurf3d(ijie,jj+1,jk) + zsurf3d(ijie,jj+2,jk)
-                    !
-                    zsfcrs_msk  =  zsurf3d(ijie  ,jj,jk) * p_mask(ijie,jj  ,jk) &
-                      &          + zsurf3d(ijie,jj+1,jk) * p_mask(ijie,jj+1,jk) &
-                      &          + zsurf3d(ijie,jj+2,jk) * p_mask(ijie,jj+2,jk) 
-                    !
-                    p_surf_crs    (ii,ij,jk) = zsfcrs
-                    p_surf_crs_msk(ii,ij,jk) = zsfcrs_msk
-                    !
-                  ENDDO      
-              ENDDO
-           ENDDO  
- 
-           CALL wrk_dealloc( jpi, jpj, jpk, zsurf3d )
-
-      END SELECT
-      
+               p_surf_crs    (ii,ij,jk) =  zsurf(ji,jj  ,jk) + zsurf(ji+1,jj  ,jk) + zsurf(ji+2,jj  ,jk)  &
+                    &                    + zsurf(ji,jj+1,jk) + zsurf(ji+1,jj+1,jk) + zsurf(ji+2,jj+1,jk)  &
+                    &                    + zsurf(ji,jj+2,jk) + zsurf(ji+1,jj+2,jk) + zsurf(ji+2,jj+2,jk)  
+
+               p_surf_crs_msk(ii,ij,jk) =  zsurfmsk(ji,jj  ,jk) + zsurfmsk(ji+1,jj  ,jk) + zsurfmsk(ji+2,jj  ,jk)  &
+                    &                    + zsurfmsk(ji,jj+1,jk) + zsurfmsk(ji+1,jj+1,jk) + zsurfmsk(ji+2,jj+1,jk)  &
+                    &                    + zsurfmsk(ji,jj+2,jk) + zsurfmsk(ji+1,jj+2,jk) + zsurfmsk(ji+2,jj+2,jk)  
+            ENDDO      
+         ENDDO
+      ENDDO   
+
       CALL crs_lbc_lnk( p_surf_crs    , cd_type, 1.0, pval=1.0 )
       CALL crs_lbc_lnk( p_surf_crs_msk, cd_type, 1.0, pval=1.0 )
 
+      CALL wrk_dealloc( jpi, jpj, jpk, zsurf, zsurfmsk )
 
    END SUBROUTINE crs_dom_sfc
@@ -1601,14 +1898,18 @@
       INTEGER  :: ji,jj,jk,ijjgloT,ijis,ijie,ijjs,ijje,jn      ! dummy indices
       INTEGER  :: ierr                                ! allocation error status
-   
-     ! 1.a. Define global domain indices
+ 
+  
+     ! 1.a. Define global domain indices  : take into account the interior domain only ( removes i/j=1 , i/j=jpiglo/jpjglo ) then add 2/3 grid points 
       jpiglo_crs   = INT( (jpiglo - 2) / nn_factx ) + 2
-      jpjglo_crs   = INT( (jpjglo - 2) / nn_facty ) + 2  ! the -2 removes j=1, j=jpj
+  !    jpjglo_crs   = INT( (jpjglo - 2) / nn_facty ) + 2  ! the -2 removes j=1, j=jpj
+  !    jpjglo_crs   = INT( (jpjglo - 2) / nn_facty ) + 3
+      jpjglo_crs   = INT( (jpjglo - MOD(jpjglo, nn_facty)) / nn_facty ) + 3
       jpiglo_crsm1 = jpiglo_crs - 1
       jpjglo_crsm1 = jpjglo_crs - 1  
 
-     ! 1.b. Define local domain indices
-      jpi_crs = ( jpiglo_crs-2 * jpreci + (jpni-1) ) / jpni + 2*jpreci
-      jpj_crs = ( jpjglo_crs-2 * jprecj + (jpnj-1) ) / jpnj + 2*jprecj
+      jpi_crs = ( jpiglo_crs   - 2 * jpreci + (jpni-1) ) / jpni + 2 * jpreci
+      jpj_crs = ( jpjglo_crsm1 - 2 * jprecj + (jpnj-1) ) / jpnj + 2 * jprecj   
+              
+      IF( noso < 0 ) jpj_crs = jpj_crs + 1    ! add a local band on southern processors  
        
       jpi_crsm1   = jpi_crs - 1
@@ -1618,5 +1919,6 @@
       
       ierr = crs_dom_alloc()          ! allocate most coarse grid arrays
-     ! 2.a Define processor domain
+
+      ! 2.a Define processor domain
       IF( .NOT. lk_mpp ) THEN
          nimpp_crs  = 1
@@ -1628,5 +1930,4 @@
          nlei_crs   = jpi_crs
          nlej_crs   = jpj_crs
-
       ELSE
          ! Initialisation of most local variables -
@@ -1642,5 +1943,5 @@
         ! Calculs suivant une découpage en j
         DO jn = 1, jpnij, jpni
-           IF( jn < (jpnij-jpni + 1)) THEN
+           IF( jn < ( jpnij - jpni + 1 ) ) THEN
               nlejt_crs(jn) = AINT( REAL( ( jpjglo - (njmppt(jn     ) - 1) ) / nn_facty, wp ) ) &
                        &    - AINT( REAL( ( jpjglo - (njmppt(jn+jpni) - 1) ) / nn_facty, wp ) )
@@ -1648,8 +1949,8 @@
               nlejt_crs(jn) = AINT( REAL(  nlejt(jn) / nn_facty, wp ) ) + 1            
            ENDIF
-           
+           IF( noso < 0 ) nlejt_crs(jn) = nlejt_crs(jn) + 1             
            SELECT CASE( ibonjt(jn) )
               CASE ( -1 )
-                IF( MOD( jpjglo - njmppt(jn), nn_facty) > 0 )    nlejt_crs(jn) = nlejt_crs(jn) + 1
+                IF( MOD( jpjglo - njmppt(jn), nn_facty) > 0 )  nlejt_crs(jn) = nlejt_crs(jn) + 1
                 nlcjt_crs(jn) = nlejt_crs(jn) + jprecj
                 nldjt_crs(jn) = nldjt(jn)
@@ -1657,7 +1958,8 @@
               CASE ( 0 )
               
+                nldjt_crs(jn) = nldjt(jn)
+                IF( nldjt(jn) == 1 )  nlejt_crs(jn) = nlejt_crs(jn) + 1
                 nlejt_crs(jn) = nlejt_crs(jn) + jprecj
                 nlcjt_crs(jn) = nlejt_crs(jn) + jprecj
-                nldjt_crs(jn) = nldjt(jn)
                 
               CASE ( 1, 2 )
@@ -1670,6 +1972,11 @@
                  STOP
            END SELECT
-         
-           njmppt_crs(jn) = ANINT(REAL((njmppt(jn) + 1 + MOD( jpjglo - njmppt(jn) + 1, nn_facty )) / nn_facty, wp ) )
+           IF( nlcjt_crs(jn) > jpj_crs )     jpj_crs = jpj_crs + 1
+
+           IF(nldjt_crs(jn) == 1 ) THEN
+              njmppt_crs(jn) = 1
+           ELSE
+              njmppt_crs(jn) = 2 + ANINT(REAL((njmppt(jn) + 1 - MOD( jpjglo , nn_facty )) / nn_facty, wp ) )
+           ENDIF           
            
            DO jj = jn + 1, jn + jpni - 1
@@ -1685,43 +1992,42 @@
         njmpp_crs = njmppt_crs(nproc + 1)
 
-         !!!! Calcul suivant un decoupage en i
-           DO jn = 1, jpni
-              IF( jn < jpni ) THEN
-         
-                 nleit_crs(jn) = AINT( REAL( ( jpiglo - (nimppt(jn  ) - 1) ) / nn_factx, wp ) ) &
-                         &     - AINT( REAL( ( jpiglo - (nimppt(jn+1) - 1) ) / nn_factx, wp ) )
-              ELSE
-                 nleit_crs(jn) = AINT( REAL( ( jpiglo - (nimppt(jn  ) - 1) ) / nn_factx, wp ) )
-              ENDIF
-              SELECT CASE( ibonit(jn) )
-           
-                 CASE ( -1 )
-                   nleit_crs(jn) = nleit_crs(jn) + jpreci           
-                   nlcit_crs(jn) = nleit_crs(jn) + jpreci
-                   nldit_crs(jn) = nldit(jn) 
+        ! Calcul suivant un decoupage en i
+        DO jn = 1, jpni
+           IF( jn == 1 ) THEN          
+              nleit_crs(jn) = AINT( REAL( ( nimppt(jn  ) - 1 + nlcit(jn  ) )  / nn_factx, wp) )
+           ELSE
+              nleit_crs(jn) = AINT( REAL( ( nimppt(jn  ) - 1 + nlcit(jn  ) )  / nn_factx, wp) ) &
+                 &          - AINT( REAL( ( nimppt(jn-1) - 1 + nlcit(jn-1) )  / nn_factx, wp) )
+           ENDIF
+
+           SELECT CASE( ibonit(jn) )
+              CASE ( -1 )
+                 nleit_crs(jn) = nleit_crs(jn) + jpreci           
+                 nlcit_crs(jn) = nleit_crs(jn) + jpreci
+                 nldit_crs(jn) = nldit(jn) 
               
-                 CASE ( 0 )
-                   nleit_crs(jn) = nleit_crs(jn) + jpreci
-                   nlcit_crs(jn) = nleit_crs(jn) + jpreci
-                   nldit_crs(jn) = nldit(jn) 
+              CASE ( 0 )
+                 nleit_crs(jn) = nleit_crs(jn) + jpreci
+                 nlcit_crs(jn) = nleit_crs(jn) + jpreci
+                 nldit_crs(jn) = nldit(jn) 
                 
-                 CASE ( 1, 2 )
-                   IF( MOD( jpiglo - nimppt(jn), nn_factx) > 0 )    nleit_crs(jn) = nleit_crs(jn) + 1
-                   nleit_crs(jn) = nleit_crs(jn) + jpreci
-                   nlcit_crs(jn) = nleit_crs(jn)
-                   nldit_crs(jn) = nldit(jn) 
-                
-                 CASE DEFAULT
-                    STOP
-              END SELECT
-
-              nimppt_crs(jn) =ANINT( REAL( (nimppt(jn) + 1 ) / nn_factx, wp ) ) + 1
-              DO jj = jn+jpni , jpnij, jpni
-                 nleit_crs(jj) = nleit_crs(jn) 
-                 nlcit_crs(jj) = nlcit_crs(jn)
-                 nldit_crs(jj) = nldit_crs(jn)
-                 nimppt_crs(jj)= nimppt_crs(jn)
-              ENDDO
-           ENDDO 
+              CASE ( 1, 2 )
+                 IF( MOD( jpiglo - nimppt(jn), nn_factx) > 0 )  nleit_crs(jn) = nleit_crs(jn) + 1
+                 nleit_crs(jn) = nleit_crs(jn) + jpreci
+                 nlcit_crs(jn) = nleit_crs(jn)
+                 nldit_crs(jn) = nldit(jn) 
+
+              CASE DEFAULT
+                 STOP
+           END SELECT
+
+           nimppt_crs(jn) = ANINT( REAL( (nimppt(jn) + 1 ) / nn_factx, wp ) ) + 1
+           DO jj = jn + jpni , jpnij, jpni
+              nleit_crs(jj) = nleit_crs(jn) 
+              nlcit_crs(jj) = nlcit_crs(jn)
+              nldit_crs(jj) = nldit_crs(jn)
+              nimppt_crs(jj)= nimppt_crs(jn)
+           ENDDO
+         ENDDO 
         
          nlei_crs  = nleit_crs(nproc + 1) 
@@ -1730,6 +2036,7 @@
          nimpp_crs = nimppt_crs(nproc + 1)
 
-         ! rajouter la condition stop
+         ! No coarsening with zoom
          IF( jpizoom /= 1 .OR. jpjzoom /= 1)    STOP 
+
          DO ji = 1, jpi_crs
             mig_crs(ji) = ji + nimpp_crs - 1
@@ -1737,4 +2044,14 @@
          DO jj = 1, jpj_crs
             mjg_crs(jj) = jj + njmpp_crs - 1!
+         ENDDO
+       
+         DO ji = 1, jpiglo_crs
+            mi0_crs(ji) = MAX( 1, MIN( ji - nimpp_crs + 1 , jpi_crs + 1 ) )
+            mi1_crs(ji) = MAX( 0, MIN( ji - nimpp_crs + 1 , jpi_crs     ) )
+         ENDDO
+         
+         DO jj = 1, jpjglo_crs
+            mj0_crs(jj) = MAX( 1, MIN( jj - njmpp_crs + 1 , jpj_crs + 1 ) )
+            mj1_crs(jj) = MAX( 0, MIN( jj - njmpp_crs + 1 , jpj_crs     ) )
          ENDDO
 
@@ -1773,5 +2090,5 @@
      
 
-      IF (lwp) THEN
+      IF(lwp) THEN
          WRITE(numout,*)
          WRITE(numout,*) 'crs_init : coarse grid dimensions'
@@ -1793,18 +2110,7 @@
          WRITE(numout,*) ' njmpp  = '     , njmpp
          WRITE(numout,*) ' njmpp_full  = ', njmpp_full
-         WRITE(numout,*) ' nreci'         , nreci 
-   !      WRITE(numout,*) ' nlejt'         , nlejt
-   !      WRITE(numout,*) ' nldjt'         , nldjt
-   !      WRITE(numout,*) ' nlcjt'         , nlcjt
-   !      WRITE(numout,*) ' njmppt'        , njmppt
-   !      WRITE(numout,*) ' nleit'         , nleit
-   !      WRITE(numout,*) ' nldit'         , nldit
-   !      WRITE(numout,*) ' nlcit'         , nlcit         
-   !      WRITE(numout,*) ' nimppt'        , nimppt
-   !      WRITE(numout,*) ' nleit_full'    , nleit_full
          WRITE(numout,*)
       ENDIF
       
-
       CALL dom_grid_glo
       
@@ -1847,10 +2153,10 @@
         
             DO ji = 2, jpiglo_crsm1
-               ijie = (ji*nn_factx)-nn_factx   !cc
-               ijis = ijie-nn_factx+1
+               ijie = ( ji * nn_factx ) - nn_factx   !cc
+               ijis = ijie - nn_factx + 1
                mis2_crs(ji) = ijis
                mie2_crs(ji) = ijie
             ENDDO
-            IF ( jpiglo - 1 - mie2_crs(jpiglo_crsm1) <= nn_factx ) mie2_crs(jpiglo_crsm1)  = jpiglo-2  
+            IF ( jpiglo - 1 - mie2_crs(jpiglo_crsm1) <= nn_factx ) mie2_crs(jpiglo_crsm1) = jpiglo - 2  
 
             ! Handle first the northernmost bin
@@ -1859,9 +2165,9 @@
             ENDIF
 
-            DO jj = 2, jpjglo_crsm1
-                ijje = ijjgloT-nn_facty*(jj-2)
-                ijjs = ijje-nn_facty+1                   
-                mjs2_crs(jpjglo_crs-jj+1) = ijjs
-                mje2_crs(jpjglo_crs-jj+1) = ijje
+            DO jj = 2, jpjglo_crs
+                ijje = ijjgloT - nn_facty * ( jj - 3 )
+                ijjs = ijje - nn_facty + 1                   
+                mjs2_crs(jpjglo_crs-jj+2) = ijjs
+                mje2_crs(jpjglo_crs-jj+2) = ijje
             ENDDO
 
@@ -1872,14 +2178,14 @@
 
             DO ji = 2, jpiglo_crsm1
-               ijie = (ji*nn_factx)-nn_factx 
-               ijis = ijie-nn_factx+1
+               ijie = ( ji * nn_factx ) - nn_factx 
+               ijis = ijie - nn_factx + 1
                mis2_crs(ji) = ijis
                mie2_crs(ji) = ijie
             ENDDO
-            IF ( jpiglo - 1 - mie2_crs(jpiglo_crsm1) <= nn_factx ) mie_crs(jpiglo_crsm1)  = jpiglo-2 
+            IF ( jpiglo - 1 - mie2_crs(jpiglo_crsm1) <= nn_factx ) mie_crs(jpiglo_crsm1)  = jpiglo - 2 
 
             ! Treat the northernmost bin separately.
             jj = 2
-            ijje = jpj-nn_facty*(jj-2)
+            ijje = jpj - nn_facty * ( jj - 2 )
             IF ( nn_facty == 3 ) THEN   ;  ijjs = ijje - 1 
             ELSE                        ;  ijjs = ijje - nn_facty + 1
@@ -1890,9 +2196,9 @@
             ! Now bin the rest, any remainder at the south is lumped in the southern bin
             DO jj = 3, jpjglo_crsm1
-                ijje = jpjglo-nn_facty*(jj-2)
-                ijjs = ijje-nn_facty+1                  
-                IF ( ijjs <= nn_facty )   ijjs = 2
-                mjs2_crs(jpj_crs-jj+1) = ijjs
-                mje2_crs(jpj_crs-jj+1) = ijje
+                ijje = jpjglo - nn_facty * ( jj - 2 )
+                ijjs = ijje - nn_facty + 1                  
+                IF ( ijjs <= nn_facty )  ijjs = 2
+                mjs2_crs(jpj_crs-jj+1)   = ijjs
+                mje2_crs(jpj_crs-jj+1)   = ijje
             ENDDO
 
@@ -1908,8 +2214,12 @@
 
      ! Pad the boundaries, do not know if it is necessary
-      mis2_crs(1) = 1             ; mis2_crs(jpiglo_crs) = mie2_crs(jpiglo_crs - 1) + 1   
-      mie2_crs(1) = nn_factx      ; mie2_crs(jpiglo_crs) = jpiglo                         
-      mje2_crs(1) = mjs2_crs(2)-1 ; mje2_crs(jpjglo_crs) = jpjglo
-      mjs2_crs(1) = 1             ; mjs2_crs(jpjglo_crs) = mje2_crs(jpjglo_crs) - nn_facty + 1 
+      mis2_crs(2) = 1             ;  mis2_crs(jpiglo_crs) = mie2_crs(jpiglo_crs - 1) + 1   
+      mie2_crs(2) = nn_factx      ;  mie2_crs(jpiglo_crs) = jpiglo                         
+      !
+      mjs2_crs(1) = 1
+      mje2_crs(1) = 1
+      !
+      mje2_crs(2) = mjs2_crs(3)-1 ;  mje2_crs(jpjglo_crs) = jpjglo
+      mjs2_crs(2) = 1             ;  mjs2_crs(jpjglo_crs) = mje2_crs(jpjglo_crs) - nn_facty + 1 
  
       IF( .NOT. lk_mpp ) THEN     
@@ -1928,6 +2238,7 @@
         ENDDO
       ENDIF
-      njstr = mjs_crs(2)  ;   njend = mjs_crs(nlcj_crs - 1)
+      !
       nistr = mis_crs(2)  ;   niend = mis_crs(nlci_crs - 1)
+      njstr = mjs_crs(3)  ;   njend = mjs_crs(nlcj_crs - 1)
       !
    END SUBROUTINE crs_dom_def
