Index: branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_lim3_interp.F90
===================================================================
--- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_lim3_interp.F90	(revision 7068)
+++ branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_lim3_interp.F90	(revision 7069)
@@ -2,5 +2,5 @@
    !!=====================================================================================
    !!                       ***  MODULE agrif_lim3_interp ***
-   !! Nesting module :  interp surface ocean boundary condition over ice from a parent grid
+   !! Nesting module :  interp surface ice boundary condition from a parent grid
    !! Sea-Ice model  :  LIM 3.6 Sea ice model time-stepping
    !!=====================================================================================
Index: branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90
===================================================================
--- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 7068)
+++ branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 7069)
@@ -451,4 +451,46 @@
          e1v(:,:) =  ze1     ;      e2v(:,:) = ze1
          e1f(:,:) =  ze1     ;      e2f(:,:) = ze1
+
+      CASE ( 6 )                   ! clem: f-plane with irregular grid-spacing
+
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) '          f-plane with irregular grid-spacing (+- 10%)'
+         IF(lwp) WRITE(numout,*) '          the max is given by ppe1_m and ppe2_m' 
+
+         ! Position coordinates (in kilometers)
+         !                          ==========
+         glam0 = 0._wp
+         gphi0 = 0._wp
+         
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zti = FLOAT( ji - 1 + nimpp - 1 )         ;   ztj = FLOAT( jj - 1 + njmpp - 1 )
+               zui = FLOAT( ji - 1 + nimpp - 1 ) + 0.5   ;   zuj = FLOAT( jj - 1 + njmpp - 1 )
+               zvi = FLOAT( ji - 1 + nimpp - 1 )         ;   zvj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5
+               zfi = FLOAT( ji - 1 + nimpp - 1 ) + 0.5   ;   zfj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5
+
+               glamt(ji,jj) = glam0 + ppe1_m * 1.e-5 * zti
+               glamu(ji,jj) = glam0 + ppe1_m * 1.e-5 * zui
+               glamv(ji,jj) = glam0 + ppe1_m * 1.e-5 * zvi
+               glamf(ji,jj) = glam0 + ppe1_m * 1.e-5 * zfi
+   
+               gphit(ji,jj) = gphi0 + ppe2_m * 1.e-5 * ztj
+               gphiu(ji,jj) = gphi0 + ppe2_m * 1.e-5 * zuj
+               gphiv(ji,jj) = gphi0 + ppe2_m * 1.e-5 * zvj
+               gphif(ji,jj) = gphi0 + ppe2_m * 1.e-5 * zfj
+            END DO
+         END DO
+         
+         ! Horizontal scale factors (in meters)
+         !                              ======
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               e1t(ji,jj) = ppe1_m * EXP(-0.8/REAL(jpiglo**2)*(mi0(ji)-REAL(jpiglo+1)*0.5)**2)
+               e2t(ji,jj) = ppe2_m * EXP(-0.8/REAL(jpjglo**2)*(mj0(jj)-REAL(jpjglo+1)*0.5)**2)
+            END DO
+         END DO
+         e1u(:,:) = e1t(:,:)      ;      e2u(:,:) = e2t(:,:)
+         e1v(:,:) = e1t(:,:)      ;      e2v(:,:) = e2t(:,:)
+         e1f(:,:) = e1t(:,:)      ;      e2f(:,:) = e2t(:,:)
 
       CASE DEFAULT
Index: branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 7068)
+++ branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 7069)
@@ -135,4 +135,21 @@
       ! Build the vertical coordinate system
       ! ------------------------------------
+#if defined key_sas2D
+      WRITE(numout,*) ' domzgr: we use SAS2D (i.e. no ocean) with jpk=',jpk
+      mbathy(:,:) = 1   ;   bathy(:,:) = rn_hmin
+
+      gdept_0 (:,:,:) = rn_hmin
+      gdepw_0 (:,:,:) = rn_hmin   ;   gdep3w_0(:,:,:) = rn_hmin
+      gdept_1d(:)     = rn_hmin   ;   gdepw_1d(:)     = rn_hmin
+
+      e3t_0 (:,:,:) = rn_hmin
+      e3u_0 (:,:,:) = rn_hmin   ;   e3v_0 (:,:,:) = rn_hmin
+      e3f_0 (:,:,:) = rn_hmin   ;   e3w_0 (:,:,:) = rn_hmin
+      e3uw_0(:,:,:) = rn_hmin   ;   e3vw_0(:,:,:) = rn_hmin
+      e3t_1d(:)     = rn_hmin   ;   e3w_1d(:)     = rn_hmin
+
+      mikt(:,:) = 1   ;   mikv(:,:) = 1
+      miku(:,:) = 1   ;   mikf(:,:) = 1
+#else
                           CALL zgr_z            ! Reference z-coordinate system (always called)
                           CALL zgr_bat          ! Bathymetry fields (levels and meters)
@@ -154,4 +171,6 @@
       END IF
       !
+#endif
+      
       IF( nprint == 1 .AND. lwp )   THEN
          WRITE(numout,*) ' MIN val mbathy ', MINVAL( mbathy(:,:) ), ' MAX ', MAXVAL( mbathy(:,:) )
@@ -174,5 +193,4 @@
       !
    END SUBROUTINE dom_zgr
-
 
    SUBROUTINE zgr_z
Index: branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
===================================================================
--- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 7068)
+++ branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 7069)
@@ -102,5 +102,5 @@
 #endif
       CHARACTER(len=10)   :: clname
-      INTEGER             :: ji
+      INTEGER             :: ji, jkmin
       !
       REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: z_bnds
@@ -190,11 +190,12 @@
 
       ! Add vertical grid bounds
+      jkmin = MIN(2,jpk)  ! in case jpk=1 (i.e. sas2D)
 #if ! defined key_xios2
       z_bnds(:      ,1) = gdepw_1d(:)
-      z_bnds(1:jpkm1,2) = gdepw_1d(2:jpk)
+      z_bnds(1:jpkm1,2) = gdepw_1d(jkmin:jpk)
       z_bnds(jpk:   ,2) = gdepw_1d(jpk) + e3t_1d(jpk)
 #else
       z_bnds(1      ,:) = gdepw_1d(:)
-      z_bnds(2,1:jpkm1) = gdepw_1d(2:jpk)
+      z_bnds(2,1:jpkm1) = gdepw_1d(jkmin:jpk)
       z_bnds(2,jpk:   ) = gdepw_1d(jpk) + e3t_1d(jpk)
 #endif
@@ -205,14 +206,13 @@
 
 #if ! defined key_xios2
-      z_bnds(:    ,2)  = gdept_1d(:)
-      z_bnds(2:jpk,1)  = gdept_1d(1:jpkm1)
-      z_bnds(1    ,1)  = gdept_1d(1) - e3w_1d(1)
-#else
-      z_bnds(2,:    )  = gdept_1d(:)
-      z_bnds(1,2:jpk)  = gdept_1d(1:jpkm1)
-      z_bnds(1,1    )  = gdept_1d(1) - e3w_1d(1)
+      z_bnds(:        ,2) = gdept_1d(:)
+      z_bnds(jkmin:jpk,1) = gdept_1d(1:jpkm1)
+      z_bnds(1        ,1) = gdept_1d(1) - e3w_1d(1)
+#else
+      z_bnds(2,:        ) = gdept_1d(:)
+      z_bnds(1,jkmin:jpk) = gdept_1d(1:jpkm1)
+      z_bnds(1,1        ) = gdept_1d(1) - e3w_1d(1)
 #endif
       CALL iom_set_axis_attr( "depthw", bounds=z_bnds )
-
 
 # if defined key_floats
Index: branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90
===================================================================
--- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 7068)
+++ branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 7069)
@@ -162,5 +162,8 @@
                   &                               + avmv(ji,jj,jk) + avmv(ji,jj-1,jk)  )   &
                   &          + avtb(jk) * tmask(ji,jj,jk)
-               !                                            ! Add the background coefficient on eddy viscosity
+            END DO
+         END DO
+         DO jj = 2, jpjm1                                   ! Add the background coefficient on eddy viscosity
+            DO ji = 2, jpim1
                avmu(ji,jj,jk) = avmu(ji,jj,jk) + avmb(jk) * umask(ji,jj,jk)
                avmv(ji,jj,jk) = avmv(ji,jj,jk) + avmb(jk) * vmask(ji,jj,jk)
Index: branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/daymod.F90
===================================================================
--- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/daymod.F90	(revision 7068)
+++ branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/daymod.F90	(revision 7069)
@@ -268,5 +268,9 @@
 
       ! since we no longer call rst_opn, need to define nitrst here, used by ice restart routine
-      IF( kt == nit000 ) nitrst = nitend
+      IF( kt == nit000 )  THEN
+         nitrst = nitend
+         lrst_oce = .FALSE.  ! init restart ocean (done in rst_opn when not SAS)
+      ENDIF
+
       IF( MOD( kt - 1, nstock ) == 0 ) THEN
          ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment
Index: branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
===================================================================
--- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90	(revision 7068)
+++ branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90	(revision 7069)
@@ -49,7 +49,5 @@
    USE step            ! NEMO time-stepping                 (stp     routine)
    USE lib_mpp         ! distributed memory computing
-#if defined key_nosignedzero
    USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)
-#endif
 #if defined key_iomput
    USE xios
@@ -58,11 +56,11 @@
    USE sbcssm
    USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges
+   USE icbini          ! handle bergs, initialisation
    USE icbstp          ! handle bergs, calving, themodynamics and transport
-#if defined key_bdy
+
    USE bdyini          ! open boundary cond. setting       (bdy_init routine). clem: mandatory for LIM3
-   USE bdydta          ! open boundary cond. setting   (bdy_dta_init routine). clem: mandatory for LIM3
-#endif
+   USE bdydta          ! open boundary cond. setting   (bdy_dta_init routine)           - -
    USE bdy_par
-
+   
    IMPLICIT NONE
    PRIVATE
@@ -98,7 +96,7 @@
       !
 #if defined key_agrif
-      CALL Agrif_Init_Grids()      ! AGRIF: set the meshes
-#endif
-
+     CALL Agrif_Init_Grids()      ! AGRIF: set the meshes
+#endif
+      
       !                            !-----------------------!
       CALL nemo_init               !==  Initialisations  ==!
@@ -113,4 +111,7 @@
       CALL Agrif_Declare_Var_lim2  !  "      "   "   "      "  LIM
 # endif
+# if defined key_lim3
+      CALL Agrif_Declare_Var_lim3  !  "      "   "   "      "  LIM3 clem: useless?
+# endif
 #endif
       ! check that all process are still there... If some process have an error,
@@ -124,8 +125,12 @@
       !                            !-----------------------!
       istp = nit000
+
+#if defined key_agrif
+          CALL Agrif_Regrid()
+#endif
         
       DO WHILE ( istp <= nitend .AND. nstop == 0 )
 #if defined key_agrif
-         CALL Agrif_Step( stp )           ! AGRIF: time stepping
+         CALL stp                         ! AGRIF: time stepping
 #else
          CALL stp( istp )                 ! standard time stepping
@@ -148,7 +153,9 @@
       !
 #if defined key_agrif
-      CALL Agrif_ParentGrid_To_ChildGrid()
-      IF( nn_timing == 1 )   CALL timing_finalize
-      CALL Agrif_ChildGrid_To_ParentGrid()
+      IF( .NOT. Agrif_Root() ) THEN
+         CALL Agrif_ParentGrid_To_ChildGrid()
+         IF( nn_timing == 1 )   CALL timing_finalize
+         CALL Agrif_ChildGrid_To_ParentGrid()
+      ENDIF
 #endif
       IF( nn_timing == 1 )   CALL timing_finalize
@@ -287,5 +294,5 @@
          jpnij = jpni*jpnj
 #endif
-      END IF
+      ENDIF
 
       ! Calculate domain dimensions given calculated jpni and jpnj
@@ -301,8 +308,21 @@
 #endif
       ENDIF
-         jpk = jpkdta                                             ! third dim
+#if defined key_sas2D
+         jpk = 1                                             ! third dim
+         jpkm1 = 1                                           !   "           "
+#else
+         jpk = jpkdta                                        ! third dim
+         jpkm1 = jpk-1                                       !   "           "
+#endif
+#if defined key_agrif
+         ! simple trick to use same vertical grid as parent
+         ! but different number of levels: 
+         ! Save maximum number of levels in jpkdta, then define all vertical grids
+         ! with this number.
+         ! Suppress once vertical online interpolation is ok
+         IF(.NOT.Agrif_Root()) jpkdta = Agrif_Parent(jpkdta)
+#endif
          jpim1 = jpi-1                                            ! inner domain indices
          jpjm1 = jpj-1                                            !   "           "
-         jpkm1 = jpk-1                                            !   "           "
          jpij  = jpi*jpj                                          !  jpi x j
 
@@ -330,6 +350,5 @@
       ENDIF
 
-      ! Now we know the dimensions of the grid and numout has been set we can 
-      ! allocate arrays
+      ! Now we know the dimensions of the grid and numout has been set we can allocate arrays
       CALL nemo_alloc()
 
@@ -353,11 +372,11 @@
                             CALL dom_init   ! Domain
 
-      IF( ln_nnogather )    CALL nemo_northcomms   ! Initialise the northfold neighbour lists (must be done after the masks are defined)
-
-      IF( ln_ctl        )   CALL prt_ctl_init   ! Print control
+     IF( ln_nnogather )     CALL nemo_northcomms   ! Initialise the northfold neighbour lists (must be done after the masks are defined)
+
+      IF( ln_ctl      )     CALL prt_ctl_init   ! Print control
                             CALL day_init   ! model calendar (using both namelist and restart infos)
 
                             CALL sbc_init   ! Forcings : surface module 
-                            
+
       ! ==> clem: open boundaries init. is mandatory for LIM3 because ice BDY is not decoupled from  
       !           the environment of ocean BDY. Therefore bdy is called in both OPA and SAS modules. 
@@ -366,4 +385,5 @@
       IF( lk_bdy        )   CALL bdy_dta_init
       ! ==>
+                            CALL icb_init( rdt, nit000)   ! initialise icebergs instance
       
       IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler
@@ -514,38 +534,17 @@
       USE diawri    , ONLY: dia_wri_alloc
       USE dom_oce   , ONLY: dom_oce_alloc
+      USE oce 
 #if defined key_bdy   
       USE bdy_oce   , ONLY: bdy_oce_alloc
-      USE oce         ! clem: mandatory for LIM3 because needed for bdy arrays
-#else
-      USE oce       , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass
-#endif
-      !
-      INTEGER :: ierr,ierr1,ierr2,ierr3,ierr4,ierr5,ierr6,ierr7,ierr8
-      INTEGER :: jpm
+#endif
+      !
+      INTEGER :: ierr
       !!----------------------------------------------------------------------
       !
       ierr =        dia_wri_alloc   ()
       ierr = ierr + dom_oce_alloc   ()          ! ocean domain
+      ierr = ierr + oce_alloc       ()          ! (tsn...) needed for agrif and/or lim3 and bdy
 #if defined key_bdy
       ierr = ierr + bdy_oce_alloc   ()          ! bdy masks (incl. initialization)
-      ierr = ierr + oce_alloc       ()          ! (tsn...)
-#endif
-
-#if ! defined key_bdy
-       ALLOCATE( snwice_mass(jpi,jpj)  , snwice_mass_b(jpi,jpj),             &
-         &      snwice_fmass(jpi,jpj)  , STAT= ierr1 )
-      !
-      ! lim code currently uses surface temperature and salinity in tsn array for initialisation
-      ! and ub, vb arrays in ice dynamics, so allocate enough of arrays to use
-      ! clem: should not be needed. To be checked out
-      jpm = MAX(jp_tem, jp_sal)
-      ALLOCATE( tsn(jpi,jpj,1,jpm)  , STAT=ierr2 )
-      ALLOCATE( ub(jpi,jpj,1)       , STAT=ierr3 )
-      ALLOCATE( vb(jpi,jpj,1)       , STAT=ierr4 )
-      ALLOCATE( tsb(jpi,jpj,1,jpm)  , STAT=ierr5 )
-      ALLOCATE( sshn(jpi,jpj)       , STAT=ierr6 )
-      ALLOCATE( un(jpi,jpj,1)       , STAT=ierr7 )
-      ALLOCATE( vn(jpi,jpj,1)       , STAT=ierr8 )
-      ierr = ierr + ierr1 + ierr2 + ierr3 + ierr4 + ierr5 + ierr6  + ierr7 + ierr8
 #endif
       !
@@ -618,10 +617,9 @@
       INTEGER :: ifac, jl, inu
       INTEGER, PARAMETER :: ntest = 14
-      INTEGER :: ilfax(ntest)
+      INTEGER, DIMENSION(ntest) :: ilfax
+      !!----------------------------------------------------------------------
       !
       ! lfax contains the set of allowed factors.
-      data (ilfax(jl),jl=1,ntest) / 16384, 8192, 4096, 2048, 1024, 512, 256,  &
-         &                            128,   64,   32,   16,    8,   4,   2  /
-      !!----------------------------------------------------------------------
+      ilfax(:) = (/(2**jl,jl=ntest,1,-1)/)
 
       ! Clear the error flag and initialise output vars
@@ -721,5 +719,5 @@
                    nsndto = nsndto + 1
                    isendto(nsndto) = jn
-                END IF
+                ENDIF
           END DO
           nfsloop = 1
Index: branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90
===================================================================
--- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90	(revision 7068)
+++ branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90	(revision 7069)
@@ -82,32 +82,38 @@
       !
       IF( nn_timing == 1 )  CALL timing_start( 'sbc_ssm')
-
-  IF ( l_sasread ) THEN
-      IF( nfld_3d > 0 ) CALL fld_read( kt, 1, sf_ssm_3d )      !==   read data at kt time step   ==!
-      IF( nfld_2d > 0 ) CALL fld_read( kt, 1, sf_ssm_2d )      !==   read data at kt time step   ==!
-      ! 
-      IF( ln_3d_uve ) THEN
-         ssu_m(:,:) = sf_ssm_3d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity
-         ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
-         IF( lk_vvl )   e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1)    ! v-velocity 
+     
+      IF ( l_sasread ) THEN
+         IF( nfld_3d > 0 ) CALL fld_read( kt, 1, sf_ssm_3d )      !==   read data at kt time step   ==!
+         IF( nfld_2d > 0 ) CALL fld_read( kt, 1, sf_ssm_2d )      !==   read data at kt time step   ==!
+         ! 
+         IF( ln_3d_uve ) THEN
+            IF( lk_vvl )   e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1)    ! v-velocity 
+                           ssu_m(:,:) = sf_ssm_3d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity
+                           ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
+         ELSE
+            IF( lk_vvl )   e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1)    ! v-velocity 
+                           ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity
+                           ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
+         ENDIF
+         !
+         sst_m(:,:) = sf_ssm_2d(jf_tem)%fnow(:,:,1) * tmask(:,:,1)    ! temperature
+         sss_m(:,:) = sf_ssm_2d(jf_sal)%fnow(:,:,1) * tmask(:,:,1)    ! salinity
+         ssh_m(:,:) = sf_ssm_2d(jf_ssh)%fnow(:,:,1) * tmask(:,:,1)    ! sea surface height
+         IF( ln_read_frq ) THEN
+            frq_m(:,:) = sf_ssm_2d(jf_frq)%fnow(:,:,1) * tmask(:,:,1) ! solar penetration
+         ELSE
+            frq_m(:,:) = 1._wp
+         ENDIF
       ELSE
-         ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity
-         ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
-         IF( lk_vvl )   e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1)    ! v-velocity 
-      ENDIF
-      !
-      sst_m(:,:) = sf_ssm_2d(jf_tem)%fnow(:,:,1) * tmask(:,:,1)    ! temperature
-      sss_m(:,:) = sf_ssm_2d(jf_sal)%fnow(:,:,1) * tmask(:,:,1)    ! salinity
-      ssh_m(:,:) = sf_ssm_2d(jf_ssh)%fnow(:,:,1) * tmask(:,:,1)    ! sea surface height
-      IF( ln_read_frq )   frq_m(:,:) = sf_ssm_2d(jf_frq)%fnow(:,:,1) * tmask(:,:,1)    ! sea surface height
-
-   ELSE
-      sst_m(:,:) = 0.
-      sss_m(:,:) = 0.
-      ssu_m(:,:) = 0.
-      ssv_m(:,:) = 0.
-      ssh_m(:,:) = 0.
-   ENDIF
-      !
+         sst_m(:,:) = 0._wp
+         sss_m(:,:) = 0._wp
+         ssu_m(:,:) = 0._wp
+         ssv_m(:,:) = 0._wp
+         ssh_m(:,:) = 0._wp
+         e3t_m(:,:) = e3t_0(:,:,1) !clem: necessary at least for sas2D
+         frq_m(:,:) = 1._wp        !              - -
+         sshn (:,:) = 0._wp        !              - -
+      ENDIF
+      
       IF ( nn_ice == 1 ) THEN
          tsn(:,:,1,jp_tem) = sst_m(:,:)
@@ -118,5 +124,5 @@
       ub (:,:,1) = ssu_m(:,:)
       vb (:,:,1) = ssv_m(:,:)
-
+ 
       IF(ln_ctl) THEN                  ! print control
          CALL prt_ctl(tab2d_1=sst_m, clinfo1=' sst_m   - : ', mask1=tmask, ovlap=1   )
@@ -300,5 +306,4 @@
  
       CALL sbc_ssm( nit000 )   ! need to define ss?_m arrays used in limistate
-      IF( .NOT. ln_read_frq )   frq_m(:,:) = 1.
       l_initdone = .TRUE.    
       !
Index: branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90
===================================================================
--- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 7068)
+++ branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 7069)
@@ -267,5 +267,5 @@
       IF( lk_offline ) THEN
         nk_rnf(:,:) = 1
-        h_rnf (:,:) = fsdept(:,:,1)
+        h_rnf (:,:) = e3t_0(:,:,1)
       ENDIF
 
Index: branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 7068)
+++ branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 7069)
@@ -304,5 +304,5 @@
          IF(lwp) WRITE(numout,9000) jn, TRIM( ctrcnm(jn) ), zmean, zmin, zmax, zdrift
       END DO
-      WRITE(numout,*) 
+      IF(lwp) WRITE(numout,*) 
 9000  FORMAT(' tracer nb :',i2,'    name :',a10,'    mean :',e18.10,'    min :',e18.10, &
       &      '    max :',e18.10,'    drift :',e18.10, ' %')
