Index: branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/LIM_SRC_2/limtab_2.F90
===================================================================
--- branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/LIM_SRC_2/limtab_2.F90	(revision 1850)
+++ branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/LIM_SRC_2/limtab_2.F90	(revision 1855)
@@ -2,12 +2,13 @@
    !!======================================================================
    !!                       ***  MODULE limtab_2   ***
-   !!              transform 1D (2D) array to a 2D (1D) table
+   !!   LIM 2 ice model : transform 1D (2D) array to a 2D (1D) array
    !!======================================================================
 #if defined key_lim2
    !!----------------------------------------------------------------------
-   !!   tab_2d_1d  : 2-D to 1-D
-   !!   tab_1d_2d  : 1-D to 2-D
+   !!   'key_lim2' :                                  LIM 2.0 sea-ice model
    !!----------------------------------------------------------------------
-   !! * Modules used
+   !!   tab_2d_1d_2  : 2-D to 1-D
+   !!   tab_1d_2d_2  : 1-D to 2-D
+   !!----------------------------------------------------------------------
    USE par_kind
 
@@ -15,10 +16,9 @@
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC tab_2d_1d_2  ! called by lim_ther
-   PUBLIC tab_1d_2d_2  ! called by lim_ther
+   PUBLIC   tab_2d_1d_2   ! called by lim_thd_2
+   PUBLIC   tab_1d_2d_2   ! called by lim_thd_2
 
    !!----------------------------------------------------------------------
-   !!   LIM 2.0,  UCL-LOCEAN-IPSL (2005) 
+   !! NEMO/LIM 3.3,  UCL-LOCEAN-IPSL (2010) 
    !! $Id$
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
@@ -26,55 +26,49 @@
 CONTAINS
 
-   SUBROUTINE tab_2d_1d_2 ( ndim1d, tab1d, tab2d, ndim2d_x, ndim2d_y, tab_ind )
-
-      INTEGER, INTENT(in) :: &
-         ndim1d, ndim2d_x, ndim2d_y
-
-      REAL(wp), DIMENSION (ndim2d_x, ndim2d_y), INTENT(in) ::  &
-         tab2d
-
-      INTEGER, DIMENSION ( ndim1d), INTENT ( in) :: &
-         tab_ind
-
-      REAL(wp), DIMENSION(ndim1d), INTENT ( out) ::  & 
-         tab1d
-
-      INTEGER ::  &
-         jn , jid, jjd
-        
-      DO jn = 1, ndim1d
-         jid        = MOD( tab_ind(jn) - 1, ndim2d_x ) + 1
-         jjd        = ( tab_ind(jn) - 1 ) / ndim2d_x + 1
-         tab1d( jn) = tab2d( jid, jjd)
+   SUBROUTINE tab_2d_1d_2( kdim1d, ptab1d, ptab2d, kdim2d_i, kdim2d_j, ptab_ind )
+      !!-------------------------------------------------------------------
+      INTEGER , INTENT(in   )                                ::   kdim1d
+      INTEGER , INTENT(in   )                                ::   kdim2d_i, kdim2d_j
+      REAL(wp), INTENT(in   ), DIMENSION(kdim2d_i, kdim2d_j) ::   ptab2d
+      INTEGER , INTENT(in   ), DIMENSION(kdim1d)             ::   ptab_ind
+      REAL(wp), INTENT(  out), DIMENSION(kdim1d)             ::   ptab1d
+      !!
+      INTEGER ::   jn , jid, jjd   ! dummy loop indices
+      !!-------------------------------------------------------------------
+      ! 
+      DO jn = 1, kdim1d
+         jid = MOD( ptab_ind(jn) - 1, kdim2d_i ) + 1
+         jjd = ( ptab_ind(jn) - 1 ) / kdim2d_i + 1
+         ptab1d(jn) = ptab2d(jid,jjd)
       END DO 
-
+      !
    END SUBROUTINE tab_2d_1d_2
 
 
-   SUBROUTINE tab_1d_2d_2 ( ndim1d, tab2d, tab_ind, tab1d, ndim2d_x, ndim2d_y )
-
-      INTEGER, INTENT ( in) :: &
-         ndim1d, ndim2d_x, ndim2d_y
-
-      INTEGER, DIMENSION (ndim1d) , INTENT (in) :: &
-         tab_ind
-
-      REAL(wp), DIMENSION(ndim1d), INTENT (in) ::  &
-         tab1d  
-
-      REAL(wp), DIMENSION (ndim2d_x, ndim2d_y), INTENT ( out) :: &
-         tab2d
-
-      INTEGER :: &
-         jn, jid, jjd
-
-      DO jn = 1, ndim1d
-         jid             = MOD( tab_ind(jn) - 1, ndim2d_x) + 1
-         jjd             =    ( tab_ind(jn) - 1 ) / ndim2d_x  + 1
-         tab2d(jid, jjd) = tab1d( jn)
+   SUBROUTINE tab_1d_2d_2( kdim1d, ptab2d, ptab_ind, ptab1d, kdim2d_i, kdim2d_j )
+      !!-------------------------------------------------------------------
+      INTEGER , INTENT(in   )                                ::   kdim1d
+      INTEGER , INTENT(in   )                                ::   kdim2d_i, kdim2d_j
+      INTEGER , INTENT(in   ), DIMENSION(kdim1d)             ::   ptab_ind
+      REAL(wp), INTENT(in   ), DIMENSION(kdim1d)             ::   ptab1d
+      REAL(wp), INTENT(  out), DIMENSION(kdim2d_i, kdim2d_j) ::   ptab2d
+      !!
+      INTEGER ::   jn, jid, jjd   ! dummy loop indices
+      !!-------------------------------------------------------------------
+      !
+      DO jn = 1, kdim1d
+         jid = MOD( ptab_ind(jn) - 1, kdim2d_i) + 1
+         jjd =    ( ptab_ind(jn) - 1 ) / kdim2d_i  + 1
+         ptab2d(jid,jjd) = ptab1d(jn)
       END DO
-
+      !
    END SUBROUTINE tab_1d_2d_2
 
+#else
+   !!----------------------------------------------------------------------
+   !!   Default option          Dummy module       NO LIM 2.0 sea-ice model
+   !!----------------------------------------------------------------------
 #endif
+
+   !!======================================================================
 END MODULE limtab_2
