Index: /trunk/NEMOGCM/CONFIG/SHARED/field_def.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 6350)
+++ /trunk/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 6351)
@@ -23,4 +23,5 @@
       <field_group id="grid_T" grid_ref="grid_T_2D" >
          <field id="e3t"          long_name="T-cell thickness"   standard_name="cell_thickness"   unit="m"   grid_ref="grid_T_3D"/>
+         <field id="e3t_0"        long_name="Initial T-cell thickness"   standard_name="ref_cell_thickness"   unit="m"   grid_ref="grid_T_3D"/>
 
          <field id="toce"         long_name="temperature"         standard_name="sea_water_potential_temperature"   unit="degC"     grid_ref="grid_T_3D"/>
@@ -181,4 +182,5 @@
       <field_group id="SBC" grid_ref="grid_T_2D" > <!-- time step automaticaly defined based on nn_fsbc -->
          <field id="empmr"        long_name="Net Upward Water Flux"                standard_name="water_flux_out_of_sea_ice_and_sea_water"                              unit="kg/m2/s"   />
+         <field id="empbmr"       long_name="Net Upward Water Flux at pre. tstep"  standard_name="water_flux_out_of_sea_ice_and_sea_water"                              unit="kg/m2/s"   />
          <field id="saltflx"      long_name="Downward salt flux"                                                                                                        unit="1e-3/m2/s" />
          <field id="fmmflx"       long_name="Water flux due to freezing/melting"                                                                                        unit="kg/m2/s"   />
@@ -466,10 +468,12 @@
         <field id="woce_eiv"     long_name="EIV ocean vertical velocity"   standard_name="bolus_upward_sea_water_velocity"   unit="m/s" />
 
-        <!-- woce_eiv: available with key_trabbl_adv -->
+
         <field id="avt"          long_name="vertical eddy diffusivity"   standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" />
+        <field id="logavt"       long_name="logarithm of vertical eddy diffusivity"   standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" />
         <field id="avm"          long_name="vertical eddy viscosity"     standard_name="ocean_vertical_momentum_diffusivity"   unit="m2/s" />
 
         <!-- avs: available with key_zdfddm -->
         <field id="avs"          long_name="salt vertical eddy diffusivity"   standard_name="ocean_vertical_salt_diffusivity"   unit="m2/s" />
+        <field id="logavs"       long_name="logarithm of salt vertical eddy diffusivity"   standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" />
 
         <!-- avt_evd and avm_evd: available with ln_zdfevd -->
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 6350)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 6351)
@@ -140,13 +140,17 @@
       ENDIF
 
-      IF( ln_linssh ) THEN
-         CALL iom_put( "e3t" , e3t_n(:,:,:) )
-         CALL iom_put( "e3u" , e3u_n(:,:,:) )
-         CALL iom_put( "e3v" , e3v_n(:,:,:) )
-         CALL iom_put( "e3w" , e3w_n(:,:,:) )
-      ENDIF
+      ! Output of initial vertical scale factor
+      CALL iom_put("e3t_0", e3t_0(:,:,:) )
+      CALL iom_put("e3u_0", e3t_0(:,:,:) )
+      CALL iom_put("e3v_0", e3t_0(:,:,:) )
+      !
+      CALL iom_put( "e3t" , fse3t_n(:,:,:) )
+      CALL iom_put( "e3u" , fse3u_n(:,:,:) )
+      CALL iom_put( "e3v" , fse3v_n(:,:,:) )
+      CALL iom_put( "e3w" , fse3w_n(:,:,:) )
+      IF( iom_use("e3tdef") )   &
+         CALL iom_put( "e3tdef"  , ( ( fse3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 )
 
       CALL iom_put( "ssh" , sshn )                 ! sea surface height
-      if( iom_use('ssh2') )   CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) )   ! square of sea surface height
       
       CALL iom_put( "toce", tsn(:,:,:,jp_tem) )    ! 3D temperature
@@ -228,4 +232,7 @@
       CALL iom_put( "avm" , avmu                       )    ! T vert. eddy visc. coef.
       CALL iom_put( "avs" , fsavs(:,:,:)               )    ! S vert. eddy diff. coef. (useful only with key_zdfddm)
+
+      IF( iom_use('logavt') )   CALL iom_put( "logavt", LOG( MAX( 1.e-20_wp, avt  (:,:,:) ) ) )
+      IF( iom_use('logavs') )   CALL iom_put( "logavs", LOG( MAX( 1.e-20_wp, fsavs(:,:,:) ) ) )
 
       IF ( iom_use("sstgrad") .OR. iom_use("sstgrad2") ) THEN
@@ -292,5 +299,7 @@
          CALL iom_put( "eken", rke )           
       ENDIF
-         
+      !
+      CALL iom_put( "hdiv", hdivn )                  ! Horizontal divergence
+      !
       IF( iom_use("u_masstr") .OR. iom_use("u_heattr") .OR. iom_use("u_salttr") ) THEN
          z3d(:,:,jpk) = 0.e0
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 6350)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 6351)
@@ -653,14 +653,4 @@
          ht_n(:,:) = ht_n(:,:) + e3t_n(:,:,jk) * tmask(:,:,jk)
       END DO
-
-      ! Write outputs
-      ! =============
-      CALL iom_put(     "e3t",   e3t_n(:,:,:) )
-      CALL iom_put(     "e3u",   e3u_n(:,:,:) )
-      CALL iom_put(     "e3v",   e3v_n(:,:,:) )
-      CALL iom_put(     "e3w",   e3w_n(:,:,:) )
-      CALL iom_put( "tpt_dep", gde3w_n(:,:,:) )
-      IF( iom_use("e3tdef") )   &
-         CALL iom_put( "e3tdef", ( ( e3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100. * tmask(:,:,:) ) ** 2 )
 
       ! write restart file
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 6350)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 6351)
@@ -430,5 +430,6 @@
       !                                                ! ---------------------------------------- !
       IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN
-         CALL iom_put( "empmr" , emp  - rnf )                   ! upward water flux
+         CALL iom_put( "empmr"  , emp    - rnf )                ! upward water flux
+         CALL iom_put( "empbmr" , emp_b  - rnf )                ! before upward water flux ( needed to recalculate the time evolution of ssh in offline )
          CALL iom_put( "saltflx", sfx  )                        ! downward salt flux  
                                                                 ! (includes virtual salt flux beneath ice 
