Index: branches/2014/dev_CNRS_2014/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90
===================================================================
--- branches/2014/dev_CNRS_2014/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90	(revision 4901)
+++ branches/2014/dev_CNRS_2014/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90	(revision 4902)
@@ -66,6 +66,6 @@
       !
       !                                ! adequation jpk versus ice/snow layers/categories
-      IF( jpl   > jpk  .OR.  jpm    > jpk .OR.                                    &
-          jkmax > jpk  .OR.  nlay_s > jpk      )   CALL ctl_stop( 'STOP',         &
+      IF( jpl > jpk .OR. (nlay_i+1) > jpk .OR. nlay_s > jpk )   &
+         &      CALL ctl_stop( 'STOP',                     &
          &     'ice_init: the 3rd dimension of workspace arrays is too small.',   &
          &     'use more ocean levels or less ice/snow layers/categories.' )
@@ -174,5 +174,5 @@
       !!              limistate (only) and is changed to 99 m in ice_init
       !!------------------------------------------------------------------
-      INTEGER  ::   jl, jm               ! dummy loop index
+      INTEGER  ::   jl                   ! dummy loop index
       REAL(wp) ::   zc1, zc2, zc3, zx1   ! local scalars
       !!------------------------------------------------------------------
@@ -185,33 +185,6 @@
       ! 1) Ice thickness distribution parameters initialization    
       !------------------------------------------------------------------------------!
-
-      !- Types boundaries (integer)
-      !----------------------------
-      ice_cat_bounds(1,1) = 1
-      ice_cat_bounds(1,2) = jpl
-
-      !- Number of ice thickness categories in each ice type
-      DO jm = 1, jpm
-         ice_ncat_types(jm) = ice_cat_bounds(jm,2) - ice_cat_bounds(jm,1) + 1 
-      END DO
-
-      !- Make the correspondence between thickness categories and ice types
-      !---------------------------------------------------------------------
-      DO jm = 1, jpm       !over types
-         DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) !over thickness categories
-            ice_types(jl) = jm
-         END DO
-      END DO
-
       IF(lwp) THEN  
-         WRITE(numout,*) ' Number of ice types jpm =      ', jpm
          WRITE(numout,*) ' Number of ice categories jpl = ', jpl
-         DO jm = 1, jpm
-            WRITE(numout,*) ' Ice type ', jm
-            WRITE(numout,*) ' Number of thickness categories ', ice_ncat_types(jm)
-            WRITE(numout,*) ' Thickness category boundaries  ', ice_cat_bounds(jm,1:2)
-         END DO
-         WRITE(numout,*) 'Ice type vector', ice_types(1:jpl)
-         WRITE(numout,*)
       ENDIF
 
@@ -219,33 +192,17 @@
       !----------------------------------
       hi_max(:) = 0._wp
-      hi_max_typ(:,:) = 0._wp
-
-      !- Type 1 - undeformed ice
-      zc1 =  3._wp / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp )
+
+      zc1 =  3._wp / REAL( jpl, wp )
       zc2 = 10._wp * zc1
       zc3 =  3._wp
 
-      DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2)
-         zx1 = REAL( jl-1 , wp ) / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp )
+      DO jl = 1, jpl
+         zx1 = REAL( jl-1, wp ) / REAL( jpl, 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)
-      DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2)
-         hi_max_typ(jl,1) = hi_max(jl)
-      END DO
-
-      IF(lwp) WRITE(numout,*) ' Thickness category boundaries independently of ice type '
+      IF(lwp) WRITE(numout,*) ' Thickness category boundaries '
       IF(lwp) WRITE(numout,*) ' hi_max ', hi_max(0:jpl)
 
-      IF(lwp) WRITE(numout,*) ' Thickness category boundaries inside ice types '
-      IF(lwp) THEN 
-         DO jm = 1, jpm
-            WRITE(numout,*) ' Type number ', jm
-            WRITE(numout,*) ' hi_max_typ : ', hi_max_typ(0:ice_ncat_types(jm),jm)
-         END DO
-      ENDIF
       !
       DO jl = 1, jpl
