Index: trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90
===================================================================
--- trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 5836)
+++ trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 7646)
@@ -8,8 +8,4 @@
    !!             3.4  !  2011-06  (O. Aumont, C. Ethe) Quota model for iron
    !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
-   !!----------------------------------------------------------------------
    !!   p4z_micro       :   Compute the sources/sinks for microzooplankton
    !!   p4z_micro_init  :   Initialize and read the appropriate namelist
@@ -19,6 +15,4 @@
    USE sms_pisces      !  PISCES Source Minus Sink variables
    USE p4zlim          !  Co-limitations
-   USE p4zsink         !  vertical flux of particulate matter due to sinking
-   USE p4zint          !  interpolation and computation of various fields
    USE p4zprod         !  production
    USE iom             !  I/O manager
@@ -71,5 +65,5 @@
       REAL(wp) :: zcompadi, zcompaz , zcompaph, zcompapoc
       REAL(wp) :: zgraze  , zdenom, zdenom2
-      REAL(wp) :: zfact   , zstep, zfood, zfoodlim
+      REAL(wp) :: zfact   , zfood, zfoodlim
       REAL(wp) :: zepshert, zepsherv, zgrarsig, zgraztot, zgraztotn, zgraztotf
       REAL(wp) :: zgrarem, zgrafer, zgrapoc, zprcaca, zmortz
@@ -83,5 +77,5 @@
       IF( nn_timing == 1 )  CALL timing_start('p4z_micro')
       !
-      IF( lk_iomput )  CALL wrk_alloc( jpi, jpj, jpk, zgrazing )
+      CALL wrk_alloc( jpi, jpj, jpk, zgrazing )
       !
       DO jk = 1, jpkm1
@@ -89,9 +83,5 @@
             DO ji = 1, jpi
                zcompaz = MAX( ( trb(ji,jj,jk,jpzoo) - 1.e-9 ), 0.e0 )
-               zstep   = xstep
-# if defined key_degrad
-               zstep = zstep * facvol(ji,jj,jk)
-# endif
-               zfact   = zstep * tgfunc2(ji,jj,jk) * zcompaz
+               zfact   = xstep * tgfunc2(ji,jj,jk) * zcompaz
 
                !  Respiration rates of both zooplankton
@@ -115,5 +105,5 @@
                zdenom    = zfoodlim / ( xkgraz + zfoodlim )
                zdenom2   = zdenom / ( zfood + rtrn )
-               zgraze    = grazrat * zstep * tgfunc2(ji,jj,jk) * trb(ji,jj,jk,jpzoo) 
+               zgraze    = grazrat * xstep * tgfunc2(ji,jj,jk) * trb(ji,jj,jk,jpzoo) 
 
                zgrazp    = zgraze  * xpref2p * zcompaph  * zdenom2 
@@ -130,5 +120,5 @@
 
                ! Grazing by microzooplankton
-               IF( ln_diatrc .AND. lk_iomput )  zgrazing(ji,jj,jk) = zgraztot
+               zgrazing(ji,jj,jk) = zgraztot
 
                !    Various remineralization and excretion terms
@@ -148,13 +138,14 @@
                tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + zgrarsig
                tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) + zgrarem - zgrarsig
+               !
+               IF( ln_ligand ) tra(ji,jj,jk,jplgw) = tra(ji,jj,jk,jplgw) + (zgrarem - zgrarsig) * ldocz
+               !
                tra(ji,jj,jk,jpoxy) = tra(ji,jj,jk,jpoxy) - o2ut * zgrarsig
                tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + zgrafer
                tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + zgrapoc
+               prodpoc(ji,jj,jk) = prodpoc(ji,jj,jk) + zgrapoc
                tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + zgraztotf * unass
                tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + zgrarsig
                tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + rno3 * zgrarsig
-#if defined key_kriest
-               tra(ji,jj,jk,jpnum) = tra(ji,jj,jk,jpnum) + zgrapoc * xkr_dmicro
-#endif
                !   Update the arrays TRA which contain the biological sources and sinks
                !   --------------------------------------------------------------------
@@ -170,4 +161,6 @@
                tra(ji,jj,jk,jpdfe) = tra(ji,jj,jk,jpdfe) - zgrazsf
                tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + zmortz - zgrazm
+               prodpoc(ji,jj,jk) = prodpoc(ji,jj,jk) + zmortz
+               conspoc(ji,jj,jk) = conspoc(ji,jj,jk) - zgrazm
                tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + ferat3 * zmortz - zgrazmf
                !
@@ -180,19 +173,17 @@
                tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) - 2. * zprcaca
                tra(ji,jj,jk,jpcal) = tra(ji,jj,jk,jpcal) + zprcaca
-#if defined key_kriest
-               tra(ji,jj,jk,jpnum) = tra(ji,jj,jk,jpnum) + zmortz * xkr_dmicro &
-                                                         - zgrazm * trb(ji,jj,jk,jpnum) / ( trb(ji,jj,jk,jppoc) + rtrn )
-#endif
             END DO
          END DO
       END DO
       !
-      IF( lk_iomput .AND. knt == nrdttrc ) THEN
-         CALL wrk_alloc( jpi, jpj, jpk, zw3d )
-         IF( iom_use( "GRAZ1" ) ) THEN
-            zw3d(:,:,:) = zgrazing(:,:,:) * 1.e+3 * rfact2r * tmask(:,:,:)  !  Total grazing of phyto by zooplankton
-            CALL iom_put( "GRAZ1", zw3d )
+      IF( lk_iomput ) THEN
+         IF( knt == nrdttrc ) THEN
+           CALL wrk_alloc( jpi, jpj, jpk, zw3d )
+           IF( iom_use( "GRAZ1" ) ) THEN
+              zw3d(:,:,:) = zgrazing(:,:,:) * 1.e+3 * rfact2r * tmask(:,:,:)  !  Total grazing of phyto by zooplankton
+              CALL iom_put( "GRAZ1", zw3d )
+           ENDIF
+           CALL wrk_dealloc( jpi, jpj, jpk, zw3d )
          ENDIF
-         CALL wrk_dealloc( jpi, jpj, jpk, zw3d )
       ENDIF
       !
@@ -203,5 +194,5 @@
       ENDIF
       !
-      IF( lk_iomput )  CALL wrk_dealloc( jpi, jpj, jpk, zgrazing )
+      CALL wrk_dealloc( jpi, jpj, jpk, zgrazing )
       !
       IF( nn_timing == 1 )  CALL timing_stop('p4z_micro')
@@ -224,5 +215,5 @@
       !!----------------------------------------------------------------------
 
-      NAMELIST/nampiszoo/ part, grazrat, resrat, mzrat, xpref2c, xpref2p, &
+      NAMELIST/namp4zzoo/ part, grazrat, resrat, mzrat, xpref2c, xpref2p, &
          &                xpref2d,  xthreshdia,  xthreshphy,  xthreshpoc, &
          &                xthresh, xkgraz, epsher, sigma1, unass
@@ -230,15 +221,15 @@
 
       REWIND( numnatp_ref )              ! Namelist nampiszoo in reference namelist : Pisces microzooplankton
-      READ  ( numnatp_ref, nampiszoo, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiszoo in reference namelist', lwp )
+      READ  ( numnatp_ref, namp4zzoo, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zzoo in reference namelist', lwp )
 
       REWIND( numnatp_cfg )              ! Namelist nampiszoo in configuration namelist : Pisces microzooplankton
-      READ  ( numnatp_cfg, nampiszoo, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiszoo in configuration namelist', lwp )
-      IF(lwm) WRITE ( numonp, nampiszoo )
+      READ  ( numnatp_cfg, namp4zzoo, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zzoo in configuration namelist', lwp )
+      IF(lwm) WRITE ( numonp, namp4zzoo )
 
       IF(lwp) THEN                         ! control print
          WRITE(numout,*) ' '
-         WRITE(numout,*) ' Namelist parameters for microzooplankton, nampiszoo'
+         WRITE(numout,*) ' Namelist parameters for microzooplankton, namp4zzoo'
          WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
          WRITE(numout,*) '    part of calcite not dissolved in microzoo guts  part        =', part
@@ -261,13 +252,4 @@
    END SUBROUTINE p4z_micro_init
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_micro                    ! Empty routine
-   END SUBROUTINE p4z_micro
-#endif 
-
    !!======================================================================
 END MODULE p4zmicro
