Index: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 7179)
+++ branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 7563)
@@ -86,4 +86,8 @@
       !!--------------------------------------------------------------------
       IF( nn_timing == 1 )   CALL timing_start('dia_ar5')
+
+      !Call to init moved to here so that we can call iom_use in the
+      !initialisation
+      IF( kt == nit000 )     CALL dia_ar5_init
  
       CALL wrk_alloc( jpi , jpj              , zarea_ssh , zbotpres, pe )
@@ -103,30 +107,30 @@
 
       !                     
-      IF( iom_use('sshthster') ) THEN
-      ztsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem)                    ! thermosteric ssh
-      ztsn(:,:,:,jp_sal) = sn0(:,:,:)
-      CALL eos( ztsn, zrhd, fsdept_n(:,:,:) )                       ! now in situ density using initial salinity
-      !
-      zbotpres(:,:) = 0._wp                        ! no atmospheric surface pressure, levitating sea-ice
-      DO jk = 1, jpkm1
-         zbotpres(:,:) = zbotpres(:,:) + fse3t(:,:,jk) * zrhd(:,:,jk)
-      END DO
-      IF( .NOT.lk_vvl ) THEN
-         IF ( ln_isfcav ) THEN
-            DO ji=1,jpi
-               DO jj=1,jpj
-                  zbotpres(ji,jj) = zbotpres(ji,jj) + sshn(ji,jj) * zrhd(ji,jj,mikt(ji,jj)) + riceload(ji,jj)
+      IF( iom_use('sshthster')) THEN
+         ztsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem)                    ! thermosteric ssh
+         ztsn(:,:,:,jp_sal) = sn0(:,:,:)
+         CALL eos( ztsn, zrhd, fsdept_n(:,:,:) )                       ! now in situ density using initial salinity
+         !
+         zbotpres(:,:) = 0._wp                        ! no atmospheric surface pressure, levitating sea-ice
+         DO jk = 1, jpkm1
+            zbotpres(:,:) = zbotpres(:,:) + fse3t(:,:,jk) * zrhd(:,:,jk)
+         END DO
+         IF( .NOT.lk_vvl ) THEN
+            IF ( ln_isfcav ) THEN
+               DO ji=1,jpi
+                  DO jj=1,jpj
+                     zbotpres(ji,jj) = zbotpres(ji,jj) + sshn(ji,jj) * zrhd(ji,jj,mikt(ji,jj)) + riceload(ji,jj)
+                  END DO
                END DO
-            END DO
-         ELSE
-            zbotpres(:,:) = zbotpres(:,:) + sshn(:,:) * zrhd(:,:,1)
+            ELSE
+               zbotpres(:,:) = zbotpres(:,:) + sshn(:,:) * zrhd(:,:,1)
+            END IF
          END IF
-      END IF
+      !                                         
+         zarho = SUM( area(:,:) * zbotpres(:,:) ) 
+         IF( lk_mpp )   CALL mpp_sum( zarho )
+         zssh_steric = - zarho / area_tot
+         CALL iom_put( 'sshthster', zssh_steric )
       ENDIF
-      !                                         
-      zarho = SUM( area(:,:) * zbotpres(:,:) ) 
-      IF( lk_mpp )   CALL mpp_sum( zarho )
-      zssh_steric = - zarho / area_tot
-      CALL iom_put( 'sshthster', zssh_steric )
       
       !                                         ! steric sea surface height
@@ -274,21 +278,23 @@
       IF( lk_mpp )   CALL mpp_sum( vol0 )
 
-        CALL iom_open ( 'sali_ref_clim_monthly', inum )
-        CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,1), 1  )
-        CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,2), 12 )
-        CALL iom_close( inum )
-
-      sn0(:,:,:) = 0.5_wp * ( zsaldta(:,:,:,1) + zsaldta(:,:,:,2) )        
-      sn0(:,:,:) = sn0(:,:,:) * tmask(:,:,:)
-      IF( ln_zps ) THEN               ! z-coord. partial steps
-         DO jj = 1, jpj               ! interpolation of salinity at the last ocean level (i.e. the partial step)
-            DO ji = 1, jpi
-               ik = mbkt(ji,jj)
-               IF( ik > 1 ) THEN
-                  zztmp = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) )
-                  sn0(ji,jj,ik) = ( 1._wp - zztmp ) * sn0(ji,jj,ik) + zztmp * sn0(ji,jj,ik-1)
-               ENDIF
+      IF( iom_use('sshthster')) THEN
+         CALL iom_open ( 'sali_ref_clim_monthly', inum )
+         CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,1), 1  )
+         CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,2), 12 )
+         CALL iom_close( inum )
+
+         sn0(:,:,:) = 0.5_wp * ( zsaldta(:,:,:,1) + zsaldta(:,:,:,2) )        
+         sn0(:,:,:) = sn0(:,:,:) * tmask(:,:,:)
+         IF( ln_zps ) THEN               ! z-coord. partial steps
+            DO jj = 1, jpj               ! interpolation of salinity at the last ocean level (i.e. the partial step)
+               DO ji = 1, jpi
+                  ik = mbkt(ji,jj)
+                  IF( ik > 1 ) THEN
+                     zztmp = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) )
+                     sn0(ji,jj,ik) = ( 1._wp - zztmp ) * sn0(ji,jj,ik) + zztmp * sn0(ji,jj,ik-1)
+                  ENDIF
+               END DO
             END DO
-         END DO
+         ENDIF
       ENDIF
       !
