Index: branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90
===================================================================
--- branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90	(revision 7398)
+++ branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90	(revision 7520)
@@ -708,5 +708,5 @@
       !!  Arguments
       REAL(wp), DIMENSION(jpi,jpj),             INTENT(in)           :: p_fld   ! T, U, V or W on parent grid
-      CHARACTER(len=3),                         INTENT(in)           :: cd_op    ! Operation SUM, MAX or MIN
+      CHARACTER(len=*),                         INTENT(in)           :: cd_op    ! Operation SUM, MAX or MIN
       CHARACTER(len=1),                         INTENT(in)           :: cd_type    ! grid type U,V 
       REAL(wp), DIMENSION(jpi,jpj,jpk),         INTENT(in)           :: p_mask    ! Parent grid T,U,V mask
@@ -729,5 +729,5 @@
       p_fld_crs(:,:) = 0.0
 
-      SELECT CASE ( cd_op )
+      SELECT CASE ( TRIM(cd_op) )
       
         CASE ( 'VOL' )
Index: branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90
===================================================================
--- branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90	(revision 7398)
+++ branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90	(revision 7520)
@@ -316,13 +316,11 @@
 
       CALL crs_dom_ope( qsr  , 'SUM', 'T', tmask, qsr_crs  , p_e12=e1e2t, p_surf_crs=e1e2t_crs, psgn=1.0 )
-#if defined key_vvl
-      CALL crs_dom_ope( gdepw_n, 'MAX', 'W', tmask, gdepw_n_crs, p_e3=zfse3w, psgn=1.0 )
-#else
-      CALL crs_dom_ope( gdepw_0, 'MAX', 'W', tmask, gdepw_0_crs, p_e3=zfse3w, psgn=1.0 )
-#endif
+
       CALL crs_dom_ope( emp   ,'SUM', 'T', tmask, emp_crs   , p_e12=e1e2t, p_surf_crs=e1e2t_crs, psgn=1.0 )
       CALL crs_dom_ope( fmmflx,'SUM', 'T', tmask, fmmflx_crs, p_e12=e1e2t, p_surf_crs=e1e2t_crs, psgn=1.0 )
       CALL crs_dom_ope( sfx   ,'SUM', 'T', tmask, sfx_crs   , p_e12=e1e2t, p_surf_crs=e1e2t_crs, psgn=1.0 )
+
       CALL crs_dom_ope( fr_i  ,'SUM', 'T', tmask, fr_i_crs  , p_e12=e1e2t, p_surf_crs=e1e2t_crs, psgn=1.0 )
+      fr_i_crs=MAX( 0._wp, MIN( fr_i_crs , 1._wp ) )
 
       z2d=REAL(nmln,wp)
Index: branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 7398)
+++ branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 7520)
@@ -15,5 +15,4 @@
    !!                   surface boundary condition
    !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers
    USE dom_oce         ! ocean space and time domain
    USE phycst          ! ???
@@ -24,6 +23,6 @@
    USE wrk_nemo        ! work arrays
    USE lbclnk          ! ocean lateral boundary conditions (C1D case)
-   USE ioipsl, ONLY :   ymds2ju, ju2ymds   ! for calendar
-   USE sbc_oce
+   USE ioipsl, ONLY  : ymds2ju, ju2ymds   ! for calendar
+   USE sbc_oce, ONLY : nn_components,nn_lsm,jp_iam_sas
    
    IMPLICIT NONE
Index: branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90
===================================================================
--- branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 7398)
+++ branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 7520)
@@ -55,5 +55,4 @@
       INTEGER             :: ji, jj, jk, jn
       CHARACTER (len=25) :: charout
-
       !!---------------------------------------------------------------------
       !
@@ -73,5 +72,4 @@
       END DO
 
-          
       CALL p4z_opt  ( kt, knt )     ! Optic: PAR in the water column
       CALL p4z_sink ( kt, knt )     ! vertical flux of particulate organic matter
@@ -81,5 +79,5 @@
       !                             ! (for each element : C, Si, Fe, Chl )
       CALL p4z_mort ( kt      )     ! phytoplankton mortality
-     !                             ! zooplankton sources/sinks routines 
+      !                             ! zooplankton sources/sinks routines 
       CALL p4z_micro( kt, knt )           ! microzooplankton
       CALL p4z_meso ( kt, knt )           ! mesozooplankton
Index: branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90
===================================================================
--- branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 7398)
+++ branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 7520)
@@ -107,12 +107,4 @@
                ekg(ji,jj,jk) = xkrgb(2,irgb) * fse3t(ji,jj,jk)
                ekr(ji,jj,jk) = xkrgb(3,irgb) * fse3t(ji,jj,jk)
-!#if defined key_crs
-!               zfse3 = e3t_max_crs(ji,jj,jk)
-!#else
-!               zfse3 = fse3t(ji,jj,jk)
-!#endif
-!               ekb(ji,jj,jk) = xkrgb(1,irgb) * zfse3
-!               ekg(ji,jj,jk) = xkrgb(2,irgb) * zfse3
-!               ekr(ji,jj,jk) = xkrgb(3,irgb) * zfse3
             END DO
          END DO
@@ -200,14 +192,4 @@
                   zetmp4 (ji,jj) = zetmp4 (ji,jj) + ediat    (ji,jj,jk) * fse3t(ji,jj,jk) ! production
                   zdepmoy(ji,jj) = zdepmoy(ji,jj) + fse3t(ji,jj,jk)
-!#if defined key_crs
-!                zfse3 = e3t_max_crs(ji,jj,jk)
-!#else
-!               zfse3 = fse3t(ji,jj,jk)
-!#endif
-!                  zetmp1 (ji,jj) = zetmp1 (ji,jj) + etot     (ji,jj,jk) * zfse3 ! remineralisation
-!                  zetmp2 (ji,jj) = zetmp2 (ji,jj) + etot_ndcy(ji,jj,jk) * zfse3 ! production
-!                  zetmp3 (ji,jj) = zetmp3 (ji,jj) + enano    (ji,jj,jk) * zfse3 ! production
-!                  zetmp4 (ji,jj) = zetmp4 (ji,jj) + ediat    (ji,jj,jk) * zfse3 ! production
-!                  zdepmoy(ji,jj) = zdepmoy(ji,jj) + zfse3
                ENDIF
             END DO
Index: branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
===================================================================
--- branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 7398)
+++ branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 7520)
@@ -223,10 +223,9 @@
          DO ji = 1, jpi
             ikt  = mbkt(ji,jj)
-!#if defined key_crs
-!            zdep = e3t_max_crs(ji,jj,ikt) / xstep
-!#else
-!            zdep = fse3t(ji,jj,ikt) / xstep
-!#endif
+#if defined key_crs
+            zdep = e3t_max_crs(ji,jj,ikt) / xstep
+#else
             zdep = fse3t(ji,jj,ikt) / xstep
+#endif
             zwsbio4(ji,jj) = MIN( 0.99 * zdep, wsbio4(ji,jj,ikt) )
             zwscal (ji,jj) = MIN( 0.99 * zdep, wscal (ji,jj,ikt) )
Index: branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90
===================================================================
--- branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 7398)
+++ branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 7520)
@@ -135,10 +135,9 @@
              DO ji = 1, jpi
                 IF( tmask(ji,jj,jk) == 1) THEN
-!#if defined key_crs
-!                   zwsmax =  0.5 * e3t_max_crs(ji,jj,jk) / xstep
-!#else
-!                   zwsmax =  0.5 * fse3t(ji,jj,jk) / xstep
-!#endif
+#if defined key_crs
+                   zwsmax =  0.5 * e3t_max_crs(ji,jj,jk) / xstep
+#else
                    zwsmax =  0.5 * fse3t(ji,jj,jk) / xstep
+#endif
                    iiter1 =  MAX( iiter1, INT( wsbio3(ji,jj,jk) / zwsmax ) )
                    iiter2 =  MAX( iiter2, INT( wsbio4(ji,jj,jk) / zwsmax ) )
@@ -159,10 +158,5 @@
             DO ji = 1, jpi
                IF( tmask(ji,jj,jk) == 1 ) THEN
-!#if defined key_crs
-!                   zwsmax =  0.5 * e3t_max_crs(ji,jj,jk) / xstep
-!#else
-!                   zwsmax =  0.5 * fse3t(ji,jj,jk) / xstep
-!#endif
-                 zwsmax = 0.5 * fse3t(ji,jj,jk) / xstep
+                 zwsmax =  0.5 * fse3t(ji,jj,jk) / xstep
                  wsbio3(ji,jj,jk) = MIN( wsbio3(ji,jj,jk), zwsmax * FLOAT( iiter1 ) )
                  wsbio4(ji,jj,jk) = MIN( wsbio4(ji,jj,jk), zwsmax * FLOAT( iiter2 ) )
@@ -870,5 +864,9 @@
             DO jj = 1,jpj
                DO ji = 1, jpi
+#if defined key_crs
+                  zflx = ( psinkflx(ji,jj,jk) - psinkflx(ji,jj,jk+1) ) / e3t_max_crs(ji,jj,jk)
+#else
                   zflx = ( psinkflx(ji,jj,jk) - psinkflx(ji,jj,jk+1) ) / fse3t(ji,jj,jk)
+#endif
                   trb(ji,jj,jk,jp_tra) = trb(ji,jj,jk,jp_tra) + zflx
                END DO
@@ -881,5 +879,9 @@
          DO jj = 1,jpj
             DO ji = 1, jpi
+#if defined key_crs
+               zflx = ( psinkflx(ji,jj,jk) - psinkflx(ji,jj,jk+1) ) / e3t_max_crs(ji,jj,jk)
+#else
                zflx = ( psinkflx(ji,jj,jk) - psinkflx(ji,jj,jk+1) ) / fse3t(ji,jj,jk)
+#endif
                ztrb(ji,jj,jk) = ztrb(ji,jj,jk) + 2. * zflx
             END DO
