Index: branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zbio.F90
===================================================================
--- branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zbio.F90	(revision 6841)
+++ branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zbio.F90	(revision 6966)
@@ -28,6 +28,4 @@
    USE p5zpoc          !  Remineralisation of organic particles
    USE p5zagg          !  Aggregation of particles
-   USE p4zlys          !  Dissolution of calcite
-   USE p4zfechem       !  Iron chemistry
    USE p4zligand       !  Remineralization of ligands
    USE prtctl_trc      !  print control for debugging
@@ -82,5 +80,4 @@
       CALL p4z_opt  ( kt, knt )     ! Optic: PAR in the water column
       CALL p5z_sink ( kt, knt )     ! vertical flux of particulate organic matter
-      CALL p4z_lys   (kt, knt )     ! Dissolution of calcite
       CALL p4z_fechem(kt, knt )     ! Iron chemistry/scavenging
       CALL p5z_lim  ( kt, knt )     ! co-limitations by the various nutrients
Index: branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zpoc.F90
===================================================================
--- branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zpoc.F90	(revision 6841)
+++ branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zpoc.F90	(revision 6966)
@@ -67,5 +67,5 @@
       INTEGER  ::   ji, jj, jk, jn
       REAL(wp) ::   zremip, zremig, zdep, zstep
-      REAL(wp) ::   zopon, zopop, zopoc2, zopon2, zopop2, zofer
+      REAL(wp) ::   zopon, zopop, zopoc, zopoc2, zopon2, zopop2, zofer
       REAL(wp) ::   zsizek, zsizek1, alphat, remint
       REAL(wp) ::   solgoc, zpoc
@@ -211,4 +211,5 @@
                zremig = zremigoc(ji,jj,jk) * zstep * tgfunc(ji,jj,jk)
                zopoc2 = zremig  * trb(ji,jj,jk,jpgoc)
+               orem(ji,jj,jk) = zopoc2
                zopon2 = xremipn / xremipc * zremig * trb(ji,jj,jk,jpgon)
                zopop2 = xremipp / xremipc * zremig * trb(ji,jj,jk,jpgop)
@@ -396,6 +397,6 @@
                ! --------------------------------------------------------
                zremip = zremipoc(ji,jj,jk) * zstep * tgfunc(ji,jj,jk)
-
-               orem(ji,jj,jk)  = zremip * trb(ji,jj,jk,jppoc)
+               zopoc  = zremip * trb(ji,jj,jk,jppoc)
+               orem(ji,jj,jk)  = orem(ji,jj,jk) + zopoc
                zopon  = xremipn / xremipc * zremip * trb(ji,jj,jk,jppon)
                zopop  = xremipp / xremipc * zremip * trb(ji,jj,jk,jppop)
@@ -407,9 +408,9 @@
                ! Update the appropriate tracers trends
                ! -------------------------------------
-               tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) - orem(ji,jj,jk)
+               tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) - zopoc
                tra(ji,jj,jk,jppon) = tra(ji,jj,jk,jppon) - zopon
                tra(ji,jj,jk,jppop) = tra(ji,jj,jk,jppop) - zopop
                tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) - zofer
-               tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) + orem(ji,jj,jk)
+               tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) + zopoc
                tra(ji,jj,jk,jpdon) = tra(ji,jj,jk,jpdon) + zopon 
                tra(ji,jj,jk,jpdop) = tra(ji,jj,jk,jpdop) + zopop 
Index: branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zprod.F90
===================================================================
--- branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zprod.F90	(revision 6841)
+++ branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zprod.F90	(revision 6966)
@@ -33,11 +33,11 @@
 
    !! * Shared module variables
-   REAL(wp), PUBLIC ::  pislope         !:
+   REAL(wp), PUBLIC ::  pislopen        !:
    REAL(wp), PUBLIC ::  pislopep        !:
-   REAL(wp), PUBLIC ::  pislope2        !:
+   REAL(wp), PUBLIC ::  pisloped        !:
    REAL(wp), PUBLIC ::  xadap           !:
-   REAL(wp), PUBLIC ::  excret          !:
+   REAL(wp), PUBLIC ::  excretn         !:
    REAL(wp), PUBLIC ::  excretp         !:
-   REAL(wp), PUBLIC ::  excret2         !:
+   REAL(wp), PUBLIC ::  excretd         !:
    REAL(wp), PUBLIC ::  bresp           !:
    REAL(wp), PUBLIC ::  thetanpm        !:
@@ -56,7 +56,7 @@
    
    REAL(wp) :: r1_rday                !: 1 / rday
-   REAL(wp) :: texcret                !: 1 - excret 
+   REAL(wp) :: texcretn               !: 1 - excret 
    REAL(wp) :: texcretp               !: 1 - excretp 
-   REAL(wp) :: texcret2               !: 1 - excret2        
+   REAL(wp) :: texcretd               !: 1 - excret2        
 
 
@@ -87,16 +87,15 @@
       REAL(wp) ::   zpronmax, zpropmax, zprofmax, zrat
       REAL(wp) ::   zlim, zsilfac2, zsiborn, zprod, zprontot, zproptot, zprodtot
-      REAL(wp) ::   zmxltst, zmxlday, zprnutmax, zdocprod
-      REAL(wp) ::   zpislopen, zpislopep, zpislope2n
+      REAL(wp) ::   zprnutmax, zdocprod, zprochln, zprochld, zprochlp
+      REAL(wp) ::   zpislopen, zpislopep, zpisloped
       REAL(wp) ::   zrum, zcodel, zargu, zval, zfeup
       REAL(wp) ::   zrfact2
       CHARACTER (len=25) :: charout
       REAL(wp), POINTER, DIMENSION(:,:  ) :: zmixnano, zmixpico, zmixdiat, zstrn
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zpislopead, zpislopeadp, zpislopead2
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zpislopeadn, zpislopeadp, zpislopead
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zprbio, zprpic, zprdia, zysopt
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zprchln, zprchlp, zprchld
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zprorcan, zprorcap, zprorcad 
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zprofed, zprofep, zprofen
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zprochln, zprochlp, zprochld
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zpronewn, zpronewp, zpronewd
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zproregn, zproregp, zproregd
@@ -105,4 +104,5 @@
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zrespn, zrespp, zrespd, zprnut
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zcroissn, zcroissp, zcroissd
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zmxl_fac, zmxl_chl
       !!---------------------------------------------------------------------
       !
@@ -111,7 +111,8 @@
       !  Allocate temporary workspace
       CALL wrk_alloc( jpi, jpj,      zmixnano, zmixpico, zmixdiat, zstrn )
-      CALL wrk_alloc( jpi, jpj, jpk, zpislopead, zpislopeadp, zpislopead2, zysopt ) 
+      CALL wrk_alloc( jpi, jpj, jpk, zmxl_fac, zmxl_chl )
+      CALL wrk_alloc( jpi, jpj, jpk, zpislopeadn, zpislopeadp, zpislopead, zysopt ) 
       CALL wrk_alloc( jpi, jpj, jpk, zprdia, zprpic, zprbio, zprorcan, zprorcap, zprorcad )
-      CALL wrk_alloc( jpi, jpj, jpk, zprofed, zprofep, zprofen, zprochln, zprochlp, zprochld )
+      CALL wrk_alloc( jpi, jpj, jpk, zprofed, zprofep, zprofen )
       CALL wrk_alloc( jpi, jpj, jpk, zpronewn, zpronewp, zpronewd, zproregn, zproregp, zproregd )
       CALL wrk_alloc( jpi, jpj, jpk, zpropo4n, zpropo4p, zpropo4d, zrespn, zrespp, zrespd, zprnut )
@@ -121,5 +122,4 @@
       zprorcan(:,:,:) = 0._wp ; zprorcap(:,:,:) = 0._wp ; zprorcad(:,:,:) = 0._wp
       zprofed (:,:,:) = 0._wp ; zprofep (:,:,:) = 0._wp ; zprofen (:,:,:) = 0._wp
-      zprochln(:,:,:) = 0._wp ; zprochlp(:,:,:) = 0._wp ; zprochld(:,:,:) = 0._wp
       zpronewn(:,:,:) = 0._wp ; zpronewp(:,:,:) = 0._wp ; zpronewd(:,:,:) = 0._wp
       zproregn(:,:,:) = 0._wp ; zproregp(:,:,:) = 0._wp ; zproregd(:,:,:) = 0._wp 
@@ -159,14 +159,24 @@
          DO jj = 1 ,jpj
             DO ji = 1, jpi
-               IF( etot(ji,jj,jk) > 1.E-3 ) THEN
+               IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
                   zval = MAX( 1., zstrn(ji,jj) )
-                  zval = 1.5 * zval / (12. + zval) * (1. - fr_i(ji,jj))
-                  zprbio(ji,jj,jk) = prmaxn(ji,jj,jk) * zval
-                  zprpic(ji,jj,jk) = prmaxp(ji,jj,jk) * zval
-                  zprdia(ji,jj,jk) = prmaxd(ji,jj,jk) * zval
+                  zmxl_fac(ji,jj,jk) = zval
+                  zmxl_chl(ji,jj,jk) = zval / 24.
+                  IF( fsdepw(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
+                     zval = MIN(1., heup_01(ji,jj) / ( hmld(ji,jj) + rtrn ))
+                     zmxl_fac(ji,jj,jk) = zmxl_fac(ji,jj,jk) * zval
+                     zmxl_chl(ji,jj,jk) = zmxl_chl(ji,jj,jk) * zval
+                  ENDIF
+                  zmxl_fac(ji,jj,jk) = ( 1. - exp( -0.2 * zmxl_fac(ji,jj,jk) ) )
+                  zmxl_chl(ji,jj,jk) = zmxl_chl(ji,jj,jk)
                ENDIF
             END DO
          END DO
       END DO
+
+      zprbio(:,:,:) = prmaxn(:,:,:) * zmxl_fac(:,:,:)
+      zprdia(:,:,:) = prmaxd(:,:,:) * zmxl_fac(:,:,:)
+      zprpic(:,:,:) = prmaxp(:,:,:) * zmxl_fac(:,:,:)
+
 
       ! Maximum light intensity
@@ -180,33 +190,34 @@
 !CDIR NOVERRCHK
             DO ji = 1, jpi
+               IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
                   ! Computation of the P-I slope for nanos and diatoms
-               IF( etot(ji,jj,jk) > 1.E-3 ) THEN
                   ztn         = MAX( 0., tsn(ji,jj,jk,jp_tem) - 15. )
                   zadap       = xadap * ztn / ( 2.+ ztn )
-                  znanotot    = enano(ji,jj,jk) * zstrn(ji,jj)
-                  zpicotot    = epico(ji,jj,jk) * zstrn(ji,jj)
-                  zdiattot    = ediat(ji,jj,jk) * zstrn(ji,jj)
                   !
-                  zpislopead (ji,jj,jk) = pislope * trb(ji,jj,jk,jpnch)    &
+                  zpislopeadn(ji,jj,jk) = pislopen * trb(ji,jj,jk,jpnch)    &
                   &                       /( trb(ji,jj,jk,jpphy) * 12. + rtrn)
-                  zpislopeadp(ji,jj,jk) = pislopep * ( 1. + zadap * EXP( -0.5 * zpicotot ) )   &
+                  zpislopeadp(ji,jj,jk) = pislopep * ( 1. + zadap * EXP( -0.25 * epico(ji,jj,jk) ) )   &
                   &                       * trb(ji,jj,jk,jppch) /( trb(ji,jj,jk,jppic) * 12. + rtrn)
-                  zpislopead2(ji,jj,jk) = pislope2 * trb(ji,jj,jk,jpdch)    &
+                  zpislopeadd(ji,jj,jk) = pisloped * trb(ji,jj,jk,jpdch)    &
                      &                    /( trb(ji,jj,jk,jpdia) * 12. + rtrn)
-                  zpislopen   = zpislopead (ji,jj,jk) / ( prmaxn(ji,jj,jk) * rday * xlimphy(ji,jj,jk) + rtrn )
-                  zpislopep   = zpislopeadp(ji,jj,jk) / ( prmaxp(ji,jj,jk) * rday * xlimpic(ji,jj,jk) + rtrn )
-                  zpislope2n  = zpislopead2(ji,jj,jk) / ( prmaxd(ji,jj,jk) * rday * xlimdia(ji,jj,jk) + rtrn )
+                  !
+                  zpislopen = zpislopeadn(ji,jj,jk) / ( prmaxn(ji,jj,jk) * rday * xlimphy(ji,jj,jk) + rtrn )
+                  zpislopep = zpislopeadp(ji,jj,jk) / ( prmaxp(ji,jj,jk) * rday * xlimpic(ji,jj,jk) + rtrn )
+                  zpisloped = zpislopeadd(ji,jj,jk) / ( prmaxd(ji,jj,jk) * rday * xlimdia(ji,jj,jk) + rtrn )
 
                   ! Computation of production function for Carbon
                   !  ---------------------------------------------
-                  zprbio(ji,jj,jk) = zprbio(ji,jj,jk) * ( 1.- EXP( -zpislopen  * znanotot )  )
-                  zprpic(ji,jj,jk) = zprpic(ji,jj,jk) * ( 1.- EXP( -zpislopep  * zpicotot )  )
-                  zprdia(ji,jj,jk) = zprdia(ji,jj,jk) * ( 1.- EXP( -zpislope2n * zdiattot )  )
+                  zprbio(ji,jj,jk) = zprbio(ji,jj,jk) * ( 1.- EXP( -zpislopen * enano(ji,jj,jk) )  )
+                  zprpic(ji,jj,jk) = zprpic(ji,jj,jk) * ( 1.- EXP( -zpislopep * epico(ji,jj,jk) )  )
+                  zprdia(ji,jj,jk) = zprdia(ji,jj,jk) * ( 1.- EXP( -zpisloped * ediat(ji,jj,jk) )  )
 
                   ! Computation of production function for Chlorophyll
                   !  -------------------------------------------------
-                  zprchln(ji,jj,jk) = prmaxn(ji,jj,jk) * ( 1.- EXP( -zpislopen  * enano(ji,jj,jk) )  )
-                  zprchlp(ji,jj,jk) = prmaxp(ji,jj,jk) * ( 1.- EXP( -zpislopep  * epico(ji,jj,jk) )  )
-                  zprchld(ji,jj,jk) = prmaxd(ji,jj,jk) * ( 1.- EXP( -zpislope2n * ediat(ji,jj,jk) )  )
+                  zpislopen = zpislopen * zmxl_fac(ji,jj,jk) / ( zmxl_chl(ji,jj,jk) + rtrn )
+                  zpisloped = zpisloped * zmxl_fac(ji,jj,jk) / ( zmxl_chl(ji,jj,jk) + rtrn )
+                  zpislopep = zpislopep * zmxl_fac(ji,jj,jk) / ( zmxl_chl(ji,jj,jk) + rtrn )
+                  zprchln(ji,jj,jk) = prmaxn(ji,jj,jk) * ( 1.- EXP( -zpislopen * enano(ji,jj,jk) )  )
+                  zprchlp(ji,jj,jk) = prmaxp(ji,jj,jk) * ( 1.- EXP( -zpislopep * epico(ji,jj,jk) )  )
+                  zprchld(ji,jj,jk) = prmaxd(ji,jj,jk) * ( 1.- EXP( -zpisloped * ediat(ji,jj,jk) )  )
                ENDIF
             END DO
@@ -217,5 +228,6 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-              IF( etot(ji,jj,jk) > 1.E-3 ) THEN
+
+                IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
                   !    Si/C of diatoms
                   !    ------------------------
@@ -238,27 +250,12 @@
       END DO
 
-      !  Computation of the limitation term due to a mixed layer deeper than the euphotic depth
-      DO jj = 1, jpj
-         DO ji = 1, jpi
-            zmxltst = MAX( 0.e0, hmld(ji,jj) - heup_01(ji,jj) )
-            zmxlday = zmxltst * zmxltst * r1_rday
-            zmixnano(ji,jj) = 1. - zmxlday / ( zlimmxln + zmxlday )
-            zmixpico(ji,jj) = 1. - zmxlday / ( zlimmxlp + zmxlday )
-            zmixdiat(ji,jj) = 1. - zmxlday / ( zlimmxld + zmxlday )
-         END DO
-      END DO
- 
-      !  Mixed-layer effect on production                                                                               
-      DO jk = 1, jpkm1
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               IF( fsdepw(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
-                  zprbio(ji,jj,jk)  = zprbio(ji,jj,jk) * zmixnano(ji,jj)
-                  zprpic(ji,jj,jk)  = zprpic(ji,jj,jk) * zmixpico(ji,jj)
-                  zprdia(ji,jj,jk)  = zprdia(ji,jj,jk) * zmixdiat(ji,jj)
-                  zprchln(ji,jj,jk) = zprchln(ji,jj,jk) * zmixnano(ji,jj)
-                  zprchlp(ji,jj,jk) = zprchlp(ji,jj,jk) * zmixpico(ji,jj)
-                  zprchld(ji,jj,jk) = zprchld(ji,jj,jk) * zmixdiat(ji,jj)
-               ENDIF
+      !  Sea-ice effect on production                                                                               
+      DO jk = 1, jpkm1
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zprbio(ji,jj,jk)  = zprbio(ji,jj,jk) * ( 1. - fr_i(ji,jj) )
+               zprpic(ji,jj,jk)  = zprpic(ji,jj,jk) * ( 1. - fr_i(ji,jj) ) 
+               zprdia(ji,jj,jk)  = zprdia(ji,jj,jk) * ( 1. - fr_i(ji,jj) ) 
+               zprnut(ji,jj,jk)  = zprnut(ji,jj,jk) * ( 1. - fr_i(ji,jj) )
             END DO
          END DO
@@ -269,5 +266,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               IF( etot(ji,jj,jk) > 1.E-3 ) THEN
+               IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
                   !  production terms for nanophyto.
                   zprorcan(ji,jj,jk) = zprbio(ji,jj,jk)  * xlimphy(ji,jj,jk) * trb(ji,jj,jk,jpphy) * rfact2
@@ -306,5 +303,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               IF( etot(ji,jj,jk) > 1.E-3 ) THEN
+               IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
                   !  production terms for picophyto.
                   zprorcap(ji,jj,jk) = zprpic(ji,jj,jk)  * xlimpic(ji,jj,jk) * trb(ji,jj,jk,jppic) * rfact2
@@ -343,5 +340,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               IF( etot(ji,jj,jk) > 1.E-3 ) THEN
+               IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
                   !  production terms for diatomees
                   zprorcad(ji,jj,jk) = zprdia(ji,jj,jk) * xlimdia(ji,jj,jk) * trb(ji,jj,jk,jpdia) * rfact2
@@ -381,17 +378,24 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               IF( etot(ji,jj,jk) > 1.E-3 ) THEN
+               IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
                      !  production terms for nanophyto. ( chlorophyll )
+                  znanotot = enano(ji,jj,jk) / ( zmxl_chl(ji,jj,jk) + rtrn )
                   zprod = rday * (zpronewn(ji,jj,jk) + zproregn(ji,jj,jk)) * zprchln(ji,jj,jk) * xlimphy(ji,jj,jk)
-                  zprochln(ji,jj,jk) = thetannm * zprod / ( zpislopead(ji,jj,jk) * enano(ji,jj,jk) +rtrn )
-                  zprochln(ji,jj,jk) = MAX(zprochln(ji,jj,jk), chlcmin * 12. * zprorcan (ji,jj,jk) )
+                  zprochln = thetannm * zprod / ( zpislopeadn(ji,jj,jk) * znanotot + rtrn )
+                  zprochln = MAX(zprochln, chlcmin * 12. * zprorcan (ji,jj,jk) )
                      !  production terms for picophyto. ( chlorophyll )
+                  zpicotot = epico(ji,jj,jk) / ( zmxl_chl(ji,jj,jk) + rtrn )
                   zprod = rday * (zpronewp(ji,jj,jk) + zproregp(ji,jj,jk)) * zprchlp(ji,jj,jk) * xlimpic(ji,jj,jk)
-                  zprochlp(ji,jj,jk) = thetanpm * zprod / ( zpislopeadp(ji,jj,jk) * epico(ji,jj,jk) +rtrn )
-                  zprochlp(ji,jj,jk) = MAX(zprochlp(ji,jj,jk), chlcmin * 12. * zprorcap(ji,jj,jk) )
+                  zprochlp = thetanpm * zprod / ( zpislopeadp(ji,jj,jk) * zpicotot + rtrn )
+                  zprochlp = MAX(zprochlp, chlcmin * 12. * zprorcap(ji,jj,jk) )
                   !  production terms for diatomees ( chlorophyll )
+                  zdiattot = ediat(ji,jj,jk) / ( zmxl_chl(ji,jj,jk) + rtrn )
                   zprod = rday * (zpronewd(ji,jj,jk) + zproregd(ji,jj,jk)) * zprchld(ji,jj,jk) * xlimdia(ji,jj,jk)
-                  zprochld(ji,jj,jk) = thetandm * zprod / ( zpislopead2(ji,jj,jk) * ediat(ji,jj,jk) +rtrn )
-                  zprochld(ji,jj,jk) = MAX(zprochld(ji,jj,jk), chlcmin * 12. * zprorcad(ji,jj,jk) )
+                  zprochld = thetandm * zprod / ( zpislopeadd(ji,jj,jk) * zdiattot + rtrn )
+                  zprochld = MAX(zprochld, chlcmin * 12. * zprorcad(ji,jj,jk) )
+                  !   Update the arrays TRA which contain the Chla sources and sinks
+                  tra(ji,jj,jk,jpnch) = tra(ji,jj,jk,jpnch) + zprochln * texcretn
+                  tra(ji,jj,jk,jpdch) = tra(ji,jj,jk,jpdch) + zprochld * texcretd
+                  tra(ji,jj,jk,jppch) = tra(ji,jj,jk,jppch) + zprochlp * texcretp
                ENDIF
             END DO
@@ -406,5 +410,5 @@
               zproptot = zpronewp(ji,jj,jk) + zproregp(ji,jj,jk)
               zprodtot = zpronewd(ji,jj,jk) + zproregd(ji,jj,jk)
-              zdocprod = excret2 * zprorcad(ji,jj,jk) + excret * zprorcan(ji,jj,jk)  &
+              zdocprod = excretd * zprorcad(ji,jj,jk) + excretn * zprorcan(ji,jj,jk)  &
               &          + excretp * zprorcap(ji,jj,jk)
               tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) - zpropo4n(ji,jj,jk) - zpropo4d(ji,jj,jk)  &
@@ -414,13 +418,12 @@
               tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) - zproregn(ji,jj,jk) - zproregd(ji,jj,jk)  &
               &                     - zproregp(ji,jj,jk)
-              tra(ji,jj,jk,jpphy) = tra(ji,jj,jk,jpphy) + zprorcan(ji,jj,jk) * texcret     &
+              tra(ji,jj,jk,jpphy) = tra(ji,jj,jk,jpphy) + zprorcan(ji,jj,jk) * texcretn    &
                  &                  - zpsino3 * zpronewn(ji,jj,jk) - zpsinh4 * zproregn(ji,jj,jk)   &
                  &                  - zrespn(ji,jj,jk) 
               zcroissn(ji,jj,jk) = tra(ji,jj,jk,jpphy) / rfact2/ (trb(ji,jj,jk,jpphy) + rtrn)
-              tra(ji,jj,jk,jpnph) = tra(ji,jj,jk,jpnph) + zprontot * texcret
-              tra(ji,jj,jk,jppph) = tra(ji,jj,jk,jppph) + zpropo4n(ji,jj,jk) * texcret   &
-              &                     + zprodopn(ji,jj,jk) * texcret
-              tra(ji,jj,jk,jpnch) = tra(ji,jj,jk,jpnch) + zprochln(ji,jj,jk) * texcret
-              tra(ji,jj,jk,jpnfe) = tra(ji,jj,jk,jpnfe) + zprofen(ji,jj,jk) * texcret
+              tra(ji,jj,jk,jpnph) = tra(ji,jj,jk,jpnph) + zprontot * texcretn
+              tra(ji,jj,jk,jppph) = tra(ji,jj,jk,jppph) + zpropo4n(ji,jj,jk) * texcretn   &
+              &                     + zprodopn(ji,jj,jk) * texcretn
+              tra(ji,jj,jk,jpnfe) = tra(ji,jj,jk,jpnfe) + zprofen(ji,jj,jk) * texcretn
               tra(ji,jj,jk,jppic) = tra(ji,jj,jk,jppic) + zprorcap(ji,jj,jk) * texcretp     &
                  &                  - zpsino3 * zpronewp(ji,jj,jk) - zpsinh4 * zproregp(ji,jj,jk)   &
@@ -430,22 +433,20 @@
               tra(ji,jj,jk,jpppi) = tra(ji,jj,jk,jpppi) + zpropo4p(ji,jj,jk) * texcretp   &
               &                     + zprodopp(ji,jj,jk) * texcretp
-              tra(ji,jj,jk,jppch) = tra(ji,jj,jk,jppch) + zprochlp(ji,jj,jk) * texcretp
               tra(ji,jj,jk,jppfe) = tra(ji,jj,jk,jppfe) + zprofep(ji,jj,jk) * texcretp
-              tra(ji,jj,jk,jpdia) = tra(ji,jj,jk,jpdia) + zprorcad(ji,jj,jk) * texcret2   &
+              tra(ji,jj,jk,jpdia) = tra(ji,jj,jk,jpdia) + zprorcad(ji,jj,jk) * texcretd   &
                  &                  - zpsino3 * zpronewd(ji,jj,jk) - zpsinh4 * zproregd(ji,jj,jk)   &
                  &                  - zrespd(ji,jj,jk) 
               zcroissd(ji,jj,jk) = tra(ji,jj,jk,jpdia) / rfact2 / (trb(ji,jj,jk,jpdia) + rtrn)
-              tra(ji,jj,jk,jpndi) = tra(ji,jj,jk,jpndi) + zprodtot * texcret2
-              tra(ji,jj,jk,jppdi) = tra(ji,jj,jk,jppdi) + zpropo4d(ji,jj,jk) * texcret2   &
-              &                     + zprodopd(ji,jj,jk) * texcret2
-              tra(ji,jj,jk,jpdch) = tra(ji,jj,jk,jpdch) + zprochld(ji,jj,jk) * texcret2
-              tra(ji,jj,jk,jpdfe) = tra(ji,jj,jk,jpdfe) + zprofed(ji,jj,jk) * texcret2
-              tra(ji,jj,jk,jpdsi) = tra(ji,jj,jk,jpdsi) + zprorcad(ji,jj,jk) * zysopt(ji,jj,jk) * texcret2
-              tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) + excret2 * zprorcad(ji,jj,jk) + excret * zprorcan(ji,jj,jk)  &
+              tra(ji,jj,jk,jpndi) = tra(ji,jj,jk,jpndi) + zprodtot * texcretd
+              tra(ji,jj,jk,jppdi) = tra(ji,jj,jk,jppdi) + zpropo4d(ji,jj,jk) * texcretd   &
+              &                     + zprodopd(ji,jj,jk) * texcretd
+              tra(ji,jj,jk,jpdfe) = tra(ji,jj,jk,jpdfe) + zprofed(ji,jj,jk) * texcretd
+              tra(ji,jj,jk,jpdsi) = tra(ji,jj,jk,jpdsi) + zprorcad(ji,jj,jk) * zysopt(ji,jj,jk) * texcretd
+              tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) + excretd * zprorcad(ji,jj,jk) + excretn * zprorcan(ji,jj,jk)  &
               &                     + excretp * zprorcap(ji,jj,jk)
-              tra(ji,jj,jk,jpdon) = tra(ji,jj,jk,jpdon) + excret2 * zprodtot + excret * zprontot   &
+              tra(ji,jj,jk,jpdon) = tra(ji,jj,jk,jpdon) + excretd * zprodtot + excretn * zprontot   &
               &                     + excretp * zproptot
-              tra(ji,jj,jk,jpdop) = tra(ji,jj,jk,jpdop) + excret2 * zpropo4d(ji,jj,jk) + excret * zpropo4n(ji,jj,jk)   &
-              &    - texcret * zprodopn(ji,jj,jk) - texcret2 * zprodopd(ji,jj,jk) + excretp * zpropo4p(ji,jj,jk)     &
+              tra(ji,jj,jk,jpdop) = tra(ji,jj,jk,jpdop) + excretd * zpropo4d(ji,jj,jk) + excretn * zpropo4n(ji,jj,jk)   &
+              &    - texcretn * zprodopn(ji,jj,jk) - texcretd * zprodopd(ji,jj,jk) + excretp * zpropo4p(ji,jj,jk)     &
               &    - texcretp * zprodopp(ji,jj,jk)
               tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) + o2ut * ( zproregn(ji,jj,jk) + zproregd(ji,jj,jk)   &
@@ -453,8 +454,8 @@
                  &                + zpronewd(ji,jj,jk) + zpronewp(ji,jj,jk) )   &
                  &                - o2ut * ( zrespn(ji,jj,jk) + zrespp(ji,jj,jk) + zrespd(ji,jj,jk) )
-              zfeup    = texcret * zprofen(ji,jj,jk) + texcret2 * zprofed(ji,jj,jk)  &
+              zfeup    = texcretn * zprofen(ji,jj,jk) + texcretd * zprofed(ji,jj,jk)  &
               &          + texcretp * zprofep(ji,jj,jk)
               tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) - zfeup
-              tra(ji,jj,jk,jpsil) = tra(ji,jj,jk,jpsil) - texcret2 * zprorcad(ji,jj,jk) * zysopt(ji,jj,jk)
+              tra(ji,jj,jk,jpsil) = tra(ji,jj,jk,jpsil) - texcretd * zprorcad(ji,jj,jk) * zysopt(ji,jj,jk)
               tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) - zprorcan(ji,jj,jk) - zprorcad(ji,jj,jk) - zprorcap(ji,jj,jk)  &
               &                     + zpsino3 * zpronewn(ji,jj,jk) + zpsinh4 * zproregn(ji,jj,jk)   &
@@ -522,7 +523,8 @@
       !
       CALL wrk_dealloc( jpi, jpj,      zmixnano, zmixpico, zmixdiat, zstrn )
-      CALL wrk_dealloc( jpi, jpj, jpk, zpislopead, zpislopeadp, zpislopead2, zysopt )                           
+      CALL wrk_dealloc( jpi, jpj, jpk, zmxl_fac, zmxl_chl )
+      CALL wrk_dealloc( jpi, jpj, jpk, zpislopeadn, zpislopeadp, zpislopeadd, zysopt )                           
       CALL wrk_dealloc( jpi, jpj, jpk, zprdia, zprpic, zprbio, zprorcan, zprorcap, zprorcad )
-      CALL wrk_dealloc( jpi, jpj, jpk, zprofed, zprofep, zprofen, zprochln, zprochlp, zprochld ) 
+      CALL wrk_dealloc( jpi, jpj, jpk, zprofed, zprofep, zprofen ) 
       CALL wrk_dealloc( jpi, jpj, jpk, zpronewn, zpronewp, zpronewd, zproregn, zproregp, zproregd )
       CALL wrk_dealloc( jpi, jpj, jpk, zpropo4n, zpropo4p, zpropo4d, zrespn, zrespp, zrespd, zprnut )
@@ -547,5 +549,5 @@
       !!----------------------------------------------------------------------
       !
-      NAMELIST/nampisprod/ pislope, pislopep, pislope2, xadap, bresp, excret, excretp, excret2,  &
+      NAMELIST/nampisprod/ pislopen, pislopep, pisloped, xadap, bresp, excretn, excretp, excretd,  &
          &                 thetannm, thetanpm, thetandm, chlcmin, grosip, zlimmxln,           &
          &                 zlimmxlp, zlimmxld
@@ -568,12 +570,12 @@
          WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
          WRITE(numout,*) '    mean Si/C ratio                           grosip       =', grosip
-         WRITE(numout,*) '    P-I slope                                 pislope      =', pislope
-         WRITE(numout,*) '    Acclimation factor to low light           xadap       =', xadap
-         WRITE(numout,*) '    excretion ratio of nanophytoplankton      excret       =', excret
+         WRITE(numout,*) '    P-I slope                                 pislopen     =', pislopen
+         WRITE(numout,*) '    Acclimation factor to low light           xadap        =', xadap
+         WRITE(numout,*) '    excretion ratio of nanophytoplankton      excretn      =', excretn
          WRITE(numout,*) '    excretion ratio of picophytoplankton      excretp      =', excretp
-         WRITE(numout,*) '    excretion ratio of diatoms                excret2      =', excret2
+         WRITE(numout,*) '    excretion ratio of diatoms                excretd      =', excretd
          WRITE(numout,*) '    basal respiration in phytoplankton        bresp        =', bresp
          WRITE(numout,*) '    Maximum Chl/C in phytoplankton            chlcmin      =', chlcmin
-         WRITE(numout,*) '    P-I slope  for diatoms                    pislope2     =', pislope2
+         WRITE(numout,*) '    P-I slope  for diatoms                    pisloped     =', pisloped
          WRITE(numout,*) '    P-I slope  for picophytoplankton          pislopep     =', pislopep
          WRITE(numout,*) '    Minimum Chl/N in nanophytoplankton        thetannm     =', thetannm
@@ -586,7 +588,7 @@
       !
       r1_rday   = 1._wp / rday 
-      texcret   = 1._wp - excret
+      texcretn  = 1._wp - excretn
       texcretp  = 1._wp - excretp
-      texcret2  = 1._wp - excret2
+      texcretd  = 1._wp - excretd
       tpp       = 0._wp
       !
Index: branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zsms.F90
===================================================================
--- branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zsms.F90	(revision 6841)
+++ branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P5Z/p5zsms.F90	(revision 6966)
@@ -20,4 +20,5 @@
    USE p5zbio          !  Biological model
    USE p4zche          !  Chemical model
+   USE p4zlys          !  Calcite saturation
    USE p4zflx          !  Gas exchange
    USE p4zsbc          !  External source of nutrients
@@ -132,4 +133,5 @@
          !
          CALL p5z_bio (kt, knt)    ! Biology
+         CALL p4z_lys( kt, jnt )   ! Compute CaCO3 saturation
          CALL p4z_flx( kt, knt )   ! Compute surface fluxes
          CALL p5z_sed (kt, knt)    ! Sedimentation
