Index: branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/DIA/dia25h.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/DIA/dia25h.F90	(revision 13241)
+++ branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/DIA/dia25h.F90	(revision 13451)
@@ -209,5 +209,7 @@
       END DO
       DO jn = 1, jp_fabm_3d
-         fabm_3d_25h(:,:,:,jn) = model%get_interior_diagnostic_data(jn)
+         IF (iom_use(TRIM(model%interior_diagnostic_variables(jn)%name)//'25h')) THEN
+            fabm_3d_25h(:,:,:,jn) = model%get_interior_diagnostic_data(jn)
+         ENDIF
       END DO
       DO jn = 1, jp_fabm_surface
@@ -218,5 +220,7 @@
       END DO
       DO jn = 1, jp_fabm_2d
-         fabm_2d_25h(:,:,jn) = model%get_horizontal_diagnostic_data(jn)
+         IF (iom_use(TRIM(model%horizontal_diagnostic_variables(jn)%name)//'25h')) THEN
+            fabm_2d_25h(:,:,jn) = model%get_horizontal_diagnostic_data(jn)
+         ENDIF
       END DO
 #endif
@@ -325,5 +329,7 @@
       END DO
       DO jn = 1, jp_fabm_3d
-         fabm_3d_25h(:,:,:,jn) = fabm_3d_25h(:,:,:,jn) + model%get_interior_diagnostic_data(jn)
+         IF (iom_use(TRIM(model%interior_diagnostic_variables(jn)%name)//'25h')) THEN
+            fabm_3d_25h(:,:,:,jn) = fabm_3d_25h(:,:,:,jn) + model%get_interior_diagnostic_data(jn)
+         ENDIF
       END DO
       DO jn = 1, jp_fabm_surface
@@ -334,5 +340,7 @@
       END DO
       DO jn = 1, jp_fabm_2d
-         fabm_2d_25h(:,:,jn) = fabm_2d_25h(:,:,jn) + model%get_horizontal_diagnostic_data(jn)
+         IF (iom_use(TRIM(model%horizontal_diagnostic_variables(jn)%name)//'25h')) THEN
+            fabm_2d_25h(:,:,jn) = fabm_2d_25h(:,:,jn) + model%get_horizontal_diagnostic_data(jn)
+         ENDIF
       END DO
 #endif
@@ -402,6 +410,8 @@
             END DO
             DO jn = 1, jp_fabm_3d
-               zw3d(:,:,:) = fabm_3d_25h(:,:,:,jn)*tmask(:,:,:) + zmdi*(1.0-tmask(:,:,:))
-               CALL iom_put( TRIM(model%interior_diagnostic_variables(jn)%name)//"25h", zw3d  )
+               IF (iom_use(TRIM(model%interior_diagnostic_variables(jn)%name)//'25h')) THEN
+                  zw3d(:,:,:) = fabm_3d_25h(:,:,:,jn)*tmask(:,:,:) + zmdi*(1.0-tmask(:,:,:))
+                  CALL iom_put( TRIM(model%interior_diagnostic_variables(jn)%name)//"25h", zw3d  )
+               ENDIF
             END DO
             DO jn = 1, jp_fabm_surface
@@ -414,6 +424,8 @@
             END DO
             DO jn = 1, jp_fabm_2d
-               zw2d(:,:) = fabm_2d_25h(:,:,jn)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1))
-               CALL iom_put( TRIM(model%horizontal_diagnostic_variables(jn)%name)//"25h", zw2d  )
+               IF (iom_use(TRIM(model%horizontal_diagnostic_variables(jn)%name)//'25h')) THEN
+                  zw2d(:,:) = fabm_2d_25h(:,:,jn)*tmask(:,:,1) + zmdi*(1.0-tmask(:,:,1))
+                  CALL iom_put( TRIM(model%horizontal_diagnostic_variables(jn)%name)//"25h", zw2d  )
+               ENDIF
             END DO
 #endif
@@ -466,5 +478,7 @@
       END DO
       DO jn = 1, jp_fabm_3d
-         fabm_3d_25h(:,:,:,jn) = model%get_interior_diagnostic_data(jn)
+         IF (iom_use(TRIM(model%interior_diagnostic_variables(jn)%name)//'25h')) THEN
+            fabm_3d_25h(:,:,:,jn) = model%get_interior_diagnostic_data(jn)
+         ENDIF
       END DO
       DO jn = 1, jp_fabm_surface
@@ -475,5 +489,7 @@
       END DO
       DO jn = 1, jp_fabm_2d
-         fabm_2d_25h(:,:,jn) = model%get_horizontal_diagnostic_data(jn)
+         IF (iom_use(TRIM(model%horizontal_diagnostic_variables(jn)%name)//'25h')) THEN
+            fabm_2d_25h(:,:,jn) = model%get_horizontal_diagnostic_data(jn)
+         ENDIF
       END DO
 #endif
Index: branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90	(revision 13241)
+++ branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90	(revision 13451)
@@ -176,8 +176,12 @@
          END DO
          DO jn = 1, jp_fabm_3d
-            CALL dia_calctmb( model%get_interior_diagnostic_data(jn), zwtmb )
-            CALL iom_put( "top_"//TRIM(model%interior_diagnostic_variables(jn)%name) , zwtmb(:,:,1) )
-            CALL iom_put( "mid_"//TRIM(model%interior_diagnostic_variables(jn)%name) , zwtmb(:,:,2) )
-            CALL iom_put( "bot_"//TRIM(model%interior_diagnostic_variables(jn)%name) , zwtmb(:,:,3) )
+            IF ( iom_use('top_'//TRIM(model%interior_diagnostic_variables(jn)%name)) .OR. &
+               & iom_use('mid_'//TRIM(model%interior_diagnostic_variables(jn)%name)) .OR. &
+               & iom_use('bot_'//TRIM(model%interior_diagnostic_variables(jn)%name)) ) THEN
+               CALL dia_calctmb( model%get_interior_diagnostic_data(jn), zwtmb )
+               CALL iom_put( "top_"//TRIM(model%interior_diagnostic_variables(jn)%name) , zwtmb(:,:,1) )
+               CALL iom_put( "mid_"//TRIM(model%interior_diagnostic_variables(jn)%name) , zwtmb(:,:,2) )
+               CALL iom_put( "bot_"//TRIM(model%interior_diagnostic_variables(jn)%name) , zwtmb(:,:,3) )
+            ENDIF
          END DO
 #endif
Index: branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 13241)
+++ branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 13451)
@@ -493,5 +493,5 @@
       IF( lk_diaobs     ) THEN                  ! Observation & model comparison
                             CALL dia_obs_init            ! Initialize observational data
-                            CALL dia_obs( nit000 - 1 )   ! Observation operator for restart
+                            !CALL dia_obs( nit000 - 1 )   ! Observation operator for restart
       ENDIF
 
@@ -505,7 +505,7 @@
 
       IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler
-                            CALL dia_tmb_init  ! TMB outputs
-                            CALL dia_25h_init  ! 25h mean  outputs
-                            CALL dia_diaopfoam_init  ! FOAM operational output
+                            !CALL dia_tmb_init  ! TMB outputs
+                            !CALL dia_25h_init  ! 25h mean  outputs
+                            !CALL dia_diaopfoam_init  ! FOAM operational output
       !
    END SUBROUTINE nemo_init
Index: branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 13241)
+++ branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 13451)
@@ -96,4 +96,9 @@
                       CALL iom_init(      cxios_context          )  ! iom_put initialization
          IF( ln_crs ) CALL iom_init( TRIM(cxios_context)//"_crs" )  ! initialize context for coarse grid
+                      IF ( lk_fabm ) CALL nemo_fabm_start
+                      CALL dia_obs( nit000 - 1 )   ! Observation operator for restart
+                      CALL dia_tmb_init  ! TMB outputs
+                      CALL dia_25h_init  ! 25h mean  outputs
+                      CALL dia_diaopfoam_init  ! FOAM operational output
       ENDIF
 
Index: branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 13241)
+++ branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 13451)
@@ -126,4 +126,11 @@
    USE trcstp           ! passive tracer time-stepping      (trc_stp routine)
 #endif
+#if defined key_fabm
+   USE par_fabm, ONLY: lk_fabm
+   USE trcsms_fabm, ONLY: nemo_fabm_start
+#endif
+   USE diatmb          ! Top,middle,bottom output
+   USE dia25h          ! 25h mean output
+   USE diaopfoam       ! FOAM operational output
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
Index: branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/TOP_SRC/FABM/trcini_fabm.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/TOP_SRC/FABM/trcini_fabm.F90	(revision 13241)
+++ branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/TOP_SRC/FABM/trcini_fabm.F90	(revision 13451)
@@ -484,7 +484,7 @@
       IMPLICIT NONE
       
-      CHARACTER(LEN=256), INTENT(IN) :: state_name
-      
-      INTEGER                        :: jn
+      CHARACTER(LEN=*), INTENT(IN) :: state_name
+      
+      INTEGER                      :: jn
 
       !!----------------------------------------------------------------------
@@ -516,7 +516,7 @@
       IMPLICIT NONE
       
-      CHARACTER(LEN=256), INTENT(IN) :: diag_name
-      
-      INTEGER                        :: jn
+      CHARACTER(LEN=*), INTENT(IN) :: diag_name
+      
+      INTEGER                      :: jn
 
       !!----------------------------------------------------------------------
Index: branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/TOP_SRC/FABM/trcsms_fabm.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/TOP_SRC/FABM/trcsms_fabm.F90	(revision 13241)
+++ branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils366_fabmv1/NEMOGCM/NEMO/TOP_SRC/FABM/trcsms_fabm.F90	(revision 13451)
@@ -52,4 +52,5 @@
    PUBLIC   trc_sms_fabm_alloc      ! called by trcini_fabm.F90 module
    PUBLIC   trc_sms_fabm_check_mass ! called by trcwri_fabm.F90
+   PUBLIC   nemo_fabm_start
 
    ! Work arrays
@@ -556,8 +557,4 @@
       fabm_st2Db = fabm_st2Dn
 
-      ! Pointer to spectral heating term
-      swrad => model%get_data(model%get_interior_variable_id(standard_variables%net_rate_of_absorption_of_shortwave_energy_in_layer))
-
-
    END FUNCTION trc_sms_fabm_alloc
 
@@ -569,8 +566,19 @@
       DO jn=1,size(model%interior_diagnostic_variables)
          model%interior_diagnostic_variables(jn)%save = iom_use(model%interior_diagnostic_variables(jn)%name) &
-            .or. iom_use(TRIM(model%interior_diagnostic_variables(jn)%name)//'_VINT')
-      END DO
+            .or. iom_use(TRIM(model%interior_diagnostic_variables(jn)%name)//'_VINT') &
+            .or. iom_use(TRIM(model%interior_diagnostic_variables(jn)%name)//'25h') &
+            .or. iom_use('top_'//TRIM(model%interior_diagnostic_variables(jn)%name)) &
+            .or. iom_use('mid_'//TRIM(model%interior_diagnostic_variables(jn)%name)) &
+            .or. iom_use('bot_'//TRIM(model%interior_diagnostic_variables(jn)%name))
+      END DO
+      model%interior_diagnostic_variables(jp_fabm_o3ta)%save = .TRUE.
+      model%interior_diagnostic_variables(jp_fabm_o3ph)%save = .TRUE.
+      model%interior_diagnostic_variables(jp_fabm_o3pc)%save = .TRUE.
+      model%interior_diagnostic_variables(jp_fabm_xeps)%save = .TRUE.
+      model%interior_diagnostic_variables(jp_fabm_pgrow)%save = .TRUE.
+      model%interior_diagnostic_variables(jp_fabm_ploss)%save = .TRUE.
       DO jn=1,size(model%horizontal_diagnostic_variables)
-         model%horizontal_diagnostic_variables(jn)%save = iom_use(model%horizontal_diagnostic_variables(jn)%name)
+         model%horizontal_diagnostic_variables(jn)%save = iom_use(model%horizontal_diagnostic_variables(jn)%name) &
+            .or. iom_use(TRIM(model%horizontal_diagnostic_variables(jn)%name)//'25h')
       END DO
 
@@ -580,4 +588,10 @@
 
       started = .TRUE.
+
+      IF( ln_qsr_spec ) THEN
+         ! Pointer to spectral heating term
+         swrad => model%get_data(model%get_interior_variable_id(standard_variables%net_rate_of_absorption_of_shortwave_energy_in_layer))
+      ENDIF
+
    END SUBROUTINE
 
