Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limmsh_2.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limmsh_2.F90	(revision 1976)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limmsh_2.F90	(revision 2004)
@@ -66,4 +66,7 @@
       ENDIF
       
+      IF( jphgr_msh == 2 .OR. jphgr_msh == 3 .OR. jphgr_msh == 5 )   &
+          &      CALL ctl_stop(' Coriolis parameter in LIM not set for f- or beta-plane' )
+
       !----------------------------------------------------------                          
       !    Initialization of local and some global (common) variables 
Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limsbc_2.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 1976)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 2004)
@@ -80,5 +80,4 @@
       INTEGER  ::   ifvt, i1mfr, idfr               ! some switches
       INTEGER  ::   iflt, ial, iadv, ifral, ifrdv
-      INTEGER  ::   ii0, ii1, ij0, ij1  ! temporary integers
       REAL(wp) ::   zrdtir           ! 1. / rdt_ice
       REAL(wp) ::   zqsr  , zqns     ! solar & non solar heat flux
@@ -109,14 +108,17 @@
          sice_r(:,:) = sice
          !
-         IF( cp_cfg == "orca"  .AND. jp_cfg == 2 ) THEN
-            !                                        ! =======================
-            !                                        !  ORCA_R2 configuration
-            !                                        ! =======================
-            ii0 = 145   ;   ii1 = 180        ! Baltic Sea
-            ij0 = 113   ;   ij1 = 130   ;   soce_r(mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 4.e0
-                                            sice_r(mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 2.e0
-         ENDIF
-         !
-      ENDIF
+         IF( cp_cfg == "orca" ) THEN
+           !   ocean/ice salinity in the Baltic sea 
+           DO jj = 1, jpj
+              DO ji = 1, jpi
+                 IF( glamt(ji,jj) >= 14. .AND.  glamt(ji,jj) <= 32. .AND. gphit(ji,jj) >= 54. .AND. gphit(ji,jj) <= 66. ) THEN 
+                   soce_r(ji,jj) = 4.e0 
+                   sice_r(ji,jj) = 2.e0
+                 END IF
+              END DO
+           END DO
+           !
+         END IF
+      END IF
 
       !------------------------------------------!
Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limthd_2.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limthd_2.F90	(revision 1976)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limthd_2.F90	(revision 2004)
@@ -360,5 +360,6 @@
          END DO
       ENDIF
-      
+
+      CALL lbc_lnk( frld , 'T', 1. )      
       
       ! Select points for lateral accretion (this occurs when heat exchange
Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limtrp_2.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limtrp_2.F90	(revision 1976)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/LIM_SRC_2/limtrp_2.F90	(revision 2004)
@@ -4,4 +4,8 @@
    !! LIM 2.0 transport ice model : sea-ice advection/diffusion
    !!======================================================================
+   !! History :  LIM  !  2000-01 (UCL)  Original code
+   !!            2.0  !  2001-05 (G. Madec, R. Hordoir) opa norm
+   !!             -   !  2004-01 (G. Madec, C. Ethe)  F90, mpp
+   !!----------------------------------------------------------------------
 #if defined key_lim2
    !!----------------------------------------------------------------------
@@ -11,27 +15,23 @@
    !!   lim_trp_init_2 : initialization and namelist read
    !!----------------------------------------------------------------------
-   !! * Modules used
-   USE phycst
-   USE dom_oce
+   USE phycst          ! physical constant
+   USE sbc_oce         ! ocean surface boundary condition
+   USE dom_oce         ! ocean domain
    USE in_out_manager  ! I/O manager
-   USE dom_ice_2
-   USE ice_2
-   USE limistate_2
-   USE limadv_2
-   USE limhdf_2
-   USE lbclnk
-   USE lib_mpp
+   USE dom_ice_2       ! LIM-2 domain
+   USE ice_2           ! LIM-2 variables
+   USE limistate_2     ! LIM-2 initial state
+   USE limadv_2        ! LIM-2 advection
+   USE limhdf_2        ! LIM-2 horizontal diffusion
+   USE lbclnk          ! lateral boundary conditions -- MPP exchanges
+   USE lib_mpp         ! MPP library
 
    IMPLICIT NONE
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC lim_trp_2     ! called by sbc_ice_lim_2
-
-   !! * Shared module variables
-   REAL(wp), PUBLIC  ::   &  !:
-      bound  = 0.e0          !: boundary condit. (0.0 no-slip, 1.0 free-slip)
-
-   !! * Module variables
+   PUBLIC   lim_trp_2   ! called by sbc_ice_lim_2
+
+   REAL(wp), PUBLIC  ::   bound  = 0.e0   !: boundary condit. (0.0 no-slip, 1.0 free-slip)
+
    REAL(wp)  ::           &  ! constant values
       epsi06 = 1.e-06  ,  &
@@ -44,7 +44,7 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   LIM 2.0,  UCL-LOCEAN-IPSL (2005) 
+   !! NEMO/LIM 3.2,  UCL-LOCEAN-IPSL (2010) 
    !! $Id$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -62,34 +62,16 @@
       !!
       !! ** action :
-      !!
-      !! History :
-      !!   1.0  !  00-01 (LIM)  Original code
-      !!        !  01-05 (G. Madec, R. Hordoir) opa norm
-      !!   2.0  !  04-01 (G. Madec, C. Ethe)  F90, mpp
       !!---------------------------------------------------------------------
       INTEGER, INTENT(in) ::   kt     ! number of iteration
-
-      INTEGER  ::   ji, jj, jk,   &  ! dummy loop indices
-         &          initad           ! number of sub-timestep for the advection
-
-      REAL(wp) ::  &                              
-         zindb  ,  &
-         zacrith, &
-         zindsn , &
-         zindic , &
-         zusvosn, &
-         zusvoic, &
-         zignm  , &
-         zindhe , &
-         zvbord , &
-         zcfl   , &
-         zusnit , &
-         zrtt, ztsn, ztic1, ztic2
-
-      REAL(wp), DIMENSION(jpi,jpj)  ::   &  ! temporary workspace
-         zui_u , zvi_v , zsm   ,         &
-         zs0ice, zs0sn , zs0a  ,         &
-         zs0c0 , zs0c1 , zs0c2 ,         &
-         zs0st
+      !!
+      INTEGER  ::   ji, jj, jk   ! dummy loop indices
+      INTEGER  ::   initad       ! number of sub-timestep for the advection
+      REAL(wp) ::   zindb  , zindsn , zindic, zacrith   ! local scalars
+      REAL(wp) ::   zusvosn, zusvoic, zignm , zindhe    !   -      -
+      REAL(wp) ::   zvbord , zcfl   , zusnit            !   -      -
+      REAL(wp) ::   zrtt   , ztsn   , ztic1 , ztic2     !   -      -
+      REAL(wp), DIMENSION(jpi,jpj)  ::   zui_u , zvi_v , zsm             ! 2D workspace
+      REAL(wp), DIMENSION(jpi,jpj)  ::   zs0ice, zs0sn , zs0a            !  -      -
+      REAL(wp), DIMENSION(jpi,jpj)  ::   zs0c0 , zs0c1 , zs0c2 , zs0st   !  -      -
       !---------------------------------------------------------------------
 
@@ -105,6 +87,5 @@
          ! ice velocities at ocean U- and V-points (zui_u,zvi_v)
          ! ---------------------------------------
-         ! zvbord factor between 1 and 2 to take into account slip or no-slip boundary conditions.        
-         zvbord = 1.0 + ( 1.0 - bound )
+         zvbord = 1.0 + ( 1.0 - bound )      ! zvbord=2 no-slip, =0 free slip boundary conditions        
          DO jj = 1, jpjm1
             DO ji = 1, jpim1   ! NO vector opt.
@@ -113,7 +94,6 @@
             END DO
          END DO
-         ! Lateral boundary conditions on zui_u, zvi_v
-         CALL lbc_lnk( zui_u, 'U', -1. )
-         CALL lbc_lnk( zvi_v, 'V', -1. )
+         CALL lbc_lnk( zui_u, 'U', -1. )   ;   CALL lbc_lnk( zvi_v, 'V', -1. )         ! Lateral boundary conditions
+
 
          ! CFL test for stability
@@ -122,28 +102,27 @@
          zcfl  = MAX( zcfl, MAXVAL( ABS( zui_u(1:jpim1, :     ) ) * rdt_ice / e1u(1:jpim1, :     ) ) )
          zcfl  = MAX( zcfl, MAXVAL( ABS( zvi_v( :     ,1:jpjm1) ) * rdt_ice / e2v( :     ,1:jpjm1) ) )
-
-         IF (lk_mpp ) CALL mpp_max(zcfl)
-
-         IF ( zcfl > 0.5 .AND. lwp )   WRITE(numout,*) 'lim_trp_2 : violation of cfl criterion the ',nday,'th day, cfl = ',zcfl
+         !
+         IF(lk_mpp)   CALL mpp_max( zcfl )
+         !
+         IF( zcfl > 0.5 .AND. lwp )   WRITE(numout,*) 'lim_trp_2 : violation of cfl criterion the ',nday,'th day, cfl = ', zcfl
 
          ! content of properties
          ! ---------------------
          zs0sn (:,:) =  hsnm(:,:) * area(:,:)                 ! Snow volume.
-         zs0ice(:,:) =  hicm (:,:) * area(:,:)                ! Ice volume.
-         zs0a  (:,:) =  ( 1.0 - frld(:,:) ) * area(:,:)       ! Surface covered by ice.
-         zs0c0 (:,:) =  tbif(:,:,1) / rt0_snow * zs0sn(:,:)   ! Heat content of the snow layer.
+         zs0ice(:,:) =  hicm(:,:) * area(:,:)                 ! Ice volume.
+         zs0a  (:,:) =  ( 1.0 - frld(:,:) )    * area  (:,:)  ! Surface covered by ice.
+         zs0c0 (:,:) =  tbif(:,:,1) / rt0_snow * zs0sn (:,:)  ! Heat content of the snow layer.
          zs0c1 (:,:) =  tbif(:,:,2) / rt0_ice  * zs0ice(:,:)  ! Heat content of the first ice layer.
          zs0c2 (:,:) =  tbif(:,:,3) / rt0_ice  * zs0ice(:,:)  ! Heat content of the second ice layer.
-         zs0st (:,:) =  qstoif(:,:) / xlic     * zs0a(:,:)    ! Heat reservoir for brine pockets.
+         zs0st (:,:) =  qstoif(:,:) / xlic     * zs0a  (:,:)  ! Heat reservoir for brine pockets.
          
  
-         ! Advection 
+         ! Advection (Prather scheme)
          ! ---------
-         ! If ice drift field is too fast, use an appropriate time step for advection.         
-         initad = 1 + INT( MAX( rzero, SIGN( rone, zcfl-0.5 ) ) )
-         zusnit = 1.0 / REAL( initad ) 
-         
-         IF ( MOD( nday , 2 ) == 0) THEN
-            DO jk = 1,initad
+         initad = 1 + INT( MAX( rzero, SIGN( rone, zcfl-0.5 ) ) )   ! If ice drift field is too fast,          
+         zusnit = 1.0 / REAL( initad )                              ! split the ice time step in two
+         !
+         IF( MOD( ( kt - 1) / nn_fsbc , 2 ) == 0) THEN        !==  odd ice time step:  adv_x then adv_y  ==!
+            DO jk = 1, initad
                CALL lim_adv_x_2( zusnit, zui_u, rone , zsm, zs0ice, sxice, sxxice, syice, syyice, sxyice )
                CALL lim_adv_y_2( zusnit, zvi_v, rzero, zsm, zs0ice, sxice, sxxice, syice, syyice, sxyice )
@@ -161,5 +140,5 @@
                CALL lim_adv_y_2( zusnit, zvi_v, rzero, zsm, zs0st , sxst , sxxst , syst , syyst , sxyst  )
             END DO
-         ELSE
+         ELSE                                                 !==  even ice time step:  adv_x then adv_y  ==!
             DO jk = 1, initad
                CALL lim_adv_y_2( zusnit, zvi_v, rone , zsm, zs0ice, sxice, sxxice, syice, syyice, sxyice )
@@ -182,4 +161,5 @@
          ! recover the properties from their contents
          ! ------------------------------------------
+!!gm Define in limmsh one for all area = 1 /area  (CPU time saved !)
          zs0ice(:,:) = zs0ice(:,:) / area(:,:)
          zs0sn (:,:) = zs0sn (:,:) / area(:,:)
@@ -205,4 +185,12 @@
             END DO
          END DO
+!!gm more readable coding: (and avoid an error in F90 with sign of zero)
+!        DO jj = 1, jpjm1          ! NB: has not to be defined on jpj line and jpi row
+!           DO ji = 1 , fs_jpim1   ! vector opt.
+!              IF( MIN( zs0a(ji,jj) , zs0a(ji+1,jj) ) == 0.e0 )   pahu(ji,jj) = 0.e0
+!              IF( MIN( zs0a(ji,jj) , zs0a(ji,jj+1) ) == 0.e0 )   pahv(ji,jj) = 0.e0
+!           END DO
+!        END DO
+!!gm end
 
          ! diffusion
@@ -216,8 +204,9 @@
          CALL lim_hdf_2( zs0st  )
 
-         zs0ice(:,:) = MAX( rzero, zs0ice(:,:) * area(:,:) )    !!bug:  est-ce utile
-         zs0sn (:,:) = MAX( rzero, zs0sn (:,:) * area(:,:) )    !!bug:  cf /area  juste apres
-         zs0a  (:,:) = MAX( rzero, zs0a  (:,:) * area(:,:) )    !! suppression des 2 change le resultat...
-         zs0c0 (:,:) = MAX( rzero, zs0c0 (:,:) * area(:,:) )
+!!gm see comment this can be skipped
+         zs0ice(:,:) = MAX( rzero, zs0ice(:,:) * area(:,:) )    !!bug:  useless
+         zs0sn (:,:) = MAX( rzero, zs0sn (:,:) * area(:,:) )    !!bug:  cf /area  just below
+         zs0a  (:,:) = MAX( rzero, zs0a  (:,:) * area(:,:) )    !! caution: the suppression of the 2 changes 
+         zs0c0 (:,:) = MAX( rzero, zs0c0 (:,:) * area(:,:) )    !! the last digit of the results
          zs0c1 (:,:) = MAX( rzero, zs0c1 (:,:) * area(:,:) )
          zs0c2 (:,:) = MAX( rzero, zs0c2 (:,:) * area(:,:) )
@@ -225,14 +214,11 @@
 
 
-         ! -------------------------------------------------------------------!
-         !   Up-dating and limitation of sea ice properties after transport   !
-         ! -------------------------------------------------------------------!
-
-         ! Up-dating and limitation of sea ice properties after transport.
+         !-------------------------------------------------------------------!
+         !   Updating and limitation of sea ice properties after transport   !
+         !-------------------------------------------------------------------!
          DO jj = 1, jpj
-!!!iii      zindhe = REAL( MAX( 0, isign(1, jj - njeq ) ) )              !ibug mpp  !!bugmpp  njeq!
             zindhe = MAX( 0.e0, SIGN( 1.e0, fcor(1,jj) ) )              ! = 0 for SH, =1 for NH
             DO ji = 1, jpi
-
+               !
                ! Recover mean values over the grid squares.
                zs0sn (ji,jj) = MAX( rzero, zs0sn (ji,jj)/area(ji,jj) )
@@ -272,7 +258,7 @@
             END DO
          END DO
-         
+         !
       ENDIF
-      
+      !
    END SUBROUTINE lim_trp_2
 
@@ -284,17 +270,13 @@
       !! ** Purpose :   initialization of ice advection parameters
       !!
-      !! ** Method  : Read the namicetrp namelist and check the parameter 
-      !!       values called at the first timestep (nit000)
+      !! ** Method  :   Read the namicetrp namelist and check the parameter 
+      !!              values called at the first timestep (nit000)
       !!
       !! ** input   :   Namelist namicetrp
-      !!
-      !! history :
-      !!   2.0  !  03-08 (C. Ethe)  Original code
       !!-------------------------------------------------------------------
       NAMELIST/namicetrp/ bound
       !!-------------------------------------------------------------------
-
-      ! Read Namelist namicetrp
-      REWIND ( numnam_ice )
+      !
+      REWIND ( numnam_ice )      ! Read Namelist namicetrp
       READ   ( numnam_ice  , namicetrp )
       IF(lwp) THEN
@@ -304,5 +286,5 @@
          WRITE(numout,*) '   boundary conditions (0. no-slip, 1. free-slip) bound  = ', bound
       ENDIF
-            
+      !
    END SUBROUTINE lim_trp_init_2
 
