Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90	(revision 2475)
@@ -15,6 +15,9 @@
    IMPLICIT NONE
    PRIVATE
+   
+   INTEGER , PUBLIC ::   numit     !: ice iteration index
+   REAL(wp), PUBLIC ::   rdt_ice   !: ice time step
 
-   !!* Share parameters namelist (namicerun read in iceini) *
+   !                                                                     !!* namicerun read in iceini  *
    CHARACTER(len=32)     , PUBLIC ::   cn_icerst_in  = "restart_ice_in"   !: suffix of ice restart name (input)
    CHARACTER(len=32)     , PUBLIC ::   cn_icerst_out = "restart_ice"      !: suffix of ice restart name (output)
@@ -22,33 +25,32 @@
    LOGICAL               , PUBLIC ::   ln_limdmp     = .FALSE.            !: Ice damping
    LOGICAL               , PUBLIC ::   ln_nicep      = .TRUE.             !: flag grid points output (T) or not (F)
-   REAL(wp)              , PUBLIC ::   hsndif        = 0.e0               !: computation of temp. in snow (0) or not (9999)
-   REAL(wp)              , PUBLIC ::   hicdif        = 0.e0               !: computation of temp. in ice (0) or not (9999)
-   REAL(wp), DIMENSION(2), PUBLIC ::   acrit = (/ 1.e-06 , 1.e-06 /)      !: minimum fraction for leads in 
-   !                                                                      !: north and south hemisphere
-   !!* ice-dynamic namelist (namicedyn) *
-   INTEGER , PUBLIC ::   nbiter = 1         !: number of sub-time steps for relaxation
-   INTEGER , PUBLIC ::   nbitdr = 250       !: maximum number of iterations for relaxation
-   INTEGER , PUBLIC ::   nevp   =   360     !: number of EVP subcycling iterations
-   INTEGER , PUBLIC ::   telast =  3600     !: timescale for EVP elastic waves
-   REAL(wp), PUBLIC ::   rdt_ice            !: ice time step
-   REAL(wp), PUBLIC ::   epsd   = 1.0e-20   !: tolerance parameter for dynamic
-   REAL(wp), PUBLIC ::   alpha  = 0.5       !: coefficient for semi-implicit coriolis
-   REAL(wp), PUBLIC ::   dm     = 0.6e+03   !: diffusion constant for dynamics
-   REAL(wp), PUBLIC ::   om     = 0.5       !: relaxation constant
-   REAL(wp), PUBLIC ::   resl   = 5.0e-05   !: maximum value for the residual of relaxation
-   REAL(wp), PUBLIC ::   cw     = 5.0e-03   !: drag coefficient for oceanic stress
-   REAL(wp), PUBLIC ::   angvg  = 0.e0      !: turning angle for oceanic stress
-   REAL(wp), PUBLIC ::   pstar  = 1.0e+04   !: first bulk-rheology parameter
-   REAL(wp), PUBLIC ::   c_rhg  = 20.e0     !: second bulk-rhelogy parameter
-   REAL(wp), PUBLIC ::   etamn  = 0.e+07    !: minimun value for viscosity
-   REAL(wp), PUBLIC ::   creepl = 2.e-08    !: creep limit
-   REAL(wp), PUBLIC ::   ecc    = 2.e0      !: eccentricity of the elliptical yield curve
-   REAL(wp), PUBLIC ::   ahi0   = 350.e0    !: sea-ice hor. eddy diffusivity coeff. (m2/s)
-   REAL(wp), PUBLIC ::   alphaevp = 1.e0    !: coefficient for the solution of EVP int. stresses
+   REAL(wp)              , PUBLIC ::   hsndif        = 0._wp              !: snow temp. computation (0) or not (9999)
+   REAL(wp)              , PUBLIC ::   hicdif        = 0._wp              !: ice  temp. computation (0) or not (9999)
+   REAL(wp), DIMENSION(2), PUBLIC ::   acrit = (/ 1.e-6_wp , 1.e-6_wp /)  !: minimum lead fraction in the 2 hemisphere
+   
+   !                                          !!* ice-dynamic namelist (namicedyn) *
+   INTEGER , PUBLIC ::   nbiter =    1         !: number of sub-time steps for relaxation
+   INTEGER , PUBLIC ::   nbitdr =  250         !: maximum number of iterations for relaxation
+   INTEGER , PUBLIC ::   nevp   =  360         !: number of EVP subcycling iterations
+   INTEGER , PUBLIC ::   telast = 3600         !: timescale for EVP elastic waves
+   REAL(wp), PUBLIC ::   epsd   = 1.0e-20_wp   !: tolerance parameter for dynamic
+   REAL(wp), PUBLIC ::   alpha  = 0.5_wp       !: coefficient for semi-implicit coriolis
+   REAL(wp), PUBLIC ::   dm     = 0.6e+03_wp   !: diffusion constant for dynamics
+   REAL(wp), PUBLIC ::   om     = 0.5_wp       !: relaxation constant
+   REAL(wp), PUBLIC ::   resl   = 5.0e-05_wp   !: maximum value for the residual of relaxation
+   REAL(wp), PUBLIC ::   cw     = 5.0e-03_wp   !: drag coefficient for oceanic stress
+   REAL(wp), PUBLIC ::   angvg  = 0._wp        !: turning angle for oceanic stress
+   REAL(wp), PUBLIC ::   pstar  = 1.0e+04_wp   !: first bulk-rheology parameter
+   REAL(wp), PUBLIC ::   c_rhg  = 20._wp       !: second bulk-rhelogy parameter
+   REAL(wp), PUBLIC ::   etamn  = 0._wp        !: minimun value for viscosity
+   REAL(wp), PUBLIC ::   creepl = 2.e-08_wp    !: creep limit
+   REAL(wp), PUBLIC ::   ecc    = 2._wp        !: eccentricity of the elliptical yield curve
+   REAL(wp), PUBLIC ::   ahi0   = 350._wp      !: sea-ice hor. eddy diffusivity coeff. (m2/s)
+   REAL(wp), PUBLIC ::   alphaevp = 1._wp      !: coefficient for the solution of EVP int. stresses
 
-   REAL(wp), PUBLIC ::   usecc2             !:  = 1.0 / ( ecc * ecc )
-   REAL(wp), PUBLIC ::   rhoco              !: = rau0 * cw
-   REAL(wp), PUBLIC ::   sangvg, cangvg     !: sin and cos of the turning angle for ocean stress
-   REAL(wp), PUBLIC ::   pstarh             !: pstar / 2.0
+   REAL(wp), PUBLIC ::   usecc2                !:  = 1.0 / ( ecc * ecc )
+   REAL(wp), PUBLIC ::   rhoco                 !: = rau0 * cw
+   REAL(wp), PUBLIC ::   sangvg, cangvg        !: sin and cos of the turning angle for ocean stress
+   REAL(wp), PUBLIC ::   pstarh                !: pstar / 2.0
 
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   ahiu , ahiv   !: hor. diffusivity coeff. at ocean U- and V-points (m2/s)
@@ -58,5 +60,5 @@
    !!* Ice Rheology
 # if defined key_lim2_vp
-   !                                                       !!* VP rheology *
+   !                                                      !!* VP rheology *
    LOGICAL , PUBLIC ::   lk_lim2_vp = .TRUE.               !: Visco-Plactic reology flag 
    !
@@ -64,5 +66,5 @@
    !
 # else
-   !                                                       !!* EVP rheology *
+   !                                                      !!* EVP rheology *
    LOGICAL , PUBLIC::   lk_lim2_vp = .FALSE.               !: Visco-Plactic reology flag 
    !
@@ -96,17 +98,16 @@
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   rdmicif       !: Variation of ice mass
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qldif         !: heat balance of the lead (or of the open ocean)
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qcmif         !: Energy needed to bring the ocean surface layer until its freezing 
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qcmif         !: Energy needed to freeze the ocean surface layer
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   fdtcn         !: net downward heat flux from the ice to the ocean
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qdtcn         !: energy from the ice to the ocean point (at a factor 2)
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   thcm          !: part of the solar energy used in the lead heat budget
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   fstric        !: Solar flux transmitted trough the ice
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   ffltbif       !: Array linked with the max heat contained in brine pockets (?)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   ffltbif       !: linked with the max heat contained in brine pockets (?)
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   fscmbq        !: Linked with the solar flux below the ice (?)
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   fsbbq         !: Also linked with the solar flux below the ice (?)
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qfvbq         !: Array used to store energy in case of toral lateral ablation (?)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qfvbq         !: used to store energy in case of toral lateral ablation (?)
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   dmgwi         !: Variation of the mass of snow ice
-
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   u_ice, v_ice   !: two components of the ice   velocity at I-point (m/s)
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   u_oce, v_oce   !: two components of the ocean velocity at I-point (m/s)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   u_ice, v_ice  !: two components of the ice   velocity at I-point (m/s)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   u_oce, v_oce  !: two components of the ocean velocity at I-point (m/s)
 
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jplayersp1) ::   tbif  !: Temperature inside the ice/snow layer
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 2475)
@@ -32,12 +32,9 @@
    PUBLIC   ice_init_2               ! called by sbcice_lim_2.F90
 
-   INTEGER, PUBLIC ::   numit   !: iteration number
-
    !!----------------------------------------------------------------------
    !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010)
    !! $Id$ 
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -49,23 +46,21 @@
       !!----------------------------------------------------------------------
       !
-      ! Open the namelist file 
-      CALL ctl_opn( numnam_ice, 'namelist_ice', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp )      
-      CALL ice_run_2                    !  read in namelist some run parameters
-                 
-      ! Louvain la Neuve Ice model
-      rdt_ice = nn_fsbc * rdttra(1)
+      !                                ! Open the namelist file 
+      CALL ctl_opn( numnam_ice, 'namelist_ice', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
+      !    
+      CALL ice_run_2                   ! read in namelist some run parameters
+      !          
+      rdt_ice = nn_fsbc * rdttra(1)    ! sea-ice time step
       numit   = nit000 - 1
-
-      CALL lim_msh_2                  ! ice mesh initialization
-     
-      ! Initial sea-ice state
-      IF( .NOT.ln_rstart ) THEN
-         CALL lim_istate_2            ! start from rest: sea-ice deduced from sst
-      ELSE
-         CALL lim_rst_read_2          ! start from a restart file
+      !
+      CALL lim_msh_2                   ! ice mesh initialization
+      !
+      !                                ! Initial sea-ice state
+      IF( .NOT.ln_rstart ) THEN   ;   CALL lim_istate_2     ! start from rest: sea-ice deduced from sst
+      ELSE                        ;   CALL lim_rst_read_2   ! start from a restart file
       ENDIF
-      
-      tn_ice(:,:,1) = sist(:,:)         ! initialisation of ice temperature   
-      fr_i  (:,:) = 1.0 - frld(:,:)   ! initialisation of sea-ice fraction    
+      !
+      tn_ice(:,:,1) = sist(:,:)        ! initialisation of ice temperature   
+      fr_i  (:,:) = 1.0 - frld(:,:)    ! initialisation of sea-ice fraction    
       !
    END SUBROUTINE ice_init_2
@@ -86,8 +81,8 @@
       !!-------------------------------------------------------------------
       !                    
-      REWIND ( numnam_ice )                       ! Read Namelist namicerun 
-      READ   ( numnam_ice , namicerun )
-
-      IF(lwp) THEN
+      REWIND( numnam_ice )                      ! Read Namelist namicerun 
+      READ  ( numnam_ice , namicerun )
+      !
+      IF(lwp) THEN                              ! control print
          WRITE(numout,*)
          WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice'
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90	(revision 2475)
@@ -12,16 +12,14 @@
    !!   'key_lim2' :                                  LIM 2.0 sea-ice model
    !!----------------------------------------------------------------------
-   !!----------------------------------------------------------------------
    !!   lim_rst_opn_2   : open ice restart file
    !!   lim_rst_write_2 : write of the ice restart file 
    !!   lim_rst_read_2  : read  the ice restart file 
    !!----------------------------------------------------------------------
-   USE dom_oce         ! ocean space and time domain
-   USE ice_2
-   USE sbc_oce
-   USE sbc_ice
-
-   USE in_out_manager
-   USE iom
+   USE dom_oce          ! ocean domain
+   USE ice_2            ! LIM-2: sea-ice variables
+   USE sbc_oce          ! Surface Boundary Condition: ocean
+   USE sbc_ice          ! Surface Boundary Condition: sea-ice
+   USE in_out_manager   ! I/O manager
+   USE iom              ! I/O library
 
    IMPLICIT NONE
@@ -38,7 +36,6 @@
    !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010)
    !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
 
@@ -84,4 +81,5 @@
       !
    END SUBROUTINE lim_rst_opn_2
+
 
    SUBROUTINE lim_rst_write_2( kt )
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/ice.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/ice.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/ice.F90	(revision 2475)
@@ -1,36 +1,19 @@
 MODULE ice
+   !!======================================================================
+   !!                        ***  MODULE ice  ***
+   !! LIM-3 Sea Ice physics:  diagnostics variables of ice defined in memory
+   !!=====================================================================
+   !! History :  3.0  ! 2008-03  (M. Vancoppenolle) : original code LIM-3
+   !!----------------------------------------------------------------------
 #if defined key_lim3
    !!----------------------------------------------------------------------
    !!   'key_lim3' :                                   LIM3 sea-ice model
    !!----------------------------------------------------------------------
-   !! History :
-   !!   2.0  !  03-08  (C. Ethe)  F90: Free form and module
-   !!   3.0  !  08-03  (M. Vancoppenolle) : LIM3 !
-   !!----------------------------------------------------------------------
-   !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)
-   !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-   !! * Modules used
    USE par_ice          ! LIM sea-ice parameters
 
    IMPLICIT NONE
    PRIVATE
-   !!
+
    !!======================================================================
-   !!                        ***  MODULE ice  ***
-   !!
-   !!                           **************
-   !!                           * L I M  3.0 *
-   !!                           **************
-   !!
-   !!                         ''in ice we trust''
-   !!
-   !!                   This module contains the sea ice 
-   !!                 diagnostics variables of ice defined 
-   !!                             in memory
-   !!
-   !!======================================================================
-   !!
    !! LIM3 by the use of sweat, agile fingers and sometimes brain juice, 
    !!  was developed in Louvain-la-Neuve by : 
@@ -64,17 +47,11 @@
    !!    * Bouillon et al., in prep for 2008.
    !!
-   !!    Or the reference manual, that should be available by 2009
-   !!
+   !!    Or the reference manual, that should be available by 2010
    !!======================================================================
    !!                                                                     |
-   !!            *****************************************                |
-   !!            *                                       *                |
-   !! ************ I C E   S T A T E   V A R I A B L E S **************** |
-   !!            *                                       *                |
-   !!            *****************************************                |
+   !!              I C E   S T A T E   V A R I A B L E S                  |
    !!                                                                     |
    !! Introduction :                                                      |
    !! --------------                                                      |
-   !!                                                                     |
    !! Every ice-covered grid cell is characterized by a series of state   |
    !! variables. To account for unresolved spatial variability in ice     |
@@ -130,5 +107,4 @@
    !!                                                                     |
    !! ** Global variables                                                 |
-   !!                                                                     |
    !!-------------|-------------|---------------------------------|-------|
    !! a_i         | a_i_b       |    Ice concentration            |       |
@@ -145,5 +121,4 @@
    !!                                                                     |
    !! ** Equivalent variables                                             |
-   !!                                                                     |
    !!-------------|-------------|---------------------------------|-------|
    !!                                                                     |
@@ -179,15 +154,17 @@
    !! et_s        !      -      !    Total snow enthalpy          | 10^9 J| 
    !! bv_i        !      -      !    Mean relative brine volume   | ???   | 
-   !!                                                                     |
-   !!                                                                     |
    !!=====================================================================
 
-   LOGICAL, PUBLIC ::    &
-      con_i = .false.           ! switch for conservation test
+   LOGICAL, PUBLIC ::   con_i = .false.   ! switch for conservation test
 
    !!--------------------------------------------------------------------------
    !! * Share Module variables
    !!--------------------------------------------------------------------------
-   REAL(wp), PUBLIC ::   rdt_ice      !: ice time step
+   INTEGER , PUBLIC ::   nstart    !: iteration number of the begining of the run 
+   INTEGER , PUBLIC ::   nlast     !: iteration number of the end of the run 
+   INTEGER , PUBLIC ::   nitrun    !: number of iteration
+   INTEGER , PUBLIC ::   numit     !: iteration number
+   REAL(wp), PUBLIC ::   tpstot    !: time of the run in seconds
+   REAL(wp), PUBLIC ::   rdt_ice   !: ice time step
 
    INTEGER , PUBLIC ::   &     !!: ** ice-dynamic namelist (namicedyn) **
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90	(revision 2475)
@@ -4,4 +4,7 @@
    !!   Sea-ice model : LIM Sea ice model Initialization
    !!======================================================================
+   !! History :  3.0  ! 2008-03  (M. Vancoppenolle) LIM-3 original code
+   !!            3.3  ! 2010-12  (G. Madec) add call to lim_thd_init and lim_thd_sal_init
+   !!----------------------------------------------------------------------
 #if defined key_lim3
    !!----------------------------------------------------------------------
@@ -10,38 +13,29 @@
    !!   ice_init       : sea-ice model initialization
    !!----------------------------------------------------------------------
-   USE dom_oce
-   USE in_out_manager
-   USE sbc_oce         ! Surface boundary condition: ocean fields
-   USE sbc_ice         ! Surface boundary condition: ice fields
-   USE phycst          ! Define parameters for the routines
-   USE ice
-   USE limmsh
-   USE limistate
-   USE limrst
-   USE par_ice
-   USE limvar
-   USE lib_mpp
+   USE phycst         ! physical constants
+   USE dom_oce        ! ocean domain
+   USE sbc_oce        ! Surface boundary condition: ocean fields
+   USE sbc_ice        ! Surface boundary condition: ice fields
+   USE ice            ! LIM: sea-ice variables
+   USE limmsh         ! LIM: mesh
+   USE limistate      ! LIM: initial state
+   USE limrst         ! LIM: restart
+   USE limthd         ! LIM: ice thermodynamics
+   USE limthd_sal     ! LIM: ice thermodynamics: salinity
+   USE par_ice        ! LIM: sea-ice parameters
+   USE limvar         ! LIM: variables
+   USE in_out_manager ! I/O manager
+   USE lib_mpp        ! MPP library
 
    IMPLICIT NONE
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC ice_init                 ! called by opa.F90
-   PUBLIC lim_itd_ini
-
-   !! * Share Module variables
-   INTEGER , PUBLIC  ::   &  !:
-      nstart ,            &  !: iteration number of the begining of the run 
-      nlast  ,            &  !: iteration number of the end of the run 
-      nitrun ,            &  !: number of iteration
-      numit                  !: iteration number
-   REAL(wp), PUBLIC  ::   &  !:
-      tpstot                 !: time of the run in seconds
+   PUBLIC   ice_init   ! called by opa.F90
+
    !!----------------------------------------------------------------------
    !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)
    !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
 
@@ -51,52 +45,45 @@
       !!
       !! ** purpose :   
-      !!
-      !! History :
-      !!   2.0  !  02-08  (G. Madec)  F90: Free form and modules
-      !!   3.0  !  08-03  (M. Vancop) ITD, salinity, EVP-C
       !!----------------------------------------------------------------------
-
-      ! Open the namelist file 
+      !
+      !                                ! Open the namelist file 
       CALL ctl_opn( numnam_ice, 'namelist_ice', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp )
-
-      CALL ice_run                    !  read in namelist some run parameters
-
-      ! Louvain la Neuve Ice model
-      IF( nacc == 1 ) THEN
-         rdt_ice = nn_fsbc * rdtmin
-      ELSE
-         rdt_ice = nn_fsbc * rdt
-      ENDIF
-
-      CALL lim_msh                    ! ice mesh initialization
-
-      CALL lim_itd_ini                ! initialize the ice thickness
-      ! distribution
-      ! Initial sea-ice state
-      IF( .NOT.ln_rstart ) THEN
+      !
+      CALL ice_run                     ! namelist read some ice run parameters
+      !
+      CALL lim_thd_init                ! namelist read ice thermodynics parameters
+      !
+      CALL lim_thd_sal_init            ! namelist read ice salinity parameters
+      !
+      rdt_ice = nn_fsbc * rdttra(1)    ! sea-ice timestep
+      !
+      CALL lim_msh                     ! ice mesh initialization
+      !
+      CALL lim_itd_ini                 ! initialize the ice thickness distribution
+
+      !                                ! Initial sea-ice state
+      IF( .NOT.ln_rstart ) THEN              ! start from rest
          numit = 0
          numit = nit000 - 1
-         CALL lim_istate              ! start from rest: sea-ice deduced from sst
-         CALL lim_var_agg(1)          ! aggregate category variables in
-         ! bulk variables
-         CALL lim_var_glo2eqv         ! convert global variables in equivalent
-         ! variables
-      ELSE
-         CALL lim_rst_read            ! start from a restart file
-
+         CALL lim_istate                        ! start from rest: sea-ice deduced from sst
+         CALL lim_var_agg(1)                    ! aggregate category variables in bulk variables
+         CALL lim_var_glo2eqv                   ! convert global variables in equivalent variables
+      ELSE                                   ! start from a restart file
+         CALL lim_rst_read                      ! read the restart file
          numit = nit000 - 1
-         CALL lim_var_agg(1)          ! aggregate ice variables
-         CALL lim_var_glo2eqv         ! convert global var in equivalent variables
-      ENDIF
-
+         CALL lim_var_agg(1)                    ! aggregate ice variables
+         CALL lim_var_glo2eqv                   ! convert global var in equivalent variables
+      ENDIF
+      !
       fr_i(:,:) = at_i(:,:)           ! initialisation of sea-ice fraction
-
+      !
       nstart = numit  + nn_fsbc      
       nitrun = nitend - nit000 + 1 
       nlast  = numit  + nitrun 
-
-      IF( nstock == 0  )  nstock = nlast + 1
-
+      !
+      IF( nstock == 0  )   nstock = nlast + 1
+      !
    END SUBROUTINE ice_init
+
 
    SUBROUTINE ice_run
@@ -110,22 +97,17 @@
       !!
       !! ** input   :   Namelist namicerun
-      !!
-      !! history :
-      !!   2.0  !  03-08 (C. Ethe)  Original code
-      !!   3.0  !  08-03 (M. Vancop) LIM3
       !!-------------------------------------------------------------------
       NAMELIST/namicerun/ cn_icerst_in, cn_icerst_out, ln_limdyn, acrit, hsndif, hicdif, cai, cao, ln_nicep
       !!-------------------------------------------------------------------
-
-      !                                           ! Read Namelist namicerun 
-      REWIND ( numnam_ice )
-      READ   ( numnam_ice , namicerun )
-
+      !                    
+      REWIND( numnam_ice )                ! Read Namelist namicerun 
+      READ  ( numnam_ice , namicerun )
+      !
       IF( lk_mpp .AND. ln_nicep ) THEN
          ln_nicep = .FALSE.
          CALL ctl_warn( 'ice_run : specific control print for LIM3 desactivated with MPI' )
       ENDIF       
-
-      IF(lwp) THEN
+      !
+      IF(lwp) THEN                        ! control print
          WRITE(numout,*)
          WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice'
@@ -137,50 +119,24 @@
          WRITE(numout,*) '   atmospheric drag over sea ice                           = ', cai
          WRITE(numout,*) '   atmospheric drag over ocean                             = ', cao
-         WRITE(numout,*) '   Several ice points in the ice or not in ocean.output = ', ln_nicep
-      ENDIF
-
+         WRITE(numout,*) '   Several ice points in the ice or not in ocean.output    = ', ln_nicep
+      ENDIF
+      !
    END SUBROUTINE ice_run
+
 
    SUBROUTINE lim_itd_ini
       !!------------------------------------------------------------------
       !!                ***  ROUTINE lim_itd_ini ***
-      !! ** Purpose :
-      !!            Initializes the ice thickness distribution
-      !! ** Method  :
-      !!            Very simple. Currently there are no ice types in the
-      !!            model...
-      !!
-      !! ** Arguments :
-      !!           kideb , kiut : Starting and ending points on which the
-      !!                         the computation is applied
-      !!
-      !! ** Inputs / Ouputs : (global commons)
-      !!
-      !! ** External :
-      !!
-      !! ** References :
-      !!
-      !! ** History :
-      !!           (12-2005) Martin Vancoppenolle
-      !!
+      !!
+      !! ** Purpose :   Initializes the ice thickness distribution
+      !! ** Method  :   ...
       !!------------------------------------------------------------------
-      !! * Arguments
-
-      !! * Local variables
-      INTEGER ::   jl,       &   ! ice category dummy loop index
-         jm            ! ice types    dummy loop index
-
-      REAL(wp)  ::           &  ! constant values
-         zeps      =  1.0e-10,   & !
-         zc1                 ,   & !
-         zc2                 ,   & !
-         zc3                 ,   & !
-         zx1
-
+      INTEGER  ::   jl, jm               ! dummy loop index
+      REAL(wp) ::   zc1, zc2, zc3, zx1   ! local scalars
+      !!------------------------------------------------------------------
+
+      IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*) 'lim_itd_ini : Initialization of ice thickness distribution '
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
-
-      !!-- End of declarations
-      !!------------------------------------------------------------------------------
 
       !------------------------------------------------------------------------------!
@@ -220,22 +176,20 @@
       !- Thickness categories boundaries 
       !----------------------------------
-      hi_max(:) = 0.0
-      hi_max_typ(:,:) = 0.0
+      hi_max(:) = 0._wp
+      hi_max_typ(:,:) = 0._wp
 
       !- Type 1 - undeformed ice
-      zc1 = 3./REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1)
-      zc2 = 10.0*zc1
-      zc3 = 3.0
+      zc1 =  3._wp / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp )
+      zc2 = 10._wp * zc1
+      zc3 =  3._wp
 
       DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2)
-         zx1 = REAL(jl-1) / REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1)
-         hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1.0 + TANH ( zc3 * (zx1 - 1.0 ) ) )
+         zx1 = REAL( jl-1 , wp ) / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp )
+         hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1._wp + TANH( zc3 * (zx1 - 1._wp ) ) )
       END DO
 
       !- Fill in the hi_max_typ vector, useful in other circumstances
-      ! Tricky trick
-      ! hi_max_typ is actually not used in the code and will be removed in a
-      ! next flyspray at this time, the tricky trick will also be removed
-      ! Martin, march 08
+      ! Tricky trick: hi_max_typ is actually not used in the code and will be removed in a
+      ! next flyspray at this time, the tricky trick will also be removed (Martin, march 08)
       DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2)
          hi_max_typ(jl,1) = hi_max(jl)
@@ -252,11 +206,11 @@
          END DO
       ENDIF
-
+      !
       DO jl = 1, jpl
-         hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) / 2.0
-      END DO
-
+         hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) * 0.5_wp
+      END DO
+      !
       tn_ice(:,:,:) = t_su(:,:,:)
-
+      !
    END SUBROUTINE lim_itd_ini
 
@@ -268,7 +222,4 @@
    SUBROUTINE ice_init        ! Empty routine
    END SUBROUTINE ice_init
-
-   SUBROUTINE lim_itd_ini
-   END SUBROUTINE lim_itd_ini
 #endif
 
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limdia.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limdia.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limdia.F90	(revision 2475)
@@ -16,7 +16,4 @@
    USE ice             ! LIM-3: sea-ice variable
    USE par_ice         ! LIM-3: ice parameters
-!   USE ice_oce         ! LIM-3: ice-ocean share variables
-   USE iceini          ! LIM-3: sea-ice initialization
-   USE limistate       ! LIM-3: sea-ice initial state
    USE dom_ice         ! LIM-3: sea-ice domain
    USE dom_oce         ! ocean domain
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90	(revision 2475)
@@ -22,6 +22,4 @@
    USE sbc_oce         ! Surface boundary condition: ocean fields
    USE sbc_ice         ! Surface boundary condition: ice fields
-   USE iceini
-   USE limistate
    USE limrhg          ! ice rheology
    USE lbclnk
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90	(revision 2475)
@@ -4,4 +4,6 @@
    !!              Initialisation of diagnostics ice variables
    !!======================================================================
+   !! History :  2.0  ! 2004-01 (C. Ethe, G. Madec)  Original code
+   !!----------------------------------------------------------------------
 #if defined key_lim3
    !!----------------------------------------------------------------------
@@ -11,48 +13,40 @@
    !!   lim_istate_init :  initialization of ice state and namelist read
    !!----------------------------------------------------------------------
-   !! * Modules used
-   USE phycst
-   USE oce             ! dynamics and tracers variables
-   USE dom_oce
-   USE sbc_oce         ! Surface boundary condition: ocean fields
-   USE par_ice         ! ice parameters
-   USE eosbn2          ! equation of state
-   USE in_out_manager
-   USE dom_ice
-   USE ice
-   USE lbclnk
+   USE phycst           ! physical constant
+   USE oce              ! dynamics and tracers variables
+   USE dom_oce          ! ocean domain
+   USE sbc_oce          ! Surface boundary condition: ocean fields
+   USE eosbn2           ! equation of state
+   USE ice              ! sea-ice variables
+   USE par_ice          ! ice parameters
+   USE dom_ice          ! sea-ice domain
+   USE in_out_manager   ! I/O manager
+   USE lbclnk           ! lateral boundary condition - MPP exchanges
 
    IMPLICIT NONE
    PRIVATE
 
-   !! * Accessibility
-   PUBLIC lim_istate      ! routine called by lim_init.F90
-
-   !! * Module variables
-   REAL(wp) ::             & !!! ** init namelist (namiceini) **
-      ttest    = 2.0  ,    &  ! threshold water temperature for initial sea ice
-      hninn    = 0.5  ,    &  ! initial snow thickness in the north
-      hginn_u  = 2.5  ,    &  ! initial ice thickness in the north
-      aginn_u  = 0.7  ,    &  ! initial leads area in the north
-      hginn_d  = 5.0  ,    &  ! initial ice thickness in the north
-      aginn_d  = 0.25 ,    &  ! initial leads area in the north
-      hnins    = 0.1  ,    &  ! initial snow thickness in the south
-      hgins_u  = 1.0  ,    &  ! initial ice thickness in the south
-      agins_u  = 0.7  ,    &  ! initial leads area in the south
-      hgins_d  = 2.0  ,    &  ! initial ice thickness in the south
-      agins_d  = 0.2  ,    &  ! initial leads area in the south
-      sinn     = 6.301 ,   &  ! initial salinity 
-      sins     = 6.301
-
-   REAL(wp)  ::            &  ! constant values
-      zzero   = 0.0     ,  &
-      zone    = 1.0
+   PUBLIC   lim_istate      ! routine called by lim_init.F90
+
+   !                                  !!** init namelist (namiceini) **
+   REAL(wp) ::   ttest    = 2.0_wp     ! threshold water temperature for initial sea ice
+   REAL(wp) ::   hninn    = 0.5_wp     ! initial snow thickness in the north
+   REAL(wp) ::   hginn_u  = 2.5_wp     ! initial ice thickness in the north
+   REAL(wp) ::   aginn_u  = 0.7_wp     ! initial leads area in the north
+   REAL(wp) ::   hginn_d  = 5.0_wp     ! initial ice thickness in the north
+   REAL(wp) ::   aginn_d  = 0.25_wp    ! initial leads area in the north
+   REAL(wp) ::   hnins    = 0.1_wp     ! initial snow thickness in the south
+   REAL(wp) ::   hgins_u  = 1.0_wp     ! initial ice thickness in the south
+   REAL(wp) ::   agins_u  = 0.7_wp     ! initial leads area in the south
+   REAL(wp) ::   hgins_d  = 2.0_wp     ! initial ice thickness in the south
+   REAL(wp) ::   agins_d  = 0.2_wp     ! initial leads area in the south
+   REAL(wp) ::   sinn     = 6.301_wp   ! initial salinity 
+   REAL(wp) ::   sins     = 6.301_wp   !
 
    !!----------------------------------------------------------------------
    !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)
    !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
 
@@ -65,21 +59,11 @@
       !! ** Method  :   restart from a state defined in a binary file
       !!                or from arbitrary sea-ice conditions
-      !!
-      !! History :
-      !!   2.0  !  01-04  (C. Ethe, G. Madec)  Original code
-      !!--------------------------------------------------------------------
-
-      !! * Local variables
+      !!-------------------------------------------------------------------
       INTEGER  ::   ji, jj, jk, jl             ! dummy loop indices
-
-      REAL(wp) ::       &  ! temporary scalar
-         zeps6, zeps, ztmelts, &
-         epsi06
-      REAL(wp), DIMENSION(jpm) ::   &
-         zgfactorn, zhin, &
-         zgfactors, zhis
-      REAL(wp) ::  &
-         zvol, zare, zh, zh1, zh2, zh3, zan, zbn, zas, zbs 
-      REAL(wp), DIMENSION(jpi,jpj) ::   zidto    ! ice indicator
+      REAL(wp) ::   zeps6, zeps, ztmelts, epsi06   ! local scalars
+      REAL(wp) ::  zvol, zare, zh, zh1, zh2, zh3, zan, zbn, zas, zbs 
+      REAL(wp), DIMENSION(jpm)     ::   zgfactorn, zhin 
+      REAL(wp), DIMENSION(jpm)     ::   zgfactors, zhis
+      REAL(wp), DIMENSION(jpi,jpj) ::   zidto      ! ice indicator
       !--------------------------------------------------------------------
 
@@ -87,5 +71,5 @@
       ! 1) Preliminary things 
       !--------------------------------------------------------------------
-      epsi06 = 1.0e-6
+      epsi06 = 1.e-6_wp
 
       CALL lim_istate_init     !  reading the initials parameters of the ice
@@ -116,17 +100,17 @@
 
       ! constants for heat contents
-      zeps   = 1.0d-20
-      zeps6  = 1.0d-06
+      zeps   = 1.e-20_wp
+      zeps6  = 1.e-06_wp
 
       ! zgfactor for initial ice distribution
-      zgfactorn(:) = 0.0
-      zgfactors(:) = 0.0
+      zgfactorn(:) = 0._wp
+      zgfactors(:) = 0._wp
 
       ! first ice type
       DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2)
-         zhin (1)     = ( hi_max(jl-1) + hi_max(jl) ) / 2.0
-         zgfactorn(1) = zgfactorn(1) + exp(-(zhin(1)-hginn_u)*(zhin(1)-hginn_u)/2.0)
-         zhis (1)     = ( hi_max(jl-1) + hi_max(jl) ) / 2.0
-         zgfactors(1) = zgfactors(1) + exp(-(zhis(1)-hgins_u)*(zhis(1)-hgins_u)/2.0)
+         zhin (1)     = ( hi_max(jl-1) + hi_max(jl) ) * 0.5_wp
+         zgfactorn(1) = zgfactorn(1) + exp(-(zhin(1)-hginn_u)*(zhin(1)-hginn_u) * 0.5_wp )
+         zhis (1)     = ( hi_max(jl-1) + hi_max(jl) ) * 0.5_wp
+         zgfactors(1) = zgfactors(1) + exp(-(zhis(1)-hgins_u)*(zhis(1)-hgins_u) * 0.5_wp )
       END DO ! jl
       zgfactorn(1) = aginn_u / zgfactorn(1)
@@ -135,12 +119,12 @@
       ! -------------
       ! new distribution, polynom of second order, conserving area and volume
-      zh1 = 0.0
-      zh2 = 0.0
-      zh3 = 0.0
+      zh1 = 0._wp
+      zh2 = 0._wp
+      zh3 = 0._wp
       DO jl = 1, jpl
-         zh = ( hi_max(jl-1) + hi_max(jl) ) / 2.0
+         zh = ( hi_max(jl-1) + hi_max(jl) ) * 0.5_wp
          zh1 = zh1 + zh
-         zh2 = zh2 + zh*zh
-         zh3 = zh3 + zh*zh*zh
+         zh2 = zh2 + zh * zh
+         zh3 = zh3 + zh * zh * zh
       END DO
       IF(lwp) WRITE(numout,*) ' zh1 : ', zh1
@@ -148,7 +132,7 @@
       IF(lwp) WRITE(numout,*) ' zh3 : ', zh3
 
-      zvol = aginn_u*hginn_u
+      zvol = aginn_u * hginn_u
       zare = aginn_u
-      IF ( jpl .GE. 2 ) THEN
+      IF( jpl >= 2 ) THEN
          zbn = ( zvol*zh2 - zare*zh3 ) / ( zh2*zh2 - zh1*zh3)
          zan = ( zare - zbn*zh1 ) / zh2
@@ -160,7 +144,7 @@
       IF(lwp) WRITE(numout,*) ' zan : ', zan 
 
-      zvol = agins_u*hgins_u
+      zvol = agins_u * hgins_u
       zare = agins_u
-      IF ( jpl .GE. 2 ) THEN
+      IF( jpl >= 2 ) THEN
          zbs = ( zvol*zh2 - zare*zh3 ) / ( zh2*zh2 - zh1*zh3)
          zas = ( zare - zbs*zh1 ) / zh2
@@ -205,5 +189,5 @@
             !--- Northern hemisphere
             !----------------------------------------------------------------
-            IF( fcor(ji,jj) >= 0.e0 ) THEN    
+            IF( fcor(ji,jj) >= 0._wp ) THEN    
 
                !-----------------------
@@ -453,6 +437,6 @@
             ENDIF ! on fcor
 
-         ENDDO
-      ENDDO
+         END DO
+      END DO
 
       !--------------------------------------------------------------------
@@ -494,5 +478,4 @@
 
       DO jl = 1, jpl
-
          CALL lbc_lnk( a_i(:,:,jl)  , 'T', 1. )
          CALL lbc_lnk( v_i(:,:,jl)  , 'T', 1. )
@@ -500,5 +483,5 @@
          CALL lbc_lnk( smv_i(:,:,jl), 'T', 1. )
          CALL lbc_lnk( oa_i(:,:,jl) , 'T', 1. )
-
+         !
          CALL lbc_lnk( ht_i(:,:,jl) , 'T', 1. )
          CALL lbc_lnk( ht_s(:,:,jl) , 'T', 1. )
@@ -514,15 +497,15 @@
             CALL lbc_lnk(e_i(:,:,jk,jl), 'T', 1. )
          END DO
-
-         a_i (:,:,jl) = tms(:,:) * a_i(:,:,jl)
-
+         !
+         a_i(:,:,jl) = tms(:,:) * a_i(:,:,jl)
       END DO
 
       CALL lbc_lnk( at_i , 'T', 1. )
       at_i(:,:) = tms(:,:) * at_i(:,:)                       ! put 0 over land
-
+      !
       CALL lbc_lnk( fsbbq  , 'T', 1. )
-
+      !
    END SUBROUTINE lim_istate
+
 
    SUBROUTINE lim_istate_init
@@ -532,24 +515,17 @@
       !! ** Purpose : Definition of initial state of the ice 
       !!
-      !! ** Method : Read the namiceini namelist and check the parameter 
-      !!       values called at the first timestep (nit000)
+      !! ** Method :   Read the namiceini namelist and check the parameter 
+      !!             values called at the first timestep (nit000)
       !!
-      !! ** input : 
-      !!        Namelist namiceini
-      !!
-      !! history :
-      !!  8.5  ! 03-08 (C. Ethe) original code
+      !! ** input  :   namelist namiceini
       !!-----------------------------------------------------------------------------
-      NAMELIST/namiceini/ ttest, hninn, hginn_u, aginn_u, hginn_d, aginn_d, hnins, &
-         hgins_u, agins_u, hgins_d, agins_d, sinn, sins
+      NAMELIST/namiceini/ ttest, hninn, hginn_u, aginn_u, hginn_d, aginn_d, hnins,   &
+         &                hgins_u, agins_u, hgins_d, agins_d, sinn, sins
       !!-----------------------------------------------------------------------------
-
-      ! Define the initial parameters
-      ! -------------------------
-
-      ! Read Namelist namiceini 
-      REWIND ( numnam_ice )
+      !
+      REWIND ( numnam_ice )               ! Read Namelist namiceini 
       READ   ( numnam_ice , namiceini )
-      IF(lwp) THEN
+      !
+      IF(lwp) THEN                        ! control print
          WRITE(numout,*)
          WRITE(numout,*) 'lim_istate_init : ice parameters inititialisation '
@@ -569,5 +545,5 @@
          WRITE(numout,*) '   initial  ice salinity       in the south     sins       = ', sins
       ENDIF
-
+      !
    END SUBROUTINE lim_istate_init
 
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 2475)
@@ -19,5 +19,4 @@
    USE sbc_oce          ! Surface boundary condition: ocean fields
    USE thd_ice
-   USE limistate
    USE in_out_manager
    USE ice
@@ -25,5 +24,4 @@
    USE limthd_lac
    USE limvar
-   USE iceini
    USE limcons
    USE prtctl           ! Print control
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limitd_th.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limitd_th.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limitd_th.F90	(revision 2475)
@@ -1,7 +1,3 @@
 MODULE limitd_th
-#if defined key_lim3
-   !!----------------------------------------------------------------------
-   !!   'key_lim3' :                                   LIM3 sea-ice model
-   !!----------------------------------------------------------------------
    !!======================================================================
    !!                       ***  MODULE limitd_th ***
@@ -9,7 +5,9 @@
    !!                   computation of changes in g(h)      
    !!======================================================================
-
+#if defined key_lim3
    !!----------------------------------------------------------------------
-   !! * Modules used
+   !!   'key_lim3' :                                   LIM3 sea-ice model
+   !!----------------------------------------------------------------------
+   !!----------------------------------------------------------------------
    USE dom_ice
    USE par_oce          ! ocean parameters
@@ -17,13 +15,11 @@
    USE phycst           ! physical constants (ocean directory) 
    USE thd_ice
-   USE limistate
-   USE in_out_manager
    USE ice
    USE par_ice
    USE limthd_lac
    USE limvar
-   USE iceini
    USE limcons
    USE prtctl           ! Print control
+   USE in_out_manager
    USE lib_mpp 
 
@@ -31,5 +27,4 @@
    PRIVATE
 
-   !! * Routine accessibility
    PUBLIC lim_itd_th        ! called by ice_stp
    PUBLIC lim_itd_th_rem
@@ -38,5 +33,4 @@
    PUBLIC lim_itd_shiftice
 
-   !! * Module variables
    REAL(wp)  ::           &  ! constant values
       epsi20 = 1e-20   ,  &
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90	(revision 2475)
@@ -28,10 +28,8 @@
    USE ice              ! LIM-3: ice variables
    USE dom_ice          ! LIM-3: ice domain
-   USE iceini           ! LIM-3: ice initialisation
    USE limitd_me        ! LIM-3: 
 #else
    USE ice_2            ! LIM2: ice variables
    USE dom_ice_2        ! LIM2: ice domain
-   USE iceini_2         ! LIM2: ice initialisation
 #endif
 
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 2475)
@@ -4,4 +4,7 @@
    !! Ice restart :  write the ice restart file
    !!======================================================================
+   !! History:   -   ! 2005-04 (M. Vancoppenolle) Original code
+   !!           3.0  ! 2008-03 (C. Ethe) restart files in using IOM interface
+   !!----------------------------------------------------------------------
 #if defined key_lim3
    !!----------------------------------------------------------------------
@@ -12,20 +15,18 @@
    !!   lim_rst_read    : read  the restart file 
    !!----------------------------------------------------------------------
-   !! * Modules used
-   USE ice
-   USE par_ice
-   USE in_out_manager
-   USE dom_oce
-   USE sbc_oce         ! Surface boundary condition: ocean fields
-   USE sbc_ice         ! Surface boundary condition: ice fields
-   USE iom
+   USE ice              ! sea-ice variables
+   USE par_ice          ! sea-ice parameters
+   USE dom_oce          ! ocean domain
+   USE sbc_oce          ! Surface boundary condition: ocean fields
+   USE sbc_ice          ! Surface boundary condition: ice fields
+   USE in_out_manager   ! I/O manager
+   USE iom              ! I/O library
 
    IMPLICIT NONE
    PRIVATE
 
-   !! * Accessibility
-   PUBLIC lim_rst_opn    ! routine called by icestep.F90
-   PUBLIC lim_rst_write  ! routine called by icestep.F90
-   PUBLIC lim_rst_read   ! routine called by iceinit.F90
+   PUBLIC   lim_rst_opn    ! routine called by icestep.F90
+   PUBLIC   lim_rst_write  ! routine called by icestep.F90
+   PUBLIC   lim_rst_read   ! routine called by iceini.F90
 
    LOGICAL, PUBLIC ::   lrst_ice         !: logical to control the ice restart write 
@@ -35,7 +36,6 @@
    !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)
    !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
 
@@ -48,5 +48,5 @@
       INTEGER, INTENT(in) ::   kt       ! number of iteration
       !
-      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character
+      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step define as a character
       CHARACTER(LEN=50)   ::   clname   ! ice output restart file name
       !!----------------------------------------------------------------------
@@ -54,8 +54,9 @@
       IF( kt == nit000 )   lrst_ice = .FALSE.   ! default definition
 
-      ! to get better performances with NetCDF format:
-      ! we open and define the ice restart file one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1)
-      ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1
-      IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN
+      ! in order to get better performances with NetCDF format, we open and define the ice restart file 
+      ! one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1), except if we write ice 
+      ! restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1
+      IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc    &
+         &                             .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN
          ! beware of the format used to write kt (default is i8.8, that should be large enough...)
          IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
@@ -75,5 +76,5 @@
             ENDIF
          ENDIF
-
+         !
          CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib )
          lrst_ice = .TRUE.
@@ -82,4 +83,5 @@
    END SUBROUTINE lim_rst_opn
 
+
    SUBROUTINE lim_rst_write( kt )
       !!----------------------------------------------------------------------
@@ -87,15 +89,12 @@
       !!
       !! ** purpose  :   output of sea-ice variable in a netcdf file
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   kt     ! number of iteration
       !!
-      !!----------------------------------------------------------------------
-      ! Arguments :
-      INTEGER, INTENT(in) ::   kt     ! number of iteration
-
-      ! Local variables :
+      INTEGER ::   ji, jj, jk ,jl   ! dummy loop indices
+      INTEGER ::   iter
+      CHARACTER(len=15) ::   znam
+      CHARACTER(len=1)  ::   zchar, zchar1
       REAL(wp), DIMENSION(jpi,jpj) :: z2d
-      INTEGER :: ji, jj, jk ,jl
-      INTEGER :: iter
-      CHARACTER(len=15) :: znam
-      CHARACTER(len=1)  :: zchar, zchar1
       !!----------------------------------------------------------------------
 
@@ -111,6 +110,6 @@
       ! ------------------ 
       !                                                                        ! calendar control
-      CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp) )      ! time-step 
-      CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp) )        ! date
+      CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ) )      ! time-step 
+      CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter   , wp ) )      ! date
 
       ! Prognostic variables 
@@ -288,91 +287,6 @@
       ENDIF
       !
-
-      IF( ln_nicep) THEN
-         WRITE(numout,*)
-         WRITE(numout,*) ' lim_rst_write : CHUKCHI SEA POINT '
-         WRITE(numout,*) ' ~~~~~~~~~~'
-         WRITE(numout,*) ' ~~~ Arctic'
-
-         ji = jiindx
-         jj = jjindx
-
-         WRITE(numout,*) ' ji, jj ', ji, jj
-         WRITE(numout,*) ' ICE VARIABLES '
-         WRITE(numout,*) ' open water ', ato_i(ji,jj)
-         DO jl = 1, jpl
-            WRITE(numout,*) ' *** CATEGORY NUMBER *** ', jl
-            WRITE(numout,*) ' '
-            WRITE(numout,*) ' a_i        : ', a_i(ji,jj,jl)     
-            WRITE(numout,*) ' v_i        : ', v_i(ji,jj,jl) 
-            WRITE(numout,*) ' v_s        : ', v_s(ji,jj,jl)    
-            WRITE(numout,*) ' e_s        : ', e_s(ji,jj,1,jl)/1.0e9
-            WRITE(numout,*) ' e_i1       : ', e_i(ji,jj,1,jl)/1.0e9      
-            WRITE(numout,*) ' e_i2       : ', e_i(ji,jj,2,jl)/1.0e9      
-            WRITE(numout,*) ' smv_i      : ', smv_i(ji,jj,jl)  
-            WRITE(numout,*) ' oa_i       : ', oa_i(ji,jj,jl)
-            WRITE(numout,*) ' t_su       : ', t_su(ji,jj,jl)
-         END DO
-
-         WRITE(numout,*) ' MOMENTS OF ADVECTION '
-
-         WRITE(numout,*) ' open water '
-         WRITE(numout,*) ' sxopw  ', sxopw(ji,jj)
-         WRITE(numout,*) ' syopw  ', syopw(ji,jj)
-         WRITE(numout,*) ' sxxopw ', sxxopw(ji,jj)
-         WRITE(numout,*) ' syyopw ', syyopw(ji,jj)
-         WRITE(numout,*) ' sxyopw ', sxyopw(ji,jj)
-         DO jl = 1, jpl
-            WRITE(numout,*) ' jl, ice volume content ', jl
-            WRITE(numout,*) ' sxice  ', sxice(ji,jj,jl)
-            WRITE(numout,*) ' syice  ', syice(ji,jj,jl)
-            WRITE(numout,*) ' sxxice ', sxxice(ji,jj,jl)
-            WRITE(numout,*) ' syyice ', syyice(ji,jj,jl)
-            WRITE(numout,*) ' sxyice ', sxyice(ji,jj,jl)
-            WRITE(numout,*) ' jl, snow volume content ', jl
-            WRITE(numout,*) ' sxsn   ', sxsn(ji,jj,jl)
-            WRITE(numout,*) ' sysn   ', sysn(ji,jj,jl)
-            WRITE(numout,*) ' sxxsn  ', sxxsn(ji,jj,jl)
-            WRITE(numout,*) ' syysn  ', syysn(ji,jj,jl)
-            WRITE(numout,*) ' sxysn  ', sxysn(ji,jj,jl)
-            WRITE(numout,*) ' jl, ice area in category ', jl
-            WRITE(numout,*) ' sxa    ', sxa (ji,jj,jl)
-            WRITE(numout,*) ' sya    ', sya (ji,jj,jl)
-            WRITE(numout,*) ' sxxa   ', sxxa (ji,jj,jl)
-            WRITE(numout,*) ' syya   ', syya (ji,jj,jl)
-            WRITE(numout,*) ' sxya   ', sxya (ji,jj,jl)
-            WRITE(numout,*) ' jl, snow temp ', jl
-            WRITE(numout,*) ' sxc0   ', sxc0(ji,jj,jl)
-            WRITE(numout,*) ' syc0   ', syc0(ji,jj,jl)
-            WRITE(numout,*) ' sxxc0  ', sxxc0(ji,jj,jl)
-            WRITE(numout,*) ' syyc0  ', syyc0(ji,jj,jl)
-            WRITE(numout,*) ' sxyc0  ', sxyc0(ji,jj,jl)
-            WRITE(numout,*) ' jl, ice salinity ', jl
-            WRITE(numout,*) ' sxsal  ', sxsal(ji,jj,jl)
-            WRITE(numout,*) ' sysal  ', sysal(ji,jj,jl)
-            WRITE(numout,*) ' sxxsal ', sxxsal(ji,jj,jl)
-            WRITE(numout,*) ' syysal ', syysal(ji,jj,jl)
-            WRITE(numout,*) ' sxysal ', sxysal(ji,jj,jl)
-            WRITE(numout,*) ' jl, ice age      ', jl
-            WRITE(numout,*) ' sxage  ', sxage(ji,jj,jl)
-            WRITE(numout,*) ' syage  ', syage(ji,jj,jl)
-            WRITE(numout,*) ' sxxage ', sxxage(ji,jj,jl)
-            WRITE(numout,*) ' syyage ', syyage(ji,jj,jl)
-            WRITE(numout,*) ' sxyage ', sxyage(ji,jj,jl)
-         END DO
-         DO jl = 1, jpl
-            DO jk = 1, nlay_i
-               WRITE(numout,*) ' jk, jl, ice heat content', jk, jl
-               WRITE(numout,*) ' sxe    ', sxe(ji,jj,jk,jl)
-               WRITE(numout,*) ' sye    ', sye(ji,jj,jk,jl)
-               WRITE(numout,*) ' sxxe   ', sxxe(ji,jj,jk,jl)
-               WRITE(numout,*) ' syye   ', syye(ji,jj,jk,jl)
-               WRITE(numout,*) ' sxye   ', sxye(ji,jj,jk,jl)
-            END DO
-         END DO
-
-      ENDIF
-
    END SUBROUTINE lim_rst_write
+
 
    SUBROUTINE lim_rst_read
@@ -382,15 +296,13 @@
       !! ** purpose  :   read of sea-ice variable restart in a netcdf file
       !!----------------------------------------------------------------------
-      ! Local variables
       INTEGER :: ji, jj, jk, jl, indx
       REAL(wp) ::   zfice, ziter
-      REAL(wp) :: & !parameters for the salinity profile
-         zs_inf, z_slope_s, zsmax, zsmin, zalpha, zindb
-      REAL(wp), DIMENSION(nlay_i) :: zs_zero 
-      REAL(wp), DIMENSION(jpi,jpj) :: z2d
-      CHARACTER(len=15) :: znam
-      CHARACTER(len=1)  :: zchar, zchar1
-      INTEGER           :: jlibalt = jprstlib
-      LOGICAL           :: llok
+      REAL(wp) ::   zs_inf, z_slope_s, zsmax, zsmin, zalpha, zindb   ! local scalars used for the salinity profile
+      REAL(wp), DIMENSION(nlay_i)  ::   zs_zero 
+      REAL(wp), DIMENSION(jpi,jpj) ::   z2d
+      CHARACTER(len=15) ::   znam
+      CHARACTER(len=1)  ::   zchar, zchar1
+      INTEGER           ::   jlibalt = jprstlib
+      LOGICAL           ::   llok
       !!----------------------------------------------------------------------
 
@@ -469,11 +381,5 @@
       END DO
 
-      ! Salinity profile
-      !-----------------
-      WRITE(numout,*) ' num_sal - will restart understand salinity profile ', num_sal
-
-      num_sal = 2
-      IF(num_sal.eq.2) THEN
-         !     CALL lim_var_salprof
+      IF( num_sal == 2 ) THEN      ! Salinity profile
          DO jl = 1, jpl
             DO jk = 1, nlay_i
@@ -481,18 +387,17 @@
                   DO ji = 1, jpi
                      zs_inf        = sm_i(ji,jj,jl)
-                     z_slope_s     = 2.0*sm_i(ji,jj,jl)/MAX(0.01,ht_i(ji,jj,jl))
+                     z_slope_s     = 2._wp * sm_i(ji,jj,jl) / MAX( 0.01_wp , ht_i(ji,jj,jl) )
                      !- slope of the salinity profile
-                     zs_zero(jk)   = z_slope_s * ( FLOAT(jk)-1.0/2.0 ) * &
-                        ht_i(ji,jj,jl) / FLOAT(nlay_i)
-                     zsmax = 4.5
-                     zsmin = 3.5
+                     zs_zero(jk)   = z_slope_s * ( REAL(jk,wp) - 0.5_wp ) * ht_i(ji,jj,jl) / REAL(nlay_i,wp)
+                     zsmax = 4.5_wp
+                     zsmin = 3.5_wp
                      IF( sm_i(ji,jj,jl) .LT. zsmin ) THEN
-                        zalpha = 1.0
+                        zalpha = 1._wp
                      ELSEIF( sm_i(ji,jj,jl) .LT.zsmax ) THEN
-                        zalpha = sm_i(ji,jj,jl) / (zsmin-zsmax) + zsmax / (zsmax-zsmin)
+                        zalpha = sm_i(ji,jj,jl) / ( zsmin - zsmax ) + zsmax / ( zsmax - zsmin )
                      ELSE
-                        zalpha = 0.0
+                        zalpha = 0._wp
                      ENDIF
-                     s_i(ji,jj,jk,jl) = zalpha*zs_zero(jk) + ( 1.0 - zalpha )*zs_inf
+                     s_i(ji,jj,jk,jl) = zalpha * zs_zero(jk) + ( 1._wp - zalpha ) * zs_inf
                   END DO
                END DO
@@ -646,94 +551,8 @@
          END DO
       END DO
-
+      !
       CALL iom_close( numrir )
-
-      !+++++++++++ CHECK EVERYTHING ++++++++++
-
-      WRITE(numout,*)
-      WRITE(numout,*) ' lim_rst_read  : CHUKCHI SEA POINT '
-      WRITE(numout,*) ' ~~~~~~~~~~'
-      WRITE(numout,*) ' ~~~ Arctic'
-
-      indx = 1
-      ji = 24
-      jj = 24
-      WRITE(numout,*) ' ji, jj ', ji, jj
-      WRITE(numout,*) ' ICE VARIABLES '
-      WRITE(numout,*) ' open water ', ato_i(ji,jj)
-
-      DO jl = 1, jpl
-         WRITE(numout,*) ' *** CATEGORY NUMBER *** ', jl
-         WRITE(numout,*) ' '
-         WRITE(numout,*) ' a_i        : ', a_i(ji,jj,jl)     
-         WRITE(numout,*) ' v_i        : ', v_i(ji,jj,jl) 
-         WRITE(numout,*) ' v_s        : ', v_s(ji,jj,jl)    
-         WRITE(numout,*) ' e_i1       : ', e_i(ji,jj,1,jl)/1.0e9      
-         WRITE(numout,*) ' e_i2       : ', e_i(ji,jj,2,jl)/1.0e9      
-         WRITE(numout,*) ' e_s        : ', e_s(ji,jj,1,jl)      
-         WRITE(numout,*) ' smv_i      : ', smv_i(ji,jj,jl)  
-         WRITE(numout,*) ' oa_i       : ', oa_i(ji,jj,jl)
-         WRITE(numout,*) ' t_su       : ', t_su(ji,jj,jl)
-      END DO
-
-      WRITE(numout,*) ' open water '
-      WRITE(numout,*) ' sxopw  ', sxopw(ji,jj)
-      WRITE(numout,*) ' syopw  ', syopw(ji,jj)
-      WRITE(numout,*) ' sxxopw ', sxxopw(ji,jj)
-      WRITE(numout,*) ' syyopw ', syyopw(ji,jj)
-      WRITE(numout,*) ' sxyopw ', sxyopw(ji,jj)
-      DO jl = 1, jpl
-         WRITE(numout,*) ' jl, ice volume content ', jl
-         WRITE(numout,*) ' sxice  ', sxice(ji,jj,jl)
-         WRITE(numout,*) ' syice  ', syice(ji,jj,jl)
-         WRITE(numout,*) ' sxxice ', sxxice(ji,jj,jl)
-         WRITE(numout,*) ' syyice ', syyice(ji,jj,jl)
-         WRITE(numout,*) ' sxyice ', sxyice(ji,jj,jl)
-         WRITE(numout,*) ' jl, snow volume content ', jl
-         WRITE(numout,*) ' sxsn   ', sxsn(ji,jj,jl)
-         WRITE(numout,*) ' sysn   ', sysn(ji,jj,jl)
-         WRITE(numout,*) ' sxxsn  ', sxxsn(ji,jj,jl)
-         WRITE(numout,*) ' syysn  ', syysn(ji,jj,jl)
-         WRITE(numout,*) ' sxysn  ', sxysn(ji,jj,jl)
-         WRITE(numout,*) ' jl, ice area in category ', jl
-         WRITE(numout,*) ' sxa    ', sxa (ji,jj,jl)
-         WRITE(numout,*) ' sya    ', sya (ji,jj,jl)
-         WRITE(numout,*) ' sxxa   ', sxxa (ji,jj,jl)
-         WRITE(numout,*) ' syya   ', syya (ji,jj,jl)
-         WRITE(numout,*) ' sxya   ', sxya (ji,jj,jl)
-         WRITE(numout,*) ' jl, snow temp ', jl
-         WRITE(numout,*) ' sxc0   ', sxc0(ji,jj,jl)
-         WRITE(numout,*) ' syc0   ', syc0(ji,jj,jl)
-         WRITE(numout,*) ' sxxc0  ', sxxc0(ji,jj,jl)
-         WRITE(numout,*) ' syyc0  ', syyc0(ji,jj,jl)
-         WRITE(numout,*) ' sxyc0  ', sxyc0(ji,jj,jl)
-         WRITE(numout,*) ' jl, ice salinity ', jl
-         WRITE(numout,*) ' sxsal  ', sxsal(ji,jj,jl)
-         WRITE(numout,*) ' sysal  ', sysal(ji,jj,jl)
-         WRITE(numout,*) ' sxxsal ', sxxsal(ji,jj,jl)
-         WRITE(numout,*) ' syysal ', syysal(ji,jj,jl)
-         WRITE(numout,*) ' sxysal ', sxysal(ji,jj,jl)
-         WRITE(numout,*) ' jl, ice age      ', jl
-         WRITE(numout,*) ' sxage  ', sxage(ji,jj,jl)
-         WRITE(numout,*) ' syage  ', syage(ji,jj,jl)
-         WRITE(numout,*) ' sxxage ', sxxage(ji,jj,jl)
-         WRITE(numout,*) ' syyage ', syyage(ji,jj,jl)
-         WRITE(numout,*) ' sxyage ', sxyage(ji,jj,jl)
-      END DO
-      DO jl = 1, jpl
-         DO jk = 1, nlay_i
-            WRITE(numout,*) ' jk, jl, ice heat content', jk, jl
-            WRITE(numout,*) ' sxe    ', sxe(ji,jj,jk,jl)
-            WRITE(numout,*) ' sye    ', sye(ji,jj,jk,jl)
-            WRITE(numout,*) ' sxxe   ', sxxe(ji,jj,jk,jl)
-            WRITE(numout,*) ' syye   ', syye(ji,jj,jk,jl)
-            WRITE(numout,*) ' sxye   ', sxye(ji,jj,jk,jl)
-         END DO
-      END DO
-
-      !+++++++++++ END CHECK +++++++++++++++++
-
+      !
    END SUBROUTINE lim_rst_read
-
 
 #else
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90	(revision 2475)
@@ -23,10 +23,8 @@
    USE sbc_oce          ! Surface boundary condition: ocean fields
    USE phycst           ! physical constants
+   USE albedo           ! albedo parameters
    USE ice              ! LIM sea-ice variables
-   USE iceini           ! ???
-
    USE lbclnk           ! ocean lateral boundary condition
    USE in_out_manager   ! I/O manager
-   USE albedo           ! albedo parameters
    USE prtctl           ! Print control
 
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 2475)
@@ -27,5 +27,4 @@
    USE dom_ice         ! LIM sea-ice domain
    USE domvvl          ! domain: variable volume level
-   USE iceini          ! LIM: sea-ice initialization
    USE limthd_dif      ! LIM: thermodynamics, vertical diffusion
    USE limthd_dh       ! LIM: thermodynamics, ice and snow thickness variation
@@ -33,5 +32,5 @@
    USE limthd_ent      ! LIM: thermodynamics, ice enthalpy redistribution
    USE limtab          ! LIM: 1D <==> 2D transformation
-   USE limvar          ! LIM: ???
+   USE limvar          ! LIM: sea-ice variables
    USE lbclnk          ! lateral boundary condition - MPP links
    USE lib_mpp         ! MPP library
@@ -42,5 +41,6 @@
    PRIVATE
 
-   PUBLIC   lim_thd    ! called by lim_step
+   PUBLIC   lim_thd        ! called by limstp module
+   PUBLIC   lim_thd_init   ! called by iceini module
 
    REAL(wp) ::   epsi20 = 1e-20_wp   ! constant values
@@ -90,8 +90,4 @@
       REAL(wp), DIMENSION(jpi,jpj) ::   zqlbsbq   ! link with lead energy budget qldif
       !!-------------------------------------------------------------------
-
-      IF( numit == nstart )   CALL lim_thd_init      ! Initialization (first time-step only)
-
-      IF( numit == nstart )   CALL lim_thd_sal_init  ! Initialization (first time-step only)
       
       !------------------------------------------------------------------------------!
@@ -823,5 +819,5 @@
          &                kappa_i, nconv_i_thd, maxer_i_thd, thcon_i_swi
       !!-------------------------------------------------------------------
-
+      !
       IF(lwp) THEN
          WRITE(numout,*)
@@ -829,8 +825,8 @@
          WRITE(numout,*) '~~~~~~~'
       ENDIF
-
+      !
       REWIND( numnam_ice )                  ! read Namelist numnam_ice
       READ  ( numnam_ice , namicethd )
-      
+      !
       IF(lwp) THEN                          ! control print
          WRITE(numout,*)
@@ -870,11 +866,6 @@
 #else
    !!----------------------------------------------------------------------
-   !!   Default option                               NO  LIM3 sea-ice model
+   !!   Default option         Dummy module          NO  LIM3 sea-ice model
    !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE lim_thd         ! Empty routine
-   END SUBROUTINE lim_thd
-   SUBROUTINE lim_thd_con_dif
-   END SUBROUTINE lim_thd_con_dif
 #endif
 
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90	(revision 2475)
@@ -17,10 +17,8 @@
    USE phycst           ! physical constants (OCE directory) 
    USE sbc_oce          ! Surface boundary condition: ocean fields
-   USE thd_ice
-   USE iceini
-   USE limistate
-   USE in_out_manager
    USE ice
    USE par_ice
+   USE thd_ice
+   USE in_out_manager
    USE lib_mpp
 
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90	(revision 2475)
@@ -1,7 +1,3 @@
 MODULE limthd_dif
-#if defined key_lim3
-   !!----------------------------------------------------------------------
-   !!   'key_lim3'                                      LIM3 sea-ice model
-   !!----------------------------------------------------------------------
    !!======================================================================
    !!                       ***  MODULE limthd_dif ***
@@ -9,12 +5,12 @@
    !!                   computation of surface and inner T  
    !!======================================================================
-
    !!----------------------------------------------------------------------
-   !! * Modules used
+#if defined key_lim3
+   !!----------------------------------------------------------------------
+   !!   'key_lim3'                                      LIM3 sea-ice model
+   !!----------------------------------------------------------------------
    USE par_oce          ! ocean parameters
    USE phycst           ! physical constants (ocean directory) 
    USE thd_ice
-   USE iceini
-   USE limistate
    USE in_out_manager
    USE ice
@@ -25,8 +21,6 @@
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC lim_thd_dif        ! called by lim_thd
-
-   !! * Module variables
+   PUBLIC   lim_thd_dif   ! called by lim_thd
+
    REAL(wp)  ::           &  ! constant values
       epsi20 = 1e-20   ,  &
@@ -40,5 +34,4 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -872,3 +865,4 @@
    END SUBROUTINE lim_thd_dif
 #endif
+   !!======================================================================
 END MODULE limthd_dif
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90	(revision 2475)
@@ -1,7 +1,3 @@
 MODULE limthd_ent
-#if defined key_lim3
-   !!----------------------------------------------------------------------
-   !!   'key_lim3'                                      LIM3 sea-ice model
-   !!----------------------------------------------------------------------
    !!======================================================================
    !!                       ***  MODULE limthd_ent   ***
@@ -10,7 +6,10 @@
    !!                       after vertical growth/decay
    !!======================================================================
+#if defined key_lim3
+   !!----------------------------------------------------------------------
+   !!   'key_lim3'                                      LIM3 sea-ice model
+   !!----------------------------------------------------------------------
    !!   lim_thd_ent : ice redistribution of enthalpy
-
-   !! * Modules used
+   !!----------------------------------------------------------------------
    USE par_oce          ! ocean parameters
    USE dom_oce
@@ -19,6 +18,4 @@
    USE phycst
    USE thd_ice
-   USE iceini
-   USE limistate
    USE ice
    USE limvar
@@ -29,8 +26,6 @@
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC  lim_thd_ent     ! called by lim_thd
-
-   !! * Module variables
+   PUBLIC   lim_thd_ent     ! called by lim_thd
+
    REAL(wp)  ::           &  ! constant values
       epsi20 = 1.e-20  ,  &
@@ -39,11 +34,9 @@
       zone   = 1.e0    ,  &
       epsi10 = 1.0e-10
-
    !!----------------------------------------------------------------------
    !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)
    !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90	(revision 2475)
@@ -1,6 +1,3 @@
 MODULE limthd_lac
-   !!----------------------------------------------------------------------
-   !!   'key_lim3'                                      LIM3 sea-ice model
-   !!----------------------------------------------------------------------
    !!======================================================================
    !!                       ***  MODULE limthd_lac   ***
@@ -9,6 +6,8 @@
 #if defined key_lim3
    !!----------------------------------------------------------------------
+   !!   'key_lim3'                                      LIM3 sea-ice model
+   !!----------------------------------------------------------------------
    !!   lim_lat_acr    : lateral accretion of ice
-   !! * Modules used
+   !!----------------------------------------------------------------------
    USE par_oce          ! ocean parameters
    USE dom_oce
@@ -21,5 +20,4 @@
    USE par_ice
    USE ice
-   USE iceini
    USE limtab
    USE limcons
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90	(revision 2475)
@@ -1,53 +1,43 @@
 MODULE limthd_sal
-   !!----------------------------------------------------------------------
-   !!   'key_lim3'                                      LIM3 sea-ice model
-   !!----------------------------------------------------------------------
    !!======================================================================
    !!                       ***  MODULE limthd_sal ***
-   !!                   computation salinity variations in
-   !!                               the ice
+   !! LIM-3 sea-ice :  computation of salinity variations in the ice
    !!======================================================================
+   !! History :   -   ! 2003-05 (M. Vancoppenolle) UCL-ASTR first coding for LIM3-1D
+   !!            3.0  ! 2005-12 (M. Vancoppenolle) adapted to the 3-D version
+   !!---------------------------------------------------------------------
 #if defined key_lim3
    !!----------------------------------------------------------------------
+   !!   'key_lim3'                                      LIM-3 sea-ice model
+   !!----------------------------------------------------------------------
    !!   lim_thd_sal : salinity variations in the ice
-   !! * Modules used
+   !!----------------------------------------------------------------------
    USE par_oce          ! ocean parameters
    USE phycst           ! physical constants (ocean directory)
    USE sbc_oce          ! Surface boundary condition: ocean fields
-   USE thd_ice
-   USE iceini
-   USE ice
-   USE limistate
-   USE in_out_manager
-   USE limvar
-   USE par_ice
+   USE ice              ! LIM: sea-ice variables
+   USE par_ice          ! LIM: sea-ice parameters
+   USE thd_ice          ! LIM: sea-ice thermodynamics
+   USE limvar           ! LIM: sea-ice variables
+   USE in_out_manager   ! I/O manager
 
    IMPLICIT NONE
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC lim_thd_sal        ! called by lim_thd
-   PUBLIC lim_thd_sal_init   ! called by lim_thd
-
-   !! * Module variables
-   REAL(wp)  ::           &  ! constant values
-      epsi20 = 1e-20   ,  &
-      epsi13 = 1e-13   ,  &
-      zzero  = 0.e0    ,  &
-      zone   = 1.e0
+   PUBLIC   lim_thd_sal        ! called by limthd module
+   PUBLIC   lim_thd_sal_init   ! called by iceini module
 
    !!----------------------------------------------------------------------
    !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)
    !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
 
-   SUBROUTINE lim_thd_sal(kideb,kiut)
+   SUBROUTINE lim_thd_sal( kideb, kiut )
       !!-------------------------------------------------------------------
-      !!                ***  ROUTINE lim_thd_sal  ***       
-      !! ** Purpose :
-      !!        This routine computes new salinities in the ice
+      !!                ***  ROUTINE lim_thd_sal  ***    
+      !!   
+      !! ** Purpose :   computes new salinities in the ice
       !!
       !! ** Method  :  4 possibilities
@@ -56,67 +46,21 @@
       !!               -> num_sal = 3 -> S = S(z)   [multiyear ice]
       !!               -> num_sal = 4 -> S = S(h)   [Cox and Weeks 74]
-      !!           
-      !! ** Steps
-      !!
-      !! ** Arguments
-      !!
-      !! ** Inputs / Outputs
-      !!
-      !! ** External
-      !!
-      !! ** References
-      !!
-      !! ** History  : 
-      !!
-      !! "Je ne suis pour l'instant qu'a 80% de ma condition, mais c'est 
-      !!  les 30% qui restent qui seront les plus difficiles"
-      !!                                           E. Mpenza
-      !!
-      !!-------------------------------------------------------------------
-      !! History :
-      !!   ori  !  03-05 M. Vancoppenolle UCL-ASTR first coding for LIM-1D
-      !!   3.0  !  05-12 Routine rewritten for the 3-D version
       !!---------------------------------------------------------------------
-      !!
-      !! * Local variables
-      INTEGER, INTENT(in) :: &
-         kideb, kiut             !: thickness category index
-
-      INTEGER ::             &
-         ji, jk ,            &   !: geographic and layer index 
-         zji, zjj
-
-      REAL(wp) ::            &
-         zsold,              &   !: old salinity
-         zeps=1.0e-06   ,    &   !: very small
-         iflush         ,    &   !: flushing (1) or not (0)
-         iaccrbo        ,    &   !: bottom accretion (1) or not (0)
-         igravdr        ,    &   !: gravity drainage or not
-         isnowic        ,    &   !: gravity drainage or not
-         i_ice_switch   ,    &   !: ice thickness above a certain treshold or not
-         ztmelts        ,    &   !: freezing point of sea ice
-         zaaa           ,    &   !: dummy factor
-         zbbb           ,    &   !: dummy factor
-         zccc           ,    &   !: dummy factor
-         zdiscrim                !: dummy factor
-
-      REAL(wp), DIMENSION(jpij) ::          &
-         ze_init        ,    &   !initial total enthalpy
-         zhiold         ,    &
-         zsiold
-
+      INTEGER, INTENT(in) ::  kideb, kiut   ! thickness category index
+      !
+      INTEGER  ::   ji, jk     ! dummy loop indices 
+      INTEGER  ::   zji, zjj   ! local integers
+      REAL(wp) ::   zsold, zeps, iflush, iaccrbo, igravdr, isnowic, i_ice_switch,  ztmelts   ! local scalars
+      REAL(wp) ::   zaaa, zbbb, zccc, zdiscrim   ! local scalars
+      REAL(wp), DIMENSION(jpij) ::   ze_init, zhiold, zsiold   ! 1D workspace
       !!---------------------------------------------------------------------
 
+      zeps=1.0e-06_wp
+
       !------------------------------------------------------------------------------|
       ! 1) Constant salinity, constant in time                                       |
       !------------------------------------------------------------------------------|
 
-      IF (num_sal.eq.1) THEN
-
-         !         WRITE(numout,*)
-         !         WRITE(numout,*) 'lim_thd_sal : Ice salinity computation module ', &
-         !         num_sal
-         !         WRITE(numout,*) '~~~~~~~~~~~~'
-
+      IF( num_sal == 1 ) THEN
          DO jk = 1, nlay_i
             DO ji = kideb, kiut
@@ -124,10 +68,10 @@
             END DO ! ji
          END DO ! jk
-
+         !
          DO ji = kideb, kiut
             sm_i_b(ji)      =  bulk_sal 
          END DO ! ji
-
-      ENDIF ! num_sal .EQ. 1
+         !
+      ENDIF
 
       !------------------------------------------------------------------------------|
@@ -176,6 +120,5 @@
             ! isnowic : 1 if snow ice formation
             i_ice_switch = 1.0 - MAX ( 0.0 , SIGN ( 1.0 , - ht_i_b(ji) + 1.0e-2 ) )
-            isnowic      = 1.0 - MAX ( 0.0 , SIGN ( 1.0 , - dh_snowice(ji) ) ) * &
-               i_ice_switch
+            isnowic      = 1.0 - MAX ( 0.0 , SIGN ( 1.0 , - dh_snowice(ji) ) ) * i_ice_switch
 
             !---------------------
@@ -184,12 +127,8 @@
 
             ! drainage by gravity drainage
-            dsm_i_gd_1d(ji) = - igravdr *                                     & 
-               MAX( sm_i_b(ji) - sal_G , 0.0 ) /             &
-               time_G * rdt_ice 
+            dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_b(ji) - sal_G , 0._wp ) / time_G * rdt_ice 
 
             ! drainage by flushing  
-            dsm_i_fl_1d(ji)  = - iflush *                                     &
-               MAX( sm_i_b(ji) - sal_F , 0.0 ) /             & 
-               time_F * rdt_ice
+            dsm_i_fl_1d(ji)  = - iflush * MAX( sm_i_b(ji) - sal_F , 0._wp ) / time_F * rdt_ice
 
             !-----------------
@@ -201,15 +140,13 @@
             ! to conserve energy
             zsiold(ji) = sm_i_b(ji)
-            sm_i_b(ji) = sm_i_b(ji)                                           &
-               + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji)  !                 &
+            sm_i_b(ji) = sm_i_b(ji) + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji)
 
             ! if no ice, salinity eq 0.1
-            i_ice_switch  = 1.0 - MAX ( 0.0, SIGN (1.0 , - ht_i_b(ji) ) )
-            sm_i_b(ji)    = i_ice_switch*sm_i_b(ji) + s_i_min * ( 1.0 -       &
-               i_ice_switch )
+            i_ice_switch = 1._wp - MAX ( 0._wp, SIGN( 1._wp , - ht_i_b(ji) ) )
+            sm_i_b(ji)   = i_ice_switch*sm_i_b(ji) + s_i_min * ( 1._wp - i_ice_switch )
          END DO ! ji
 
          ! Salinity profile
-         CALL lim_var_salprof1d(kideb,kiut)
+         CALL lim_var_salprof1d( kideb, kiut )
 
          !----------------------------
@@ -219,11 +156,11 @@
          DO ji = kideb, kiut
             ! iflush  : 1 if summer 
-            iflush       =  MAX( 0.0 , SIGN ( 1.0 , t_su_b(ji) - rtt ) ) 
+            iflush  =  MAX( 0._wp , SIGN ( 1._wp , t_su_b(ji) - rtt ) ) 
             ! igravdr : 1 if t_su lt t_bo
-            igravdr      =  MAX( 0.0 , SIGN ( 1.0 , t_bo_b(ji) - t_su_b(ji) ) ) 
+            igravdr =  MAX( 0._wp , SIGN ( 1._wp , t_bo_b(ji) - t_su_b(ji) ) ) 
             ! iaccrbo : 1 if bottom accretion
-            iaccrbo      =  MAX( 0.0 , SIGN ( 1.0 , dh_i_bott(ji) ) )
-
-            fhbri_1d(ji) = 0.0
+            iaccrbo =  MAX( 0._wp , SIGN ( 1._wp , dh_i_bott(ji) ) )
+            !
+            fhbri_1d(ji) = 0._wp
          END DO ! ji
 
@@ -232,11 +169,8 @@
          !----------------------------
          DO ji = kideb, kiut
-            i_ice_switch  = 1.0 - MAX ( 0.0, SIGN (1.0 , - ht_i_b(ji) ) )
-            fsbri_1d(ji) = fsbri_1d(ji) -  &
-               i_ice_switch * rhoic * a_i_b(ji) * ht_i_b(ji) *  &
-               ( MAX(dsm_i_gd_1d(ji) + dsm_i_fl_1d(ji), &
-               sm_i_b(ji) - zsiold(ji) ) ) / rdt_ice
-            IF ( num_sal .EQ. 4 ) fsbri_1d(ji) = 0.0
-
+            i_ice_switch = 1._wp - MAX ( 0._wp, SIGN( 1._wp , - ht_i_b(ji) ) )
+            fsbri_1d(ji) = fsbri_1d(ji) - i_ice_switch * rhoic * a_i_b(ji) * ht_i_b(ji)         &
+               &         * ( MAX(dsm_i_gd_1d(ji) + dsm_i_fl_1d(ji), sm_i_b(ji) - zsiold(ji) ) ) / rdt_ice
+            IF( num_sal == 4 ) fsbri_1d(ji) = 0._wp
          END DO ! ji
 
@@ -246,20 +180,15 @@
          !--------------------
          DO jk = 1, nlay_i
-
             DO ji = kideb, kiut
-
                ztmelts    =  -tmut*s_i_b(ji,jk) + rtt
                !Conversion q(S,T) -> T (second order equation)
                zaaa         =  cpic
-               zbbb         =  ( rcp - cpic ) * ( ztmelts - rtt ) + &
-                  q_i_b(ji,jk) / rhoic - lfus
+               zbbb         =  ( rcp - cpic ) * ( ztmelts - rtt ) + q_i_b(ji,jk) / rhoic - lfus
                zccc         =  lfus * ( ztmelts - rtt )
                zdiscrim     =  SQRT( MAX(zbbb*zbbb - 4.0*zaaa*zccc,0.0) )
-               t_i_b(ji,jk) =  rtt - ( zbbb + zdiscrim ) / & 
-                  ( 2.0 *zaaa )
+               t_i_b(ji,jk) =  rtt - ( zbbb + zdiscrim ) / ( 2.0 *zaaa )
             END DO !ji
-
          END DO !jk
-
+         !
       ENDIF ! num_sal .EQ. 2
 
@@ -268,5 +197,5 @@
       !------------------------------------------------------------------------------|
 
-      IF ( num_sal .EQ. 3 ) THEN
+      IF( num_sal .EQ. 3 ) THEN
 
          WRITE(numout,*)
@@ -322,8 +251,6 @@
             zji                 = MOD( npb(ji) - 1, jpi ) + 1
             zjj                 = ( npb(ji) - 1 ) / jpi + 1
-            fseqv_1d(ji) = fseqv_1d(ji)              + & 
-               ( sss_m(zji,zjj) - bulk_sal    ) * & 
-               rhoic * a_i_b(ji) * &
-               MAX( dh_i_bott(ji) , 0.0 ) / rdt_ice
+            fseqv_1d(ji) = fseqv_1d(ji) + ( sss_m(zji,zjj) - bulk_sal    )               &
+               &                        * rhoic * a_i_b(ji) * MAX( dh_i_bott(ji) , 0.0 ) / rdt_ice
          END DO
       ELSE
@@ -331,14 +258,11 @@
             zji                 = MOD( npb(ji) - 1, jpi ) + 1
             zjj                 = ( npb(ji) - 1 ) / jpi + 1
-            fseqv_1d(ji) = fseqv_1d(ji)              + & 
-               ( sss_m(zji,zjj) - s_i_new(ji) ) * & 
-               rhoic * a_i_b(ji) * &
-               MAX( dh_i_bott(ji) , 0.0 ) / rdt_ice
+            fseqv_1d(ji) = fseqv_1d(ji) + ( sss_m(zji,zjj) - s_i_new(ji) )               &
+               &                        * rhoic * a_i_b(ji) * MAX( dh_i_bott(ji) , 0.0 ) / rdt_ice
          END DO ! ji
       ENDIF
-
-      !-- End of salinity computations
+      !
    END SUBROUTINE lim_thd_sal
-   !==============================================================================
+
 
    SUBROUTINE lim_thd_sal_init
@@ -348,20 +272,17 @@
       !! ** Purpose :   initialization of ice salinity parameters
       !!
-      !! ** Method  : Read the namicesal namelist and check the parameter
-      !!       values called at the first timestep (nit000)
+      !! ** Method  :   Read the namicesal namelist and check the parameter
+      !!              values called at the first timestep (nit000)
       !!
       !! ** input   :   Namelist namicesal
-      !!
-      !! history :
-      !!   3.0  !  July 2005 M. Vancoppenolle  Original code
       !!-------------------------------------------------------------------
-      NAMELIST/namicesal/ num_sal, bulk_sal, sal_G, time_G, sal_F, time_F, &
-         s_i_max, s_i_min, s_i_0, s_i_1
+      NAMELIST/namicesal/ num_sal, bulk_sal, sal_G, time_G, sal_F, time_F,   &
+         &                s_i_max, s_i_min, s_i_0, s_i_1
       !!-------------------------------------------------------------------
-
-      ! Read Namelist namicesal
-      REWIND ( numnam_ice )
-      READ   ( numnam_ice  , namicesal )
-      IF(lwp) THEN
+      !
+      REWIND( numnam_ice )                   ! Read Namelist namicesal
+      READ  ( numnam_ice  , namicesal )
+      !
+      IF(lwp) THEN                           ! control print
          WRITE(numout,*)
          WRITE(numout,*) 'lim_thd_sal_init : Ice parameters for salinity '
@@ -378,14 +299,11 @@
          WRITE(numout,*) ' 2nd salinity for salinity profile  : ', s_i_1
       ENDIF
-
+      !
    END SUBROUTINE lim_thd_sal_init
 
 #else
    !!----------------------------------------------------------------------
-   !!   Default option         Empty Module                No sea-ice model
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE lim_thd_sal        ! Empty routine
-   END SUBROUTINE lim_thd_sal
+   !!   Default option         Dummy Module          No LIM-3 sea-ice model
+   !!----------------------------------------------------------------------
 #endif
    !!======================================================================
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90	(revision 2475)
@@ -11,5 +11,4 @@
    !!   lim_trp_init : initialization and namelist read
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE phycst
    USE dom_oce
@@ -18,6 +17,4 @@
    USE dom_ice
    USE ice
-   USE iceini
-   USE limistate
    USE limadv
    USE limhdf
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limupdate.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limupdate.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limupdate.F90	(revision 2475)
@@ -13,9 +13,6 @@
    !!   'key_lim3'                                      LIM3 sea-ice model
    !!----------------------------------------------------------------------
-   !!    lim_update   : computes update of sea-ice global variables 
-   !!                   from trend terms
+   !!    lim_update   : computes update of sea-ice global variables from trend terms
    !!----------------------------------------------------------------------
-   !! * Modules used
-   USE limistate
    USE limrhg          ! ice rheology
    USE lbclnk
@@ -29,5 +26,4 @@
    USE phycst          ! Define parameters for the routines
    USE ice
-   USE iceini
    USE lbclnk
    USE limdyn
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 2474)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 2475)
@@ -1,6 +1,3 @@
 MODULE limwri
-   !!----------------------------------------------------------------------
-   !!   'key_lim3'                                      LIM3 sea-ice model
-   !!----------------------------------------------------------------------
    !!======================================================================
    !!                     ***  MODULE  limwri  ***
@@ -9,12 +6,9 @@
 #if defined key_lim3
    !!----------------------------------------------------------------------
-   !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)
-   !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !!   'key_lim3'                                      LIM3 sea-ice model
    !!----------------------------------------------------------------------
    !!   lim_wri      : write of the diagnostics variables in ouput file 
    !!   lim_wri_init : initialization and namelist read
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE ioipsl
    USE dianam          ! build name of file (routine)
@@ -26,5 +20,4 @@
    USE dom_ice
    USE ice
-   USE iceini
    USE lbclnk
    USE par_ice
@@ -64,10 +57,14 @@
       zzero  = 0.e0     ,  &
       zone   = 1.e0
-
+      
+   !!----------------------------------------------------------------------
+   !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)
+   !! $Id$
+   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
+
 #if defined key_dimgout
-
 # include "limwri_dimg.h90"
-
 #else
 
