Index: branches/CNRS/dev_r4826_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmicro.F90
===================================================================
--- branches/CNRS/dev_r4826_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmicro.F90	(revision 5266)
+++ branches/CNRS/dev_r4826_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmicro.F90	(revision 5288)
@@ -7,4 +7,5 @@
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
    !!             3.4  !  2011-06  (O. Aumont, C. Ethe) Quota model for iron
+   !!             3.6  !  2015-05  (O. Aumont) PISCES quota
    !!----------------------------------------------------------------------
 #if defined key_pisces_quota
@@ -47,9 +48,11 @@
    REAL(wp), PUBLIC ::  mzrat       !: microzooplankton mortality rate 
    REAL(wp), PUBLIC ::  grazrat     !: maximal microzoo grazing rate
-   REAL(wp), PUBLIC ::  xkgraz      !: non assimilated fraction of P by microzoo 
+   REAL(wp), PUBLIC ::  xkgraz      !: non assimilated fraction of P by microzoo
    REAL(wp), PUBLIC ::  unassc      !: Efficicency of microzoo growth 
    REAL(wp), PUBLIC ::  unassn      !: Efficicency of microzoo growth 
    REAL(wp), PUBLIC ::  unassp      !: Efficicency of microzoo growth 
    REAL(wp), PUBLIC ::  epsher      !: half sturation constant for grazing 1 
+   REAL(wp), PUBLIC ::  srespir     !: half sturation constant for grazing 1 
+   REAL(wp), PUBLIC ::  ssigma      !: Fraction excreted as semi-labile DOM
 
 
@@ -81,5 +84,6 @@
       REAL(wp) :: zepsherf, zepshert, zepsherv, zrespirc, zrespirn, zrespirp, zbasresb, zbasresi
       REAL(wp) :: zgraztotc, zgraztotn, zgraztotp, zgraztotf
-      REAL(wp) :: zexcess, zgradoc, zgradon, zgradop, zgrafer
+      REAL(wp) :: zgradoc, zgradon, zgradop, zgrafer, zgradoct, zgradont, zgradopt, zgrafert
+      REAL(wp) :: zexcess, zgraren, zgrarep, zgrarem
       REAL(wp) :: zgrapoc, zgrapon, zgrapop, zgrapof, zprcaca, zmortz
       REAL(wp) :: zrespz, ztortz, zgrasratf, zgrasratn, zgrasratp
@@ -200,12 +204,19 @@
                zbasresb = MAX(0., zrespz - zexcess)
                zbasresi = zexcess + MIN(0., zrespz - zexcess)  
-               zrespirc = 0.2 * zepsherv * zgraztotc + zbasresb
+               zrespirc = srespir * zepsherv * zgraztotc + zbasresb
 
                !   Voiding of the excessive elements as DOM
                !   ----------------------------------------
-               zgradoc   = (1. - unassc - zepsherv) * zgraztotc - zbasresi  
-               zgradon   = (1. - unassn) * zgraztotn - zepsherv * no3rat3 * zgraztotc
-               zgradop   = (1. - unassp) * zgraztotp - zepsherv * po4rat3 * zgraztotc
-               zgrafer   = (1. - unassc) * zgraztotf - zepsherv * ferat3 * zgraztotc
+               zgradoct   = (1. - unassc - zepsherv) * zgraztotc - zbasresi  
+               zgradont   = (1. - unassn) * zgraztotn - zepsherv * no3rat3 * zgraztotc
+               zgradopt   = (1. - unassp) * zgraztotp - zepsherv * po4rat3 * zgraztotc
+               zgrafert   = (1. - unassc) * zgraztotf - zepsherv * ferat3 * zgraztotc
+               zgradoc =  zgradoct * ssigma
+               zgradon =  zgradont * ssigma
+               zgradop =  zgradopt * ssigma
+               zgrarem = (1.0 - ssigma) * zgradoct
+               zgraren = (1.0 - ssigma) * zgradont
+               zgrarep = (1.0 - ssigma) * zgradopt
+               zgrafer = zgrafert
 
                !   Defecation as a result of non assimilated products
@@ -218,14 +229,14 @@
                !   Update of the TRA arrays
                !   ------------------------
-               zrespirn  = zrespirc * no3rat3
+               zrespirn  = zrespirc * no3rat3 
                zrespirp  = zrespirc * po4rat3
                zgrafer   = zgrafer + zrespirc * ferat3
 
-               tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + zrespirp
-               tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + zrespirn
+               tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + zrespirp + zgrarep
+               tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + zrespirn + zgraren
                tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) + zgradoc
                tra(ji,jj,jk,jpdon) = tra(ji,jj,jk,jpdon) + zgradon
                tra(ji,jj,jk,jpdop) = tra(ji,jj,jk,jpdop) + zgradop
-               tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) - o2ut * zrespirc
+               tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) - o2ut * ( zrespirc + zgrarem )
                tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + zgrafer
                tra(ji,jj,jk,jpzoo) = tra(ji,jj,jk,jpzoo) + zepsherv * zgraztotc - zrespirc   &
@@ -261,7 +272,7 @@
                !
                zprcaca = part * zprcaca
-               tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + zrespirc - zprcaca
+               tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + zrespirc + zgrarem - zprcaca
                tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) - 2. * zprcaca
-               tra(ji,jj,jk,jpcal) = tra(ji,jj,jk,jpcal) + rno3 * zrespirn + zprcaca
+               tra(ji,jj,jk,jpcal) = tra(ji,jj,jk,jpcal) + rno3 * ( zrespirn + zgraren ) + zprcaca
 #if defined key_kriest
                tra(ji,jj,jk,jpnum) = tra(ji,jj,jk,jpnum) + ztortz * xkr_dmicro &
@@ -307,5 +318,5 @@
          &                xprefp, xprefd, xprefz, xthreshdia, xthreshphy, &
          &                xthreshpic, xthreshpoc, xthreshzoo, xthresh, xkgraz, &
-         &                epsher, unassc, unassn, unassp
+         &                epsher, ssigma, srespir, unassc, unassn, unassp
 
       INTEGER :: ios                 ! Local integer output status for namelist read
@@ -343,4 +354,6 @@
          WRITE(numout,*) '    P egested fraction of fodd by microzoo          unassp      =', unassp
          WRITE(numout,*) '    Efficicency of microzoo growth                  epsher      =', epsher
+         WRITE(numout,*) '    Fraction excreted as semi-labile DOM            ssigma      =', ssigma
+         WRITE(numout,*) '    Active respiration                              srespir     =', srespir
          WRITE(numout,*) '    half sturation constant for grazing 1           xkgraz      =', xkgraz
       ENDIF
