Index: NEMO/branches/2019/dev_r12072_TOP-01_ENHANCE-11_CEthe/src/TOP/PISCES/P4Z/p4zflx.F90
===================================================================
--- NEMO/branches/2019/dev_r12072_TOP-01_ENHANCE-11_CEthe/src/TOP/PISCES/P4Z/p4zflx.F90	(revision 12108)
+++ NEMO/branches/2019/dev_r12072_TOP-01_ENHANCE-11_CEthe/src/TOP/PISCES/P4Z/p4zflx.F90	(revision 12109)
@@ -160,7 +160,7 @@
             zfld = zfco2 * chemc(ji,jj,1) * zkgco2(ji,jj)  ! (mol/L) * (m/s)
             zflu = zh2co3(ji,jj) * zkgco2(ji,jj)                                   ! (mol/L) (m/s) ?
-            oce_co2(ji,jj) = ( zfld - zflu ) * rfact2 * e1e2t(ji,jj) * tmask(ji,jj,1) * 1000.
+            oce_co2(ji,jj) = ( zfld - zflu ) * tmask(ji,jj,1) 
             ! compute the trend
-            tra(ji,jj,1,jpdic) = tra(ji,jj,1,jpdic) + ( zfld - zflu ) * rfact2 / e3t_n(ji,jj,1) * tmask(ji,jj,1)
+            tra(ji,jj,1,jpdic) = tra(ji,jj,1,jpdic) + oce_co2(ji,jj) * rfact2 / e3t_n(ji,jj,1)
 
             ! Compute O2 flux 
@@ -174,5 +174,5 @@
       IF( iom_use("tcflx") .OR. iom_use("tcflxcum") .OR. kt == nitrst   &
          &                 .OR. (ln_check_mass .AND. kt == nitend) )    &
-         t_oce_co2_flx  = glob_sum( 'p4zflx', oce_co2(:,:) )                    !  Total Flux of Carbon
+         t_oce_co2_flx  = glob_sum( 'p4zflx', oce_co2(:,:) * e1e2t(:,:) * 1000. )                    !  Total Flux of Carbon
       t_oce_co2_flx_cum = t_oce_co2_flx_cum + t_oce_co2_flx       !  Cumulative Total Flux of Carbon
 !      t_atm_co2_flx     = glob_sum( 'p4zflx', satmco2(:,:) * e1e2t(:,:) )       ! Total atmospheric pCO2
@@ -186,11 +186,13 @@
 
       IF( lk_iomput .AND. knt == nrdttrc ) THEN
+         CALL iom_put( "AtmCo2" , satmco2(:,:) * tmask(:,:,1) )   ! Atmospheric CO2 concentration
+         ! 
          ALLOCATE( zw2d(jpi,jpj) )  
          IF( iom_use( "Cflx"  ) )  THEN
-            zw2d(:,:) = oce_co2(:,:) / e1e2t(:,:) * rfact2r
+            zw2d(:,:) = oce_co2(:,:) * 1000.  ! conversion in molC/m2/s
             CALL iom_put( "Cflx"     , zw2d ) 
          ENDIF
          IF( iom_use( "Oflx"  ) )  THEN
-            zw2d(:,:) =  zoflx(:,:) * 1000 * tmask(:,:,1)
+            zw2d(:,:) =  zoflx(:,:) * 1000.
             CALL iom_put( "Oflx" , zw2d )
          ENDIF
@@ -203,10 +205,15 @@
            CALL iom_put( "Dpco2" ,  zw2d )
          ENDIF
+         IF( iom_use( "pCO2sea" ) ) THEN
+           zw2d(:,:) = ( zh2co3(:,:) / ( chemc(:,:,1) + rtrn ) ) * tmask(:,:,1)
+           CALL iom_put( "pCO2sea" ,  zw2d )
+         ENDIF
+
          IF( iom_use( "Dpo2" ) )  THEN
            zw2d(:,:) = ( atcox * patm(:,:) - atcox * trb(:,:,1,jpoxy) / ( chemo2(:,:,1) + rtrn ) ) * tmask(:,:,1)
            CALL iom_put( "Dpo2"  , zw2d )
          ENDIF
-         CALL iom_put( "tcflx"    , t_oce_co2_flx * rfact2r )   ! molC/s
-         CALL iom_put( "tcflxcum" , t_oce_co2_flx_cum       )   ! molC
+         CALL iom_put( "tcflx"    , t_oce_co2_flx     )   ! molC/s
+         CALL iom_put( "tcflxcum" , t_oce_co2_flx_cum )   ! molC
          !
          DEALLOCATE( zw2d )
Index: NEMO/branches/2019/dev_r12072_TOP-01_ENHANCE-11_CEthe/src/TOP/PISCES/P4Z/p4zsms.F90
===================================================================
--- NEMO/branches/2019/dev_r12072_TOP-01_ENHANCE-11_CEthe/src/TOP/PISCES/P4Z/p4zsms.F90	(revision 12108)
+++ NEMO/branches/2019/dev_r12072_TOP-01_ENHANCE-11_CEthe/src/TOP/PISCES/P4Z/p4zsms.F90	(revision 12109)
@@ -35,5 +35,5 @@
    INTEGER ::    numco2, numnut, numnit      ! logical unit for co2 budget
    REAL(wp) ::   alkbudget, no3budget, silbudget, ferbudget, po4budget
-   REAL(wp) ::   xfact1, xfact2, xfact3
+   REAL(wp) ::   xfact, xfact1, xfact2, xfact3
 
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   xnegtr     ! Array used to indicate negative tracer values
@@ -63,4 +63,8 @@
       REAL(wp) ::  ztra
       CHARACTER (len=25) :: charout
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:    ) :: zw2d
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:  ) :: zw3d
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   ztrdt   ! 4D workspace
+
       !!---------------------------------------------------------------------
       !
@@ -85,4 +89,11 @@
       rfact = r2dttrc
       !
+      ! trends computation initialisation
+      IF( l_trdtrc )  THEN
+         ALLOCATE( ztrdt(jpi,jpj,jpk,jp_pisces) )  !* store now fields before applying the Asselin filter
+         ztrdt(:,:,:,:)  = trn(:,:,:,:)
+      ENDIF
+      !
+
       IF( ( ln_top_euler .AND. kt == nittrc000 )  .OR. ( .NOT.ln_top_euler .AND. kt <= nittrc000 + nn_dttrc ) ) THEN
          rfactr  = 1. / rfact
@@ -90,4 +101,5 @@
          rfact2r = 1. / rfact2
          xstep = rfact2 / rday         ! Time step duration for biology
+         xfact = 1.e+3 * rfact2r
          IF(lwp) WRITE(numout,*) 
          IF(lwp) WRITE(numout,*) '    Passive Tracer  time step    rfact  = ', rfact, ' rdt = ', rdt
@@ -134,4 +146,52 @@
          END DO
         !
+        IF(  iom_use( 'INTdtAlk' ) .OR. iom_use( 'INTdtDIC' ) .OR. iom_use( 'INTdtFer' ) .OR.  &
+          &  iom_use( 'INTdtDIN' ) .OR. iom_use( 'INTdtDIP' ) .OR. iom_use( 'INTdtSil' ) )  THEN
+          !
+          ALLOCATE( zw3d(jpi,jpj,jpk), zw2d(jpi,jpj) )
+          zw3d(:,:,jpk) = 0.
+          DO jk = 1, jpkm1
+              zw3d(:,:,jk) = xnegtr(:,:,jk) * xfact * e3t_n(:,:,jk) * tmask(:,:,jk)
+          ENDDO
+          !
+          zw2d(:,:) = 0.
+          DO jk = 1, jpkm1
+             zw2d(:,:) = zw2d(:,:) + zw3d(:,:,jk) * tra(:,:,jk,jptal)
+          ENDDO
+          CALL iom_put( 'INTdtAlk', zw2d )
+          !
+          zw2d(:,:) = 0.
+          DO jk = 1, jpkm1
+             zw2d(:,:) = zw2d(:,:) + zw3d(:,:,jk) * tra(:,:,jk,jpdic)
+          ENDDO
+          CALL iom_put( 'INTdtDIC', zw2d )
+          !
+          zw2d(:,:) = 0.
+          DO jk = 1, jpkm1
+             zw2d(:,:) = zw2d(:,:) + zw3d(:,:,jk) * rno3 * ( tra(:,:,jk,jpno3) + tra(:,:,jk,jpnh4) )
+          ENDDO
+          CALL iom_put( 'INTdtDIN', zw2d )
+          !
+          zw2d(:,:) = 0.
+          DO jk = 1, jpkm1
+             zw2d(:,:) = zw2d(:,:) + zw3d(:,:,jk) * po4r * tra(:,:,jk,jppo4)
+          ENDDO
+          CALL iom_put( 'INTdtDIP', zw2d )
+          !
+          zw2d(:,:) = 0.
+          DO jk = 1, jpkm1
+             zw2d(:,:) = zw2d(:,:) + zw3d(:,:,jk) * tra(:,:,jk,jpfer)
+          ENDDO
+          CALL iom_put( 'INTdtFer', zw2d )
+          !
+          zw2d(:,:) = 0.
+          DO jk = 1, jpkm1
+             zw2d(:,:) = zw2d(:,:) + zw3d(:,:,jk) * tra(:,:,jk,jpsil)
+          ENDDO
+          CALL iom_put( 'INTdtSil', zw2d )
+          !
+          DEALLOCATE( zw3d, zw2d )
+        ENDIF
+        !
          DO jn = jp_pcs0, jp_pcs1
             tra(:,:,:,jn) = 0._wp
@@ -144,10 +204,11 @@
          ENDIF
       END DO
-
       !
       IF( l_trdtrc ) THEN
          DO jn = jp_pcs0, jp_pcs1
-           CALL trd_trc( tra(:,:,:,jn), jn, jptra_sms, kt )   ! save trends
+           ztrdt(:,:,:,jn) = ( trb(:,:,:,jn) - ztrdt(:,:,:,jn) ) * rfact2r 
+           CALL trd_trc( ztrdt(:,:,:,jn), jn, jptra_sms, kt )   ! save trends
          END DO
+         DEALLOCATE( ztrdt ) 
       END IF
 #endif
