Index: trunk/NEMO/TOP_SRC/PISCES/p4zbio.F90
===================================================================
--- trunk/NEMO/TOP_SRC/PISCES/p4zbio.F90	(revision 1672)
+++ trunk/NEMO/TOP_SRC/PISCES/p4zbio.F90	(revision 1678)
@@ -64,7 +64,4 @@
       REAL(wp) ::  zcoef1, zcoef2
 #endif
-#if defined key_trc_dia3d && defined key_kriest && defined key_iomput
-      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zw3d
-#endif
       CHARACTER (len=25) :: charout
 
@@ -130,13 +127,4 @@
 #endif
 
-
-# if defined key_trc_dia3d && defined key_kriest
-#if ! defined key_iomput
-      trc3d(:,:,:,jp_pcs0_3d + 10) = tra(:,:,:,jpcal) * xnegtr(:,:,:) * 1.e3 * rfact2r  * tmask(:,:,:)
-#else
-      zw3d(:,:,:) = tra(:,:,:,jpcal) * xnegtr(:,:,:) * 1.e3 * rfact2r  * tmask(:,:,:)
-      IF( jnt == nrdttrc ) CALL iom_put( "PBSi", zw3d )
-# endif
-#endif
       !
       IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
Index: trunk/NEMO/TOP_SRC/PISCES/p4zflx.F90
===================================================================
--- trunk/NEMO/TOP_SRC/PISCES/p4zflx.F90	(revision 1672)
+++ trunk/NEMO/TOP_SRC/PISCES/p4zflx.F90	(revision 1678)
@@ -74,5 +74,5 @@
       REAL(wp), DIMENSION(jpi,jpj) ::   zkgco2, zkgo2, zh2co3
 #if defined key_trc_diaadd && defined key_iomput
-      REAL(wp), DIMENSION(jpi,jpj) ::  zcflx, zoflx, zkg, zdelc
+      REAL(wp), DIMENSION(jpi,jpj) ::  zcflx, zoflx, zkg, zdpco2, zdpo2
 #endif
       CHARACTER (len=25) :: charout
@@ -171,5 +171,5 @@
 
             ! Compute O2 flux 
-            zfld16 = atcox * chemc(ji,jj,2) *tmask(ji,jj,1) * zkgo2(ji,jj)
+            zfld16 = atcox * chemc(ji,jj,2) * tmask(ji,jj,1) * zkgo2(ji,jj)
             zflu16 = trn(ji,jj,1,jpoxy) * tmask(ji,jj,1) * zkgo2(ji,jj)
             tra(ji,jj,1,jpoxy) = tra(ji,jj,1,jpoxy) + ( zfld16 - zflu16 ) / fse3t(ji,jj,1)
@@ -181,10 +181,14 @@
             trc2d(ji,jj,jp_pcs0_2d + 1) = ( zfld16 - zflu16 ) * 1000. * tmask(ji,jj,1)
             trc2d(ji,jj,jp_pcs0_2d + 2) = zkgco2(ji,jj) * tmask(ji,jj,1)
-            trc2d(ji,jj,jp_pcs0_2d + 3) = atcco2 - zh2co3(ji,jj) / ( chemc(ji,jj,1) + rtrn ) * tmask(ji,jj,1)
+            trc2d(ji,jj,jp_pcs0_2d + 3) = ( atcco2 - zh2co3(ji,jj) / ( chemc(ji,jj,1) + rtrn ) ) &
+               &                            * tmask(ji,jj,1)
 #  else
             zcflx(ji,jj) = ( zfld - zflu ) * 1000.  * tmask(ji,jj,1)
             zoflx(ji,jj) = ( zfld16 - zflu16 ) * 1000. * tmask(ji,jj,1)
             zkg  (ji,jj) = zkgco2(ji,jj) * tmask(ji,jj,1)
-            zdelc(ji,jj) = atcco2 - zh2co3(ji,jj) / ( chemc(ji,jj,1) + rtrn ) * tmask(ji,jj,1)
+            zdpco2(ji,jj) = ( atcco2 - zh2co3(ji,jj)      / ( chemc(ji,jj,1) + rtrn ) ) &
+              &             * tmask(ji,jj,1)
+            zdpo2 (ji,jj) = ( atcox  - trn(ji,jj,1,jpoxy) / ( chemc(ji,jj,2) + rtrn ) ) &
+              &             * tmask(ji,jj,1)
 #  endif
 #endif
@@ -224,8 +228,9 @@
 
 # if defined key_trc_diaadd && defined key_iomput
-      CALL iom_put( "Cflx", zcflx )
-      CALL iom_put( "Oflx", zoflx )
-      CALL iom_put( "Kg"  , zkg   )
-      CALL iom_put( "DelC", zdelc )
+      CALL iom_put( "Cflx" , zcflx  )
+      CALL iom_put( "Oflx" , zoflx  )
+      CALL iom_put( "Kg"   , zkg    )
+      CALL iom_put( "Dpco2", zdpco2 )
+      CALL iom_put( "Dpo2" , zdpo2  )
 #endif
 
Index: trunk/NEMO/TOP_SRC/PISCES/p4zlys.F90
===================================================================
--- trunk/NEMO/TOP_SRC/PISCES/p4zlys.F90	(revision 1672)
+++ trunk/NEMO/TOP_SRC/PISCES/p4zlys.F90	(revision 1678)
@@ -63,5 +63,6 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zco3
 #if defined key_trc_dia3d && defined key_iomput
-      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zw3d
+      REAL(wp) ::   zrfact2
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zcaldiss, zw3d
 #endif
       CHARACTER (len=25) :: charout
@@ -72,4 +73,7 @@
       zco3(:,:,:) = 0.
 
+# if defined key_trc_dia3d && defined key_iomput
+      zcaldiss(:,:,:) = 0.
+# endif
       !     -------------------------------------------
       !     COMPUTE [CO3--] and [H+] CONCENTRATIONS
@@ -146,8 +150,11 @@
               zremco3 = zdispot / rmoss
               zco3(ji,jj,jk) = zco3(ji,jj,jk) + zremco3 * rfact
-              tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + 2.*zremco3
-              tra(ji,jj,jk,jpcal) = tra(ji,jj,jk,jpcal) -    zremco3
-              tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) +    zremco3
-
+              tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + 2. * zremco3
+              tra(ji,jj,jk,jpcal) = tra(ji,jj,jk,jpcal) -      zremco3
+              tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) +      zremco3
+
+# if defined key_trc_dia3d && defined key_iomput
+              zcaldiss(ji,jj,jk) = zremco3  ! calcite dissolution
+# endif
             END DO
          END DO
@@ -160,10 +167,13 @@
       trc3d(:,:,:,jp_pcs0_3d + 2) = aksp(:,:,:) / calcon * tmask(:,:,:)
 #  else
-      zw3d(:,:,:) = hi  (:,:,:)          * tmask(:,:,:)
+      zrfact2 = 1.e3 * rfact2r
+      zw3d(:,:,:) = hi  (:,:,:)                    * tmask(:,:,:)
       CALL iom_put( "PH", zw3d )
-      zw3d(:,:,:) = zco3(:,:,:)          * tmask(:,:,:)
+      zw3d(:,:,:) = zco3(:,:,:)                    * tmask(:,:,:)
       CALL iom_put( "CO3", zw3d )
-      zw3d(:,:,:) = aksp(:,:,:) / calcon * tmask(:,:,:)
+      zw3d(:,:,:) = aksp(:,:,:) / calcon           * tmask(:,:,:)
       CALL iom_put( "CO3sat", zw3d )
+      zw3d(:,:,:) = zcaldiss(:,:,:) * zrfact2 * tmask(:,:,:)
+      CALL iom_put( "Dcal", zw3d )
 #  endif
 # endif
Index: trunk/NEMO/TOP_SRC/PISCES/p4zmeso.F90
===================================================================
--- trunk/NEMO/TOP_SRC/PISCES/p4zmeso.F90	(revision 1672)
+++ trunk/NEMO/TOP_SRC/PISCES/p4zmeso.F90	(revision 1678)
@@ -21,4 +21,5 @@
    USE p4zint
    USE p4zsink
+   USE iom
 
    IMPLICIT NONE
@@ -73,8 +74,25 @@
       REAL(wp),DIMENSION(jpi,jpj,jpk) :: zgrazfff,zgrazffe
       CHARACTER (len=25) :: charout
+#if defined key_trc_diaadd && defined key_trc_dia3d && defined key_iomput
+      REAL(wp) :: zrfact2
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zw3d
+#endif
+
       !!---------------------------------------------------------------------
 
 
       IF( ( kt * jnt ) == nittrc000  )   CALL p4z_meso_init      ! Initialization (first time-step only)
+
+      zrespz2 (:,:,:) = 0.
+      ztortz2 (:,:,:) = 0.
+      zgrazd  (:,:,:) = 0.
+      zgrazz  (:,:,:) = 0.
+      zgrazpof(:,:,:) = 0.
+      zgrazn  (:,:,:) = 0.
+      zgrazpoc(:,:,:) = 0.
+      zgraznf (:,:,:) = 0.
+      zgrazf  (:,:,:) = 0.
+      zgrazfff(:,:,:) = 0.
+      zgrazffe(:,:,:) = 0.
 
       zstep = rfact2 / rjjss      ! Time step duration for biology
@@ -151,14 +169,15 @@
 !    ----------------------------------
 # if ! defined key_kriest
+#   if ! defined key_off_degrad
                zgrazffe(ji,jj,jk) = grazflux * zstep * wsbio4(ji,jj,jk)          &
-#  if defined key_off_degrad
-                  &     * facvol(ji,jj,jk)          &
+                  &                 * tgfunc2(ji,jj,jk) * trn(ji,jj,jk,jpgoc) * trn(ji,jj,jk,jpmes)
+#   else
+               zgrazffe(ji,jj,jk) = grazflux * zstep * wsbio4(ji,jj,jk) * facvol(ji,jj,jk)         &
+                  &                 * tgfunc2(ji,jj,jk) * trn(ji,jj,jk,jpgoc) * trn(ji,jj,jk,jpmes)
 #  endif
-                  &     * tgfunc2(ji,jj,jk) * trn(ji,jj,jk,jpgoc) * trn(ji,jj,jk,jpmes)
-
                zgrazfff(ji,jj,jk) = zgrazffe(ji,jj,jk)       &
-                  &     * trn(ji,jj,jk,jpbfe) / (trn(ji,jj,jk,jpgoc) + rtrn)
+                  &                 * trn(ji,jj,jk,jpbfe) / (trn(ji,jj,jk,jpgoc) + rtrn)
 # else
-! KRIEST3
+!!--------------------------- KRIEST3 -------------------------------------------
 !!               zgrazffe(ji,jj,jk) = 0.5 * 1.3e-2 / 5.5e-7 * 0.3 * zstep * wsbio3(ji,jj,jk)     &
 !!                  &     * tgfunc(ji,jj,jk) * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jpmes)    &
@@ -167,13 +186,16 @@
 #  endif
 !!                  &     /  (trn(ji,jj,jk,jppoc) * 1.e7 + 0.1)
-
+!!--------------------------- KRIEST3 -------------------------------------------
+
+#  if ! defined key_off_degrad
               zgrazffe(ji,jj,jk) = grazflux * zstep * wsbio3(ji,jj,jk)     &
-#  if defined key_off_degrad
-                  &     * facvol(ji,jj,jk)          &
+                  &                * tgfunc2(ji,jj,jk) * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jpmes)
+#  else
+              zgrazffe(ji,jj,jk) = grazflux * zstep * wsbio3(ji,jj,jk) * facvol(ji,jj,jk)    &
+                  &               * tgfunc2(ji,jj,jk) * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jpmes)
 #  endif
-                  &     * tgfunc2(ji,jj,jk) * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jpmes)
 
                zgrazfff(ji,jj,jk) = zgrazffe(ji,jj,jk)      &
-                  &     * trn(ji,jj,jk,jpsfe) / (trn(ji,jj,jk,jppoc) + rtrn)
+                  &                * trn(ji,jj,jk,jpsfe) / (trn(ji,jj,jk,jppoc) + rtrn)
 # endif
             END DO
@@ -253,6 +275,9 @@
                tra(ji,jj,jk,jpdfe) = tra(ji,jj,jk,jpdfe) -  zgrazf(ji,jj,jk)
 
-               zprcaca = xfracal(ji,jj,jk) * part * unass2 * zgrazn(ji,jj,jk)
-
+               zprcaca = xfracal(ji,jj,jk) * unass2 * zgrazn(ji,jj,jk)
+#if defined key_trc_dia3d
+               prodcal(ji,jj,jk) = prodcal(ji,jj,jk) + zprcaca  ! prodcal=prodcal(nanophy)+prodcal(microzoo)+prodcal(mesozoo)
+#endif
+               zprcaca = part * zprcaca
                tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) - zprcaca
                tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) - 2. * zprcaca
@@ -284,4 +309,14 @@
       END DO
       !
+#if defined key_trc_diaadd && defined key_trc_dia3d && defined key_iomput
+      zrfact2 = 1.e3 * rfact2r
+      zw3d(:,:,:) = (     zgrazd(:,:,:) +   zgrazz(:,:,:) + zgrazn(:,:,:) &
+                    & + zgrazpoc(:,:,:) + zgrazffe(:,:,:)                 ) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "Graz2" , zw3d )
+
+      zw3d(:,:,:) = prodcal(:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "Pcal"  , zw3d )
+#endif
+
        IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
          WRITE(charout, FMT="('meso')")
Index: trunk/NEMO/TOP_SRC/PISCES/p4zmicro.F90
===================================================================
--- trunk/NEMO/TOP_SRC/PISCES/p4zmicro.F90	(revision 1672)
+++ trunk/NEMO/TOP_SRC/PISCES/p4zmicro.F90	(revision 1678)
@@ -21,4 +21,5 @@
    USE p4zint
    USE p4zsink
+   USE iom
 
    IMPLICIT NONE
@@ -69,4 +70,8 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk) :: zgrazmf, zgrazsf, zgrazpf
       CHARACTER (len=25) :: charout
+#if defined key_trc_diaadd && defined key_trc_dia3d && defined key_iomput
+      REAL(wp) :: zrfact2
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zw3d
+#endif
 
       !!---------------------------------------------------------------------
@@ -74,6 +79,15 @@
       IF( ( kt * jnt ) == nittrc000  )   CALL p4z_micro_init      ! Initialization (first time-step only)
 
-
-        zstep = rfact2 / rjjss      ! Time step duration for biology
+      zrespz (:,:,:) = 0.
+      ztortz (:,:,:) = 0.
+      zgrazp (:,:,:) = 0.
+      zgrazm (:,:,:) = 0.
+      zgrazsd(:,:,:) = 0.
+      zgrazmf(:,:,:) = 0.
+      zgrazsf(:,:,:) = 0.
+      zgrazpf(:,:,:) = 0.
+
+
+      zstep = rfact2 / rjjss      ! Time step duration for biology
 
       DO jk = 1, jpkm1
@@ -202,7 +216,11 @@
                  &     + unass * ( zgrazpf(ji,jj,jk) + zgrazsf (ji,jj,jk)) &
                  &     - (1.-unass) * zgrazmf(ji,jj,jk)
-               zprcaca = xfracal(ji,jj,jk) * part * unass * zgrazp(ji,jj,jk)
+               zprcaca = xfracal(ji,jj,jk) * unass * zgrazp(ji,jj,jk)
+#if defined key_trc_dia3d
+               prodcal(ji,jj,jk) = prodcal(ji,jj,jk) + zprcaca  ! prodcal=prodcal(nanophy)+prodcal(microzoo)+prodcal(mesozoo)
+#endif
+               zprcaca = part * zprcaca
                tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) - zprcaca
-               tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal)- 2. * zprcaca
+               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
@@ -213,4 +231,10 @@
       END DO
       !
+#if defined key_trc_diaadd && defined key_trc_dia3d && defined key_iomput
+      zrfact2 = 1.e3 * rfact2r
+      zw3d(:,:,:) = ( zgrazp(:,:,:) + zgrazm(:,:,:) + zgrazsd(:,:,:) ) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "Graz" , zw3d )
+#endif
+
        IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
          WRITE(charout, FMT="('micro')")
Index: trunk/NEMO/TOP_SRC/PISCES/p4zmort.F90
===================================================================
--- trunk/NEMO/TOP_SRC/PISCES/p4zmort.F90	(revision 1672)
+++ trunk/NEMO/TOP_SRC/PISCES/p4zmort.F90	(revision 1678)
@@ -89,4 +89,8 @@
 
 
+#if defined key_trc_dia3d
+     prodcal(:,:,:) = 0.  !: Initialisation of calcite production variable
+#endif
+
       DO jk = 1, jpkm1
          DO jj = 1, jpj
@@ -126,4 +130,7 @@
                tra(ji,jj,jk,jpnfe) = tra(ji,jj,jk,jpnfe) - zmortp * zfactfe
                zprcaca = xfracal(ji,jj,jk) * zmortp
+#if defined key_trc_dia3d
+               prodcal(ji,jj,jk) = prodcal(ji,jj,jk) + zprcaca  ! prodcal=prodcal(nanophy)+prodcal(microzoo)+prodcal(mesozoo)
+#endif
                zfracal = 0.5 * xfracal(ji,jj,jk)
                tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) - zprcaca
Index: trunk/NEMO/TOP_SRC/PISCES/p4zopt.F90
===================================================================
--- trunk/NEMO/TOP_SRC/PISCES/p4zopt.F90	(revision 1672)
+++ trunk/NEMO/TOP_SRC/PISCES/p4zopt.F90	(revision 1678)
@@ -240,5 +240,5 @@
       zw2d(:,:  ) =  heup(:,:  ) * tmask(:,:,1)
       zw3d(:,:,:) =  etot(:,:,:) * tmask(:,:,:)
-      IF( jnt == nrdttrc ) CALL iom_put( "heup", zw2d )               
+      IF( jnt == nrdttrc ) CALL iom_put( "Heup", zw2d )               
       IF( jnt == nrdttrc ) CALL iom_put( "PAR" , zw3d )
 # endif
Index: trunk/NEMO/TOP_SRC/PISCES/p4zsed.F90
===================================================================
--- trunk/NEMO/TOP_SRC/PISCES/p4zsed.F90	(revision 1672)
+++ trunk/NEMO/TOP_SRC/PISCES/p4zsed.F90	(revision 1678)
@@ -89,6 +89,10 @@
       REAL(wp), DIMENSION(jpi,jpj)     ::   zsidep
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   znitrpot, zirondep
-#if defined key_trc_diaadd && defined key_iomput
-     REAL(wp), DIMENSION(jpi,jpj)     ::   zw2d
+#if defined key_diaadd || defined key_trc_dia3d 
+      REAL(wp) :: zrfact2
+# if defined key_iomput
+     REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zw3d 
+     REAL(wp), DIMENSION(jpi,jpj)    ::    zw2d 
+# endif
 #endif
       CHARACTER (len=25) :: charout
@@ -267,5 +271,5 @@
       IF( lk_mpp )   CALL mpp_sum( zdenitot )      ! sum over the global domain
 
-      ! Potential nitrogen fication dependant on temperature and iron
+      ! Potential nitrogen fixation dependant on temperature and iron
       ! -------------------------------------------------------------
 
@@ -318,14 +322,16 @@
       END DO
 
-#if defined key_trc_diaadd
+#if defined key_trc_diaadd || defined key_trc_dia3d
+      zrfact2 = 1.e+3 * rfact2r
 #  if  ! defined key_iomput
-      trc2d(:,:,jp_pcs0_2d + 11) = zirondep(:,:,1)         * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1)
-      trc2d(:,:,jp_pcs0_2d + 12) = znitrpot(:,:,1) * 1.e-7 * 1.e+3 / rfact2  * fse3t(:,:,1) * tmask(:,:,1)
+      trc2d(:,:,jp_pcs0_2d + 11) = zirondep(:,:,1)         * zrfact2 * fse3t(:,:,1) * tmask(:,:,1)
+      trc2d(:,:,jp_pcs0_2d + 12) = znitrpot(:,:,1) * 1.e-7 * zrfact2 * fse3t(:,:,1) * tmask(:,:,1)
 # else
       ! write diagnostics
-      zw2d(:,:) = zirondep(:,:,1)         * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "Fedep", zw2d )
-      zw2d(:,:) = znitrpot(:,:,1) * 1.e-7 * 1.e+3 / rfact2  * fse3t(:,:,1) * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "Nfix", zw2d  ) 
+      zw2d(:,:)   =  ( zirondep(:,:,1) + ironsed(:,:,1) * rfact2 ) &
+      &            * zrfact2 * fse3t(:,:,1) * tmask(:,:,1)     
+      IF( jnt == nrdttrc ) CALL iom_put( "Irondep", zw2d )
+      zw3d(:,:,:) = znitrpot(:,:,:) * 1.e-7 * zrfact2  * fse3t(:,:,:) * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "Nfix", zw3d  ) 
 # endif
 
Index: trunk/NEMO/TOP_SRC/PISCES/p4zsink.F90
===================================================================
--- trunk/NEMO/TOP_SRC/PISCES/p4zsink.F90	(revision 1672)
+++ trunk/NEMO/TOP_SRC/PISCES/p4zsink.F90	(revision 1678)
@@ -101,5 +101,4 @@
       INTEGER  :: iksed1
 #if defined key_iomput
-      REAL(wp), DIMENSION(jpi,jpj)     ::   zw2d
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zw3d
 #endif
@@ -302,27 +301,27 @@
       trc3d(:,:,:,jp_pcs0_3d + 17) = wsbio4  (:,:,:)                * tmask(:,:,:)
 #else
-      zw2d(:,:  )  = sinking (:,:,iksed1) * zrfact2 * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "PMO", zw2d )
-      zw2d(:,:  )  = sinking2(:,:,iksed1) * zrfact2 * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "PMO2", zw2d )
-      zw2d(:,:  )  = sinkfer (:,:,iksed1) * zrfact2 * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "ExpFe1", zw2d )
-      zw2d(:,:  )  = sinksil (:,:,iksed1) * zrfact2 * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "ExpSi", zw2d )
-      zw2d(:,:  )  = sinkcal (:,:,iksed1) * zrfact2 * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "ExpCaCO3", zw2d )
-      zw3d(:,:,:)  = sinking (:,:,:)      * zrfact2 * tmask(:,:,:)
+      zw3d(:,:,:)  = sinking (:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "PMO" , zw3d )
+      zw3d(:,:,:)  = sinking2(:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "PMO2", zw3d )
+      zw3d(:,:,:)  = sinkfer (:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "ExpFe1", zw3d )
+      zw3d(:,:,:)  = sinksil (:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "ExpSi", zw3d )
+      zw3d(:,:,:)  = sinkcal (:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "ExpCaCO3", zw3d )
+      zw3d(:,:,:)  = sinking (:,:,:) * zrfact2 * tmask(:,:,:)
       IF( jnt == nrdttrc ) CALL iom_put( "POCFlx", zw3d )
-      zw3d(:,:,:)  = sinking2(:,:,:)      * zrfact2 * tmask(:,:,:)
+      zw3d(:,:,:)  = sinking2(:,:,:) * zrfact2 * tmask(:,:,:)
       IF( jnt == nrdttrc ) CALL iom_put( "GOCFlx", zw3d )
-      zw3d(:,:,:)  = sinksil (:,:,:)      * zrfact2 * tmask(:,:,:)
+      zw3d(:,:,:)  = sinksil (:,:,:) * zrfact2 * tmask(:,:,:)
       IF( jnt == nrdttrc ) CALL iom_put( "SiFlx", zw3d )
-      zw3d(:,:,:)  = sinkcal (:,:,:)      * zrfact2 * tmask(:,:,:)
+      zw3d(:,:,:)  = sinkcal (:,:,:) * zrfact2 * tmask(:,:,:)
       IF( jnt == nrdttrc ) CALL iom_put( "CaCO3Flx", zw3d )
-      zw3d(:,:,:)  = znum3d  (:,:,:)                * tmask(:,:,:)
+      zw3d(:,:,:)  = znum3d  (:,:,:)           * tmask(:,:,:)
       IF( jnt == nrdttrc ) CALL iom_put( "xnum", zw3d )
-      zw3d(:,:,:)  = wsbio3  (:,:,:)                * tmask(:,:,:)
+      zw3d(:,:,:)  = wsbio3  (:,:,:)           * tmask(:,:,:)
       IF( jnt == nrdttrc ) CALL iom_put( "W1", zw3d )
-      zw3d(:,:,:)  = wsbio4  (:,:,:)                * tmask(:,:,:)
+      zw3d(:,:,:)  = wsbio4  (:,:,:)           * tmask(:,:,:)
       IF( jnt == nrdttrc ) CALL iom_put( "W2", zw3d )
 #  endif
@@ -493,5 +492,5 @@
 #endif
 #if defined key_iomput
-      REAL(wp), DIMENSION(jpi,jpj) ::   zw2d
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zw3d
 #endif
       CHARACTER (len=25) :: charout
@@ -623,17 +622,16 @@
       trc2d(:,:,jp_pcs0_2d + 9) = sinkcal (:,:,iksed1) * zrfact2 * tmask(:,:,1)
 #  else
-      ! write diagnostics 
-      zw2d(:,:) = sinking (:,:,iksed1) * zrfact2 * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "PMO", zw2d )
-      zw2d(:,:) = sinking2(:,:,iksed1) * zrfact2 * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "PMO2", zw2d )
-      zw2d(:,:) = sinkfer (:,:,iksed1) * zrfact2 * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "ExpFe1", zw2d )
-      zw2d(:,:) = sinkfer2(:,:,iksed1) * zrfact2 * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "ExpFe2", zw2d )
-      zw2d(:,:) = sinksil (:,:,iksed1) * zrfact2 * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "ExpSi", zw2d )
-      zw2d(:,:) = sinkcal (:,:,iksed1) * zrfact2 * tmask(:,:,1)
-      IF( jnt == nrdttrc ) CALL iom_put( "ExpCaCO3", zw2d )
+      zw3d(:,:,:)  = sinking (:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "ExpPOC" , zw3d )
+      zw3d(:,:,:)  = sinking2(:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "ExpGOC", zw3d )
+      zw3d(:,:,:)  = sinkfer (:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "ExpFe1", zw3d )
+      zw3d(:,:,:)  = sinkfer2(:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "ExpFe2", zw3d )
+      zw3d(:,:,:)  = sinksil (:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "ExpSi", zw3d )
+      zw3d(:,:,:)  = sinkcal (:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "Expcal", zw3d )
 #  endif
 #endif
Index: trunk/NEMO/TOP_SRC/PISCES/sms_pisces.F90
===================================================================
--- trunk/NEMO/TOP_SRC/PISCES/sms_pisces.F90	(revision 1672)
+++ trunk/NEMO/TOP_SRC/PISCES/sms_pisces.F90	(revision 1678)
@@ -60,4 +60,7 @@
    REAL(wp), DIMENSION(jpi,jpj,jpk) ::   xlimbac    !: ??
    REAL(wp), DIMENSION(jpi,jpj,jpk) ::   xdiss      !: ??
+#if defined key_trc_dia3d
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   prodcal    !: Calcite production
+#endif
 
    !!* Variable for chemistry of the CO2 cycle
