Index: tags/nemo_v2_3/NEMO/TOP_SRC/SMS/p4zsed.F
===================================================================
--- tags/nemo_v2_3/NEMO/TOP_SRC/SMS/p4zsed.F	(revision 735)
+++ tags/nemo_v2_3/NEMO/TOP_SRC/SMS/p4zsed.F	(revision 736)
@@ -1,4 +1,4 @@
 
-CCC $Header$ 
+CCC $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/SMS/p4zsed.F,v 1.9 2007/10/12 09:35:04 opalod Exp $ 
 CCC  TOP 1.0 , LOCEAN-IPSL (2005) 
 C This software is governed by CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
@@ -102,5 +102,5 @@
      &      +(rivinp(ji,jj)+nitdep(ji,jj))*rfact2
           trn(ji,jj,1,jpfer) = trn(ji,jj,1,jpfer)
-     &      +rivinp(ji,jj)*9E-5*rfact2
+     &      +rivinp(ji,jj)*3E-5*rfact2
           trn(ji,jj,1,jpsil) = trn(ji,jj,1,jpsil)
      &      +sidep(ji,jj)+cotdep(ji,jj)*rfact2/6.
@@ -140,8 +140,8 @@
 C    -------------------------------------------------------------
 C
-        DO jj=2,jpjm1
-          DO ji=2,jpim1
+        DO jj=1,jpj
+          DO ji=1,jpi
             ikt=max(mbathy(ji,jj)-1,1)
-            zfact=e1t(ji,jj)*e2t(ji,jj)/rjjss
+            zfact=e1t(ji,jj)*e2t(ji,jj)/rjjss*tmask_i(ji,jj)
             sumsedsi=sumsedsi+zfact*trn(ji,jj,ikt,jpdsi)
 #if ! defined key_trc_kriest
@@ -152,6 +152,11 @@
             sumsedcal=sumsedcal+trn(ji,jj,ikt,jpcal)*wscal(ji,jj,ikt)
      &          *2.*zfact
+#if  defined key_trc_kriest
             sumsedpo4=sumsedpo4+
      &          (trn(ji,jj,ikt,jppoc)*wsbio3(ji,jj,ikt))*zfact
+#else
+            sumsedpo4=sumsedpo4+(trn(ji,jj,ikt,jpgoc)*wsbio4(ji,jj,ikt)
+     &    +trn(ji,jj,ikt,jppoc)*wsbio3(ji,jj,ikt))*zfact
+#endif
           END DO
         END DO
@@ -246,5 +251,6 @@
             DO ji=2,jpi-1
         denitot=denitot+denitr(ji,jj,jk)*rdenit*e1t(ji,jj)*e2t(ji,jj)
-     &    *fse3t(ji,jj,jk)*tmask(ji,jj,jk)*znegtr(ji,jj,jk)
+     &    *fse3t(ji,jj,jk)*tmask(ji,jj,jk)*tmask_i(ji,jj)
+     &    *znegtr(ji,jj,jk)
             END DO
           END DO
@@ -274,8 +280,8 @@
       nitrpottot=0.
       DO jk=1,jpkm1
-        DO jj=2,jpj-1
-          DO ji=2,jpi-1
+        DO jj=1,jpj
+          DO ji=1,jpi
         nitrpottot=nitrpottot+nitrpot(ji,jj,jk)*e1t(ji,jj)
-     &    *e2t(ji,jj)*tmask(ji,jj,jk)*fse3t(ji,jj,jk)
+     &    *e2t(ji,jj)*tmask(ji,jj,jk)*tmask_i(ji,jj)*fse3t(ji,jj,jk)
           END DO
         END DO
Index: tags/nemo_v2_3/NEMO/TOP_SRC/SMS/trcini.pisces.h90
===================================================================
--- tags/nemo_v2_3/NEMO/TOP_SRC/SMS/trcini.pisces.h90	(revision 735)
+++ tags/nemo_v2_3/NEMO/TOP_SRC/SMS/trcini.pisces.h90	(revision 736)
@@ -37,5 +37,5 @@
       !!----------------------------------------------------------------------
       !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-      !! $Header$ 
+      !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/SMS/trcini.pisces.h90,v 1.9 2007/10/12 09:35:04 opalod Exp $ 
       !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
       !!----------------------------------------------------------------------
@@ -169,5 +169,5 @@
             DO ji = 2, jpim1
                sumdepsi = sumdepsi + dustmo(ji,jj,jm)/(12.*rmoss)*8.8        &
-                  *0.075/28.1*e1t(ji,jj)*e2t(ji,jj)*tmask(ji,jj,1)
+                  *0.075/28.1*e1t(ji,jj)*e2t(ji,jj)*tmask(ji,jj,1)*tmask_i(ji,jj)
             END DO
          END DO
@@ -200,9 +200,9 @@
          DO ji=2,jpim1
             rivpo4input=rivpo4input+rivinp(ji,jj)*(e1t(ji,jj)*e2t(ji,jj)    &
-               *fse3t(ji,jj,1))*tmask(ji,jj,1)*raass
+               *fse3t(ji,jj,1))*tmask(ji,jj,1)*tmask_i(ji,jj)*raass
             rivalkinput=rivalkinput+cotdep(ji,jj)*(e1t(ji,jj)*e2t(ji,jj)    &
-               *fse3t(ji,jj,1))*tmask(ji,jj,1)*raass
+               *fse3t(ji,jj,1))*tmask(ji,jj,1)*tmask_i(ji,jj)*raass
             nitdepinput=nitdepinput+nitdep(ji,jj)*(e1t(ji,jj)*e2t(ji,jj)    &
-               *fse3t(ji,jj,1))*tmask(ji,jj,1)*raass
+               *fse3t(ji,jj,1))*tmask(ji,jj,1)*tmask_i(ji,jj)*raass
          END DO
       END DO
