Index: branches/NERC/dev_r5518_GO6_CleanMedusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90
===================================================================
--- branches/NERC/dev_r5518_GO6_CleanMedusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90	(revision 8345)
+++ branches/NERC/dev_r5518_GO6_CleanMedusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90	(revision 8352)
@@ -32,5 +32,5 @@
       !!----------------------------------------------------------------------
       USE bio_medusa_mod
-      USE dom_oce,           ONLY: atfp, atfp1, neuler, rdt
+      USE dom_oce,           ONLY: atfp, atfp1, neuler, rdt, e3t_n, tmask
       USE in_out_manager,    ONLY: lwp, numout
 # if defined key_iomput
@@ -61,4 +61,7 @@
       INTEGER :: ji, jj
       INTEGER :: jn
+
+      REAL(wp) :: fq0,fq1,fq2,fq3
+
       !!----------------------------------------------------------------------
       !! Process benthic in/out fluxes
@@ -107,12 +110,4 @@
             ENDDO
          ENDDO
-         !! AXY (07/07/15): temporary hijacking
-# if defined key_roam
-  !!       trc2d(:,:,126) = zn_dms_chn(:,:)
-  !!       trc2d(:,:,127) = zn_dms_chd(:,:)
-  !!       trc2d(:,:,128) = zn_dms_mld(:,:)
-  !!       trc2d(:,:,129) = zn_dms_qsr(:,:)
-  !!       trc2d(:,:,130) = zn_dms_din(:,:)
-# endif
       ENDIF 
       !!
@@ -235,5 +230,88 @@
          ENDIF
       endif
-      
+
+#  if defined key_debug_medusa
+         !! AXY (12/07/17)
+         !!-----------------------------------------------------------------
+         !! Check conservation of MEDUSA's sinks-minus-sources using fflx_X 
+         !! diagnostics (i.e. biogeochemical processes only)
+         !!   - fflx_X diagnostics *should* include all transfers between
+         !!     modelled components
+         !!   - they should also include gains / losses due to air-sea 
+         !!     fluxes of C and O2, aeolian and seafloor inputs of Fe, and 
+         !!     inputs from seafloor "benthic buckets" (N, Si, Fe, C and 
+         !!     alkalinity)
+         !!   - however, they do not include the transfer of material to 
+         !!     "benthic buckets" by sedimenting slow- and fast-sinking
+         !!     detritus since these are separate 2D reservoirs
+         !!   - consequently, for a given water column, the integrated
+         !!     fluxes should sum to the "loss" of material to the "benthic
+         !!     buckets"
+         !!   - if they do not, this suggests that MEDUSA contains errors
+         !!     in its accounting (e.g. processes omitted from calculated
+         !!     fluxes)
+         !!   - here, the local integrated fluxes and benthic inputs (plus
+         !!     air-sea fluxes in the case of C) are reported together with
+         !!     the resulting error
+         !!   - only N, Si, C and alkalinity inventories considered; Fe and
+         !!     O2 overlooked because of wholesale loss (and addition, in 
+         !!     the case of O2) of these tracers within the water column
+         !!-----------------------------------------------------------------
+         !!
+         !! nitrogen
+         DO jj = 2,jpjm1
+            DO ji = 2,jpim1
+               if (tmask(ji,jj,1) == 1) then
+                  fq0 = fflx_n(ji,jj)
+                  fq1 = f_sbenin_n(ji,jj) + f_fbenin_n(ji,jj)
+                  fq2 = fq0 + fq1
+                  IF (lwp) write (numout,'(a,2i3,a,3f15.10)')               &
+                     'AXY N   cons: (i,j)=',ji,jj,', (flx,ben,err)=',      &
+                     fq0,fq1,fq2
+               ENDIF
+            ENDDO
+         ENDDO   
+         !! silicon
+         DO jj = 2,jpjm1
+            DO ji = 2,jpim1
+               if (tmask(ji,jj,1) == 1) then
+                  fq0 = fflx_si(ji,jj)
+                  fq1 = f_fbenin_si(ji,jj)
+                  fq2 = fq0 + fq1
+                  IF (lwp) write (numout,'(a,2i3,a,3f15.10)')               &
+                     'AXY Si  cons: (i,j)=',ji,jj,', (flx,ben,err)=',     &
+                     fq0,fq1,fq2
+               ENDIF
+            ENDDO
+         ENDDO   
+         !! carbon
+         DO jj = 2,jpjm1
+            DO ji = 2,jpim1
+               if (tmask(ji,jj,1) == 1) then
+                  fq0 = fflx_c(ji,jj)
+                  fq1 = f_sbenin_c(ji,jj) + f_fbenin_c(ji,jj) + f_fbenin_ca(ji,jj)
+                  fq2 = f_co2flux(ji,jj) * e3t_n(ji,jj,1)
+                  fq3 = fq0 + fq1
+                  IF (lwp) write (numout,'(a,2i3,a,4f15.10)')               &
+                    'AXY C   cons: (i,j)=',ji,jj,', (flx,ben,asf,err)=',  &
+                    fq0,fq1,fq2,fq3
+               ENDIF
+            ENDDO
+         ENDDO   
+         !! alkalinity
+         DO jj = 2,jpjm1
+            DO ji = 2,jpim1
+               if (tmask(ji,jj,1) == 1) then
+                  fq0 = fflx_a(ji,jj)
+                  fq1 = 2.0 * f_fbenin_ca(ji,jj)
+                  fq2 = fq0 + fq1
+                  IF (lwp) write (numout,'(a,2i3,a,3f15.10)')               &
+                     'AXY alk cons: (i,j)=',ji,jj,', (flx,ben,err)=',     &
+                     fq0,fq1,fq2
+               ENDIF
+            ENDDO
+         ENDDO   
+#  endif
+
       IF( ln_diatrc ) THEN
          !!-----------------------------------------------------------------
Index: branches/NERC/dev_r5518_GO6_CleanMedusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90
===================================================================
--- branches/NERC/dev_r5518_GO6_CleanMedusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90	(revision 8345)
+++ branches/NERC/dev_r5518_GO6_CleanMedusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90	(revision 8352)
@@ -350,6 +350,4 @@
       !!          x * 30d + 1*rdt(i.e: mod = rdt)   
       !!          ++ need to pass carb-chem output var through restarts
-      If ( ( kt == nittrc000 .AND. .NOT.ln_rsttr ) .OR.                      &
-           ( mod(kt*rdt,2592000.) == rdt ) ) THEN
       If ( (kt == nittrc000 .AND. .NOT.ln_rsttr) .OR.                        &
            ((86400*mod(nn_date0,100) + mod(kt*rdt,2592000.)) == rdt) ) THEN
