Index: /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/dia25h.F90
===================================================================
--- /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/dia25h.F90	(revision 10365)
+++ /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/dia25h.F90	(revision 10366)
@@ -22,8 +22,8 @@
    USE diatmb
 #if defined key_fabm
-   USE trc, ONLY: trn, visib
+   USE trc, ONLY: trn
    USE par_fabm
    USE st2d_fabm, ONLY: fabm_st2dn
-   USE fabm, ONLY: fabm_get_bulk_diagnostic_data, &
+   USE fabm, ONLY: fabm_get_interior_diagnostic_data, &
       &            fabm_get_horizontal_diagnostic_data
 #endif
@@ -53,5 +53,4 @@
    REAL(wp),SAVE, ALLOCATABLE,   DIMENSION(:,:,:)   :: fabm_bottom_25h
    REAL(wp),SAVE, ALLOCATABLE,   DIMENSION(:,:,:)   :: fabm_2d_25h
-   REAL(wp),SAVE, ALLOCATABLE,   DIMENSION(:,:,:)   :: fabm_visib_25h
 #endif
    INTEGER, SAVE :: cnt_25h     ! Counter for 25 hour means
@@ -182,8 +181,4 @@
          CALL ctl_stop( 'dia_25h: unable to allocate fabm_2d_25h' )   ;   RETURN
       ENDIF
-      ALLOCATE( fabm_visib_25h(jpi,jpj,jpk), STAT=ierror )
-      IF( ierror > 0 ) THEN
-         CALL ctl_stop( 'dia_25h: unable to allocate fabm_visib_25h' )   ;   RETURN
-      ENDIF
 #endif 
       ! ------------------------- !
@@ -216,5 +211,5 @@
       END DO
       DO jn = 1, jp_fabm_3d
-         fabm_3d_25h(:,:,:,jn) = fabm_get_bulk_diagnostic_data(model, jn)
+         fabm_3d_25h(:,:,:,jn) = fabm_get_interior_diagnostic_data(model, jn)
       END DO
       DO jn = 1, jp_fabm_surface
@@ -227,5 +222,4 @@
          fabm_2d_25h(:,:,jn) = fabm_get_horizontal_diagnostic_data(model,jn)
       END DO
-      fabm_visib_25h(:,:,:) = visib(:,:,:)
 #endif
 #if defined key_lim3 || defined key_lim2
@@ -333,5 +327,5 @@
       END DO
       DO jn = 1, jp_fabm_3d
-         fabm_3d_25h(:,:,:,jn) = fabm_3d_25h(:,:,:,jn) + fabm_get_bulk_diagnostic_data(model, jn)
+         fabm_3d_25h(:,:,:,jn) = fabm_3d_25h(:,:,:,jn) + fabm_get_interior_diagnostic_data(model, jn)
       END DO
       DO jn = 1, jp_fabm_surface
@@ -344,5 +338,4 @@
          fabm_2d_25h(:,:,jn) = fabm_2d_25h(:,:,jn) + fabm_get_horizontal_diagnostic_data(model,jn)
       END DO
-      fabm_visib_25h(:,:,:) = fabm_visib_25h(:,:,:) + visib(:,:,:)
 #endif
          cnt_25h = cnt_25h + 1
@@ -385,5 +378,4 @@
             fabm_bottom_25h(:,:,:)  = fabm_bottom_25h(:,:,:)  / 25.0_wp
             fabm_2d_25h(:,:,:)      = fabm_2d_25h(:,:,:)      / 25.0_wp
-            fabm_visib_25h(:,:,:)   = fabm_visib_25h(:,:,:)   / 25.0_wp
 #endif
 
@@ -427,6 +419,4 @@
                CALL iom_put( TRIM(model%horizontal_diagnostic_variables(jn)%name)//"25h", zw2d  )
             END DO
-            zw3d(:,:,:) = fabm_visib_25h(:,:,:)*tmask(:,:,:) + zmdi*(1.0-tmask(:,:,:))
-            CALL iom_put( "visib25h", zw3d  )
 #endif
 
@@ -478,5 +468,5 @@
       END DO
       DO jn = 1, jp_fabm_3d
-         fabm_3d_25h(:,:,:,jn) = fabm_get_bulk_diagnostic_data(model, jn)
+         fabm_3d_25h(:,:,:,jn) = fabm_get_interior_diagnostic_data(model, jn)
       END DO
       DO jn = 1, jp_fabm_surface
@@ -489,5 +479,4 @@
          fabm_2d_25h(:,:,jn) = fabm_get_horizontal_diagnostic_data(model,jn)
       END DO
-      fabm_visib_25h(:,:,:) = visib(:,:,:)
 #endif
             cnt_25h = 1
Index: /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90
===================================================================
--- /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90	(revision 10365)
+++ /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90	(revision 10366)
@@ -12,7 +12,7 @@
    USE wrk_nemo        ! working arrays
 #if defined key_fabm
-   USE trc, ONLY: trn, visib
+   USE trc, ONLY: trn
    USE par_fabm
-   USE fabm, ONLY: fabm_get_bulk_diagnostic_data
+   USE fabm, ONLY: fabm_get_interior_diagnostic_data
 #endif
 
@@ -177,13 +177,9 @@
          END DO
          DO jn = 1, jp_fabm_3d
-            CALL dia_calctmb( fabm_get_bulk_diagnostic_data(model, jn), zwtmb )
+            CALL dia_calctmb( fabm_get_interior_diagnostic_data(model, jn), zwtmb )
             CALL iom_put( "top_"//TRIM(model%diagnostic_variables(jn)%name) , zwtmb(:,:,1) )
             CALL iom_put( "mid_"//TRIM(model%diagnostic_variables(jn)%name) , zwtmb(:,:,2) )
             CALL iom_put( "bot_"//TRIM(model%diagnostic_variables(jn)%name) , zwtmb(:,:,3) )
          END DO
-         CALL dia_calctmb( visib(:,:,:), zwtmb )
-         CALL iom_put( "top_visib" , zwtmb(:,:,1) )
-         CALL iom_put( "mid_visib" , zwtmb(:,:,2) )
-         CALL iom_put( "bot_visib" , zwtmb(:,:,3) )
 #endif
       ELSE
Index: /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/par_fabm.F90
===================================================================
--- /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/par_fabm.F90	(revision 10365)
+++ /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/par_fabm.F90	(revision 10366)
@@ -28,5 +28,5 @@
                       jp_fabm_o2o,  jp_fabm_o3c,  &
                       jp_fabm_o3a,  jp_fabm_o3ph, &
-                      jp_fabm_o3pc, jp_fabm_xeps
+                      jp_fabm_o3pc
 
 #if defined key_fabm
Index: /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/trcini_fabm.F90
===================================================================
--- /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/trcini_fabm.F90	(revision 10365)
+++ /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/trcini_fabm.F90	(revision 10366)
@@ -18,6 +18,5 @@
    USE trcsms_fabm
    USE fabm_config,ONLY: fabm_create_model_from_yaml_file
-   USE fabm,ONLY: type_external_variable, fabm_initialize_library, &
-                  fabm_get_bulk_diagnostic_data
+   USE fabm,ONLY: type_external_variable, fabm_initialize_library
    USE inputs_fabm,ONLY: initialize_inputs,link_inputs, &
      type_input_variable,type_input_data,type_river_data, &
@@ -111,5 +110,4 @@
       jp_fabm_o3ph = fabm_diag_index( 'O3_pH' )
       jp_fabm_o3pc = fabm_diag_index( 'O3_pCO2' )
-      jp_fabm_xeps = fabm_diag_index( 'light_xEPS')
 
       IF (lwp) THEN
@@ -151,9 +149,4 @@
             CALL write_25hourm_xml(xml_unit,model%horizontal_diagnostic_variables(jn))
          END DO
-         WRITE (xml_unit,'(A)') '  <field id="visib" long_name="visibility" unit="m" default_value="1.e+20" grid_ref="grid_T_3D" />'
-         WRITE (xml_unit,'(A)') '  <field id="visib25h" long_name="visibility 25-hour mean" unit="m" default_value="1.e+20" grid_ref="grid_T_3D" />'
-         WRITE (xml_unit,'(A)') '  <field id="top_visib" long_name="Top-level visibility" unit="m" default_value="1.e+20" grid_ref="grid_T_2D" />'
-         WRITE (xml_unit,'(A)') '  <field id="mid_visib" long_name="Middle-level visibility" unit="m" default_value="1.e+20" grid_ref="grid_T_2D" />'
-         WRITE (xml_unit,'(A)') '  <field id="bot_visib" long_name="Bottom-level visibility" unit="m" default_value="1.e+20" grid_ref="grid_T_2D" />'
          WRITE (xml_unit,1000) ' </field_group>'
 
@@ -403,7 +396,4 @@
 #endif
 
-      ! Initialise visibility
-      visib(:,:,:) = 1.7 / fabm_get_bulk_diagnostic_data(model, jp_fabm_xeps)
-
       ! Log mapping of FABM states:
       IF (lwp) THEN
Index: /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/trcsms_fabm.F90
===================================================================
--- /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/trcsms_fabm.F90	(revision 10365)
+++ /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/trcsms_fabm.F90	(revision 10366)
@@ -37,5 +37,4 @@
 
    USE fabm
-   USE par_fabm
 
    IMPLICIT NONE
@@ -119,6 +118,4 @@
       CALL trc_bc_read  ( kt )       ! tracers: surface and lateral Boundary Conditions
       CALL trc_rnf_fabm ( kt ) ! River forcings
-      
-      visib(:,:,:) = 1.7 / fabm_get_bulk_diagnostic_data(model, jp_fabm_xeps)
 
       IF( l_trdtrc ) THEN      ! Save the trends in the mixed layer
Index: /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/trcwri_fabm.F90
===================================================================
--- /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/trcwri_fabm.F90	(revision 10365)
+++ /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/FABM/trcwri_fabm.F90	(revision 10366)
@@ -81,6 +81,4 @@
       INTEGER, INTENT( in )               :: kt
       INTEGER              :: jn
-      
-      REAL(wp), DIMENSION(jpi,jpj,jpk)    :: zw3d
 
 #if defined key_tracer_budget
@@ -107,6 +105,4 @@
              CALL iom_put( model%diagnostic_variables(jn)%name, fabm_get_bulk_diagnostic_data(model,jn))
       END DO
-      zw3d(:,:,:) = visib(:,:,:)*tmask(:,:,:) + 1.e+20*(1.0-tmask(:,:,:))
-      CALL iom_put( 'visib', zw3d )
 
       ! write 2D diagnostics in the file
Index: /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/trc.F90
===================================================================
--- /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/trc.F90	(revision 10365)
+++ /branches/UKMO/AMM15_v3_6_STABLE_package_collate_bgc_diagnostics/NEMOGCM/NEMO/TOP_SRC/trc.F90	(revision 10366)
@@ -149,7 +149,4 @@
    LOGICAL            , PUBLIC                                        ::  ln_diatrc      !: boolean term for additional diagnostic
    INTEGER            , PUBLIC                                        ::  nn_writedia    !: frequency of additional outputs
-#if defined key_fabm
-   REAL(wp)           , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::  visib          !: visibility
-#endif
 
    !! Biological trends
@@ -256,5 +253,4 @@
 ! FABM <<<+++
          &      ln_trc_sbc(jptra)     , ln_trc_cbc(jptra)     , ln_trc_obc(jptra)     ,       &
-         &      visib(jpi,jpj,jpk)    ,                                                       &
 #endif
 #if defined key_bdy
