Index: /NEMO/trunk/src/OCE/DIA/diawri.F90
===================================================================
--- /NEMO/trunk/src/OCE/DIA/diawri.F90	(revision 15135)
+++ /NEMO/trunk/src/OCE/DIA/diawri.F90	(revision 15136)
@@ -786,8 +786,10 @@
          CALL histdef( nid_T, "soshfldo", "Shortwave Radiation"                , "W/m2"   ,   &  ! qsr
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T, "somixhgt", "Turbocline Depth"                   , "m"      ,   &  ! hmld
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T, "somxl010", "Mixed Layer Depth 0.01"             , "m"      ,   &  ! hmlp
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
+         IF( ALLOCATED(hmld) ) THEN   ! zdf_mxl not called by SWE
+            CALL histdef( nid_T, "somixhgt", "Turbocline Depth"                   , "m"      ,   &  ! hmld
+               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
+            CALL histdef( nid_T, "somxl010", "Mixed Layer Depth 0.01"             , "m"      ,   &  ! hmlp
+               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
+         ENDIF
          CALL histdef( nid_T, "soicecov", "Ice fraction"                       , "[0,1]"  ,   &  ! fr_i
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
@@ -972,6 +974,8 @@
       CALL histwrite( nid_T, "sohefldo", it, qns + qsr     , ndim_hT, ndex_hT )   ! total heat flux
       CALL histwrite( nid_T, "soshfldo", it, qsr           , ndim_hT, ndex_hT )   ! solar heat flux
-      CALL histwrite( nid_T, "somixhgt", it, hmld          , ndim_hT, ndex_hT )   ! turbocline depth
-      CALL histwrite( nid_T, "somxl010", it, hmlp          , ndim_hT, ndex_hT )   ! mixed layer depth
+      IF( ALLOCATED(hmld) ) THEN   ! zdf_mxl not called by SWE
+         CALL histwrite( nid_T, "somixhgt", it, hmld          , ndim_hT, ndex_hT )   ! turbocline depth
+         CALL histwrite( nid_T, "somxl010", it, hmlp          , ndim_hT, ndex_hT )   ! mixed layer depth
+      ENDIF
       CALL histwrite( nid_T, "soicecov", it, fr_i          , ndim_hT, ndex_hT )   ! ice fraction   
       CALL histwrite( nid_T, "sowindsp", it, wndm          , ndim_hT, ndex_hT )   ! wind speed   
Index: /NEMO/trunk/src/OCE/IOM/restart.F90
===================================================================
--- /NEMO/trunk/src/OCE/IOM/restart.F90	(revision 15135)
+++ /NEMO/trunk/src/OCE/IOM/restart.F90	(revision 15136)
@@ -165,8 +165,6 @@
          CALL iom_rstput( kt, nitrst, numrow, 'ub'     , uu(:,:,:       ,Kbb) )
          CALL iom_rstput( kt, nitrst, numrow, 'vb'     , vv(:,:,:       ,Kbb) )
-         IF( .NOT.lk_SWE ) THEN
-            CALL iom_rstput( kt, nitrst, numrow, 'tb'  , ts(:,:,:,jp_tem,Kbb) )
-            CALL iom_rstput( kt, nitrst, numrow, 'sb'  , ts(:,:,:,jp_sal,Kbb) )
-         ENDIF
+         CALL iom_rstput( kt, nitrst, numrow, 'tb'  , ts(:,:,:,jp_tem,Kbb) )
+         CALL iom_rstput( kt, nitrst, numrow, 'sb'  , ts(:,:,:,jp_sal,Kbb) )
          !
 #if ! defined key_RK3
@@ -174,9 +172,7 @@
          CALL iom_rstput( kt, nitrst, numrow, 'un'     , uu(:,:,:       ,Kmm) )
          CALL iom_rstput( kt, nitrst, numrow, 'vn'     , vv(:,:,:       ,Kmm) )
-         IF( .NOT.lk_SWE ) THEN
-            CALL iom_rstput( kt, nitrst, numrow, 'tn'  , ts(:,:,:,jp_tem,Kmm) )
-            CALL iom_rstput( kt, nitrst, numrow, 'sn'  , ts(:,:,:,jp_sal,Kmm) )
-            CALL iom_rstput( kt, nitrst, numrow, 'rhop', rhop                 )
-         ENDIF
+         CALL iom_rstput( kt, nitrst, numrow, 'tn'  , ts(:,:,:,jp_tem,Kmm) )
+         CALL iom_rstput( kt, nitrst, numrow, 'sn'  , ts(:,:,:,jp_sal,Kmm) )
+         IF( .NOT.lk_SWE )   CALL iom_rstput( kt, nitrst, numrow, 'rhop', rhop )
 #endif
       ENDIF
@@ -288,8 +284,6 @@
       CALL iom_get( numror, jpdom_auto, 'ub'   , uu(:,:,:       ,Kbb), cd_type = 'U', psgn = -1._wp )
       CALL iom_get( numror, jpdom_auto, 'vb'   , vv(:,:,:       ,Kbb), cd_type = 'V', psgn = -1._wp )
-      IF( .NOT.lk_SWE ) THEN
-         CALL iom_get( numror, jpdom_auto, 'tb', ts(:,:,:,jp_tem,Kbb) )
-         CALL iom_get( numror, jpdom_auto, 'sb', ts(:,:,:,jp_sal,Kbb) )
-      ENDIF
+      CALL iom_get( numror, jpdom_auto, 'tb', ts(:,:,:,jp_tem,Kbb) )
+      CALL iom_get( numror, jpdom_auto, 'sb', ts(:,:,:,jp_sal,Kbb) )
 #else
       !                             !*  Read Kmm fields   (MLF only)
@@ -297,8 +291,6 @@
       CALL iom_get( numror, jpdom_auto, 'un'   , uu(:,:,:       ,Kmm), cd_type = 'U', psgn = -1._wp )
       CALL iom_get( numror, jpdom_auto, 'vn'   , vv(:,:,:       ,Kmm), cd_type = 'V', psgn = -1._wp )
-      IF( .NOT.lk_SWE ) THEN
-         CALL iom_get( numror, jpdom_auto, 'tn', ts(:,:,:,jp_tem,Kmm) )
-         CALL iom_get( numror, jpdom_auto, 'sn', ts(:,:,:,jp_sal,Kmm) )
-      ENDIF
+      CALL iom_get( numror, jpdom_auto, 'tn', ts(:,:,:,jp_tem,Kmm) )
+      CALL iom_get( numror, jpdom_auto, 'sn', ts(:,:,:,jp_sal,Kmm) )
       !
       IF( l_1st_euler ) THEN        !*  Euler restart   (MLF only)
@@ -306,5 +298,5 @@
          uu(:,:,:  ,Kbb) = uu(:,:,:  ,Kmm)         ! all before fields set to now values
          vv(:,:,:  ,Kbb) = vv(:,:,:  ,Kmm)
-         IF( .NOT.lk_SWE ) ts(:,:,:,:,Kbb) = ts(:,:,:,:,Kmm)
+         ts(:,:,:,:,Kbb) = ts(:,:,:,:,Kmm)
          !
       ELSE                          !* Leap frog restart   (MLF only)
@@ -312,8 +304,6 @@
          CALL iom_get( numror, jpdom_auto, 'ub'   , uu(:,:,:       ,Kbb), cd_type = 'U', psgn = -1._wp )
          CALL iom_get( numror, jpdom_auto, 'vb'   , vv(:,:,:       ,Kbb), cd_type = 'V', psgn = -1._wp )
-         IF( .NOT.lk_SWE ) THEN
-            CALL iom_get( numror, jpdom_auto, 'tb', ts(:,:,:,jp_tem,Kbb) )
-            CALL iom_get( numror, jpdom_auto, 'sb', ts(:,:,:,jp_sal,Kbb) )
-         ENDIF
+         CALL iom_get( numror, jpdom_auto, 'tb', ts(:,:,:,jp_tem,Kbb) )
+         CALL iom_get( numror, jpdom_auto, 'sb', ts(:,:,:,jp_sal,Kbb) )
       ENDIF
 #endif
Index: /NEMO/trunk/src/OCE/TRA/eosbn2.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/eosbn2.F90	(revision 15135)
+++ /NEMO/trunk/src/OCE/TRA/eosbn2.F90	(revision 15136)
@@ -1081,5 +1081,5 @@
          !
          zt  = ctmp   (ji,jj) * z1_T0
-         zs  = SQRT( ABS( psal(ji,jj) + zdeltaS ) * r1_S0 )
+         zs  = SQRT( ABS( psal(ji,jj) + zdeltaS ) * z1_S0 )
          ztm = tmask(ji,jj,1)
          !
Index: /NEMO/trunk/src/SWE/nemogcm.F90
===================================================================
--- /NEMO/trunk/src/SWE/nemogcm.F90	(revision 15135)
+++ /NEMO/trunk/src/SWE/nemogcm.F90	(revision 15136)
@@ -22,4 +22,6 @@
    USE bdyini         ! open boundary cond. setting       (bdy_init routine)
    USE istate         ! initial state setting          (istate_init routine)
+   USE wet_dry , ONLY : ln_wd_il, ln_wd_dl, ln_wd_dl_bc   ! switch off wetting and drying
+   USE isf_oce , ONLY : ln_isf           ! ice shelf
    USE trd_oce , ONLY : l_trddyn         ! dynamical trend logical
 #if defined key_RK3
@@ -297,4 +299,5 @@
       !
                            CALL     phy_cst         ! Physical constants
+                           ln_wd_il = .FALSE.   ;   ln_wd_dl = .FALSE.   ;   ln_wd_dl_bc = .FALSE.  ! No wetting and drying
       !
       !                                             ! SWE: Set rho0 and associated variables (eosbn2 not used)
@@ -317,4 +320,7 @@
 
       !                                      ! Ocean physics                                    
+      !                                         ! Vertical physics
+                           ln_zdfddm = .FALSE.   ;   ln_zad_Aimp = .FALSE.   ;   ln_zdfosm = .FALSE.   ! used in diawri
+                           avt(:,:,:) = 0._wp    ;   avm(:,:,:) = 0._wp                                ! used in diawri
       !                                         ! Lateral physics
                            CALL ldf_dyn_init      ! Lateral ocean momentum physics
@@ -324,4 +330,9 @@
                            CALL dyn_vor_init         ! vorticity term including Coriolis
                            CALL dyn_ldf_init         ! lateral mixing
+
+      !                                      ! Icebergs
+                           ln_icebergs = .false.
+      !                                      ! ice shelf
+                           ln_isf = .false.
 
       !                                      ! Diagnostics
Index: /NEMO/trunk/tests/SWG/MY_SRC/usrdef_sbc.F90
===================================================================
--- /NEMO/trunk/tests/SWG/MY_SRC/usrdef_sbc.F90	(revision 15135)
+++ /NEMO/trunk/tests/SWG/MY_SRC/usrdef_sbc.F90	(revision 15136)
@@ -72,4 +72,5 @@
       sfx (:,:) = 0._wp
       qns (:,:) = 0._wp
+      qsr (:,:) = 0._wp
 
       ! ---------------------------- !
