Index: branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90	(revision 9292)
+++ branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90	(revision 9296)
@@ -50,20 +50,6 @@
    USE ice
 #endif
-#if defined key_hadocc
-   USE trc, ONLY: trn, &
-      &     pgrow_avg, &
-      &     ploss_avg, &
-      &     phyt_avg,  &
-      &     mld_max,   &
-      &     HADOCC_CHL
-   USE had_bgc_const, ONLY: cchl_p
-   USE par_hadocc
-#elif defined key_medusa && defined key_foam_medusa
-   USE trc, ONLY: trn
-   USE sms_medusa, ONLY: pgrow_avg, &
-      &                  ploss_avg, &
-      &                  phyt_avg,  &
-      &                  mld_max
-   USE par_medusa
+#if defined key_top
+   USE asmbgc, ONLY: asm_bgc_bkg_wri
 #endif
    IMPLICIT NONE
@@ -138,39 +124,9 @@
 !            CALL iom_rstput( kt, nitbkg_r, inum, 'gcx'    , gcx               )
             CALL iom_rstput( kt, nitbkg_r, inum, 'avt'    , avt               )
-#if defined key_hadocc
-            CALL iom_rstput( kt, nitbkg_r, inum, 'pgrow_avg'   , pgrow_avg             )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'ploss_avg'   , ploss_avg             )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'phyt_avg'    , phyt_avg              )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'mld_max'     , mld_max               )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'hadocc_nut'  , trn(:,:,:,jp_had_nut) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'hadocc_phy'  , trn(:,:,:,jp_had_phy) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'hadocc_zoo'  , trn(:,:,:,jp_had_zoo) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'hadocc_pdn'  , trn(:,:,:,jp_had_pdn) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'hadocc_dic'  , trn(:,:,:,jp_had_dic) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'hadocc_alk'  , trn(:,:,:,jp_had_alk) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'hadocc_chl'  , HADOCC_CHL(:,:,1)     )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'hadocc_cchl' , cchl_p(:,:,1)         )
-#elif defined key_medusa && defined key_foam_medusa
-            CALL iom_rstput( kt, nitbkg_r, inum, 'pgrow_avg'   , pgrow_avg        )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'ploss_avg'   , ploss_avg        )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'phyt_avg'    , phyt_avg         )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'mld_max'     , mld_max          )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_chn'  , trn(:,:,:,jpchn) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_chd'  , trn(:,:,:,jpchd) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_phn'  , trn(:,:,:,jpphn) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_phd'  , trn(:,:,:,jpphd) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_pds'  , trn(:,:,:,jppds) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_zmi'  , trn(:,:,:,jpzmi) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_zme'  , trn(:,:,:,jpzme) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_din'  , trn(:,:,:,jpdin) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_sil'  , trn(:,:,:,jpsil) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_fer'  , trn(:,:,:,jpfer) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_det'  , trn(:,:,:,jpdet) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_dtc'  , trn(:,:,:,jpdtc) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_dic'  , trn(:,:,:,jpdic) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_alk'  , trn(:,:,:,jpalk) )
-            CALL iom_rstput( kt, nitbkg_r, inum, 'medusa_oxy'  , trn(:,:,:,jpoxy) )
+            !
+#if defined key_top
+            CALL asm_bgc_bkg_wri( kt, inum )
+            !
 #endif
-            !
             CALL iom_close( inum )
          ENDIF
