Index: trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90
===================================================================
--- trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 4990)
+++ trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 4996)
@@ -110,5 +110,5 @@
       IF( nn_timing == 1 )  CALL timing_start('p2z_bio')
       !
-      IF( ln_diatrc ) THEN
+      IF( ln_diatrc .OR. lk_iomput ) THEN
          CALL wrk_alloc( jpi, jpj,     17, zw2d )
          CALL wrk_alloc( jpi, jpj, jpk, 3, zw3d )
@@ -122,5 +122,5 @@
 
       xksi(:,:) = 0.e0        ! zooplakton closure ( fbod)
-      IF( ln_diatrc ) THEN
+      IF( ln_diatrc .OR. lk_iomput ) THEN
          zw2d  (:,:,:) = 0.e0
          zw3d(:,:,:,:) = 0.e0
@@ -239,5 +239,5 @@
                   !  trend number 17 in p2zexp
                 ENDIF
-                IF( ln_diatrc ) THEN
+                IF( ln_diatrc .OR. lk_iomput ) THEN
                   ! convert fluxes in per day
                   ze3t = fse3t(ji,jj,jk) * 86400.
@@ -360,5 +360,5 @@
                   !  trend number 17 in p2zexp 
                 ENDIF
-                IF( ln_diatrc ) THEN
+                IF( ln_diatrc .OR. lk_iomput ) THEN
                   ! convert fluxes in per day
                   ze3t = fse3t(ji,jj,jk) * 86400.
@@ -390,6 +390,5 @@
       END DO
 
-      IF( ln_diatrc ) THEN
-         !
+      IF( ln_diatrc .OR. lk_iomput ) THEN
          DO jl = 1, 17 
             CALL lbc_lnk( zw2d(:,:,jl),'T', 1. )
@@ -398,28 +397,30 @@
             CALL lbc_lnk( zw3d(:,:,:,jl),'T', 1. )
          END DO
-         IF( lk_iomput ) THEN
+      ENDIF
+      IF( lk_iomput ) THEN
             ! Save diagnostics
-            CALL iom_put( "TNO3PHY", zw2d(:,:,1) )
-            CALL iom_put( "TNH4PHY", zw2d(:,:,2) )
-            CALL iom_put( "TPHYDOM", zw2d(:,:,3) )
-            CALL iom_put( "TPHYNH4", zw2d(:,:,4) )
-            CALL iom_put( "TPHYZOO", zw2d(:,:,5) )
-            CALL iom_put( "TPHYDET", zw2d(:,:,6) )
-            CALL iom_put( "TDETZOO", zw2d(:,:,7) )
-            CALL iom_put( "TZOODET", zw2d(:,:,8) )
-            CALL iom_put( "TZOOBOD", zw2d(:,:,9) )
-            CALL iom_put( "TZOONH4", zw2d(:,:,10) )
-            CALL iom_put( "TZOODOM", zw2d(:,:,11) )
-            CALL iom_put( "TNH4NO3", zw2d(:,:,12) )
-            CALL iom_put( "TDOMNH4", zw2d(:,:,13) )
-            CALL iom_put( "TDETNH4", zw2d(:,:,14) )
-            CALL iom_put( "TPHYTOT", zw2d(:,:,15) )
-            CALL iom_put( "TZOOTOT", zw2d(:,:,16) )
-            ! 
-            CALL iom_put( "FNO3PHY", zw3d(:,:,:,1) )
-            CALL iom_put( "FNH4PHY", zw3d(:,:,:,2) )
-            CALL iom_put( "FNH4NO3", zw3d(:,:,:,3) )
-            !
-         ELSE
+        CALL iom_put( "TNO3PHY", zw2d(:,:,1) )
+        CALL iom_put( "TNH4PHY", zw2d(:,:,2) )
+        CALL iom_put( "TPHYDOM", zw2d(:,:,3) )
+        CALL iom_put( "TPHYNH4", zw2d(:,:,4) )
+        CALL iom_put( "TPHYZOO", zw2d(:,:,5) )
+        CALL iom_put( "TPHYDET", zw2d(:,:,6) )
+        CALL iom_put( "TDETZOO", zw2d(:,:,7) )
+        CALL iom_put( "TZOODET", zw2d(:,:,8) )
+        CALL iom_put( "TZOOBOD", zw2d(:,:,9) )
+        CALL iom_put( "TZOONH4", zw2d(:,:,10) )
+        CALL iom_put( "TZOODOM", zw2d(:,:,11) )
+        CALL iom_put( "TNH4NO3", zw2d(:,:,12) )
+        CALL iom_put( "TDOMNH4", zw2d(:,:,13) )
+        CALL iom_put( "TDETNH4", zw2d(:,:,14) )
+        CALL iom_put( "TPHYTOT", zw2d(:,:,15) )
+        CALL iom_put( "TZOOTOT", zw2d(:,:,16) )
+         ! 
+        CALL iom_put( "FNO3PHY", zw3d(:,:,:,1) )
+        CALL iom_put( "FNH4PHY", zw3d(:,:,:,2) )
+        CALL iom_put( "FNH4NO3", zw3d(:,:,:,3) )
+         !
+       ELSE
+          IF( ln_diatrc ) THEN
             !
             trc2d(:,:,jp_pcs0_2d    ) = zw2d(:,:,1) 
@@ -467,5 +468,5 @@
       ENDIF
       !
-      IF( ln_diatrc ) THEN
+      IF( ln_diatrc .OR. lk_iomput ) THEN
          CALL wrk_dealloc( jpi, jpj,     17, zw2d )
          CALL wrk_dealloc( jpi, jpj, jpk, 3, zw3d )
