Index: branches/devmercator2010/NEMO/TOP_SRC/PISCES/p4zsink.F90
===================================================================
--- branches/devmercator2010/NEMO/TOP_SRC/PISCES/p4zsink.F90	(revision 2069)
+++ branches/devmercator2010/NEMO/TOP_SRC/PISCES/p4zsink.F90	(revision 2072)
@@ -69,5 +69,5 @@
 
    !!* Substitution
-#  include "top_substitute.h90"
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
@@ -99,5 +99,8 @@
 #if defined key_trc_diaadd
       REAL(wp) :: zrfact2
-      INTEGER  :: ik1
+      INTEGER  :: iksed1
+#if defined key_iomput
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zw3d
+#endif
 #endif
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   znum3d
@@ -283,11 +286,11 @@
 #if defined key_trc_diaadd
       zrfact2 = 1.e3 * rfact2r
-      ik1 = iksed + 1
+      iksed1 = iksed + 1
 #  if ! defined key_iomput
-      trc2d(:,:  ,jp_pcs0_2d + 4)  = sinking (:,:,ik1) * zrfact2 * tmask(:,:,1)
-      trc2d(:,:  ,jp_pcs0_2d + 5)  = sinking2(:,:,ik1) * zrfact2 * tmask(:,:,1)
-      trc2d(:,:  ,jp_pcs0_2d + 6)  = sinkfer (:,:,ik1) * zrfact2 * tmask(:,:,1)
-      trc2d(:,:  ,jp_pcs0_2d + 7)  = sinksil (:,:,ik1) * zrfact2 * tmask(:,:,1)
-      trc2d(:,:  ,jp_pcs0_2d + 8)  = sinkcal (:,:,ik1) * zrfact2 * tmask(:,:,1)
+      trc2d(:,:  ,jp_pcs0_2d + 4)  = sinking (:,:,iksed1) * zrfact2 * tmask(:,:,1)
+      trc2d(:,:  ,jp_pcs0_2d + 5)  = sinking2(:,:,iksed1) * zrfact2 * tmask(:,:,1)
+      trc2d(:,:  ,jp_pcs0_2d + 6)  = sinkfer (:,:,iksed1) * zrfact2 * tmask(:,:,1)
+      trc2d(:,:  ,jp_pcs0_2d + 7)  = sinksil (:,:,iksed1) * zrfact2 * tmask(:,:,1)
+      trc2d(:,:  ,jp_pcs0_2d + 8)  = sinkcal (:,:,iksed1) * zrfact2 * tmask(:,:,1)
       trc3d(:,:,:,jp_pcs0_3d + 11) = sinking (:,:,:)      * zrfact2 * tmask(:,:,:)
       trc3d(:,:,:,jp_pcs0_3d + 12) = sinking2(:,:,:)      * zrfact2 * tmask(:,:,:)
@@ -298,18 +301,28 @@
       trc3d(:,:,:,jp_pcs0_3d + 17) = wsbio4  (:,:,:)                * tmask(:,:,:)
 #else
-      IF( jnt == nrdttrc ) then
-        CALL iom_put( "POCFlx"  , sinking (:,:,:)      * zrfact2 * tmask(:,:,:) )  ! POC export
-        CALL iom_put( "NumFlx"  , sinking2 (:,:,:)     * zrfact2 * tmask(:,:,:) )  ! Num export
-        CALL iom_put( "SiFlx"   , sinksil (:,:,:)      * zrfact2 * tmask(:,:,:) )  ! Silica export
-        CALL iom_put( "CaCO3Flx", sinkcal (:,:,:)      * zrfact2 * tmask(:,:,:) )  ! Calcite export
-        CALL iom_put( "xnum"    , znum3d  (:,:,:)                * tmask(:,:,:) )  ! Number of particles in aggregats
-        CALL iom_put( "W1"      , wsbio3  (:,:,:)                * tmask(:,:,:) )  ! sinking speed of POC
-        CALL iom_put( "W2"      , wsbio4  (:,:,:)                * tmask(:,:,:) )  ! sinking speed of aggregats
-        CALL iom_put( "PMO"     , sinking (:,:,ik1) * zrfact2 * tmask(:,:,1) )  ! POC export at 100m
-        CALL iom_put( "PMO2"    , sinking2(:,:,ik1) * zrfact2 * tmask(:,:,1) )  ! Num export at 100m
-        CALL iom_put( "ExpFe1"  , sinkfer (:,:,ik1) * zrfact2 * tmask(:,:,1) )  ! Export of iron at 100m
-        CALL iom_put( "ExpSi"   , sinksil (:,:,ik1) * zrfact2 * tmask(:,:,1) )  ! export of silica at 100m
-        CALL iom_put( "ExpCaCO3", sinkcal (:,:,ik1) * zrfact2 * tmask(:,:,1) )  ! export of calcite at 100m
-     ENDIF
+      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(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "GOCFlx", zw3d )
+      zw3d(:,:,:)  = sinksil (:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "SiFlx", zw3d )
+      zw3d(:,:,:)  = sinkcal (:,:,:) * zrfact2 * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "CaCO3Flx", zw3d )
+      zw3d(:,:,:)  = znum3d  (:,:,:)           * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "xnum", zw3d )
+      zw3d(:,:,:)  = wsbio3  (:,:,:)           * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "W1", zw3d )
+      zw3d(:,:,:)  = wsbio4  (:,:,:)           * tmask(:,:,:)
+      IF( jnt == nrdttrc ) CALL iom_put( "W2", zw3d )
 #  endif
 
@@ -476,5 +489,8 @@
 #if defined key_trc_dia3d
       REAL(wp) ::   zrfact2
-      INTEGER  ::   ik1
+      INTEGER  ::   iksed1
+#endif
+#if defined key_iomput
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zw3d
 #endif
       CHARACTER (len=25) :: charout
@@ -597,20 +613,26 @@
 #if defined key_trc_diaadd
       zrfact2 = 1.e3 * rfact2r
-      ik1  = iksed + 1
+      iksed1 = iksed + 1
 #  if ! defined key_iomput
-      trc2d(:,:,jp_pcs0_2d + 4) = sinking (:,:,ik1) * zrfact2 * tmask(:,:,1)
-      trc2d(:,:,jp_pcs0_2d + 5) = sinking2(:,:,ik1) * zrfact2 * tmask(:,:,1)
-      trc2d(:,:,jp_pcs0_2d + 6) = sinkfer (:,:,ik1) * zrfact2 * tmask(:,:,1)
-      trc2d(:,:,jp_pcs0_2d + 7) = sinkfer2(:,:,ik1) * zrfact2 * tmask(:,:,1)
-      trc2d(:,:,jp_pcs0_2d + 8) = sinksil (:,:,ik1) * zrfact2 * tmask(:,:,1)
-      trc2d(:,:,jp_pcs0_2d + 9) = sinkcal (:,:,ik1) * zrfact2 * tmask(:,:,1)
+      trc2d(:,:,jp_pcs0_2d + 4) = sinking (:,:,iksed1) * zrfact2 * tmask(:,:,1)
+      trc2d(:,:,jp_pcs0_2d + 5) = sinking2(:,:,iksed1) * zrfact2 * tmask(:,:,1)
+      trc2d(:,:,jp_pcs0_2d + 6) = sinkfer (:,:,iksed1) * zrfact2 * tmask(:,:,1)
+      trc2d(:,:,jp_pcs0_2d + 7) = sinkfer2(:,:,iksed1) * zrfact2 * tmask(:,:,1)
+      trc2d(:,:,jp_pcs0_2d + 8) = sinksil (:,:,iksed1) * zrfact2 * tmask(:,:,1)
+      trc2d(:,:,jp_pcs0_2d + 9) = sinkcal (:,:,iksed1) * zrfact2 * tmask(:,:,1)
 #  else
-      IF( jnt == nrdttrc )  then
-         CALL iom_put( "EPC100"  , ( sinking(:,:,ik1) + sinking2(:,:,ik1) ) * zrfact2 * tmask(:,:,1) ) ! Export of carbon at 100m
-         CALL iom_put( "EPFE100" , ( sinkfer(:,:,ik1) + sinkfer2(:,:,ik1) ) * zrfact2 * tmask(:,:,1) ) ! Export of iron at 100m
-         CALL iom_put( "EPCAL100",   sinkcal(:,:,ik1)                       * zrfact2 * tmask(:,:,1) ) ! Export of calcite  at 100m
-         CALL iom_put( "EPSI100" ,   sinksil(:,:,ik1)                       * zrfact2 * tmask(:,:,1) ) ! Export of biogenic silica at 100m
-      ENDIF
-#endif
+      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
       !
