Index: branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90
===================================================================
--- branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 3506)
+++ branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 3531)
@@ -80,6 +80,6 @@
 
           
+      CALL p4z_opt  ( kt, jnt )     ! Optic: PAR in the water column
       CALL p4z_sink ( kt, jnt )     ! vertical flux of particulate organic matter
-      CALL p4z_opt  ( kt, jnt )     ! Optic: PAR in the water column
       CALL p4z_fechem(kt, jnt )     ! Iron chemistry/scavenging
       CALL p4z_lim  ( kt, jnt )     ! co-limitations by the various nutrients
Index: branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90
===================================================================
--- branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 3506)
+++ branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 3531)
@@ -85,6 +85,15 @@
       !
       ! Allocate temporary workspace
-                       CALL wrk_alloc( jpi, jpj, jpk, zFe3, zFeL1, zTL1, ztotlig )
-      IF( ln_fechem )  CALL wrk_alloc( jpi, jpj, jpk, zFe2, zFeL2, zTL2, zFeP )
+      CALL wrk_alloc( jpi, jpj, jpk, zFe3, zFeL1, zTL1, ztotlig )
+      zFe3 (:,:,:) = 0.
+      zFeL1(:,:,:) = 0.
+      zTL1 (:,:,:) = 0.
+      IF( ln_fechem ) THEN
+         CALL wrk_alloc( jpi, jpj, jpk, zFe2, zFeL2, zTL2, zFeP )
+         zFe2 (:,:,:) = 0.
+         zFeL2(:,:,:) = 0.
+         zTL2 (:,:,:) = 0.
+         zFeP (:,:,:) = 0.
+      ENDIF
 
       ! Total ligand concentration : Ligands can be chosen to be constant or variable
@@ -104,6 +113,9 @@
          ! Chemistry is supposed to be fast enough to be at equilibrium
          ! ------------------------------------------------------------
+!CDIR NOVERRCHK
          DO jk = 1, jpkm1
+!CDIR NOVERRCHK
             DO jj = 1, jpj
+!CDIR NOVERRCHK
                DO ji = 1, jpi
                   ! Calculate ligand concentrations : assume 2/3rd of excess goes to
@@ -183,6 +195,9 @@
          ! Chemistry is supposed to be fast enough to be at equilibrium
          ! ------------------------------------------------------------
+!CDIR NOVERRCHK
          DO jk = 1, jpkm1
+!CDIR NOVERRCHK
             DO jj = 1, jpj
+!CDIR NOVERRCHK
                DO ji = 1, jpi
                   zTL1(ji,jj,jk) = ztotlig(ji,jj,jk)
@@ -202,5 +217,5 @@
       ENDIF
 
-
+      zdust = 0.         ! if no dust available
 !CDIR NOVERRCHK
       DO jk = 1, jpkm1
@@ -229,5 +244,5 @@
                ztrc   = ( trn(ji,jj,jk,jppoc) + trn(ji,jj,jk,jpgoc) + trn(ji,jj,jk,jpcal) + trn(ji,jj,jk,jpgsi) ) * 1.e6 
 #endif
-               zdust  = dust(ji,jj) / ( wdust * 30.42 * 0.035 ) * tmask(ji,jj,jk)
+               IF( ln_dust )  zdust  = dust(ji,jj) / ( wdust * 30.42 * 0.035 ) * tmask(ji,jj,jk)
                zlam1b = 3.e-5 + xlamdust * zdust + xlam1 * ztrc
                zscave = zfeequi * zlam1b * zstep
Index: branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
===================================================================
--- branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 3506)
+++ branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 3531)
@@ -72,7 +72,6 @@
       REAL(wp) ::  zsiloss, zcaloss, zwsbio3, zwsbio4, zwscal, zdep, zwstpoc
       REAL(wp) ::  ztrfer, ztrpo4, zwdust
-!!Ch  
-      REAL(wp) ::  zrdenittot, zsdenittot, znitrpottot, znitrfix
-!!Ch  
+      REAL(wp) ::  zrdenittot, zsdenittot, znitrpottot
+      !
       CHARACTER (len=25) :: charout
       REAL(wp), POINTER, DIMENSION(:,:  ) :: zpdep, zsidep, zwork1, zwork2, zwork3, zwork4
@@ -88,5 +87,6 @@
          r1_rday  = 1. / rday
          r1_ryyss = 1. / ryyss
-         IF(lwp) CALL ctl_opn( numnit, 'nitrogen.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea )
+         IF( ln_check_mass .AND. lwp)  &
+           &  CALL ctl_opn( numnit, 'nitrogen.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea )
       ENDIF
       !
@@ -333,13 +333,15 @@
       END DO
  
-      ! The total gain from nitrogen fixation is scaled to balance the loss by denitrification
-      ! -------------------------------------------------------------
-      zrdenittot   = glob_sum ( denitr(:,:,:) * rdenit * xnegtr(:,:,:) * cvol(:,:,:) )
-      zsdenittot   = glob_sum ( zwork4(:,:)   * e1e2t(:,:) )
-      znitrpottot  = glob_sum ( znitrpot(:,:,:)                        * cvol(:,:,:) )
-      IF( kt == nitend .AND. jnt == nrdttrc ) THEN
-         zfact = 1.e+3 * rfact2r * rno3 * 365. * 86400. * 14. / 1e12
-         IF(lwp) WRITE(numnit,9100) ndastp, znitrpottot * nitrfix * zfact, zrdenittot * zfact , zsdenittot * zfact
-      ENDIF
+      IF( ln_check_mass ) THEN
+         ! The total gain from nitrogen fixation is scaled to balance the loss by denitrification
+         ! -------------------------------------------------------------
+         zrdenittot   = glob_sum ( denitr(:,:,:) * rdenit * xnegtr(:,:,:) * cvol(:,:,:) )
+         zsdenittot   = glob_sum ( zwork4(:,:)   * e1e2t(:,:) )
+         znitrpottot  = glob_sum ( znitrpot(:,:,:)                        * cvol(:,:,:) )
+         IF( kt == nitend .AND. jnt == nrdttrc ) THEN
+            zfact = 1.e+3 * rfact2r * rno3 * 365. * 86400. * 14. / 1e12
+            IF(lwp) WRITE(numnit,9100) ndastp, znitrpottot * nitrfix * zfact, zrdenittot * zfact , zsdenittot * zfact
+         ENDIF
+       ENDIF
 
       ! Nitrogen change due to nitrogen fixation
@@ -348,4 +350,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
+               ! zfact = znitrpot(ji,jj,jk) * ( zrdenittot + zsdenittot ) / znitrpottot
                zfact = znitrpot(ji,jj,jk) * nitrfix
                trn(ji,jj,jk,jpnh4) = trn(ji,jj,jk,jpnh4) +             zfact
Index: branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
===================================================================
--- branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 3506)
+++ branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 3531)
@@ -36,5 +36,4 @@
    PUBLIC   p4z_sms    ! called in p4zsms.F90
 
-   LOGICAL ::  ln_check_mass = .false.       !: Flag to check mass conservation 
    REAL(wp) :: alkbudget, no3budget, silbudget, ferbudget
    INTEGER ::  numco2, numnut  !: logical unit for co2 budget
@@ -166,4 +165,7 @@
 #endif
       NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp, ln_pisclo
+      NAMELIST/nampismass/ ln_check_mass
+      !!----------------------------------------------------------------------
+
 
       REWIND( numnatp )
@@ -211,4 +213,8 @@
 #endif
 
+      ln_pisdmp = .true.
+      nn_pisdmp = 1
+      ln_pisclo = .false.
+
       REWIND( numnatp )
       READ  ( numnatp, nampisdmp )
@@ -221,4 +227,14 @@
          WRITE(numout,*) '    Restoring of tracer to initial value  on closed seas  ln_pisclo      =', ln_pisclo
          WRITE(numout,*) ' '
+      ENDIF
+
+      ln_check_mass = .false.
+      REWIND( numnatp )       
+      READ  ( numnatp, nampismass )
+      IF(lwp) THEN                         ! control print
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' Namelist parameter for mass conservation checking'
+         WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
+         WRITE(numout,*) '    Flag to check mass conservation of NO3/Si/TALK ln_check_mass = ', ln_check_mass
       ENDIF
 
@@ -347,17 +363,7 @@
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index      
       !!
-      NAMELIST/nampismass/ ln_check_mass
       !!---------------------------------------------------------------------
 
       IF( kt == nittrc000 ) THEN 
-         REWIND( numnatp )       
-         READ  ( numnatp, nampismass )
-         IF(lwp) THEN                         ! control print
-            WRITE(numout,*) ' '
-            WRITE(numout,*) ' Namelist parameter for mass conservation checking'
-            WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
-            WRITE(numout,*) '    Flag to check mass conservation of NO3/Si/TALK ln_check_mass = ', ln_check_mass
-         ENDIF
-
          IF( ln_check_mass .AND. lwp) THEN      !   Open budget file of NO3, ALK, Si, Fer
             CALL ctl_opn( numco2, 'carbon.budget'  , 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea )
Index: branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90
===================================================================
--- branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90	(revision 3506)
+++ branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90	(revision 3531)
@@ -53,9 +53,11 @@
    REAL(wp) ::  t_atm_co2_flx      !: global mean of atmospheric pco2
 
-   !!* Damping 
-   LOGICAL  ::   ln_pisdmp         !: relaxation or not of nutrients to a mean value
-   INTEGER  ::   nn_pisdmp         !: frequency of relaxation or not of nutrients to a mean value
-   LOGICAL  ::   ln_pisclo         !: Restoring or not of nutrients to initial value
-                                   !: on close seas
+   !!* restoring
+   LOGICAL  ::  ln_pisdmp          !: restoring or not of nutrients to a mean value
+   INTEGER  ::  nn_pisdmp          !: frequency of relaxation or not of nutrients to a mean value
+   LOGICAL  ::  ln_pisclo          !: Restoring or not of nutrients to initial value on closed seas
+
+   !!* Mass conservation
+   LOGICAL  ::  ln_check_mass      !: Flag to check mass conservation
 
    !!*  Biological fluxes for primary production
