Index: branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90
===================================================================
--- branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 7513)
+++ branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 7525)
@@ -129,12 +129,12 @@
 
       IF( lk_degrad ) THEN
-!$OMP DO schedule(static) private(jk,jj,ji)
-      DO jk = 1, jpk
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               prmax(ji,jj,jk) = prmax(ji,jj,jk) * facvol(ji,jj,jk) 
-            END DO
-         END DO
-      END DO 
+!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
+         DO jk = 1, jpk
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  prmax(ji,jj,jk) = prmax(ji,jj,jk) * facvol(ji,jj,jk) 
+               END DO
+            END DO
+         END DO 
       END IF
 
@@ -453,161 +453,161 @@
           IF( iom_use( "PPPHY" ) .OR. iom_use( "PPPHY2" ) )  THEN
 !$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = zprorca (ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! primary production by nanophyto
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "PPPHY"  , zw3d )
-!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = zprorcad (ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! primary production by nanophyto
-                  END DO
-               END DO
-            END DO
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = zprorca (ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! primary production by nanophyto
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "PPPHY"  , zw3d )
+!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = zprorcad (ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! primary production by nanophyto
+                   END DO
+                END DO
+             END DO
+             !
+             CALL iom_put( "PPPHY2"  , zw3d )
+          ENDIF
+          IF( iom_use( "PPNEWN" ) .OR. iom_use( "PPNEWD" ) )  THEN
+!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = zpronew (ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! new primary production by nanophyto
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "PPNEWN"  , zw3d )
+             !
+!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = zpronewd (ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! new primary production by nanophyto
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "PPNEWD"  , zw3d )
+          ENDIF
+          IF( iom_use( "PBSi" ) )  THEN
+!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = zprorcad(ji,jj,jk) * zfact * tmask(ji,jj,jk) * zysopt(ji,jj,jk) ! biogenic silica production
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "PBSi"  , zw3d )
+          ENDIF
+          IF( iom_use( "PFeN" ) .OR. iom_use( "PFeD" ) )  THEN
+!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = zprofen(ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! biogenic iron production by nanophyto
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "PFeN"  , zw3d )
+             !
+!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = zprofed(ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! biogenic iron production by nanophyto
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "PFeD"  , zw3d )
+          ENDIF
+          IF( iom_use( "Mumax" ) )  THEN
+!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = prmax(ji,jj,jk) * tmask(ji,jj,jk)   ! Maximum growth rate
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "Mumax"  , zw3d )
+          ENDIF
+          IF( iom_use( "MuN" ) .OR. iom_use( "MuD" ) )  THEN
+!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = zprbio(ji,jj,jk) * xlimphy(ji,jj,jk) * tmask(ji,jj,jk)  ! Realized growth rate for nanophyto
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "MuN"  , zw3d )
               !
-              CALL iom_put( "PPPHY2"  , zw3d )
-          ENDIF
-          IF( iom_use( "PPNEWN" ) .OR. iom_use( "PPNEWD" ) )  THEN
-!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = zpronew (ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! new primary production by nanophyto
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "PPNEWN"  , zw3d )
-              !
-!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = zpronewd (ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! new primary production by nanophyto
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "PPNEWD"  , zw3d )
-          ENDIF
-          IF( iom_use( "PBSi" ) )  THEN
-!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = zprorcad(ji,jj,jk) * zfact * tmask(ji,jj,jk) * zysopt(ji,jj,jk) ! biogenic silica production
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "PBSi"  , zw3d )
-          ENDIF
-          IF( iom_use( "PFeN" ) .OR. iom_use( "PFeD" ) )  THEN
-!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = zprofen(ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! biogenic iron production by nanophyto
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "PFeN"  , zw3d )
-              !
-!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = zprofed(ji,jj,jk) * zfact * tmask(ji,jj,jk)  ! biogenic iron production by nanophyto
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "PFeD"  , zw3d )
-          ENDIF
-          IF( iom_use( "Mumax" ) )  THEN
-!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = prmax(ji,jj,jk) * tmask(ji,jj,jk)   ! Maximum growth rate
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "Mumax"  , zw3d )
-          ENDIF
-          IF( iom_use( "MuN" ) .OR. iom_use( "MuD" ) )  THEN
-!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = zprbio(ji,jj,jk) * xlimphy(ji,jj,jk) * tmask(ji,jj,jk)  ! Realized growth rate for nanophyto
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "MuN"  , zw3d )
-              !
-!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) =  zprdia(ji,jj,jk) * xlimdia(ji,jj,jk) * tmask(ji,jj,jk)  ! Realized growth rate for diatoms
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "MuD"  , zw3d )
+!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) =  zprdia(ji,jj,jk) * xlimdia(ji,jj,jk) * tmask(ji,jj,jk)  ! Realized growth rate for diatoms
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "MuD"  , zw3d )
           ENDIF
           IF( iom_use( "LNlight" ) .OR. iom_use( "LDlight" ) )  THEN
 !$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = zprbio (ji,jj,jk) / (prmax(ji,jj,jk) + rtrn) * tmask(ji,jj,jk) ! light limitation term
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "LNlight"  , zw3d )
-              !
-!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) =  zprdia (ji,jj,jk) / (prmax(ji,jj,jk) + rtrn) * tmask(ji,jj,jk)  ! light limitation term
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "LDlight"  , zw3d )
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = zprbio (ji,jj,jk) / (prmax(ji,jj,jk) + rtrn) * tmask(ji,jj,jk) ! light limitation term
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "LNlight"  , zw3d )
+             !
+!$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) =  zprdia (ji,jj,jk) / (prmax(ji,jj,jk) + rtrn) * tmask(ji,jj,jk)  ! light limitation term
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "LDlight"  , zw3d )
           ENDIF
           IF( iom_use( "TPP" ) )  THEN
 !$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = ( zprorca(ji,jj,jk) + zprorcad(ji,jj,jk) ) * zfact * tmask(ji,jj,jk)  ! total primary production
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "TPP"  , zw3d )
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = ( zprorca(ji,jj,jk) + zprorcad(ji,jj,jk) ) * zfact * tmask(ji,jj,jk)  ! total primary production
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "TPP"  , zw3d )
           ENDIF
           IF( iom_use( "TPNEW" ) )  THEN
 !$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = ( zpronew(ji,jj,jk) + zpronewd(ji,jj,jk) ) * zfact * tmask(ji,jj,jk)  ! total new production
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "TPNEW"  , zw3d )
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = ( zpronew(ji,jj,jk) + zpronewd(ji,jj,jk) ) * zfact * tmask(ji,jj,jk)  ! total new production
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "TPNEW"  , zw3d )
           ENDIF
           IF( iom_use( "TPBFE" ) )  THEN
 !$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     zw3d(ji,jj,jk) = ( zprofen(ji,jj,jk) + zprofed(ji,jj,jk) ) * zfact * tmask(ji,jj,jk)  ! total biogenic iron production
-                  END DO
-               END DO
-            END DO
-              CALL iom_put( "TPBFE"  , zw3d )
+             DO jk = 1, jpk
+                DO jj = 1, jpj
+                   DO ji = 1, jpi
+                      zw3d(ji,jj,jk) = ( zprofen(ji,jj,jk) + zprofed(ji,jj,jk) ) * zfact * tmask(ji,jj,jk)  ! total biogenic iron production
+                   END DO
+                END DO
+             END DO
+             CALL iom_put( "TPBFE"  , zw3d )
           ENDIF
           IF( iom_use( "INTPPPHY" ) .OR. iom_use( "INTPPPHY2" ) ) THEN  
@@ -708,5 +708,5 @@
              ENDDO
 !$OMP END PARALLEL
-            CALL iom_put( "INTPBFE" , zw2d )
+             CALL iom_put( "INTPBFE" , zw2d )
           ENDIF
           IF( iom_use( "INTPBSI" ) ) THEN           !   total biogenic silica production  ( vertically integrated )
@@ -739,19 +739,19 @@
            zfact = 1.e+3 * rfact2r
 !$OMP PARALLEL DO schedule(static) private(jk,jj,ji)
-            DO jk = 1, jpk
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     trc3d(ji,jj,jk,jp_pcs0_3d + 4)  = zprorca (ji,jj,jk) * zfact * tmask(ji,jj,jk)
-                     trc3d(ji,jj,jk,jp_pcs0_3d + 5)  = zprorcad(ji,jj,jk) * zfact * tmask(ji,jj,jk)
-                     trc3d(ji,jj,jk,jp_pcs0_3d + 6)  = zpronew (ji,jj,jk) * zfact * tmask(ji,jj,jk)
-                     trc3d(ji,jj,jk,jp_pcs0_3d + 7)  = zpronewd(ji,jj,jk) * zfact * tmask(ji,jj,jk)
-                     trc3d(ji,jj,jk,jp_pcs0_3d + 8)  = zprorcad(ji,jj,jk) * zfact * tmask(ji,jj,jk) * zysopt(ji,jj,jk)
-                     trc3d(ji,jj,jk,jp_pcs0_3d + 9)  = zprofed (ji,jj,jk) * zfact * tmask(ji,jj,jk)
+           DO jk = 1, jpk
+              DO jj = 1, jpj
+                 DO ji = 1, jpi
+                    trc3d(ji,jj,jk,jp_pcs0_3d + 4)  = zprorca (ji,jj,jk) * zfact * tmask(ji,jj,jk)
+                    trc3d(ji,jj,jk,jp_pcs0_3d + 5)  = zprorcad(ji,jj,jk) * zfact * tmask(ji,jj,jk)
+                    trc3d(ji,jj,jk,jp_pcs0_3d + 6)  = zpronew (ji,jj,jk) * zfact * tmask(ji,jj,jk)
+                    trc3d(ji,jj,jk,jp_pcs0_3d + 7)  = zpronewd(ji,jj,jk) * zfact * tmask(ji,jj,jk)
+                    trc3d(ji,jj,jk,jp_pcs0_3d + 8)  = zprorcad(ji,jj,jk) * zfact * tmask(ji,jj,jk) * zysopt(ji,jj,jk)
+                    trc3d(ji,jj,jk,jp_pcs0_3d + 9)  = zprofed (ji,jj,jk) * zfact * tmask(ji,jj,jk)
 #  if ! defined key_kriest
-                     trc3d(ji,jj,jk,jp_pcs0_3d + 10) = zprofen (ji,jj,jk) * zfact * tmask(ji,jj,jk)
+                    trc3d(ji,jj,jk,jp_pcs0_3d + 10) = zprofen (ji,jj,jk) * zfact * tmask(ji,jj,jk)
 #  endif
-                  END DO
-               END DO
-            END DO
+                 END DO
+              END DO
+           END DO
         ENDIF
      ENDIF
