Index: /branches/devmercator2010/CONFIG/ORCA2_LIM/EXP00/AA_job
===================================================================
--- /branches/devmercator2010/CONFIG/ORCA2_LIM/EXP00/AA_job	(revision 2076)
+++ /branches/devmercator2010/CONFIG/ORCA2_LIM/EXP00/AA_job	(revision 2077)
@@ -117,5 +117,5 @@
 
 #- Files for the configuration and ocean dynamics
-Rapatrie ${R_TMP} ORCA2_LIM_nemo_v3.1.tar
+Rapatrie ${R_TMP} ORCA2_LIM_nemo_v3.2.tar
 
 ls -alF
Index: /branches/devmercator2010/CONFIG/ORCA2_LIM/EXP00/namelist
===================================================================
--- /branches/devmercator2010/CONFIG/ORCA2_LIM/EXP00/namelist	(revision 2076)
+++ /branches/devmercator2010/CONFIG/ORCA2_LIM/EXP00/namelist	(revision 2077)
@@ -275,5 +275,22 @@
    rn_alphdi   =    0.72   !  (Pyane, 1972)
 /
-
+!-----------------------------------------------------------------------
+&namdta_tem    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!              !     file name                  ! frequency (hours) ! variable   ! time interpol. !  clim   !'yearly' or ! weights  ! rotation !
+!              !                                !  (if <0  months)  !   name     !    (logical)   !  (T/F)  ! 'monthly'  ! filename ! pairing  !
+  sn_tem       = 'data_1m_potential_temperature_nomask',  -1        , 'votemper' ,     .true.     , .true.  , 'yearly'   , ' '      , ' '
+!
+  cn_dir       = './'      !  root directory for the location of the runoff files
+/
+!-----------------------------------------------------------------------
+&namdta_sal    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!              !     file name                  ! frequency (hours) ! variable   ! time interpol. !  clim   ! 'yearly' or ! weights  ! rotation !
+!              !                                !  (if <0  months)  !   name     !    (logical)   !  (T/F)  !  'monthly'  ! filename ! pairing  !
+   sn_sal      =  'data_1m_salinity_nomask'     ,         -1        , 'vosaline' ,     .true.     , .true.  , 'yearly'    , ''       , ' '
+!  
+   cn_dir      = './'      !  root directory for the location of the runoff files
+/
 !!======================================================================
 !!               ***  Lateral boundary condition  ***
@@ -417,4 +434,5 @@
    ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries  
    ln_traadv_ubs    =  .false.  !  UBS scheme                 
+   !ln_traadv_ppm    =  .true.  !  UBS scheme                 
 /
 !-----------------------------------------------------------------------
@@ -698,5 +716,5 @@
 &namptr       !   Poleward Transport Diagnostic
 !-----------------------------------------------------------------------
-   ln_diaptr  = .true.     !  Poleward heat and salt transport (T) or not (F)
+   ln_diaptr  = .false.     !  Poleward heat and salt transport (T) or not (F)
    ln_diaznl  = .true.     !  Add zonal means and meridional stream functions
    ln_subbas  = .true.     !  Atlantic/Pacific/Indian basins computation (T) or not 
Index: /branches/devmercator2010/CONFIG/ORCA2_LIM_PISCES/EXP00/AA_job
===================================================================
--- /branches/devmercator2010/CONFIG/ORCA2_LIM_PISCES/EXP00/AA_job	(revision 2076)
+++ /branches/devmercator2010/CONFIG/ORCA2_LIM_PISCES/EXP00/AA_job	(revision 2077)
@@ -117,5 +117,5 @@
 
 #- Files for the configuration and ocean dynamics
-Rapatrie ${R_TMP} ORCA2_LIM_nemo_v3.1.tar
+Rapatrie ${R_TMP} ORCA2_LIM_nemo_v3.2.tar
 Rapatrie ${R_TMP} INPUTS_INIT_v3.tar
 Rapatrie ${R_TMP} INPUTS_PISCES_v3.tar
Index: /branches/devmercator2010/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist
===================================================================
--- /branches/devmercator2010/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist	(revision 2076)
+++ /branches/devmercator2010/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist	(revision 2077)
@@ -275,5 +275,22 @@
    rn_alphdi   =    0.72   !  (Pyane, 1972)
 /
-
+!-----------------------------------------------------------------------
+&namdta_tem    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!              !     file name                  ! frequency (hours) ! variable   ! time interpol. !  clim   !'yearly' or ! weights  ! rotation !
+!              !                                !  (if <0  months)  !   name     !    (logical)   !  (T/F)  ! 'monthly'  ! filename ! pairing  !
+  sn_tem       = 'data_1m_potential_temperature_nomask',  -1        , 'votemper' ,     .true.     , .true.  , 'yearly'   , ' '      , ' '
+!
+  cn_dir       = './'      !  root directory for the location of the runoff files
+/
+!-----------------------------------------------------------------------
+&namdta_sal    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!              !     file name                  ! frequency (hours) ! variable   ! time interpol. !  clim   ! 'yearly' or ! weights  ! rotation !
+!              !                                !  (if <0  months)  !   name     !    (logical)   !  (T/F)  !  'monthly'  ! filename ! pairing  !
+   sn_sal      =  'data_1m_salinity_nomask'     ,         -1        , 'vosaline' ,     .true.     , .true.  , 'yearly'    , ''       , ' '
+!
+   cn_dir      = './'      !  root directory for the location of the runoff files
+/
 !!======================================================================
 !!               ***  Lateral boundary condition  ***
Index: /branches/devmercator2010/NEMO/LIM_SRC_2/dom_ice_2.F90
===================================================================
--- /branches/devmercator2010/NEMO/LIM_SRC_2/dom_ice_2.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/LIM_SRC_2/dom_ice_2.F90	(revision 2077)
@@ -5,5 +5,4 @@
    !!======================================================================
    !! History :   2.0  !  03-08  (C. Ethe)  Free form and module
-   !!             3.3  !  09-05 (G.Garric) addition of the lim2_evp cas
    !!----------------------------------------------------------------------
 #if defined key_lim2
@@ -27,14 +26,8 @@
       &                                              area   ,         &  !: surface of grid cell 
       &                                              tms    , tmu        !: temperature and velocity points masks
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,2,2)     ::   wght                !: weight of the 4 neighbours to compute averages
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,2,2)     ::   wght   ,         &  !: weight of the 4 neighbours to compute averages
+      &                                              akappa , bkappa     !: first and third group of metric coefficients
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,2,2,2,2) ::   alambd   !: second group of metric coefficients
 
-#if defined key_lim2_vp
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,2,2)     ::                     &
-      &                                              akappa , bkappa     !: first and third group of metric coefficients
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,2,2,2,2) ::   alambd              !: second group of metric coefficients
-#else
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)         ::   tmv    , tmf        !: y-velocity and F-points masks
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)         ::   tmi                 !: ice mask: =1 if ice thick > 0
-#endif
    !!======================================================================
 #endif
Index: /branches/devmercator2010/NEMO/LIM_SRC_2/ice_2.F90
===================================================================
--- /branches/devmercator2010/NEMO/LIM_SRC_2/ice_2.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/LIM_SRC_2/ice_2.F90	(revision 2077)
@@ -5,5 +5,4 @@
    !!=====================================================================
    !! History :  2.0  !  03-08  (C. Ethe)  F90: Free form and module
-   !!            3.3  !  09-05 (G.Garric) addition of the lim2_evp cas
    !!----------------------------------------------------------------------
 #if defined key_lim2
@@ -26,5 +25,4 @@
    LOGICAL               , PUBLIC ::   ln_limdyn     = .TRUE.             !: flag for ice dynamics (T) or not (F)
    LOGICAL               , PUBLIC ::   ln_limdmp     = .FALSE.            !: Ice damping
-   LOGICAL               , PUBLIC ::   ln_nicep      = .TRUE.             !: flag for sea-ice 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)
@@ -48,7 +46,5 @@
    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)
-   INTEGER , PUBLIC ::   nevp   =   360     !: number of EVP subcycling iterations
-   INTEGER , PUBLIC ::   telast =  3600     !: timescale for EVP elastic waves
-   REAL(wp), PUBLIC ::   alphaevp = 1.e0    !: coefficient for the solution of EVP int. stresses
+
    REAL(wp), PUBLIC ::   usecc2             !:  = 1.0 / ( ecc * ecc )
    REAL(wp), PUBLIC ::   rhoco              !: = rau0 * cw
@@ -56,31 +52,10 @@
    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)
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   pahu , pahv         !: ice hor. eddy diffusivity coef. at ocean U- and V-points
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   ust2s               !: friction velocity
-
-#if  defined key_lim2_vp
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hsnm , hicm         !: mean snow and ice thicknesses
-   CHARACTER(len=1), PUBLIC :: cl_grid =   'B'                   !: type of grid used in ice dynamics, 'C' or 'B'
-#else
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::                      &
-                                                   stress1_i ,  &!: first stress tensor element       
-                                                   stress2_i ,  &!: second stress tensor element
-                                                   stress12_i,  &!: diagonal stress tensor element
-                                                   delta_i   ,  &!: Delta factor for the ice rheology (see Flato and Hibler 95) [s-1] -> limrhg.F90
-                                                   divu_i    ,  &!: Divergence of the velocity field [s-1] -> limrhg.F90
-                                                   shear_i       !: Shear of the velocity field [s-1] -> limrhg.F90
-
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)         :: at_i          !:
-   REAL(wp), PUBLIC, DIMENSION(:,:)    ,POINTER :: vt_s ,vt_i    !: mean snow and ice thicknesses
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj),TARGET  :: hsnm , hicm   !: mean snow and ice thicknesses, target for pointers vt_s and vt_i 
-   CHARACTER(len=1), PUBLIC :: cl_grid =   'C'                   !: type of grid used in ice dynamics, 'C' or 'B'
-#endif
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   ahiu , ahiv   !: hor. diffusivity coeff. at ocean U- and V-points (m2/s)
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   pahu , pahv   !: ice hor. eddy diffusivity coef. at ocean U- and V-points
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hsnm , hicm   !: mean snow and ice thicknesses
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   ust2s                 !: friction velocity
 
    !!* diagnostic quantities
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   rdvosif       !: Variation of volume at surface (only used for outputs)
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   rdvobif       !: Variation of ice volume at the bottom ice (only used for outputs)
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   fdvolif       !: Total variation of ice volume (only used for outputs)
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   rdvonif       !: Lateral Variation of ice volume (only used for outputs)
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   sist          !: Sea-Ice Surface Temperature (Kelvin)
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   tfu           !: Freezing/Melting point temperature of sea water at SSS
Index: /branches/devmercator2010/NEMO/LIM_SRC_2/iceini_2.F90
===================================================================
--- /branches/devmercator2010/NEMO/LIM_SRC_2/iceini_2.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/LIM_SRC_2/iceini_2.F90	(revision 2077)
@@ -6,5 +6,4 @@
    !! History :   1.0  !  02-08  (G. Madec)  F90: Free form and modules
    !!             2.0  !  03-08  (C. Ethe)  add ice_run
-   !!             3.3  !  09-05  (G.Garric) addition of the lim2_evp case
    !!----------------------------------------------------------------------
 #if defined key_lim2
@@ -31,7 +30,4 @@
 
    PUBLIC   ice_init_2               ! called by sbcice_lim_2.F90
-
-   INTEGER , PUBLIC  ::     numit                  !: iteration number
-
 
    !!----------------------------------------------------------------------
@@ -66,9 +62,6 @@
       ENDIF
       
-      tn_ice(:,:,1) = sist(:,:)       ! initialisation of ice temperature   
+      tn_ice(:,:,1) = sist(:,:)         ! initialisation of ice temperature   
       fr_i  (:,:) = 1.0 - frld(:,:)   ! initialisation of sea-ice fraction    
-      !
-      numit = nit000 - 1              !initialisation ice time-step
-
       !
    END SUBROUTINE ice_init_2
Index: /branches/devmercator2010/NEMO/LIM_SRC_2/limdyn_2.F90
===================================================================
--- /branches/devmercator2010/NEMO/LIM_SRC_2/limdyn_2.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/LIM_SRC_2/limdyn_2.F90	(revision 2077)
@@ -8,5 +8,4 @@
    !!             2.0  !  03-08  (C. Ethe) add lim_dyn_init
    !!             2.0  !  06-07  (G. Madec)  Surface module
-   !!             3.3  !  09-05  (G.Garric) addition of the lim2_evp cas
    !!---------------------------------------------------------------------
 #if defined key_lim2
@@ -23,9 +22,6 @@
    USE dom_ice_2      !
    USE limistate_2    !
-#if defined key_lim2_vp
    USE limrhg_2       ! ice rheology
-#else
-   USE limrhg         ! ice rheology
-#endif
+
    USE lbclnk         !
    USE lib_mpp        !
@@ -91,9 +87,5 @@
             i_jpj = jpj
             IF(ln_ctl)   CALL prt_ctl_info( 'lim_dyn  :    i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj )
-#if defined key_lim2_vp
             CALL lim_rhg_2( i_j1, i_jpj )
-#else
-            CALL lim_rhg( i_j1, i_jpj ) !!!!cbr CALL lim_rhg( i_j1, i_jpj, kt )
-#endif
             !
          ELSE                                 ! optimization of the computational area
@@ -113,14 +105,8 @@
                   i_j1 = i_j1 + 1
                END DO
-#if defined key_lim2_vp
                i_j1 = MAX( 1, i_j1-1 )
                IF(ln_ctl)   WRITE(numout,*) 'lim_dyn : NH i_j1 = ', i_j1, ' ij_jpj = ', i_jpj
                ! 
                CALL lim_rhg_2( i_j1, i_jpj )
-#else
-               i_j1 = MAX( 1, i_j1-2 )
-               IF(ln_ctl)   WRITE(numout,*) 'lim_dyn : NH i_j1 = ', i_j1, ' ij_jpj = ', i_jpj
-               CALL lim_rhg( i_j1, i_jpj )
-#endif
                ! 
                ! Southern hemisphere
@@ -130,14 +116,8 @@
                   i_jpj = i_jpj - 1
                END DO
-#if defined key_lim2_vp
                i_jpj = MIN( jpj, i_jpj+2 )
                IF(ln_ctl)   WRITE(numout,*) 'lim_dyn : SH i_j1 = ', i_j1, ' ij_jpj = ', i_jpj
                ! 
                CALL lim_rhg_2( i_j1, i_jpj )
-#else
-               i_jpj = MIN( jpj, i_jpj+1 )
-               IF(ln_ctl)   WRITE(numout,*) 'lim_dyn : SH i_j1 = ', i_j1, ' ij_jpj = ', i_jpj
-               CALL lim_rhg( i_j1, i_jpj ) !!!!cbr CALL lim_rhg( i_j1, i_jpj, kt )
-#endif
                ! 
             ELSE                                 ! local domain extends over one hemisphere only
@@ -154,16 +134,9 @@
                   i_jpj = i_jpj - 1
                END DO
-#if defined key_lim2_vp
                i_jpj = MIN( jpj, i_jpj+2)
-
+    
                IF(ln_ctl)   WRITE(numout,*) 'lim_dyn : one hemisphere: i_j1 = ', i_j1, ' ij_jpj = ', i_jpj
                ! 
                CALL lim_rhg_2( i_j1, i_jpj )
-#else
-               i_j1 = MAX( 1, i_j1-2 )
-               i_jpj = MIN( jpj, i_jpj+1)
-               IF(ln_ctl)   WRITE(numout,*) 'lim_dyn : one hemisphere: i_j1 = ', i_j1, ' ij_jpj = ', i_jpj
-               CALL lim_rhg( i_j1, i_jpj ) !!!!cbr CALL lim_rhg( i_j1, i_jpj, kt )
-#endif
                !
             ENDIF
@@ -175,15 +148,4 @@
          ! computation of friction velocity
          ! --------------------------------
-
-     SELECT CASE( cl_grid )
-
-      CASE( 'C' )                          ! C-grid ice dynamics
-         !?????????????????????????????????
-         ! ice-ocean velocity at U & V-points (u_ice vi_ice at U- & V-points ; ssu_m, ssv_m at U- & V-points)
-         zu_io(:,:) = u_ice(:,:) - ssu_m(:,:)
-         zv_io(:,:) = v_ice(:,:) - ssv_m(:,:)
-
-
-      CASE( 'B' )                          ! B-grid ice dynamics
          ! ice-ocean velocity at U & V-points (u_ice v_ice at I-point ; ssu_m, ssv_m at U- & V-points)
          
@@ -194,7 +156,4 @@
             END DO
          END DO
-
-      END SELECT
-
          ! frictional velocity at T-point
          DO jj = 2, jpjm1
@@ -239,6 +198,5 @@
       NAMELIST/namicedyn/ epsd, alpha,     &
          &                dm, nbiter, nbitdr, om, resl, cw, angvg, pstar,   &
-         &                c_rhg, etamn, creepl, ecc, ahi0, &
-         &                nevp, telast, alphaevp
+         &                c_rhg, etamn, creepl, ecc, ahi0
       !!-------------------------------------------------------------------
 
@@ -265,7 +223,4 @@
          WRITE(numout,*) '       eccentricity of the elliptical yield curve       ecc    = ', ecc
          WRITE(numout,*) '       horizontal diffusivity coeff. for sea-ice        ahi0   = ', ahi0
-         WRITE(numout,*) '       number of iterations for subcycling              nevp   = ', nevp
-         WRITE(numout,*) '       timescale for elastic waves                      telast = ', telast
-         WRITE(numout,*) '       coefficient for the solution of int. stresses  alphaevp = ', alphaevp
       ENDIF
 
Index: /branches/devmercator2010/NEMO/LIM_SRC_2/limmsh_2.F90
===================================================================
--- /branches/devmercator2010/NEMO/LIM_SRC_2/limmsh_2.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/LIM_SRC_2/limmsh_2.F90	(revision 2077)
@@ -47,12 +47,8 @@
       !!         original    : 01-04 (LIM)
       !!         addition    : 02-08 (C. Ethe, G. Madec)
-      !!         additions   : 2009-05 (addition of the lim2_evp case, G. Garric)
       !!--------------------------------------------------------------------- 
       !! * Local variables
       INTEGER :: ji, jj      ! dummy loop indices
 
-      REAL(wp) ::         &
-         zusden              ! temporary scalars
-#if defined key_lim2_vp
       REAL(wp), DIMENSION(jpi,jpj) ::  &
          zd2d1 , zd1d2       ! Derivative of zh2 (resp. zh1) in the x direction
@@ -61,6 +57,5 @@
          zh1p  , zh2p   , &  ! Idem zh1, zh2 for the bottom left corner of the grid
          zd2d1p, zd1d2p , &  ! Idem zd2d1, zd1d2 for the bottom left corner of the grid
-         zusden2             ! temporary scalars
-#endif
+         zusden, zusden2     ! temporary scalars
       !!---------------------------------------------------------------------
 
@@ -117,16 +112,11 @@
       !-------------------
 !!ibug ???
+      akappa(:,:,:,:) = 0.e0
       wght(:,:,:,:) = 0.e0
-      tmu(:,:)      = 0.e0
-#if defined key_lim2_vp 
-      akappa(:,:,:,:)     = 0.e0
       alambd(:,:,:,:,:,:) = 0.e0
-#else
-      tmv(:,:) = 0.e0
-      tmf(:,:) = 0.e0
-#endif
+      tmu(:,:) = 0.e0
 !!i
       
-#if defined key_lim2_vp
+      
       ! metric coefficients for sea ice dynamic
       !----------------------------------------
@@ -162,29 +152,8 @@
       CALL lbc_lnk( wght(:,:,2,1), 'I', 1. )      ! but it is never used
       CALL lbc_lnk( wght(:,:,2,2), 'I', 1. )
-#else
-      !                                                      ! weights (wght)
-      DO jj = 2, jpj-1
-         DO ji = 2, jpi-1
-            zusden = 1. / (  ( e1t(ji+1,jj) + e1t(ji,jj  ) )   &
-               &           * ( e2t(ji,jj+1) + e2t(ji  ,jj) ) ) 
-            wght(ji,jj,1,1) = zusden * e1t(ji+1,jj) * e2t(ji,jj+1)
-            wght(ji,jj,1,2) = zusden * e1t(ji+1,jj) * e2t(ji,jj  )
-            wght(ji,jj,2,1) = zusden * e1t(ji  ,jj) * e2t(ji,jj+1)
-            wght(ji,jj,2,2) = zusden * e1t(ji  ,jj) * e2t(ji,jj  )
-         END DO
-      END DO
-
-      !With EVP, the weights are calculated on 'F' points
-      CALL lbc_lnk( wght(:,:,1,1), 'F', 1. )      ! CAUTION: even with the lbc_lnk at ice U-V-point
-      CALL lbc_lnk( wght(:,:,1,2), 'F', 1. )      ! the value of wght at jpj is wrong
-      CALL lbc_lnk( wght(:,:,2,1), 'F', 1. )      ! but it is never used
-      CALL lbc_lnk( wght(:,:,2,2), 'F', 1. )
-
-#endif
     
       ! Coefficients for divergence of the stress tensor
       !-------------------------------------------------
 
-#if defined key_lim2_vp
       DO jj = 2, jpj
          DO ji = 2, jpi   ! NO vector opt.
@@ -254,5 +223,4 @@
       CALL lbc_lnk( alambd(:,:,2,1,1,1), 'I', 1. )      !
       CALL lbc_lnk( alambd(:,:,2,1,1,2), 'I', 1. )      !
-#endif
             
 
@@ -265,6 +233,4 @@
       tmu(:,1) = 0.e0
       tmu(1,:) = 0.e0
-
-#if defined key_lim2_vp
       DO jj = 2, jpj               ! ice U.V-point: computed from ice T-point mask
          DO ji = 2, jpim1   ! NO vector opt.
@@ -275,23 +241,4 @@
       !--lateral boundary conditions    
       CALL lbc_lnk( tmu(:,:), 'I', 1. )
-#else
-      tmv(:,1) = 0.e0 !SB
-      tmv(1,:) = 0.e0 !SB
-      tmf(1,:) = 0.e0
-      tmf(:,1) = 0.e0
-      DO jj = 1, jpj - 1
-         DO ji = 1 , jpi - 1
-            tmu(ji,jj) =  tms(ji,jj) * tms(ji+1,jj)
-            tmv(ji,jj) =  tms(ji,jj) * tms(ji,jj+1)
-            tmf(ji,jj) =  tms(ji,jj) * tms(ji+1,jj) * tms(ji,jj+1) * &
-               tms(ji+1,jj+1)
-         END DO
-      END DO
-
-      !--lateral boundary conditions
-      CALL lbc_lnk( tmu(:,:), 'U', 1. )
-      CALL lbc_lnk( tmv(:,:), 'V', 1. )
-      CALL lbc_lnk( tmf(:,:), 'F', 1. )
-#endif
       
       ! unmasked and masked area of T-grid cell
Index: /branches/devmercator2010/NEMO/LIM_SRC_2/limrhg_2.F90
===================================================================
--- /branches/devmercator2010/NEMO/LIM_SRC_2/limrhg_2.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/LIM_SRC_2/limrhg_2.F90	(revision 2077)
@@ -9,7 +9,6 @@
    !!            " "  !  06-08  (G. Madec)  surface module, ice-stress at I-point
    !!            " "  !  09-09  (G. Madec)  Huge verctor optimisation
-   !!            3.3  !  09-05  (G.Garric) addition of the lim2_evp case
-   !!----------------------------------------------------------------------
-#if defined key_lim2 &&  defined key_lim2_vp
+   !!----------------------------------------------------------------------
+#if defined key_lim2
    !!----------------------------------------------------------------------
    !!   'key_lim2'                                    LIM 2.0 sea-ice model
Index: /branches/devmercator2010/NEMO/LIM_SRC_2/limrst_2.F90
===================================================================
--- /branches/devmercator2010/NEMO/LIM_SRC_2/limrst_2.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/LIM_SRC_2/limrst_2.F90	(revision 2077)
@@ -6,5 +6,4 @@
    !! History :  2.0  !  01-04  (C. Ethe, G. Madec)  Original code
    !!                 !  06-07  (S. Masson)  use IOM for restart read/write
-   !!            3.3  !  09-05  (G.Garric) addition of the lim2_evp case
    !!----------------------------------------------------------------------
 #if defined key_lim2
@@ -109,55 +108,50 @@
       CALL iom_rstput( iter, nitrst, numriw, 'kt_ice', REAL( iter, wp) ) 
       
-      CALL iom_rstput( iter, nitrst, numriw, 'hicif'      , hicif     (:,:)   )      ! prognostic variables 
-      CALL iom_rstput( iter, nitrst, numriw, 'hsnif'      , hsnif     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'frld'       , frld      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sist'       , sist      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'tbif1'      , tbif      (:,:,1) )
-      CALL iom_rstput( iter, nitrst, numriw, 'tbif2'      , tbif      (:,:,2) )
-      CALL iom_rstput( iter, nitrst, numriw, 'tbif3'      , tbif      (:,:,3) )
-      CALL iom_rstput( iter, nitrst, numriw, 'u_ice'      , u_ice     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'v_ice'      , v_ice     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'qstoif'     , qstoif    (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'fsbbq'      , fsbbq     (:,:)   )
-#if ! defined key_lim2_vp
-      CALL iom_rstput( iter, nitrst, numriw, 'stress1_i'  , stress1_i (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'stress2_i'  , stress2_i (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'stress12_i' , stress12_i(:,:)   )
-#endif
-      CALL iom_rstput( iter, nitrst, numriw, 'sxice' ,      sxice     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syice' ,      syice     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxxice',      sxxice    (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syyice',      syyice    (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxyice',      sxyice    (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxsn'  ,      sxsn      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sysn'  ,      sysn      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxxsn' ,      sxxsn     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syysn' ,      syysn     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxysn' ,      sxysn     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxa'   ,      sxa       (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sya'   ,      sya       (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxxa'  ,      sxxa      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syya'  ,      syya      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxya'  ,      sxya      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxc0'  ,      sxc0      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syc0'  ,      syc0      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxxc0' ,      sxxc0     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syyc0' ,      syyc0     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxyc0' ,      sxyc0     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxc1'  ,      sxc1      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syc1'  ,      syc1      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxxc1' ,      sxxc1     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syyc1' ,      syyc1     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxyc1' ,      sxyc1     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxc2'  ,      sxc2      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syc2'  ,      syc2      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxxc2' ,      sxxc2     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syyc2' ,      syyc2     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxyc2' ,      sxyc2     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxst'  ,      sxst      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syst'  ,      syst      (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxxst' ,      sxxst     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'syyst' ,      syyst     (:,:)   )
-      CALL iom_rstput( iter, nitrst, numriw, 'sxyst' ,      sxyst     (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'hicif' , hicif (:,:)   )      ! prognostic variables 
+      CALL iom_rstput( iter, nitrst, numriw, 'hsnif' , hsnif (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'frld'  , frld  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sist'  , sist  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'tbif1' , tbif  (:,:,1) )
+      CALL iom_rstput( iter, nitrst, numriw, 'tbif2' , tbif  (:,:,2) )
+      CALL iom_rstput( iter, nitrst, numriw, 'tbif3' , tbif  (:,:,3) )
+      CALL iom_rstput( iter, nitrst, numriw, 'u_ice' , u_ice (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'v_ice' , v_ice (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'qstoif', qstoif(:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'fsbbq' , fsbbq (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxice' , sxice (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syice' , syice (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxxice', sxxice(:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syyice', syyice(:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxyice', sxyice(:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxsn'  , sxsn  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sysn'  , sysn  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxxsn' , sxxsn (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syysn' , syysn (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxysn' , sxysn (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxa'   , sxa   (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sya'   , sya   (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxxa'  , sxxa  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syya'  , syya  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxya'  , sxya  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxc0'  , sxc0  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syc0'  , syc0  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxxc0' , sxxc0 (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syyc0' , syyc0 (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxyc0' , sxyc0 (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxc1'  , sxc1  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syc1'  , syc1  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxxc1' , sxxc1 (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syyc1' , syyc1 (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxyc1' , sxyc1 (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxc2'  , sxc2  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syc2'  , syc2  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxxc2' , sxxc2 (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syyc2' , syyc2 (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxyc2' , sxyc2 (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxst'  , sxst  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syst'  , syst  (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxxst' , sxxst (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'syyst' , syyst (:,:)   )
+      CALL iom_rstput( iter, nitrst, numriw, 'sxyst' , sxyst (:,:)   )
       
       IF( iter == nitrst ) THEN
@@ -224,46 +218,41 @@
       ENDIF
 
-      CALL iom_get( numrir, jpdom_autoglo, 'qstoif'     , qstoif     )    
-      CALL iom_get( numrir, jpdom_autoglo, 'fsbbq'      , fsbbq      )    
-#if ! defined key_lim2_vp
-      CALL iom_get( numrir, jpdom_autoglo, 'stress1_i'  , stress1_i  )
-      CALL iom_get( numrir, jpdom_autoglo, 'stress2_i'  , stress2_i  )
-      CALL iom_get( numrir, jpdom_autoglo, 'stress12_i' , stress12_i )
-#endif
-      CALL iom_get( numrir, jpdom_autoglo, 'sxice'      , sxice      )
-      CALL iom_get( numrir, jpdom_autoglo, 'syice'      , syice      )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxxice'     , sxxice     )
-      CALL iom_get( numrir, jpdom_autoglo, 'syyice'     , syyice     )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxyice'     , sxyice     )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxsn'       , sxsn       )
-      CALL iom_get( numrir, jpdom_autoglo, 'sysn'       , sysn       )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxxsn'      , sxxsn      )
-      CALL iom_get( numrir, jpdom_autoglo, 'syysn'      , syysn      )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxysn'      , sxysn      )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxa'        , sxa        )
-      CALL iom_get( numrir, jpdom_autoglo, 'sya'        , sya        )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxxa'       , sxxa       )
-      CALL iom_get( numrir, jpdom_autoglo, 'syya'       , syya       )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxya'       , sxya       )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxc0'       , sxc0       )
-      CALL iom_get( numrir, jpdom_autoglo, 'syc0'       , syc0       )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxxc0'      , sxxc0      )
-      CALL iom_get( numrir, jpdom_autoglo, 'syyc0'      , syyc0      )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxyc0'      , sxyc0      )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxc1'       , sxc1       )
-      CALL iom_get( numrir, jpdom_autoglo, 'syc1'       , syc1       )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxxc1'      , sxxc1      )
-      CALL iom_get( numrir, jpdom_autoglo, 'syyc1'      , syyc1      )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxyc1'      , sxyc1      )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxc2'       , sxc2       )
-      CALL iom_get( numrir, jpdom_autoglo, 'syc2'       , syc2       )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxxc2'      , sxxc2      )
-      CALL iom_get( numrir, jpdom_autoglo, 'syyc2'      , syyc2      )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxyc2'      , sxyc2      )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxst'       , sxst       )
-      CALL iom_get( numrir, jpdom_autoglo, 'syst'       , syst       )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxxst'      , sxxst      )
-      CALL iom_get( numrir, jpdom_autoglo, 'syyst'      , syyst      )
-      CALL iom_get( numrir, jpdom_autoglo, 'sxyst'      , sxyst      )
+      CALL iom_get( numrir, jpdom_autoglo, 'qstoif', qstoif )    
+      CALL iom_get( numrir, jpdom_autoglo, 'fsbbq' , fsbbq  )    
+      CALL iom_get( numrir, jpdom_autoglo, 'sxice' , sxice  )
+      CALL iom_get( numrir, jpdom_autoglo, 'syice' , syice  )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxxice', sxxice )
+      CALL iom_get( numrir, jpdom_autoglo, 'syyice', syyice )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxyice', sxyice )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxsn'  , sxsn   )
+      CALL iom_get( numrir, jpdom_autoglo, 'sysn'  , sysn   )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxxsn' , sxxsn  )
+      CALL iom_get( numrir, jpdom_autoglo, 'syysn' , syysn  )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxysn' , sxysn  )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxa'   , sxa    )
+      CALL iom_get( numrir, jpdom_autoglo, 'sya'   , sya    )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxxa'  , sxxa   )
+      CALL iom_get( numrir, jpdom_autoglo, 'syya'  , syya   )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxya'  , sxya   )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxc0'  , sxc0   )
+      CALL iom_get( numrir, jpdom_autoglo, 'syc0'  , syc0   )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxxc0' , sxxc0  )
+      CALL iom_get( numrir, jpdom_autoglo, 'syyc0' , syyc0  )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxyc0' , sxyc0  )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxc1'  , sxc1   )
+      CALL iom_get( numrir, jpdom_autoglo, 'syc1'  , syc1   )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxxc1' , sxxc1  )
+      CALL iom_get( numrir, jpdom_autoglo, 'syyc1' , syyc1  )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxyc1' , sxyc1  )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxc2'  , sxc2   )
+      CALL iom_get( numrir, jpdom_autoglo, 'syc2'  , syc2   )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxxc2' , sxxc2  )
+      CALL iom_get( numrir, jpdom_autoglo, 'syyc2' , syyc2  )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxyc2' , sxyc2  )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxst'  , sxst   )
+      CALL iom_get( numrir, jpdom_autoglo, 'syst'  , syst   )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxxst' , sxxst  )
+      CALL iom_get( numrir, jpdom_autoglo, 'syyst' , syyst  )
+      CALL iom_get( numrir, jpdom_autoglo, 'sxyst' , sxyst  )
       
       CALL iom_close( numrir )
Index: /branches/devmercator2010/NEMO/LIM_SRC_2/limsbc_2.F90
===================================================================
--- /branches/devmercator2010/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 2077)
@@ -7,5 +7,4 @@
    !!           02-07 (C. Ethe, G. Madec) re-writing F90
    !!           06-07 (G. Madec) surface module
-   !!           09-05 (G.Garric) addition of the lim2_evp case
    !!----------------------------------------------------------------------
 #if defined key_lim2
@@ -89,5 +88,4 @@
       REAL(wp) ::   zfrldu, zfrldv   ! lead fraction at U- & V-points
       REAL(wp) ::   zutau , zvtau    ! lead fraction at U- & V-points
-!!!      REAL(wp) ::   zutaui , zvtaui  ! lead fraction at U- & V-points
       REAL(wp) ::   zu_io , zv_io    ! 2 components of the ice-ocean velocity
 ! interface 2D --> 3D
@@ -277,11 +275,6 @@
             DO ji = 2, jpim1   ! NO vector opt.
                ! ... components of ice-ocean stress at U and V-points  (from I-point values)
-#if defined key_lim2_vp
                zutau  = 0.5 * ( ztio_u(ji+1,jj) + ztio_u(ji+1,jj+1) )
                zvtau  = 0.5 * ( ztio_v(ji,jj+1) + ztio_v(ji+1,jj+1) )
-#else
-               zutau  = ztio_u(ji,jj)
-               zvtau  = ztio_v(ji,jj)
-#endif
                ! ... open-ocean (lead) fraction at U- & V-points (from T-point values)
                zfrldu = 0.5 * ( frld(ji,jj) + frld(ji+1,jj  ) )
Index: /branches/devmercator2010/NEMO/LIM_SRC_2/limtrp_2.F90
===================================================================
--- /branches/devmercator2010/NEMO/LIM_SRC_2/limtrp_2.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/LIM_SRC_2/limtrp_2.F90	(revision 2077)
@@ -67,5 +67,4 @@
       !!        !  01-05 (G. Madec, R. Hordoir) opa norm
       !!   2.0  !  04-01 (G. Madec, C. Ethe)  F90, mpp
-      !!   3.3  !  09-05  (G.Garric) addition of the lim2_evp case
       !!---------------------------------------------------------------------
       INTEGER, INTENT(in) ::   kt     ! number of iteration
@@ -108,5 +107,4 @@
          ! zvbord factor between 1 and 2 to take into account slip or no-slip boundary conditions.        
          zvbord = 1.0 + ( 1.0 - bound )
-#if defined key_lim2_vp
          DO jj = 1, jpjm1
             DO ji = 1, jpim1   ! NO vector opt.
@@ -118,8 +116,4 @@
          CALL lbc_lnk( zui_u, 'U', -1. )
          CALL lbc_lnk( zvi_v, 'V', -1. )
-#else
-        zui_u(:,:)=u_ice(:,:)
-        zvi_v(:,:)=v_ice(:,:)
-#endif
 
          ! CFL test for stability
Index: /branches/devmercator2010/NEMO/LIM_SRC_3/limrhg.F90
===================================================================
--- /branches/devmercator2010/NEMO/LIM_SRC_3/limrhg.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/LIM_SRC_3/limrhg.F90	(revision 2077)
@@ -7,7 +7,6 @@
    !!            3.0  !  2008-03  (M. Vancoppenolle) LIM3
    !!             -   !  2008-11  (M. Vancoppenolle, S. Bouillon, Y. Aksenov) add surface tilt in ice rheolohy 
-   !!             -   !  2009-05  (G.Garric) addition of the lim2_evp cas
    !!----------------------------------------------------------------------
-#if defined key_lim3 || (  defined key_lim2 && ! defined key_lim2_vp )
+#if defined key_lim3
    !!----------------------------------------------------------------------
    !!   'key_lim3'                                      LIM3 sea-ice model
@@ -19,6 +18,9 @@
    USE par_oce
    USE dom_oce
+   USE dom_ice
    USE sbc_oce         ! Surface boundary condition: ocean fields
    USE sbc_ice         ! Surface boundary condition: ice fields
+   USE ice
+   USE iceini
    USE lbclnk
    USE lib_mpp
@@ -26,14 +28,5 @@
    USE limitd_me
    USE prtctl          ! Print control
-#if defined key_lim3
-   USE dom_ice
-   USE ice
-   USE iceini
-#endif
-#if defined key_lim2 && ! defined key_lim2_vp
-   USE dom_ice_2
-   USE ice_2
-   USE iceini_2
-#endif
+
 
    IMPLICIT NONE
@@ -187,9 +180,4 @@
          zresr                         !: Local error on velocity
 
-#if  defined key_lim2 && ! defined key_lim2_vp
-     vt_s => hsnm
-     vt_i => hicm
-     at_i(:,:) = 1. - frld(:,:)
-#endif
       !
       !------------------------------------------------------------------------------!
@@ -202,8 +190,7 @@
       u_ice2(:,:)  = 0.0 ; v_ice1(:,:)  = 0.0
       zdd(:,:)     = 0.0 ; zdt(:,:)     = 0.0 ; zds(:,:)     = 0.0
-#if defined key_lim3
+
       ! Ice strength on T-points
       CALL lim_itd_me_icestrength(ridge_scheme_swi)
-#endif
 
       ! Ice mass and temp variables
@@ -213,9 +200,5 @@
          DO ji = 1 , jpi
             zc1(ji,jj)    = tms(ji,jj) * ( rhosn * vt_s(ji,jj) + rhoic * vt_i(ji,jj) )
-#if defined key_lim3
             zpresh(ji,jj) = tms(ji,jj) *  strength(ji,jj) / 2.
-#else
-            zpresh(ji,jj) = tms(ji,jj) *  2. * pstar * hicm(ji,jj) * EXP( -c_rhg * frld(ji,jj) )
-#endif
             ! tmi = 1 where there is ice or on land
             tmi(ji,jj)    = 1.0 - ( 1.0 - MAX( 0.0 , SIGN ( 1.0 , vt_i(ji,jj) - &
@@ -286,5 +269,4 @@
                / ( e2t(ji,jj+1) + e2t(ji,jj) + epsd )
             !
-            ! Mass, coriolis coeff. and currents
             u_oce1(ji,jj)  = u_oce(ji,jj)
             v_oce2(ji,jj)  = v_oce(ji,jj)
Index: /branches/devmercator2010/NEMO/OPA_SRC/DTA/dtasal.F90
===================================================================
--- /branches/devmercator2010/NEMO/OPA_SRC/DTA/dtasal.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/OPA_SRC/DTA/dtasal.F90	(revision 2077)
@@ -13,4 +13,5 @@
    USE oce             ! ocean dynamics and tracers
    USE dom_oce         ! ocean space and time domain
+   USE fldread         ! read input fields
    USE in_out_manager  ! I/O manager
    USE phycst          ! physical constants
@@ -27,13 +28,8 @@
    !! * Shared module variables
    LOGICAL , PUBLIC, PARAMETER ::   lk_dtasal = .TRUE.    !: salinity data flag
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &  !:
-      s_dta       !: salinity data at given time-step
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   s_dta    !: salinity data at given time-step
 
    !! * Module variables
-   INTEGER ::   &
-      numsdt,           &  !: logical unit for data salinity
-      nsal1, nsal2         ! first and second record used
-   REAL(wp), DIMENSION(jpi,jpj,jpk,2) ::   &
-      saldta    ! salinity data at two consecutive times
+   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_sal       ! structure of input SST (file informations, fields read)
 
    !! * Substitutions
@@ -52,255 +48,213 @@
 
    SUBROUTINE dta_sal( kt )
-     !!----------------------------------------------------------------------
-     !!                   ***  ROUTINE dta_sal  ***
-     !!        
-     !! ** Purpose :   Reads monthly salinity data
-     !!             
-     !! ** Method  : - Read on unit numsdt the monthly salinity data interpo-
-     !!     lated onto the model grid.
-     !!              - At each time step, a linear interpolation is applied
-     !!     between two monthly values.
-     !!
-     !! History :
-     !!        !  91-03  ()  Original code
-     !!        !  92-07  (M. Imbard)
-     !!   9.0  !  02-06  (G. Madec)  F90: Free form and module 
-     !!----------------------------------------------------------------------
-     !! * Modules used
-     USE iom
-     
-     !! * Arguments
-     INTEGER, INTENT(in) ::   kt             ! ocean time step
-     
-     !! * Local declarations
-     
-     INTEGER ::   ji, jj, jk, jl, jkk   ! dummy loop indicies
-     INTEGER ::   &
-          imois, iman, i15, ik           ! temporary integers
-#  if defined key_tradmp
-     INTEGER ::   &
+      !!----------------------------------------------------------------------
+      !!                   ***  ROUTINE dta_sal  ***
+      !!        
+      !! ** Purpose :   Reads monthly salinity data
+      !!             
+      !! ** Method  : - Read on unit numsdt the monthly salinity data interpo-
+      !!     lated onto the model grid.
+      !!              - At each time step, a linear interpolation is applied
+      !!     between two monthly values.
+      !!
+      !! History :
+      !!        !  91-03  ()  Original code
+      !!        !  92-07  (M. Imbard)
+      !!   9.0  !  02-06  (G. Madec)  F90: Free form and module 
+      !!----------------------------------------------------------------------
+     
+      !! * Arguments
+      INTEGER, INTENT(in) ::   kt             ! ocean time step
+      
+      !! * Local declarations
+     
+      INTEGER ::   ji, jj, jk, jl, jkk   ! dummy loop indicies
+      INTEGER ::   &
+           imois, iman, i15, ik           ! temporary integers
+      INTEGER            :: ierror
+#if defined key_tradmp
+      INTEGER ::   &
           il0, il1, ii0, ii1, ij0, ij1   ! temporary integers         
-# endif
-     REAL(wp) ::   zxy, zl
+#endif
+      REAL(wp) ::   zxy, zl
 #if defined key_orca_lev10
-     REAL(wp), DIMENSION(jpi,jpj,jpkdta,2) :: zsal
-     INTEGER   :: ikr, ikw, ikt, jjk
-     REAL(wp)  :: zfac
-#endif
-     REAL(wp), DIMENSION(jpk,2) ::   &
+      INTEGER   :: ikr, ikw, ikt, jjk
+      REAL(wp)  :: zfac
+#endif
+      REAL(wp), DIMENSION(jpk) ::   &
           zsaldta            ! auxiliary array for interpolation
-     !!----------------------------------------------------------------------
-     
-     ! 0. Initialization
-     ! -----------------
-     
-     iman  = INT( raamo )
-!!! better but change the results     i15 = INT( 2*FLOAT( nday ) / ( FLOAT( nobis(nmonth) ) + 0.5 ) )
-     i15   = nday / 16
-     imois = nmonth + i15 - 1
-     IF( imois == 0 ) imois = iman
-     
-     ! 1. First call kt=nit000
-     ! -----------------------
-     
-     IF( kt == nit000 ) THEN
-        
-        nsal1 = 0   ! initializations
-        IF(lwp) WRITE(numout,*) ' dta_sal : monthly salinity data in NetCDF file'
-        CALL iom_open ( 'data_1m_salinity_nomask', numsdt ) 
-        
-     ENDIF
-     
-     
-     ! 2. Read monthly file
-     ! -------------------
-     
-     IF( kt == nit000 .OR. imois /= nsal1 ) THEN
-        
-        ! 2.1 Calendar computation
-        
-        nsal1 = imois        ! first file record used 
-        nsal2 = nsal1 + 1    ! last  file record used
-        nsal1 = MOD( nsal1, iman )
-        IF( nsal1 == 0 ) nsal1 = iman
-        nsal2 = MOD( nsal2, iman )
-        IF( nsal2 == 0 ) nsal2 = iman
-        IF(lwp) WRITE(numout,*) 'first record file used nsal1 ', nsal1
-        IF(lwp) WRITE(numout,*) 'last  record file used nsal2 ', nsal2
-        
-        ! 2.3 Read monthly salinity data Levitus 
+      CHARACTER(len=100) :: cn_dir          ! Root directory for location of ssr files
+      TYPE(FLD_N)        :: sn_sal
+      LOGICAL , SAVE     :: linit_sal = .FALSE.
+      !!----------------------------------------------------------------------
+      NAMELIST/namdta_sal/cn_dir,sn_sal
+     
+      ! 1. Initialization
+      ! -----------------------
+     
+      IF( kt == nit000 .AND. ( .NOT. linit_sal ) ) THEN
+        
+         !                         ! set file information
+         cn_dir = './'             ! directory in which the model is executed
+         ! ... default values (NB: frequency positive => hours, negative => months)
+         !            !   file    ! frequency !  variable  ! time intep !  clim   ! 'yearly' or ! weights  ! rotation   !
+         !            !   name    !  (hours)  !   name     !   (T/F)    !  (T/F)  !  'monthly'  ! filename ! pairs      !
+         sn_sal = FLD_N( 'salinity',  -1.  ,  'vosaline',  .false.   , .true.  ,  'monthly'  , ''       , ''         )
+
+         REWIND ( numnam )         ! ... read in namlist namdta_sal 
+         READ( numnam, namdta_sal ) 
+
+         IF(lwp) THEN              ! control print
+            WRITE(numout,*)
+            WRITE(numout,*) 'dta_sal : Salinity Climatology '
+            WRITE(numout,*) '~~~~~~~ '
+         ENDIF
+         ALLOCATE( sf_sal(1), STAT=ierror )
+         IF( ierror > 0 ) THEN
+             CALL ctl_stop( 'dta_sal: unable to allocate sf_sal structure' )   ;   RETURN
+         ENDIF
+         ALLOCATE( sf_sal(1)%fnow(jpi,jpj,jpk) )
+         ALLOCATE( sf_sal(1)%fdta(jpi,jpj,jpk,2) )
+
+         ! fill sf_sal with sn_sal and control print
+         CALL fld_fill( sf_sal, (/ sn_sal /), cn_dir, 'dta_sal', 'Salinity data', 'namdta_sal' )
+         linit_sal = .TRUE.        
+      ENDIF
+     
+     
+      ! 2. Read monthly file
+      ! -------------------
+     
+      CALL fld_read( kt, 1, sf_sal )
+
+      IF( lwp .AND. kt==nn_it000 ) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) ' read Levitus salinity ok'
+         WRITE(numout,*)
+      ENDIF
+
+#if defined key_tradmp
+      IF( cp_cfg == "orca"  .AND. jp_cfg == 2 ) THEN
+   
+         !                                        ! =======================
+         !                                        !  ORCA_R2 configuration
+         !                                        ! =======================
+         ij0 = 101   ;   ij1 = 109
+         ii0 = 141   ;   ii1 = 155   
+         DO jj = mj0(ij0), mj1(ij1)                  ! Reduced salinity in the Alboran Sea
+            DO ji = mi0(ii0), mi1(ii1)
+               sf_sal(1)%fnow(ji,jj,13:13) = sf_sal(1)%fnow(ji,jj,13:13) - 0.15
+               sf_sal(1)%fnow(ji,jj,14:15) = sf_sal(1)%fnow(ji,jj,14:15) - 0.25
+               sf_sal(1)%fnow(ji,jj,16:17) = sf_sal(1)%fnow(ji,jj,16:17) - 0.30
+               sf_sal(1)%fnow(ji,jj,18:25) = sf_sal(1)%fnow(ji,jj,18:25) - 0.35
+            END DO
+         END DO
+
+         IF( n_cla == 1 ) THEN 
+            !                                         ! New salinity profile at Gibraltar
+            il0 = 138   ;   il1 = 138   
+            ij0 = 101   ;   ij1 = 102
+            ii0 = 139   ;   ii1 = 139   
+            DO jl = mi0(il0), mi1(il1)
+               DO jj = mj0(ij0), mj1(ij1)
+                  DO ji = mi0(ii0), mi1(ii1)
+                        sf_sal(1)%fnow(ji,jj,:) = sf_sal(1)%fnow(jl,jj,:)
+                  END DO
+               END DO
+            END DO
+            !                                         ! New salinity profile at Bab el Mandeb
+            il0 = 164   ;   il1 = 164   
+            ij0 =  87   ;   ij1 =  88
+            ii0 = 161   ;   ii1 = 163   
+            DO jl = mi0(il0), mi1(il1)
+               DO jj = mj0(ij0), mj1(ij1)
+                  DO ji = mi0(ii0), mi1(ii1)
+                     sf_sal(1)%fnow(ji,jj,:) = sf_sal(1)%fnow(jl,jj,:)
+                  END DO
+               END DO
+            END DO
+            !
+         ENDIF
+            !
+      ENDIF
+#endif   
         
 #if defined key_orca_lev10
-        if (ln_zps) stop
-        zsal(:,:,:,:) = 0.
-        CALL iom_get (numsdt,jpdom_data,'vosaline',zsal(:,:,:,1),nsal1)
-        CALL iom_get (numsdt,jpdom_data,'vosaline',zsal(:,:,:,2),nsal2)
+      DO jjk = 1, 5
+         s_dta(:,:,jjk) = sf_sal(1)%fnow(:,:,1)
+      ENDDO
+      DO jk = 1, jpk-20,10
+         ikr =  INT(jk/10) + 1
+         ikw =  (ikr-1) *10 + 1
+         ikt =  ikw + 5
+         DO jjk=ikt,ikt+9
+            zfac = ( gdept_0(jjk   ) - gdepw_0(ikt) ) / ( gdepw_0(ikt+10) - gdepw_0(ikt) )
+            s_dta(:,:,jjk) = sf_sal(1)%fnow(:,:,ikr) + ( sf_sal(1)%fnow(:,:,ikr+1) - sf_sal(1)%fnow(:,:,ikr) ) * zfac
+         END DO
+      END DO
+      DO jjk = jpk-5, jpk
+         s_dta(:,:,jjk) = sf_sal(1)%fnow(:,:,jpkdta-1)
+      END DO
+      ! fill the overlap areas
+      CALL lbc_lnk (s_dta(:,:,:),'Z',-999.,'no0')        
 #else
-        CALL iom_get (numsdt,jpdom_data,'vosaline',saldta(:,:,:,1),nsal1)
-        CALL iom_get (numsdt,jpdom_data,'vosaline',saldta(:,:,:,2),nsal2)
-#endif
-        
-        IF(lwp) THEN
-           WRITE(numout,*)
-           WRITE(numout,*) ' read Levitus salinity ok'
-           WRITE(numout,*)
-        ENDIF
-        
-#if defined key_tradmp
-        IF( cp_cfg == "orca"  .AND. jp_cfg == 2 ) THEN
+      s_dta(:,:,:)=sf_sal(1)%fnow(:,:,:)
+#endif
+        
+      IF( ln_sco ) THEN
+         DO jj = 1, jpj                  ! interpolation of salinites
+            DO ji = 1, jpi
+               DO jk = 1, jpk
+                  zl=fsdept_0(ji,jj,jk)
+                  IF(zl < gdept_0(1)  ) zsaldta(jk) =  s_dta(ji,jj,1    ) 
+                  IF(zl > gdept_0(jpk)) zsaldta(jk) =  s_dta(ji,jj,jpkm1) 
+                  DO jkk = 1, jpkm1
+                     IF((zl-gdept_0(jkk))*(zl-gdept_0(jkk+1)).le.0.0) THEN
+                          zsaldta(jk) = s_dta(ji,jj,jkk)                                 &
+                                     &           + (zl-gdept_0(jkk))/(gdept_0(jkk+1)-gdept_0(jkk))      &
+                                     &                              *(s_dta(ji,jj,jkk+1) - s_dta(ji,jj,jkk))
+                     ENDIF
+                  END DO
+               END DO
+               DO jk = 1, jpkm1
+                  s_dta(ji,jj,jk) = zsaldta(jk) 
+               END DO
+               s_dta(ji,jj,jpk) = 0.0 
+            END DO
+         END DO
            
-           !                                        ! =======================
-           !                                        !  ORCA_R2 configuration
-           !                                        ! =======================
-           ij0 = 101   ;   ij1 = 109
-           ii0 = 141   ;   ii1 = 155   
-           DO jj = mj0(ij0), mj1(ij1)                  ! Reduced salinity in the Alboran Sea
-              DO ji = mi0(ii0), mi1(ii1)
-#if defined key_orca_lev10
-                 zsal  (ji,jj,13:13,:) = zsal  (ji,jj,13:13,:) - 0.15
-                 zsal  (ji,jj,14:15,:) = zsal  (ji,jj,14:15,:) - 0.25
-                 zsal  (ji,jj,16:17,:) = zsal  (ji,jj,16:17,:) - 0.30
-                 zsal  (ji,jj,18:25,:) = zsal  (ji,jj,18:25,:) - 0.35
-#else
-                 saldta(ji,jj,13:13,:) = saldta(ji,jj,13:13,:) - 0.15
-                 saldta(ji,jj,14:15,:) = saldta(ji,jj,14:15,:) - 0.25
-                 saldta(ji,jj,16:17,:) = saldta(ji,jj,16:17,:) - 0.30
-                 saldta(ji,jj,18:25,:) = saldta(ji,jj,18:25,:) - 0.35
-#endif
-              END DO
-           END DO
-
-           IF( n_cla == 1 ) THEN 
-              !                                         ! New salinity profile at Gibraltar
-              il0 = 138   ;   il1 = 138   
-              ij0 = 101   ;   ij1 = 102
-              ii0 = 139   ;   ii1 = 139   
-              DO jl = mi0(il0), mi1(il1)
-                 DO jj = mj0(ij0), mj1(ij1)
-                    DO ji = mi0(ii0), mi1(ii1)
-#if defined key_orca_lev10
-                       zsal  (ji,jj,:,:) = zsal  (jl,jj,:,:)
-#else
-                       saldta(ji,jj,:,:) = saldta(jl,jj,:,:)
-#endif
-                    END DO
-                 END DO
-              END DO
-              !                                         ! New salinity profile at Bab el Mandeb
-              il0 = 164   ;   il1 = 164   
-              ij0 =  87   ;   ij1 =  88
-              ii0 = 161   ;   ii1 = 163   
-              DO jl = mi0(il0), mi1(il1)
-                 DO jj = mj0(ij0), mj1(ij1)
-                    DO ji = mi0(ii0), mi1(ii1)
-#if defined key_orca_lev10
-                       zsal  (ji,jj,:,:) = zsal  (jl,jj,:,:)
-#else
-                       saldta(ji,jj,:,:) = saldta(jl,jj,:,:)
-#endif
-                    END DO
-                 END DO
-              END DO
-              !
-           ENDIF
-           !
-        ENDIF
-#endif   
-        
-#if defined key_orca_lev10
-        !  interpolate from 31 to 301 level the zsal field result in saldta
-        DO jl = 1, 2
-           DO jjk = 1, 5
-              saldta(:,:,jjk,jl) = zsal(:,:,1,jl)
-           ENDDO
-           DO jk = 1, jpk - 20, 10
-              ikr = INT( jk / 10 ) + 1
-              ikw = (ikr-1) * 10 + 1
-              ikt = ikw + 5
-              DO jjk = ikt , ikt + 9
-                 zfac = ( gdept_0(jjk) - gdepw_0(ikt) ) / ( gdepw_0(ikt+10) - gdepw_0(ikt) )
-                 saldta(:,:,jjk,jl) = zsal(:,:,ikr,jl) + ( zsal(:,:,ikr+1,jl) - zsal(:,:,ikr,jl) ) * zfac
-              END DO
-           END DO
-           DO jjk = jpk-5, jpk
-              saldta(:,:,jjk,jl) = zsal(:,:,jpkdta-1,jl)
-           END DO
-           ! fill the overlap areas
-           CALL lbc_lnk (saldta(:,:,:,jl),'Z',-999.,'no0')
-        END DO
-        
-#endif
-        
-        IF( ln_sco ) THEN
-           DO jl = 1, 2
-              DO jj = 1, jpj                  ! interpolation of salinites
-                 DO ji = 1, jpi
-                    DO jk = 1, jpk
-                       zl=fsdept_0(ji,jj,jk)
-                       IF(zl <  gdept_0(1)) zsaldta(jk,jl) =  saldta(ji,jj,1,jl)
-                       IF(zl >  gdept_0(jpk)) zsaldta(jk,jl) =  saldta(ji,jj,jpkm1,jl)
-                       DO jkk = 1, jpkm1
-                          IF((zl-gdept_0(jkk))*(zl-gdept_0(jkk+1)).le.0.0) THEN
-                             zsaldta(jk,jl) = saldta(ji,jj,jkk,jl)                                  &
-                                  &           + (zl-gdept_0(jkk))/(gdept_0(jkk+1)-gdept_0(jkk))       &
-                                  &                              *(saldta(ji,jj,jkk+1,jl) - saldta(ji,jj,jkk,jl))
-                          ENDIF
-                       END DO
-                    END DO
-                    DO jk = 1, jpkm1
-                       saldta(ji,jj,jk,jl) = zsaldta(jk,jl)
-                    END DO
-                    saldta(ji,jj,jpk,jl) = 0.0
-                 END DO
-              END DO
-           END DO
-           
-           IF(lwp) WRITE(numout,*)
-           IF(lwp) WRITE(numout,*) ' Levitus salinity data interpolated to s-coordinate'
-           IF(lwp) WRITE(numout,*)
-           
-        ELSE
-           !                                  ! Mask
-           DO jl = 1, 2
-              saldta(:,:,:,jl) = saldta(:,:,:,jl)*tmask(:,:,:)
-              saldta(:,:,jpk,jl) = 0.
-              IF( ln_zps ) THEN               ! z-coord. partial steps
-                 DO jj = 1, jpj               ! interpolation of salinity at the last ocean level (i.e. the partial step)
-                    DO ji = 1, jpi
-                       ik = mbathy(ji,jj) - 1
-                       IF( ik > 2 ) THEN
-                          zl = ( gdept_0(ik) - fsdept_0(ji,jj,ik) ) / ( gdept_0(ik) - gdept_0(ik-1) )
-                          saldta(ji,jj,ik,jl) = (1.-zl) * saldta(ji,jj,ik,jl) +zl * saldta(ji,jj,ik-1,jl)
-                       ENDIF
-                    END DO
-                 END DO
-              ENDIF
-           END DO
-        ENDIF
-        
-        
-        IF(lwp) THEN
-           WRITE(numout,*)' salinity Levitus month ',nsal1,nsal2
-           WRITE(numout,*)
-           WRITE(numout,*) ' Levitus month = ',nsal1,'  level = 1'
-           CALL prihre(saldta(:,:,1,1),jpi,jpj,1,jpi,20,1,jpj,20,1.,numout)
-           WRITE(numout,*) ' Levitus month = ',nsal1,'  level = ',jpk/2
-           CALL prihre(saldta(:,:,jpk/2,1),jpi,jpj,1,jpi,20,1,jpj,20,1.,numout)
-           WRITE(numout,*) ' Levitus month = ',nsal1,'  level = ',jpkm1
-           CALL prihre(saldta(:,:,jpkm1,1),jpi,jpj,1,jpi,20,1,jpj,20,1.,numout)
-        ENDIF
-     ENDIF
-     
-     
-     ! 3. At every time step compute salinity data
-     ! -------------------------------------------
-     
-     zxy = FLOAT(nday + 15 - 30*i15)/30.
-     s_dta(:,:,:) = ( 1.- zxy ) * saldta(:,:,:,1) + zxy * saldta(:,:,:,2)
-     
-     ! Close the file
-     ! --------------
-     
-     IF( kt == nitend )   CALL iom_close (numsdt)
+         IF( lwp .AND. kt==nn_it000 ) THEN
+            WRITE(numout,*)
+            WRITE(numout,*) ' Levitus salinity data interpolated to s-coordinate'
+            WRITE(numout,*)
+         ENDIF
+
+      ELSE
+         !                                  ! Mask
+         s_dta(:,:,:) = s_dta(:,:,:) * tmask(:,:,:)
+         s_dta(:,:,jpk) = 0. 
+         IF( ln_zps ) THEN               ! z-coord. partial steps
+            DO jj = 1, jpj               ! interpolation of salinity at the last ocean level (i.e. the partial step)
+               DO ji = 1, jpi
+                  ik = mbathy(ji,jj) - 1
+                  IF( ik > 2 ) THEN
+                     zl = ( gdept_0(ik) - fsdept_0(ji,jj,ik) ) / ( gdept_0(ik) - gdept_0(ik-1) )
+                     s_dta(ji,jj,ik) = (1.-zl) * s_dta(ji,jj,ik) + zl * s_dta(ji,jj,ik-1)
+                  ENDIF
+               END DO
+            END DO
+         ENDIF
+      ENDIF
+        
+      IF( lwp .AND. kt==nn_it000 ) THEN
+         WRITE(numout,*)' salinity Levitus '
+         WRITE(numout,*)
+         WRITE(numout,*)'  level = 1'
+         CALL prihre(s_dta(:,:,1),    jpi,jpj,1,jpi,20,1,jpj,20,1.,numout)
+         WRITE(numout,*)'  level = ',jpk/2
+         CALL prihre(s_dta(:,:,jpk/2),jpi,jpj,1,jpi,20,1,jpj,20,1.,numout)           
+         WRITE(numout,*) '  level = ',jpkm1
+         CALL prihre(s_dta(:,:,jpkm1),jpi,jpj,1,jpi,20,1,jpj,20,1.,numout)
+      ENDIF
 
    END SUBROUTINE dta_sal
Index: /branches/devmercator2010/NEMO/OPA_SRC/DTA/dtatem.F90
===================================================================
--- /branches/devmercator2010/NEMO/OPA_SRC/DTA/dtatem.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/OPA_SRC/DTA/dtatem.F90	(revision 2077)
@@ -13,4 +13,5 @@
    USE oce             ! ocean dynamics and tracers
    USE dom_oce         ! ocean space and time domain
+   USE fldread         ! read input fields
    USE in_out_manager  ! I/O manager
    USE phycst          ! physical constants
@@ -26,13 +27,8 @@
    !! * Shared module variables
    LOGICAL , PUBLIC, PARAMETER ::   lk_dtatem = .TRUE.   !: temperature data flag
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &  !:
-      t_dta             !: temperature data at given time-step
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::  t_dta    !: temperature data at given time-step
 
    !! * Module variables
-   INTEGER ::   &
-      numtdt,        &  !: logical unit for data temperature
-      ntem1, ntem2  ! first and second record used
-   REAL(wp), DIMENSION(jpi,jpj,jpk,2) ::   &
-      temdta            ! temperature data at two consecutive times
+   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_tem      ! structure of input SST (file informations, fields read)
 
    !! * Substitutions
@@ -73,251 +69,212 @@
       !!   8.5  !  02-09  (G. Madec)  F90: Free form and module
       !!----------------------------------------------------------------------
-      !! * Modules used
-      USE iom
-
       !! * Arguments
       INTEGER, INTENT( in ) ::   kt     ! ocean time-step
 
       !! * Local declarations
-      INTEGER ::   ji, jj, jl, jk, jkk       ! dummy loop indicies
+      INTEGER ::   ji, jj, jk, jl, jkk       ! dummy loop indicies
       INTEGER ::   &
-         imois, iman, i15 , ik      ! temporary integers
-#  if defined key_tradmp
+        imois, iman, i15 , ik      ! temporary integers
+      INTEGER            :: ierror
+#if defined key_tradmp
       INTEGER ::   &
          il0, il1, ii0, ii1, ij0, ij1   ! temporary integers
-# endif
+#endif
       REAL(wp) ::   zxy, zl
 #if defined key_orca_lev10
-      REAL(wp), DIMENSION(jpi,jpj,jpkdta,2) :: ztem
+      !!!REAL(wp), DIMENSION(jpi,jpj,jpkdta,2) :: ztem
       INTEGER   :: ikr, ikw, ikt, jjk 
       REAL(wp)  :: zfac
 #endif
-      REAL(wp), DIMENSION(jpk,2) ::   &
+      REAL(wp), DIMENSION(jpk) ::   &
          ztemdta            ! auxiliary array for interpolation
+      CHARACTER(len=100) :: cn_dir          ! Root directory for location of ssr files
+      TYPE(FLD_N)        :: sn_tem
+      LOGICAL , SAVE     :: linit_tem = .FALSE.
       !!----------------------------------------------------------------------
-      
-      ! 0. Initialization
-      ! -----------------
-      
-      iman  = INT( raamo )
-!!! better but change the results     i15 = INT( 2*FLOAT( nday ) / ( FLOAT( nobis(nmonth) ) + 0.5 ) )
-      i15   = nday / 16
-      imois = nmonth + i15 - 1
-      IF( imois == 0 ) imois = iman
-      
-      ! 1. First call kt=nit000
+      NAMELIST/namdta_tem/cn_dir,sn_tem
+ 
+      ! 1. Initialization 
       ! -----------------------
       
-      IF( kt == nit000 ) THEN
-         
-         ntem1= 0   ! initializations
-         IF(lwp) WRITE(numout,*) ' dta_tem : Levitus monthly fields'
-         CALL iom_open ( 'data_1m_potential_temperature_nomask', numtdt ) 
-         
-      ENDIF
-      
+      IF( kt == nit000 .AND. (.NOT. linit_tem ) ) THEN
+
+         !                   ! set file information
+         cn_dir = './'       ! directory in which the model is executed
+         ! ... default values (NB: frequency positive => hours, negative => months)
+         !            !   file    ! frequency !  variable  ! time intep !  clim   ! 'yearly' or ! weights  ! rotation   !
+         !            !   name    !  (hours)  !   name     !   (T/F)    !  (T/F)  !  'monthly'  ! filename ! pairs      !
+         sn_tem = FLD_N( 'temperature',  -1.  ,  'votemper',  .false.   , .true.  ,  'yearly'  , ''       , ''         )
+
+         REWIND( numnam )         ! ... read in namlist namdta_tem 
+         READ( numnam, namdta_tem ) 
+
+         IF(lwp) THEN              ! control print
+            WRITE(numout,*)
+            WRITE(numout,*) 'dta_tem : Temperature Climatology '
+            WRITE(numout,*) '~~~~~~~ '
+         ENDIF
+         ALLOCATE( sf_tem(1), STAT=ierror )
+         IF( ierror > 0 ) THEN
+             CALL ctl_stop( 'dta_tem: unable to allocate sf_tem structure' )   ;   RETURN
+         ENDIF
+
+#if defined key_orca_lev10
+         ALLOCATE( sf_tem(1)%fnow(jpi,jpj,jpkdta)   )
+         ALLOCATE( sf_tem(1)%fdta(jpi,jpj,jpkdta,2) )
+#else
+         ALLOCATE( sf_tem(1)%fnow(jpi,jpj,jpk)   )
+         ALLOCATE( sf_tem(1)%fdta(jpi,jpj,jpk,2) )
+#endif
+         ! fill sf_tem with sn_tem and control print
+         CALL fld_fill( sf_tem, (/ sn_tem /), cn_dir, 'dta_tem', 'Temperature data', 'namdta_tem' )
+         linit_tem = .TRUE.
+
+      ENDIF
       
       ! 2. Read monthly file
       ! -------------------
-      
-      IF( kt == nit000 .OR. imois /= ntem1 ) THEN
-         
-         ! Calendar computation
-         
-         ntem1 = imois        ! first file record used 
-         ntem2 = ntem1 + 1    ! last  file record used
-         ntem1 = MOD( ntem1, iman )
-         IF( ntem1 == 0 )   ntem1 = iman
-         ntem2 = MOD( ntem2, iman )
-         IF( ntem2 == 0 )   ntem2 = iman
-         IF(lwp) WRITE(numout,*) 'first record file used ntem1 ', ntem1
-         IF(lwp) WRITE(numout,*) 'last  record file used ntem2 ', ntem2
-         
-         ! Read monthly temperature data Levitus 
-         
-#if defined key_orca_lev10
-         if (ln_zps) stop
-         ztem(:,:,:,:) = 0.
-         CALL iom_get (numtdt,jpdom_data,'votemper',ztem(:,:,:,1),ntem1)
-         CALL iom_get (numtdt,jpdom_data,'votemper',ztem(:,:,:,2),ntem2)
-#else         
-         CALL iom_get (numtdt,jpdom_data,'votemper',temdta(:,:,:,1),ntem1)
-         CALL iom_get (numtdt,jpdom_data,'votemper',temdta(:,:,:,2),ntem2)
-#endif
-         
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) ' read Levitus temperature ok'
-         IF(lwp) WRITE(numout,*)
+         
+      CALL fld_read( kt, 1, sf_tem )
+       
+      IF( lwp .AND. kt==nn_it000 )THEN 
+         WRITE(numout,*)
+         WRITE(numout,*) ' read Levitus temperature ok'
+         WRITE(numout,*)
+      ENDIF
          
 #if defined key_tradmp
-         IF( cp_cfg == "orca"  .AND. jp_cfg == 2 ) THEN
-            
-            !                                        ! =======================
-            !                                        !  ORCA_R2 configuration
-            !                                        ! ======================= 
-            ij0 = 101   ;   ij1 = 109
-            ii0 = 141   ;   ii1 = 155
-            DO jj = mj0(ij0), mj1(ij1)                      ! Reduced temperature in the Alboran Sea
-               DO ji = mi0(ii0), mi1(ii1)
-#if defined key_orca_lev10
-                  ztem(  ji,jj, 13:13 ,:) = ztem  (ji,jj, 13:13 ,:) - 0.20
-                  ztem  (ji,jj, 14:15 ,:) = ztem  (ji,jj, 14:15 ,:) - 0.35
-                  ztem  (ji,jj, 16:25 ,:) = ztem  (ji,jj, 16:25 ,:) - 0.40
+      IF( cp_cfg == "orca"  .AND. jp_cfg == 2 ) THEN
+            
+         !                                        ! =======================
+         !                                        !  ORCA_R2 configuration
+         !                                        ! ======================= 
+         ij0 = 101   ;   ij1 = 109
+         ii0 = 141   ;   ii1 = 155
+         DO jj = mj0(ij0), mj1(ij1)                      ! Reduced temperature in the Alboran Sea
+            DO ji = mi0(ii0), mi1(ii1)
+               sf_tem(1)%fnow(ji,jj, 13:13 ) = sf_tem(1)%fnow(ji,jj, 13:13 ) - 0.20
+               sf_tem(1)%fnow(ji,jj, 14:15 ) = sf_tem(1)%fnow(ji,jj, 14:15 ) - 0.35  
+               sf_tem(1)%fnow(ji,jj, 16:25 ) = sf_tem(1)%fnow(ji,jj, 16:25 ) - 0.40
+            END DO
+         END DO
+            
+         IF( n_cla == 1 ) THEN 
+            !                                         ! New temperature profile at Gibraltar
+            il0 = 138   ;   il1 = 138
+            ij0 = 101   ;   ij1 = 102
+            ii0 = 139   ;   ii1 = 139
+            DO jl = mi0(il0), mi1(il1)
+               DO jj = mj0(ij0), mj1(ij1)
+                  DO ji = mi0(ii0), mi1(ii1)
+                     sf_tem(1)%fnow(ji,jj,:) = sf_tem(1)%fnow(jl,jj,:)
+                  END DO
+               END DO
+            END DO
+            !                                         ! New temperature profile at Bab el Mandeb
+            il0 = 164   ;   il1 = 164
+            ij0 =  87   ;   ij1 =  88
+            ii0 = 161   ;   ii1 = 163
+            DO jl = mi0(il0), mi1(il1)
+               DO jj = mj0(ij0), mj1(ij1)
+                  DO ji = mi0(ii0), mi1(ii1)
+                     sf_tem(1)%fnow(ji,jj,:) = sf_tem(1)%fnow(jl,jj,:)
+                  END DO
+               END DO
+            END DO
+            !
+         ELSE
+            !                                         ! Reduced temperature at Red Sea
+            ij0 =  87   ;   ij1 =  96
+            ii0 = 148   ;   ii1 = 160
+            sf_tem(1)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ,  4:10 ) = 7.0
+            sf_tem(1)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 11:13 ) = 6.5
+            sf_tem(1)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 14:20 ) = 6.0
+         ENDIF
+            !
+      ENDIF
+#endif
+         
+#if defined key_orca_lev10
+      DO jjk = 1, 5
+         t_dta(:,:,jjk) = sf_tem(1)%fnow(:,:,1)
+      END DO
+      DO jk = 1, jpk-20,10
+         ik = jk+5
+         ikr =  INT(jk/10) + 1
+         ikw =  (ikr-1) *10 + 1
+         ikt =  ikw + 5
+         DO jjk=ikt,ikt+9
+            zfac = ( gdept_0(jjk   ) - gdepw_0(ikt) ) / ( gdepw_0(ikt+10) - gdepw_0(ikt) )
+            t_dta(:,:,jjk) = sf_tem(1)%fnow(:,:,ikr) + ( sf_tem(1)%fnow(:,:,ikr+1) - sf_tem(1)%fnow(:,:,ikr) ) * zfac
+         END DO
+      END DO
+      DO jjk = jpk-5, jpk
+         t_dta(:,:,jjk) = sf_tem(1)%fnow(:,:,jpkdta-1)
+      END DO
+      ! fill the overlap areas
+      CALL lbc_lnk (t_dta(:,:,:),'Z',-999.,'no0')
 #else
-                  temdta(ji,jj, 13:13 ,:) = temdta(ji,jj, 13:13 ,:) - 0.20
-                  temdta(ji,jj, 14:15 ,:) = temdta(ji,jj, 14:15 ,:) - 0.35
-                  temdta(ji,jj, 16:25 ,:) = temdta(ji,jj, 16:25 ,:) - 0.40
-#endif
-               END DO
-            END DO
-            
-            IF( n_cla == 1 ) THEN 
-               !                                         ! New temperature profile at Gibraltar
-               il0 = 138   ;   il1 = 138
-               ij0 = 101   ;   ij1 = 102
-               ii0 = 139   ;   ii1 = 139
-               DO jl = mi0(il0), mi1(il1)
-                  DO jj = mj0(ij0), mj1(ij1)
-                     DO ji = mi0(ii0), mi1(ii1)
-#if defined key_orca_lev10
-                        ztem  (ji,jj,:,:) = ztem  (jl,jj,:,:)
-#else
-                        temdta(ji,jj,:,:) = temdta(jl,jj,:,:)
-#endif
-                     END DO
+      t_dta(:,:,:) = sf_tem(1)%fnow(:,:,:) 
+#endif
+         
+      IF( ln_sco ) THEN
+         DO jj = 1, jpj                  ! interpolation of temperatures
+            DO ji = 1, jpi
+               DO jk = 1, jpk
+                  zl=fsdept_0(ji,jj,jk)
+                  IF(zl < gdept_0(1))   ztemdta(jk) =  t_dta(ji,jj,1)
+                  IF(zl > gdept_0(jpk)) ztemdta(jk) =  t_dta(ji,jj,jpkm1) 
+                  DO jkk = 1, jpkm1
+                     IF((zl-gdept_0(jkk))*(zl-gdept_0(jkk+1)).le.0.0) THEN
+                        ztemdta(jk) = t_dta(ji,jj,jkk)                                 &
+                                  &    + (zl-gdept_0(jkk))/(gdept_0(jkk+1)-gdept_0(jkk))  &
+                                  &    * (t_dta(ji,jj,jkk+1) - t_dta(ji,jj,jkk))
+                     ENDIF
                   END DO
                END DO
-               !                                         ! New temperature profile at Bab el Mandeb
-               il0 = 164   ;   il1 = 164
-               ij0 =  87   ;   ij1 =  88
-               ii0 = 161   ;   ii1 = 163
-               DO jl = mi0(il0), mi1(il1)
-                  DO jj = mj0(ij0), mj1(ij1)
-                     DO ji = mi0(ii0), mi1(ii1)
-#if defined key_orca_lev10
-                        ztem  (ji,jj,:,:) = ztem  (jl,jj,:,:)
-#else
-                        temdta(ji,jj,:,:) = temdta(jl,jj,:,:)
-#endif
-                     END DO
-                  END DO
-               END DO
-               !
-            ELSE
-               !                                         ! Reduced temperature at Red Sea
-               ij0 =  87   ;   ij1 =  96
-               ii0 = 148   ;   ii1 = 160
-#if defined key_orca_lev10
-               ztem  ( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ,  4:10 , : ) = 7.0 
-               ztem  ( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 11:13 , : ) = 6.5 
-               ztem  ( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 14:20 , : ) = 6.0
-#else
-               temdta( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ,  4:10 , : ) = 7.0 
-               temdta( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 11:13 , : ) = 6.5 
-               temdta( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 14:20 , : ) = 6.0
-#endif
-            ENDIF
-            !
-         ENDIF
-#endif
-         
-#if defined key_orca_lev10
-         ! interpolate from 31 to 301 level the ztem field result in temdta
-         DO jl = 1, 2
-            DO jjk = 1, 5
-               temdta(:,:,jjk,jl) = ztem(:,:,1,jl)
-            END DO
-            DO jk = 1, jpk-20,10
-               ik = jk+5
-               ikr =  INT(jk/10) + 1
-               ikw =  (ikr-1) *10 + 1
-               ikt =  ikw + 5
-               DO jjk=ikt,ikt+9
-                  zfac = ( gdept_0(jjk   ) - gdepw_0(ikt) ) / ( gdepw_0(ikt+10) - gdepw_0(ikt) )
-                  temdta(:,:,jjk,jl) = ztem(:,:,ikr,jl) + ( ztem(:,:,ikr+1,jl) - ztem(:,:,ikr,jl) ) * zfac
-               END DO
-            END DO
-            DO jjk = jpk-5, jpk
-               temdta(:,:,jjk,jl) = ztem(:,:,jpkdta-1,jl)
-            END DO
-            ! fill the overlap areas
-            CALL lbc_lnk (temdta(:,:,:,jl),'Z',-999.,'no0')
-         END DO
-#endif
-         
-         IF( ln_sco ) THEN
-            DO jl = 1, 2
-               DO jj = 1, jpj                  ! interpolation of temperatures
-                  DO ji = 1, jpi
-                     DO jk = 1, jpk
-                        zl=fsdept_0(ji,jj,jk)
-                        IF(zl < gdept_0(1)) ztemdta(jk,jl) =  temdta(ji,jj,1,jl)
-                        IF(zl > gdept_0(jpk)) ztemdta(jk,jl) =  temdta(ji,jj,jpkm1,jl)
-                        DO jkk = 1, jpkm1
-                           IF((zl-gdept_0(jkk))*(zl-gdept_0(jkk+1)).le.0.0) THEN
-                              ztemdta(jk,jl) = temdta(ji,jj,jkk,jl)                                 &
-                                   &           + (zl-gdept_0(jkk))/(gdept_0(jkk+1)-gdept_0(jkk))      &
-                                   &                              *(temdta(ji,jj,jkk+1,jl) - temdta(ji,jj,jkk,jl))
-                           ENDIF
-                        END DO
-                     END DO
-                     DO jk = 1, jpkm1
-                        temdta(ji,jj,jk,jl) = ztemdta(jk,jl)
-                     END DO
-                     temdta(ji,jj,jpk,jl) = 0.0
-                  END DO
-               END DO
-            END DO
-            
-            IF(lwp) WRITE(numout,*)
-            IF(lwp) WRITE(numout,*) ' Levitus temperature data interpolated to s-coordinate'
-            IF(lwp) WRITE(numout,*)
-            
-         ELSE
-            
-            !                                  ! Mask
-            DO jl = 1, 2
-               temdta(:,:,:,jl) = temdta(:,:,:,jl) * tmask(:,:,:)
-               temdta(:,:,jpk,jl) = 0.
-               IF( ln_zps ) THEN                ! z-coord. with partial steps
-                  DO jj = 1, jpj                  ! interpolation of temperature at the last level
-                     DO ji = 1, jpi
-                        ik = mbathy(ji,jj) - 1
-                        IF( ik > 2 ) THEN
-                           zl = ( gdept_0(ik) - fsdept_0(ji,jj,ik) ) / ( gdept_0(ik) - gdept_0(ik-1) )
-                           temdta(ji,jj,ik,jl) = (1.-zl) * temdta(ji,jj,ik,jl) + zl * temdta(ji,jj,ik-1,jl)
-                        ENDIF
-                     END DO
-                  END DO
-               ENDIF
-            END DO
-            
-         ENDIF
-         
-         IF(lwp) THEN
-            WRITE(numout,*) ' temperature Levitus month ', ntem1, ntem2
+               DO jk = 1, jpkm1
+                  t_dta(ji,jj,jk) = ztemdta(jk)
+               END DO
+               t_dta(ji,jj,jpk) = 0.0
+            END DO
+         END DO
+            
+         IF( lwp .AND. kt==nn_it000 )THEN
             WRITE(numout,*)
-            WRITE(numout,*) ' Levitus month = ', ntem1, '  level = 1'
-            CALL prihre( temdta(:,:,1,1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-            WRITE(numout,*) ' Levitus month = ', ntem1, '  level = ', jpk/2
-            CALL prihre( temdta(:,:,jpk/2,1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-            WRITE(numout,*) ' Levitus month = ',ntem1,'  level = ', jpkm1
-            CALL prihre( temdta(:,:,jpkm1,1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         ENDIF
-      ENDIF
-      
-      
-      ! 2. At every time step compute temperature data
-      ! ----------------------------------------------
-      
-      zxy = FLOAT( nday + 15 - 30 * i15 ) / 30.
-      t_dta(:,:,:) = (1.-zxy) * temdta(:,:,:,1) + zxy * temdta(:,:,:,2)
-      
-      ! Close the file
-      ! --------------
-      
-      IF( kt == nitend )   CALL iom_close (numtdt)
-      
-    END SUBROUTINE dta_tem
+            WRITE(numout,*) ' Levitus temperature data interpolated to s-coordinate'
+            WRITE(numout,*)
+         ENDIF
+            
+      ELSE
+         !                                  ! Mask
+         t_dta(:,:,:  ) = t_dta(:,:,:) * tmask(:,:,:)
+         t_dta(:,:,jpk) = 0.
+         IF( ln_zps ) THEN                ! z-coord. with partial steps
+            DO jj = 1, jpj                ! interpolation of temperature at the last level
+               DO ji = 1, jpi
+                  ik = mbathy(ji,jj) - 1
+                  IF( ik > 2 ) THEN
+                     zl = ( gdept_0(ik) - fsdept_0(ji,jj,ik) ) / ( gdept_0(ik) - gdept_0(ik-1) )
+                     t_dta(ji,jj,ik) = (1.-zl) * t_dta(ji,jj,ik) + zl * t_dta(ji,jj,ik-1)
+                  ENDIF
+            END DO
+         END DO
+      ENDIF
+
+   ENDIF
+         
+   IF( lwp .AND. kt==nn_it000 ) THEN
+      WRITE(numout,*) ' temperature Levitus '
+      WRITE(numout,*)
+      WRITE(numout,*)'  level = 1'
+      CALL prihre( t_dta(:,:,1    ), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
+      WRITE(numout,*)'  level = ', jpk/2
+      CALL prihre( t_dta(:,:,jpk/2), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
+      WRITE(numout,*)'  level = ', jpkm1
+      CALL prihre( t_dta(:,:,jpkm1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
+   ENDIF
+
+   END SUBROUTINE dta_tem
 
 #else
Index: /branches/devmercator2010/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- /branches/devmercator2010/NEMO/OPA_SRC/SBC/fldread.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/OPA_SRC/SBC/fldread.F90	(revision 2077)
@@ -48,6 +48,6 @@
       INTEGER , DIMENSION(2)          ::   nrec_b       ! before record (1: index, 2: second since Jan. 1st 00h of nit000 year)
       INTEGER , DIMENSION(2)          ::   nrec_a       ! after  record (1: index, 2: second since Jan. 1st 00h of nit000 year)
-      REAL(wp) , ALLOCATABLE, DIMENSION(:,:)   ::   fnow         ! input fields interpolated to now time step
-      REAL(wp) , ALLOCATABLE, DIMENSION(:,:,:) ::   fdta         ! 2 consecutive record of input fields
+      REAL(wp) , ALLOCATABLE, DIMENSION(:,:,:)   ::   fnow       ! input fields interpolated to now time step
+      REAL(wp) , ALLOCATABLE, DIMENSION(:,:,:,:) ::   fdta       ! 2 consecutive record of input fields
       CHARACTER(len = 256)            ::   wgtname      ! current name of the NetCDF weight file acting as a key
                                                         ! into the WGTLIST structure
@@ -78,6 +78,6 @@
       INTEGER, DIMENSION(:,:,:), POINTER      ::   data_jpj     ! array of source integers
       REAL(wp), DIMENSION(:,:,:), POINTER     ::   data_wgt     ! array of weights on model grid
-      REAL(wp), DIMENSION(:,:), POINTER       ::   fly_dta      ! array of values on input grid
-      REAL(wp), DIMENSION(:,:), POINTER       ::   col2         ! temporary array for reading in columns
+      REAL(wp), DIMENSION(:,:,:), POINTER     ::   fly_dta      ! array of values on input grid
+      REAL(wp), DIMENSION(:,:,:), POINTER     ::   col2         ! temporary array for reading in columns
    END TYPE WGT
 
@@ -120,4 +120,6 @@
 
       INTEGER  ::   jf         ! dummy indices
+      INTEGER  ::   jk         ! dummy indices
+      INTEGER  ::   ipk        ! number of vertical levels of sdjf%fdta ( 2D: ipk=1 ; 3D: ipk=jpk )
       INTEGER  ::   kw         ! index into wgts array
       INTEGER  ::   ireclast   ! last record to be read in the current year file
@@ -143,6 +145,6 @@
             IF( sd(jf)%ln_tint ) THEN         ! time interpolation: swap before record field
 !CDIR COLLAPSE
-               sd(jf)%fdta(:,:,1) = sd(jf)%fdta(:,:,2)
-               sd(jf)%rotn(1)     = sd(jf)%rotn(2)
+               sd(jf)%fdta(:,:,:,1) = sd(jf)%fdta(:,:,:,2)
+               sd(jf)%rotn(1)       = sd(jf)%rotn(2)
             ENDIF
 
@@ -157,5 +159,8 @@
 
                ! last record to be read in the current file
-               IF( sd(jf)%nfreqh == -1 ) THEN                  ;   ireclast = 12
+               IF( sd(jf)%nfreqh == -1 ) THEN
+                  IF(     sd(jf)%cltype == 'monthly'   ) THEN  ;   ireclast = 1
+                  ELSE                                         ;   ireclast = 12
+                  ENDIF
                ELSE                             
                   IF(     sd(jf)%cltype == 'monthly'   ) THEN  ;   ireclast = 24 * nmonth_len(nmonth) / sd(jf)%nfreqh 
@@ -204,7 +209,13 @@
             IF( LEN(TRIM(sd(jf)%wgtname)) > 0 ) THEN
                CALL wgt_list( sd(jf), kw )
-               CALL fld_interp( sd(jf)%num, sd(jf)%clvar, kw, sd(jf)%fdta(:,:,2), sd(jf)%nrec_a(1) )
+               ipk =  SIZE(sd(jf)%fdta,3)
+               CALL fld_interp( sd(jf)%num, sd(jf)%clvar , kw , ipk, sd(jf)%fdta(:,:,:,2) , sd(jf)%nrec_a(1) )
             ELSE
-               CALL iom_get( sd(jf)%num, jpdom_data, sd(jf)%clvar, sd(jf)%fdta(:,:,2), sd(jf)%nrec_a(1) )
+               SELECT CASE( SIZE(sd(jf)%fdta,3) )
+               CASE(1)
+                  CALL iom_get( sd(jf)%num, jpdom_data, sd(jf)%clvar, sd(jf)%fdta(:,:,1,2), sd(jf)%nrec_a(1) )
+               CASE(jpk)
+                  CALL iom_get( sd(jf)%num, jpdom_data, sd(jf)%clvar, sd(jf)%fdta(:,:,:,2), sd(jf)%nrec_a(1) )
+               END SELECT
             ENDIF
             sd(jf)%rotn(2) = .FALSE.
@@ -245,8 +256,13 @@
                          utmp(:,:) = 0.0
                          vtmp(:,:) = 0.0
-                         CALL rot_rep( sd(jf)%fdta(:,:,nf), sd(kf)%fdta(:,:,nf), 'T', 'en->i', utmp(:,:) )
-                         CALL rot_rep( sd(jf)%fdta(:,:,nf), sd(kf)%fdta(:,:,nf), 'T', 'en->j', vtmp(:,:) )
-                         sd(jf)%fdta(:,:,nf) = utmp(:,:)
-                         sd(kf)%fdta(:,:,nf) = vtmp(:,:)
+                         !
+                         ipk = SIZE( sd(kf)%fdta(:,:,:,nf) ,3 )
+                         DO jk = 1,ipk
+                            CALL rot_rep( sd(jf)%fdta(:,:,jk,nf),sd(kf)%fdta(:,:,jk,nf),'T', 'en->i', utmp(:,:) )
+                            CALL rot_rep( sd(jf)%fdta(:,:,jk,nf),sd(kf)%fdta(:,:,jk,nf),'T', 'en->j', vtmp(:,:) )
+                            sd(jf)%fdta(:,:,jk,nf) = utmp(:,:)
+                            sd(kf)%fdta(:,:,jk,nf) = vtmp(:,:)
+                         END DO
+                         !
                          sd(jf)%rotn(nf) = .TRUE.
                          sd(kf)%rotn(nf) = .TRUE.
@@ -280,5 +296,5 @@
                ztintb =  1. - ztinta
 !CDIR COLLAPSE
-               sd(jf)%fnow(:,:) = ztintb * sd(jf)%fdta(:,:,1) + ztinta * sd(jf)%fdta(:,:,2)
+               sd(jf)%fnow(:,:,:) = ztintb * sd(jf)%fdta(:,:,:,1) + ztinta * sd(jf)%fdta(:,:,:,2)
             ELSE
                IF(lwp .AND. kt - nit000 <= 100 ) THEN
@@ -288,5 +304,5 @@
                ENDIF
 !CDIR COLLAPSE
-               sd(jf)%fnow(:,:) = sd(jf)%fdta(:,:,2)   ! piecewise constant field
+               sd(jf)%fnow(:,:,:) = sd(jf)%fdta(:,:,:,2)   ! piecewise constant field
  
             ENDIF
@@ -320,4 +336,6 @@
       INTEGER :: inrec          ! number of record existing for this variable
       INTEGER :: kwgt
+      INTEGER :: jk             !vertical loop variable
+      INTEGER :: ipk            !number of vertical levels of sdjf%fdta ( 2D: ipk=1 ; 3D: ipk=jpk )
       CHARACTER(LEN=1000) ::   clfmt   ! write format
       !!---------------------------------------------------------------------
@@ -339,5 +357,5 @@
                IF( sdjf%cltype == 'monthly' ) THEN   ! monthly file
                   sdjf%nrec_b(1) = 1                                                       ! force to read the unique record
-                  llprevmth = .NOT. sdjf%ln_clim                                           ! use previous month file?
+                  llprevmth = .TRUE.                                                       ! use previous month file?
                   llprevyr  = llprevmth .AND. nmonth == 1                                  ! use previous year  file?
                ELSE                                  ! yearly file
@@ -366,5 +384,5 @@
             &                  nmonth - COUNT((/llprevmth/)) + 12                   * COUNT((/llprevyr /)),               &
             &                  nday   - COUNT((/llprevday/)) + nmonth_len(nmonth-1) * COUNT((/llprevmth/)), .NOT. llprev )
-         
+
          ! if previous year/month/day file does not exist, we switch to the current year/month/day
          IF( llprev .AND. sdjf%num == 0 ) THEN
@@ -384,9 +402,16 @@
 
          ! read before data into sdjf%fdta(:,:,2) because we will swap data in the following part of fld_read
+         
          IF( LEN(TRIM(sdjf%wgtname)) > 0 ) THEN
             CALL wgt_list( sdjf, kwgt )
-            CALL fld_interp( sdjf%num, sdjf%clvar, kwgt, sdjf%fdta(:,:,2), sdjf%nrec_b(1) )
+            ipk = SIZE(sdjf%fdta,3)
+            CALL fld_interp( sdjf%num, sdjf%clvar, kwgt, ipk, sdjf%fdta(:,:,:,2), sdjf%nrec_a(1) )
          ELSE
-            CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fdta(:,:,2), sdjf%nrec_b(1) )
+            SELECT CASE ( SIZE(sdjf%fdta,3) )
+            CASE(1)
+                CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fdta(:,:,1,2), sdjf%nrec_b(1) )
+            CASE(jpk)
+                CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fdta(:,:,:,2), sdjf%nrec_b(1) )
+            END SELECT
          ENDIF
          sdjf%rotn(2) = .FALSE.
@@ -399,8 +424,9 @@
       ENDIF
 
+
       IF( sdjf%num == 0 )   CALL fld_clopn( sdjf, nyear, nmonth, nday )   ! make sure current year/month/day file is opened
 
       sdjf%nswap_sec = nsec_year + nsec1jan000 - 1   ! force read/update the after data in the following part of fld_read 
-      
+     
    END SUBROUTINE fld_init
 
@@ -436,5 +462,6 @@
             !       forcing record :  nmonth 
             !                            
-            ztmp  = REAL( nday, wp ) / REAL( nmonth_len(nmonth), wp ) + 0.5
+            ztmp  = 0.e0
+            IF(  REAL( nday, wp ) / REAL( nmonth_len(nmonth), wp ) .GT. 0.5 ) ztmp  = 1.0
          ELSE
             ztmp  = 0.e0
@@ -446,7 +473,21 @@
          ENDIF
 
-         sdjf%nrec_a(:) = (/ irec, nmonth_half(irec) + nsec1jan000 /)   ! define after  record number and time
-         irec = irec - 1                                                ! move back to previous record
-         sdjf%nrec_b(:) = (/ irec, nmonth_half(irec) + nsec1jan000 /)   ! define before record number and time
+         IF( sdjf%cltype == 'monthly' ) THEN
+
+            sdjf%nrec_b(:) = (/ 0, nmonth_half(irec - 1 ) + nsec1jan000 /)
+            sdjf%nrec_a(:) = (/ 1, nmonth_half(irec     ) + nsec1jan000 /)
+
+            IF( ztmp  == 1. ) THEN
+              sdjf%nrec_b(1) = 1
+              sdjf%nrec_a(1) = 2
+            ENDIF
+
+         ELSE
+
+            sdjf%nrec_a(:) = (/ irec, nmonth_half(irec) + nsec1jan000 /)   ! define after  record number and time
+            irec = irec - 1                                                ! move back to previous record
+            sdjf%nrec_b(:) = (/ irec, nmonth_half(irec) + nsec1jan000 /)   ! define before record number and time
+
+         ENDIF
          !
       ELSE                              ! higher frequency mean (in hours)
@@ -534,4 +575,7 @@
          IF( sdjf%cltype /= 'yearly' )    WRITE(sdjf%clname, '(a,"m" ,i2.2)' ) TRIM( sdjf%clname     ), kmonth   ! add month
          IF( sdjf%cltype == 'daily'  )    WRITE(sdjf%clname, '(a,"d" ,i2.2)' ) TRIM( sdjf%clname     ), kday     ! add day
+      ELSE
+         ! build the new filename if climatological data
+         IF( sdjf%cltype == 'monthly' )   WRITE(sdjf%clname, '(a,"_m" ,i2.2)' ) TRIM( sdjf%clrootname ), kmonth   ! add month
       ENDIF
       CALL iom_open( sdjf%clname, sdjf%num, ldstop = ldstop, ldiof =  LEN(TRIM(sdjf%wgtname)) > 0 )
@@ -564,7 +608,5 @@
          sdf(jf)%ln_tint    = sdf_n(jf)%ln_tint
          sdf(jf)%ln_clim    = sdf_n(jf)%ln_clim
-         IF( sdf(jf)%nfreqh == -1. ) THEN   ;   sdf(jf)%cltype = 'yearly'
-         ELSE                               ;   sdf(jf)%cltype = sdf_n(jf)%cltype
-         ENDIF
+         sdf(jf)%cltype     = sdf_n(jf)%cltype
          sdf(jf)%wgtname = " "
          IF( LEN( TRIM(sdf_n(jf)%wname) ) > 0 )   sdf(jf)%wgtname = TRIM( cdir )//TRIM( sdf_n(jf)%wname )
@@ -684,4 +726,5 @@
       INTEGER                                 ::   inum          ! temporary logical unit
       INTEGER                                 ::   id            ! temporary variable id
+      INTEGER                                 ::   ipk           ! temporary vertical dimension
       CHARACTER (len=5)                       ::   aname
       INTEGER , DIMENSION(3)                  ::   ddims
@@ -848,6 +891,7 @@
          ! SA: +3 stencil is a patch to avoid out-of-bound computation in some configuration. 
          ! a more robust solution will be given in next release
-         ALLOCATE( ref_wgts(nxt_wgt)%fly_dta(ref_wgts(nxt_wgt)%jpiwgt+3, ref_wgts(nxt_wgt)%jpjwgt+3) )
-         IF( ref_wgts(nxt_wgt)%cyclic ) ALLOCATE( ref_wgts(nxt_wgt)%col2(2,ref_wgts(nxt_wgt)%jpjwgt+3) )
+         ipk =  SIZE(sd%fdta,3)
+         ALLOCATE( ref_wgts(nxt_wgt)%fly_dta(ref_wgts(nxt_wgt)%jpiwgt+3, ref_wgts(nxt_wgt)%jpjwgt+3 ,ipk) )
+         IF( ref_wgts(nxt_wgt)%cyclic ) ALLOCATE( ref_wgts(nxt_wgt)%col2(2,ref_wgts(nxt_wgt)%jpjwgt+3,ipk) )
 
          nxt_wgt = nxt_wgt + 1
@@ -859,5 +903,5 @@
    END SUBROUTINE fld_weight
 
-   SUBROUTINE fld_interp(num, clvar, kw, dta, nrec)
+   SUBROUTINE fld_interp(num, clvar, kw, kk, dta, nrec)
       !!---------------------------------------------------------------------
       !!                    ***  ROUTINE fld_interp  ***
@@ -868,16 +912,17 @@
       !! ** Method  :   
       !!----------------------------------------------------------------------
-      INTEGER,          INTENT(in)                        ::   num                 ! stream number
-      CHARACTER(LEN=*), INTENT(in)                        ::   clvar               ! variable name
-      INTEGER,          INTENT(in)                        ::   kw                  ! weights number
-      REAL(wp),         INTENT(inout), DIMENSION(jpi,jpj) ::   dta                 ! output field on model grid
-      INTEGER,          INTENT(in)                        ::   nrec                ! record number to read (ie time slice)
+      INTEGER,          INTENT(in)                           ::   num                 ! stream number
+      CHARACTER(LEN=*), INTENT(in)                           ::   clvar               ! variable name
+      INTEGER,          INTENT(in)                           ::   kw                  ! weights number
+      INTEGER,          INTENT(in)                           ::   kk                  ! vertical dimension of kk
+      REAL(wp),         INTENT(inout), DIMENSION(jpi,jpj,kk) ::   dta                 ! output field on model grid
+      INTEGER,          INTENT(in)                           ::   nrec                ! record number to read (ie time slice)
       !! 
-      INTEGER, DIMENSION(2)                               ::   rec1,recn           ! temporary arrays for start and length
-      INTEGER                                             ::  jk, jn, jm           ! loop counters
-      INTEGER                                             ::  ni, nj               ! lengths
-      INTEGER                                             ::  jpimin,jpiwid        ! temporary indices
-      INTEGER                                             ::  jpjmin,jpjwid        ! temporary indices
-      INTEGER                                             ::  jpi1,jpi2,jpj1,jpj2  ! temporary indices
+      INTEGER, DIMENSION(3)                                  ::   rec1,recn           ! temporary arrays for start and length
+      INTEGER                                                ::  jk, jn, jm           ! loop counters
+      INTEGER                                                ::  ni, nj               ! lengths
+      INTEGER                                                ::  jpimin,jpiwid        ! temporary indices
+      INTEGER                                                ::  jpjmin,jpjwid        ! temporary indices
+      INTEGER                                                ::  jpi1,jpi2,jpj1,jpj2  ! temporary indices
       !!----------------------------------------------------------------------
       !
@@ -897,6 +942,8 @@
       rec1(1) = MAX( jpimin-1, 1 )
       rec1(2) = MAX( jpjmin-1, 1 )
+      rec1(3) = 1
       recn(1) = MIN( jpiwid+2, ref_wgts(kw)%ddims(1)-rec1(1)+1 )
       recn(2) = MIN( jpjwid+2, ref_wgts(kw)%ddims(2)-rec1(2)+1 )
+      recn(3) = kk
 
       !! where we need to read it to
@@ -906,16 +953,21 @@
       jpj2 = jpj1 + recn(2) - 1
 
-      ref_wgts(kw)%fly_dta(:,:) = 0.0
-      CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2), nrec, rec1, recn)
+      ref_wgts(kw)%fly_dta(:,:,:) = 0.0
+      SELECT CASE( SIZE(ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,:),3) )
+      CASE(1)
+           CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,1), nrec, rec1, recn)
+      CASE(jpk)  
+           CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,:), nrec, rec1, recn)
+      END SELECT 
 
       !! first four weights common to both bilinear and bicubic
       !! note that we have to offset by 1 into fly_dta array because of halo
-      dta(:,:) = 0.0
+      dta(:,:,:) = 0.0
       DO jk = 1,4
-        DO jn = 1, jpj
-          DO jm = 1,jpi
+        DO jn = 1, nlcj
+          DO jm = 1,nlci
             ni = ref_wgts(kw)%data_jpi(jm,jn,jk)
             nj = ref_wgts(kw)%data_jpj(jm,jn,jk)
-            dta(jm,jn) = dta(jm,jn) + ref_wgts(kw)%data_wgt(jm,jn,jk) * ref_wgts(kw)%fly_dta(ni+1,nj+1)
+            dta(jm,jn,:) = dta(jm,jn,:) + ref_wgts(kw)%data_wgt(jm,jn,jk) * ref_wgts(kw)%fly_dta(ni+1,nj+1,jk)
           END DO
         END DO
@@ -926,14 +978,14 @@
         !! fix up halo points that we couldnt read from file
         IF( jpi1 == 2 ) THEN
-           ref_wgts(kw)%fly_dta(jpi1-1,:) = ref_wgts(kw)%fly_dta(jpi1,:)
+           ref_wgts(kw)%fly_dta(jpi1-1,:,:) = ref_wgts(kw)%fly_dta(jpi1,:,:)
         ENDIF
         IF( jpi2 + jpimin - 1 == ref_wgts(kw)%ddims(1)+1 ) THEN
-           ref_wgts(kw)%fly_dta(jpi2+1,:) = ref_wgts(kw)%fly_dta(jpi2,:)
+           ref_wgts(kw)%fly_dta(jpi2+1,:,:) = ref_wgts(kw)%fly_dta(jpi2,:,:)
         ENDIF
         IF( jpj1 == 2 ) THEN
-           ref_wgts(kw)%fly_dta(:,jpj1-1) = ref_wgts(kw)%fly_dta(:,jpj1)
+           ref_wgts(kw)%fly_dta(:,jpj1-1,:) = ref_wgts(kw)%fly_dta(:,jpj1,:)
         ENDIF
         IF( jpj2 + jpjmin - 1 == ref_wgts(kw)%ddims(2)+1 .AND. jpj2 .lt. jpjwid+2 ) THEN
-           ref_wgts(kw)%fly_dta(:,jpj2+1) = 2.0*ref_wgts(kw)%fly_dta(:,jpj2) - ref_wgts(kw)%fly_dta(:,jpj2-1)
+           ref_wgts(kw)%fly_dta(:,jpj2+1,:) = 2.0*ref_wgts(kw)%fly_dta(:,jpj2,:) - ref_wgts(kw)%fly_dta(:,jpj2-1,:)
         ENDIF
 
@@ -948,11 +1000,21 @@
            IF( jpi1 == 2 ) THEN
               rec1(1) = ref_wgts(kw)%ddims(1) - 1
-              CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col2(:,jpj1:jpj2), nrec, rec1, recn)
-              ref_wgts(kw)%fly_dta(jpi1-1,jpj1:jpj2) = ref_wgts(kw)%col2(ref_wgts(kw)%offset+1,jpj1:jpj2)
+              SELECT CASE( SIZE( ref_wgts(kw)%col2(:,jpj1:jpj2,:),3) )
+              CASE(1)
+                   CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col2(:,jpj1:jpj2,1), nrec, rec1, recn)
+              CASE(jpk)         
+                   CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col2(:,jpj1:jpj2,:), nrec, rec1, recn)
+              END SELECT      
+              ref_wgts(kw)%fly_dta(jpi1-1,jpj1:jpj2,:) = ref_wgts(kw)%col2(ref_wgts(kw)%offset+1,jpj1:jpj2,:)
            ENDIF
            IF( jpi2 + jpimin - 1 == ref_wgts(kw)%ddims(1)+1 ) THEN
               rec1(1) = 1
-              CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col2(:,jpj1:jpj2), nrec, rec1, recn)
-              ref_wgts(kw)%fly_dta(jpi2+1,jpj1:jpj2) = ref_wgts(kw)%col2(2-ref_wgts(kw)%offset,jpj1:jpj2)
+              SELECT CASE( SIZE( ref_wgts(kw)%col2(:,jpj1:jpj2,:),3) )
+              CASE(1)
+                   CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col2(:,jpj1:jpj2,1), nrec, rec1, recn)
+              CASE(jpk)
+                   CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col2(:,jpj1:jpj2,:), nrec, rec1, recn)
+              END SELECT
+              ref_wgts(kw)%fly_dta(jpi2+1,jpj1:jpj2,:) = ref_wgts(kw)%col2(2-ref_wgts(kw)%offset,jpj1:jpj2,:)
            ENDIF
         ENDIF
@@ -960,10 +1022,10 @@
         ! gradient in the i direction
         DO jk = 1,4
-          DO jn = 1, jpj
-            DO jm = 1,jpi
+          DO jn = 1, nlcj
+            DO jm = 1,nlci
               ni = ref_wgts(kw)%data_jpi(jm,jn,jk)
               nj = ref_wgts(kw)%data_jpj(jm,jn,jk)
-              dta(jm,jn) = dta(jm,jn) + ref_wgts(kw)%data_wgt(jm,jn,jk+4) * 0.5 *         &
-                               (ref_wgts(kw)%fly_dta(ni+2,nj+1) - ref_wgts(kw)%fly_dta(ni,nj+1))
+              dta(jm,jn,:) = dta(jm,jn,:) + ref_wgts(kw)%data_wgt(jm,jn,jk+4) * 0.5 *         &
+                               (ref_wgts(kw)%fly_dta(ni+2,nj+1,:) - ref_wgts(kw)%fly_dta(ni,nj+1,:))
             END DO
           END DO
@@ -972,10 +1034,10 @@
         ! gradient in the j direction
         DO jk = 1,4
-          DO jn = 1, jpj
-            DO jm = 1,jpi
+          DO jn = 1, nlcj
+            DO jm = 1,nlci
               ni = ref_wgts(kw)%data_jpi(jm,jn,jk)
               nj = ref_wgts(kw)%data_jpj(jm,jn,jk)
-              dta(jm,jn) = dta(jm,jn) + ref_wgts(kw)%data_wgt(jm,jn,jk+8) * 0.5 *         &
-                               (ref_wgts(kw)%fly_dta(ni+1,nj+2) - ref_wgts(kw)%fly_dta(ni+1,nj))
+              dta(jm,jn,:) = dta(jm,jn,:) + ref_wgts(kw)%data_wgt(jm,jn,jk+8) * 0.5 *         &
+                               (ref_wgts(kw)%fly_dta(ni+1,nj+2,:) - ref_wgts(kw)%fly_dta(ni+1,nj,:))
             END DO
           END DO
@@ -988,7 +1050,7 @@
               ni = ref_wgts(kw)%data_jpi(jm,jn,jk)
               nj = ref_wgts(kw)%data_jpj(jm,jn,jk)
-              dta(jm,jn) = dta(jm,jn) + ref_wgts(kw)%data_wgt(jm,jn,jk+12) * 0.25 * ( &
-                               (ref_wgts(kw)%fly_dta(ni+2,nj+2) - ref_wgts(kw)%fly_dta(ni  ,nj+2)) -   &
-                               (ref_wgts(kw)%fly_dta(ni+2,nj  ) - ref_wgts(kw)%fly_dta(ni  ,nj  )))
+              dta(jm,jn,:) = dta(jm,jn,:) + ref_wgts(kw)%data_wgt(jm,jn,jk+12) * 0.25 * ( &
+                               (ref_wgts(kw)%fly_dta(ni+2,nj+2,:) - ref_wgts(kw)%fly_dta(ni  ,nj+2,:)) -   &
+                               (ref_wgts(kw)%fly_dta(ni+2,nj  ,:) - ref_wgts(kw)%fly_dta(ni  ,nj  ,:)))
             END DO
           END DO
Index: /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcblk_clio.F90
===================================================================
--- /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 2077)
@@ -162,6 +162,6 @@
 
          DO ifpr= 1, jpfld
-            ALLOCATE( sf(ifpr)%fnow(jpi,jpj) )
-            ALLOCATE( sf(ifpr)%fdta(jpi,jpj,2) )
+            ALLOCATE( sf(ifpr)%fnow(jpi,jpj,1) )
+            ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) )
          END DO
 
@@ -178,5 +178,5 @@
       !
 #if defined key_lim3      
-      tatm_ice(:,:) = sf(jp_tair)%fnow(:,:)     !RB ugly patch
+      tatm_ice(:,:) = sf(jp_tair)%fnow(:,:,1)     !RB ugly patch
 #endif
       !
@@ -272,6 +272,6 @@
       DO jj = 1 , jpj
          DO ji = 1, jpi
-            utau(ji,jj) = sf(jp_utau)%fnow(ji,jj)
-            vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj)
+            utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1)
+            vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1)
          END DO
       END DO
@@ -297,5 +297,5 @@
       DO jj = 1 , jpj
          DO ji = 1, jpi
-            wndm(ji,jj) = sf(jp_wndm)%fnow(ji,jj)
+            wndm(ji,jj) = sf(jp_wndm)%fnow(ji,jj,1)
          END DO
       END DO
@@ -317,6 +317,6 @@
             !
             zsst  = pst(ji,jj)              + rt0           ! converte Celcius to Kelvin the SST
-            ztatm = sf(jp_tair)%fnow(ji,jj)                 ! and set minimum value far above 0 K (=rt0 over land)
-            zcco1 = 1.0 - sf(jp_ccov)%fnow(ji,jj)           ! fraction of clear sky ( 1 - cloud cover)
+            ztatm = sf(jp_tair)%fnow(ji,jj,1)               ! and set minimum value far above 0 K (=rt0 over land)
+            zcco1 = 1.0 - sf(jp_ccov)%fnow(ji,jj,1)         ! fraction of clear sky ( 1 - cloud cover)
             zrhoa = zpatm / ( 287.04 * ztatm )              ! air density (equation of state for dry air) 
             ztamr = ztatm - rtt                             ! Saturation water vapour
@@ -325,5 +325,5 @@
             zmt3  = SIGN( 28.200, -ztamr )                  !           \/
             zes   = 611.0 * EXP(  ABS( ztamr ) * MIN ( zmt1, zmt2 ) / ( ztatm - 35.86  + MAX( 0.e0, zmt3 ) )  )
-            zev    = sf(jp_humi)%fnow(ji,jj) * zes          ! vapour pressure  
+            zev    = sf(jp_humi)%fnow(ji,jj,1) * zes        ! vapour pressure  
             zevsqr = SQRT( zev * 0.01 )                     ! square-root of vapour pressure
             zqatm = 0.622 * zev / ( zpatm - 0.378 * zev )   ! specific humidity 
@@ -333,5 +333,5 @@
             !--------------------------------------!
             ztatm3  = ztatm * ztatm * ztatm
-            zcldeff = 1.0 - sbudyko(ji,jj) * sf(jp_ccov)%fnow(ji,jj) * sf(jp_ccov)%fnow(ji,jj)    
+            zcldeff = 1.0 - sbudyko(ji,jj) * sf(jp_ccov)%fnow(ji,jj,1) * sf(jp_ccov)%fnow(ji,jj,1)    
             ztaevbk = ztatm * ztatm3 * zcldeff * ( 0.39 - 0.05 * zevsqr ) 
             !
@@ -351,5 +351,5 @@
             zdeltaq = zqatm - zqsato
             ztvmoy  = ztatm * ( 1. + 2.2e-3 * ztatm * zqatm )
-            zdenum  = MAX( sf(jp_wndm)%fnow(ji,jj) * sf(jp_wndm)%fnow(ji,jj) * ztvmoy, zeps )
+            zdenum  = MAX( sf(jp_wndm)%fnow(ji,jj,1) * sf(jp_wndm)%fnow(ji,jj,1) * ztvmoy, zeps )
             zdtetar = zdteta / zdenum
             ztvmoyr = ztvmoy * ztvmoy * zdeltaq / zdenum
@@ -373,5 +373,5 @@
             zpsil   = zpsih
             
-            zvatmg         = MAX( 0.032 * 1.5e-3 * sf(jp_wndm)%fnow(ji,jj) * sf(jp_wndm)%fnow(ji,jj) / grav, zeps )
+            zvatmg         = MAX( 0.032 * 1.5e-3 * sf(jp_wndm)%fnow(ji,jj,1) * sf(jp_wndm)%fnow(ji,jj,1) / grav, zeps )
             zcmn           = vkarmn / LOG ( 10. / zvatmg )
             zchn           = 0.0327 * zcmn
@@ -387,5 +387,5 @@
             zcleo          = zcln * zclcm 
 
-            zrhova         = zrhoa * sf(jp_wndm)%fnow(ji,jj)
+            zrhova         = zrhoa * sf(jp_wndm)%fnow(ji,jj,1)
 
             ! sensible heat flux
@@ -408,5 +408,5 @@
          DO ji = 1, jpi
             qns (ji,jj) = zqlw(ji,jj) - zqsb(ji,jj) - zqla(ji,jj)      ! Downward Non Solar flux
-            emp (ji,jj) = zqla(ji,jj) / cevap - sf(jp_prec)%fnow(ji,jj) / rday * tmask(ji,jj,1)
+            emp (ji,jj) = zqla(ji,jj) / cevap - sf(jp_prec)%fnow(ji,jj,1) / rday * tmask(ji,jj,1)
          END DO
       END DO
@@ -530,5 +530,5 @@
 !CDIR NOVERRCHK
          DO ji = 1, jpi
-            ztatm (ji,jj) = sf(jp_tair)%fnow(ji,jj)                  ! air temperature in Kelvins 
+            ztatm (ji,jj) = sf(jp_tair)%fnow(ji,jj,1)                ! air temperature in Kelvins 
       
             zrhoa(ji,jj) = zpatm / ( 287.04 * ztatm(ji,jj) )         ! air density (equation of state for dry air) 
@@ -541,5 +541,5 @@
                &                / ( ztatm(ji,jj) - 35.86  + MAX( 0.e0, zmt3 ) )  )
 
-            zev = sf(jp_humi)%fnow(ji,jj) * zes                      ! vapour pressure  
+            zev = sf(jp_humi)%fnow(ji,jj,1) * zes                      ! vapour pressure  
             zevsqr(ji,jj) = SQRT( zev * 0.01 )                       ! square-root of vapour pressure
             zqatm(ji,jj) = 0.622 * zev / ( zpatm - 0.378 * zev )     ! specific humidity 
@@ -551,5 +551,5 @@
             zmt2  = ( 272.0 - ztatm(ji,jj) ) / 38.0   ;   zind2 = MAX( 0.e0, SIGN( 1.e0, zmt2 ) )
             zmt3  = ( 281.0 - ztatm(ji,jj) ) / 18.0   ;   zind3 = MAX( 0.e0, SIGN( 1.e0, zmt3 ) )
-            p_spr(ji,jj) = sf(jp_prec)%fnow(ji,jj) / rday   &        ! rday = converte mm/day to kg/m2/s
+            p_spr(ji,jj) = sf(jp_prec)%fnow(ji,jj,1) / rday   &      ! rday = converte mm/day to kg/m2/s
                &         * (          zind1      &                   ! solid  (snow) precipitation [kg/m2/s]
                &            + ( 1.0 - zind1 ) * (          zind2   * ( 0.5 + zmt2 )   &
@@ -561,6 +561,6 @@
             ! fraction of qsr_ice which is NOT absorbed in the thin surface layer
             ! and thus which penetrates inside the ice cover ( Maykut and Untersteiner, 1971 ; Elbert anbd Curry, 1993 )
-            p_fr1(ji,jj) = 0.18  * ( 1.e0 - sf(jp_ccov)%fnow(ji,jj) ) + 0.35 * sf(jp_ccov)%fnow(ji,jj) 
-            p_fr2(ji,jj) = 0.82  * ( 1.e0 - sf(jp_ccov)%fnow(ji,jj) ) + 0.65 * sf(jp_ccov)%fnow(ji,jj)
+            p_fr1(ji,jj) = 0.18  * ( 1.e0 - sf(jp_ccov)%fnow(ji,jj,1) ) + 0.35 * sf(jp_ccov)%fnow(ji,jj,1) 
+            p_fr2(ji,jj) = 0.82  * ( 1.e0 - sf(jp_ccov)%fnow(ji,jj,1) ) + 0.65 * sf(jp_ccov)%fnow(ji,jj,1)
          END DO
       END DO
@@ -584,5 +584,5 @@
                !-------------------------------------------!
                ztatm3  = ztatm(ji,jj) * ztatm(ji,jj) * ztatm(ji,jj)
-               zcldeff = 1.0 - sbudyko(ji,jj) * sf(jp_ccov)%fnow(ji,jj) * sf(jp_ccov)%fnow(ji,jj)    
+               zcldeff = 1.0 - sbudyko(ji,jj) * sf(jp_ccov)%fnow(ji,jj,1) * sf(jp_ccov)%fnow(ji,jj,1)    
                ztaevbk = ztatm3 * ztatm(ji,jj) * zcldeff * ( 0.39 - 0.05 * zevsqr(ji,jj) ) 
                !
@@ -609,5 +609,5 @@
                
                !  sensible and latent fluxes over ice
-               zrhova     = zrhoa(ji,jj) * sf(jp_wndm)%fnow(ji,jj)      ! computation of intermediate values
+               zrhova     = zrhoa(ji,jj) * sf(jp_wndm)%fnow(ji,jj,1)      ! computation of intermediate values
                zrhovaclei = zrhova * zcshi * 2.834e+06
                zrhovacshi = zrhova * zclei * 1004.0
@@ -639,5 +639,5 @@
       p_qns(:,:,:) = z_qlw (:,:,:) - z_qsb (:,:,:) - p_qla (:,:,:)      ! Downward Non Solar flux
 !CDIR COLLAPSE
-      p_tpr(:,:)   = sf(jp_prec)%fnow(:,:) / rday                       ! total precipitation [kg/m2/s]
+      p_tpr(:,:)   = sf(jp_prec)%fnow(:,:,1) / rday                       ! total precipitation [kg/m2/s]
       !
 !!gm : not necessary as all input data are lbc_lnk...
@@ -735,11 +735,11 @@
 !CDIR NOVERRCHK
          DO ji = 1, jpi
-            ztamr = sf(jp_tair)%fnow(ji,jj) - rtt
+            ztamr = sf(jp_tair)%fnow(ji,jj,1) - rtt
             zmt1  = SIGN( 17.269,  ztamr )
             zmt2  = SIGN( 21.875,  ztamr )
             zmt3  = SIGN( 28.200, -ztamr )
             zes = 611.0 * EXP(  ABS( ztamr ) * MIN ( zmt1, zmt2 )   &              ! Saturation water vapour
-               &                     / ( sf(jp_tair)%fnow(ji,jj) - 35.86  + MAX( 0.e0, zmt3 ) )  )
-            zev(ji,jj) = sf(jp_humi)%fnow(ji,jj) * zes * 1.0e-05                   ! vapour pressure  
+               &                     / ( sf(jp_tair)%fnow(ji,jj,1) - 35.86  + MAX( 0.e0, zmt3 ) )  )
+            zev(ji,jj) = sf(jp_humi)%fnow(ji,jj,1) * zes * 1.0e-05                   ! vapour pressure  
          END DO
       END DO
@@ -798,6 +798,6 @@
 
                ! ocean albedo depending on the cloud cover (Payne, 1972)
-               za_oce     = ( 1.0 - sf(jp_ccov)%fnow(ji,jj) ) * 0.05 / ( 1.1 * zcmue**1.4 + 0.15 )   &   ! clear sky
-                  &       +         sf(jp_ccov)%fnow(ji,jj)   * 0.06                                     ! overcast
+               za_oce     = ( 1.0 - sf(jp_ccov)%fnow(ji,jj,1) ) * 0.05 / ( 1.1 * zcmue**1.4 + 0.15 )   &   ! clear sky
+                  &       +         sf(jp_ccov)%fnow(ji,jj,1)   * 0.06                                     ! overcast
 
                   ! solar heat flux absorbed by the ocean (Zillman, 1972)
@@ -814,5 +814,5 @@
          DO ji = 1, jpi
             zlmunoon = ASIN( zps(ji,jj) + zpc(ji,jj) ) / rad                         ! local noon solar altitude
-            zcldcor  = MIN(  1.e0, ( 1.e0 - 0.62 * sf(jp_ccov)%fnow(ji,jj)   &       ! cloud correction (Reed 1977)
+            zcldcor  = MIN(  1.e0, ( 1.e0 - 0.62 * sf(jp_ccov)%fnow(ji,jj,1)   &       ! cloud correction (Reed 1977)
                &                          + 0.0019 * zlmunoon )                 )
             pqsr_oce(ji,jj) = zcoef1 * zcldcor * pqsr_oce(ji,jj) * tmask(ji,jj,1)   ! and zcoef1: ellipsity
@@ -865,11 +865,11 @@
 !CDIR NOVERRCHK
          DO ji = 1, jpi           
-            ztamr = sf(jp_tair)%fnow(ji,jj) - rtt           
+            ztamr = sf(jp_tair)%fnow(ji,jj,1) - rtt           
             zmt1  = SIGN( 17.269,  ztamr )
             zmt2  = SIGN( 21.875,  ztamr )
             zmt3  = SIGN( 28.200, -ztamr )
             zes = 611.0 * EXP(  ABS( ztamr ) * MIN ( zmt1, zmt2 )   &              ! Saturation water vapour
-               &                     / ( sf(jp_tair)%fnow(ji,jj) - 35.86  + MAX( 0.e0, zmt3 ) )  )
-            zev(ji,jj) = sf(jp_humi)%fnow(ji,jj) * zes * 1.0e-05                   ! vapour pressure  
+               &                     / ( sf(jp_tair)%fnow(ji,jj,1) - 35.86  + MAX( 0.e0, zmt3 ) )  )
+            zev(ji,jj) = sf(jp_humi)%fnow(ji,jj,1) * zes * 1.0e-05                   ! vapour pressure  
          END DO
       END DO
@@ -938,6 +938,6 @@
                      &        / (  1.0 + 0.139  * stauc(ji,jj) * ( 1.0 - 0.9435 * pa_ice_os(ji,jj,jl) ) )       
              
-                  pqsr_ice(ji,jj,jl) = pqsr_ice(ji,jj,jl) + (  ( 1.0 - sf(jp_ccov)%fnow(ji,jj) ) * zqsr_ice_cs    &
-                     &                                       +         sf(jp_ccov)%fnow(ji,jj)   * zqsr_ice_os  )
+                  pqsr_ice(ji,jj,jl) = pqsr_ice(ji,jj,jl) + (  ( 1.0 - sf(jp_ccov)%fnow(ji,jj,1) ) * zqsr_ice_cs    &
+                     &                                       +         sf(jp_ccov)%fnow(ji,jj,1)   * zqsr_ice_os  )
                END DO
             END DO
Index: /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 2077)
@@ -164,6 +164,6 @@
          ENDIF
          DO ifpr= 1, jfld
-            ALLOCATE( sf(ifpr)%fnow(jpi,jpj) )
-            ALLOCATE( sf(ifpr)%fdta(jpi,jpj,2) )
+            ALLOCATE( sf(ifpr)%fnow(jpi,jpj,1) )
+            ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) )
          END DO
          !
@@ -176,5 +176,5 @@
 
 #if defined key_lim3
-      tatm_ice(:,:) = sf(jp_tair)%fnow(:,:)
+      tatm_ice(:,:) = sf(jp_tair)%fnow(:,:,1)
 #endif
 
@@ -244,6 +244,6 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vect. opt.
-            zwnd_i(ji,jj) = (  sf(jp_wndi)%fnow(ji,jj) - 0.5 * ( pu(ji-1,jj  ) + pu(ji,jj) )  )
-            zwnd_j(ji,jj) = (  sf(jp_wndj)%fnow(ji,jj) - 0.5 * ( pv(ji  ,jj-1) + pv(ji,jj) )  )
+            zwnd_i(ji,jj) = (  sf(jp_wndi)%fnow(ji,jj,1) - 0.5 * ( pu(ji-1,jj  ) + pu(ji,jj) )  )
+            zwnd_j(ji,jj) = (  sf(jp_wndj)%fnow(ji,jj,1) - 0.5 * ( pv(ji  ,jj-1) + pv(ji,jj) )  )
          END DO
       END DO
@@ -262,7 +262,7 @@
       ! ocean albedo assumed to be 0.066
 !CDIR COLLAPSE
-      qsr (:,:) = ( 1. - 0.066 ) * sf(jp_qsr)%fnow(:,:) * tmask(:,:,1)                                 ! Short Wave
-!CDIR COLLAPSE
-      zqlw(:,:) = (  sf(jp_qlw)%fnow(:,:) - Stef * zst(:,:)*zst(:,:)*zst(:,:)*zst(:,:)  ) * tmask(:,:,1)   ! Long  Wave
+      qsr (:,:) = ( 1. - 0.066 ) * sf(jp_qsr)%fnow(:,:,1) * tmask(:,:,1)                                 ! Short Wave
+!CDIR COLLAPSE
+      zqlw(:,:) = (  sf(jp_qlw)%fnow(:,:,1) - Stef * zst(:,:)*zst(:,:)*zst(:,:)*zst(:,:)  ) * tmask(:,:,1)   ! Long  Wave
                       
       ! ----------------------------------------------------------------------------- !
@@ -307,5 +307,5 @@
       IF( lhftau ) THEN 
 !CDIR COLLAPSE
-         taum(:,:) = taum(:,:) + sf(jp_tdif)%fnow(:,:)
+         taum(:,:) = taum(:,:) + sf(jp_tdif)%fnow(:,:,1)
       ENDIF
       CALL iom_put( "taum_oce", taum )   ! output wind stress module
@@ -330,7 +330,7 @@
       ELSE
 !CDIR COLLAPSE
-         zevap(:,:) = MAX( 0.e0, rhoa    *Ce(:,:)*( zqsatw(:,:) - sf(jp_humi)%fnow(:,:) ) * wndm(:,:) )   ! Evaporation
-!CDIR COLLAPSE
-         zqsb (:,:) =            rhoa*cpa*Ch(:,:)*( zst   (:,:) - sf(jp_tair)%fnow(:,:) ) * wndm(:,:)     ! Sensible Heat
+         zevap(:,:) = MAX( 0.e0, rhoa    *Ce(:,:)*( zqsatw(:,:) - sf(jp_humi)%fnow(:,:,1) ) * wndm(:,:) )   ! Evaporation
+!CDIR COLLAPSE
+         zqsb (:,:) =            rhoa*cpa*Ch(:,:)*( zst   (:,:) - sf(jp_tair)%fnow(:,:,1) ) * wndm(:,:)     ! Sensible Heat
       ENDIF
 !CDIR COLLAPSE
@@ -355,5 +355,5 @@
       qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:)      ! Downward Non Solar flux
 !CDIR COLLAPSE
-      emp (:,:) = zevap(:,:) - sf(jp_prec)%fnow(:,:) * rn_pfac * tmask(:,:,1)
+      emp (:,:) = zevap(:,:) - sf(jp_prec)%fnow(:,:,1) * rn_pfac * tmask(:,:,1)
 !CDIR COLLAPSE
       emps(:,:) = emp(:,:)
@@ -453,8 +453,8 @@
             DO ji = 2, jpim1   ! B grid : no vector opt
                ! ... scalar wind at I-point (fld being at T-point)
-               zwndi_f = 0.25 * (  sf(jp_wndi)%fnow(ji-1,jj  ) + sf(jp_wndi)%fnow(ji  ,jj  )   &
-                  &              + sf(jp_wndi)%fnow(ji-1,jj-1) + sf(jp_wndi)%fnow(ji  ,jj-1)  ) - pui(ji,jj)
-               zwndj_f = 0.25 * (  sf(jp_wndj)%fnow(ji-1,jj  ) + sf(jp_wndj)%fnow(ji  ,jj  )   &
-                  &              + sf(jp_wndj)%fnow(ji-1,jj-1) + sf(jp_wndj)%fnow(ji  ,jj-1)  ) - pvi(ji,jj)
+               zwndi_f = 0.25 * (  sf(jp_wndi)%fnow(ji-1,jj  ,1) + sf(jp_wndi)%fnow(ji  ,jj  ,1)   &
+                  &              + sf(jp_wndi)%fnow(ji-1,jj-1,1) + sf(jp_wndi)%fnow(ji  ,jj-1,1)  ) - pui(ji,jj)
+               zwndj_f = 0.25 * (  sf(jp_wndj)%fnow(ji-1,jj  ,1) + sf(jp_wndj)%fnow(ji  ,jj  ,1)   &
+                  &              + sf(jp_wndj)%fnow(ji-1,jj-1,1) + sf(jp_wndj)%fnow(ji  ,jj-1,1)  ) - pvi(ji,jj)
                zwnorm_f = zcoef_wnorm * SQRT( zwndi_f * zwndi_f + zwndj_f * zwndj_f )
                ! ... ice stress at I-point
@@ -462,7 +462,7 @@
                p_tauj(ji,jj) = zwnorm_f * zwndj_f
                ! ... scalar wind at T-point (fld being at T-point)
-               zwndi_t = sf(jp_wndi)%fnow(ji,jj) - 0.25 * (  pui(ji,jj+1) + pui(ji+1,jj+1)   &
+               zwndi_t = sf(jp_wndi)%fnow(ji,jj,1) - 0.25 * (  pui(ji,jj+1) + pui(ji+1,jj+1)   &
                   &                                        + pui(ji,jj  ) + pui(ji+1,jj  )  )
-               zwndj_t = sf(jp_wndj)%fnow(ji,jj) - 0.25 * (  pvi(ji,jj+1) + pvi(ji+1,jj+1)   &
+               zwndj_t = sf(jp_wndj)%fnow(ji,jj,1) - 0.25 * (  pvi(ji,jj+1) + pvi(ji+1,jj+1)   &
                   &                                        + pvi(ji,jj  ) + pvi(ji+1,jj  )  )
                z_wnds_t(ji,jj)  = SQRT( zwndi_t * zwndi_t + zwndj_t * zwndj_t ) * tmask(ji,jj,1)
@@ -479,6 +479,6 @@
          DO jj = 2, jpj
             DO ji = fs_2, jpi   ! vect. opt.
-               zwndi_t = (  sf(jp_wndi)%fnow(ji,jj) - 0.5 * ( pui(ji-1,jj  ) + pui(ji,jj) )  )
-               zwndj_t = (  sf(jp_wndj)%fnow(ji,jj) - 0.5 * ( pvi(ji  ,jj-1) + pvi(ji,jj) )  )
+               zwndi_t = (  sf(jp_wndi)%fnow(ji,jj,1) - 0.5 * ( pui(ji-1,jj  ) + pui(ji,jj) )  )
+               zwndj_t = (  sf(jp_wndj)%fnow(ji,jj,1) - 0.5 * ( pvi(ji  ,jj-1) + pvi(ji,jj) )  )
                z_wnds_t(ji,jj)  = SQRT( zwndi_t * zwndi_t + zwndj_t * zwndj_t ) * tmask(ji,jj,1)
             END DO
@@ -490,7 +490,7 @@
             DO ji = fs_2, fs_jpim1   ! vect. opt.
                p_taui(ji,jj) = zcoef_wnorm2 * ( z_wnds_t(ji+1,jj) + z_wnds_t(ji,jj) )                          &
-                  &          * ( 0.5 * (sf(jp_wndi)%fnow(ji+1,jj) + sf(jp_wndi)%fnow(ji,jj) ) - pui(ji,jj) )
+                  &          * ( 0.5 * (sf(jp_wndi)%fnow(ji+1,jj,1) + sf(jp_wndi)%fnow(ji,jj,1) ) - pui(ji,jj) )
                p_tauj(ji,jj) = zcoef_wnorm2 * ( z_wnds_t(ji,jj+1) + z_wnds_t(ji,jj) )                          &
-                  &          * ( 0.5 * (sf(jp_wndj)%fnow(ji,jj+1) + sf(jp_wndj)%fnow(ji,jj) ) - pvi(ji,jj) )
+                  &          * ( 0.5 * (sf(jp_wndj)%fnow(ji,jj+1,1) + sf(jp_wndj)%fnow(ji,jj,1) ) - pvi(ji,jj) )
             END DO
          END DO
@@ -515,7 +515,7 @@
                zst3 = pst(ji,jj,jl) * zst2
                ! Short Wave (sw)
-               p_qsr(ji,jj,jl) = ( 1. - palb(ji,jj,jl) ) * sf(jp_qsr)%fnow(ji,jj) * tmask(ji,jj,1)
+               p_qsr(ji,jj,jl) = ( 1. - palb(ji,jj,jl) ) * sf(jp_qsr)%fnow(ji,jj,1) * tmask(ji,jj,1)
                ! Long  Wave (lw)
-               z_qlw(ji,jj,jl) = 0.95 * (  sf(jp_qlw)%fnow(ji,jj)       &                         
+               z_qlw(ji,jj,jl) = 0.95 * (  sf(jp_qlw)%fnow(ji,jj,1)       &                         
                   &                   - Stef * pst(ji,jj,jl) * zst3  ) * tmask(ji,jj,1)
                ! lw sensitivity
@@ -528,8 +528,8 @@
                ! ... turbulent heat fluxes
                ! Sensible Heat
-               z_qsb(ji,jj,jl) = rhoa * cpa * Cice * z_wnds_t(ji,jj) * ( pst(ji,jj,jl) - sf(jp_tair)%fnow(ji,jj) )
+               z_qsb(ji,jj,jl) = rhoa * cpa * Cice * z_wnds_t(ji,jj) * ( pst(ji,jj,jl) - sf(jp_tair)%fnow(ji,jj,1) )
                ! Latent Heat
                p_qla(ji,jj,jl) = MAX( 0.e0, rhoa * Ls  * Cice * z_wnds_t(ji,jj)   &                           
-                  &                    * (  11637800. * EXP( -5897.8 / pst(ji,jj,jl) ) / rhoa - sf(jp_humi)%fnow(ji,jj)  ) )
+                  &                    * (  11637800. * EXP( -5897.8 / pst(ji,jj,jl) ) / rhoa - sf(jp_humi)%fnow(ji,jj,1)  ) )
                ! Latent heat sensitivity for ice (Dqla/Dt)
                p_dqla(ji,jj,jl) = zcoef_dqla * z_wnds_t(ji,jj) / ( zst2 ) * EXP( -5897.8 / pst(ji,jj,jl) )
@@ -561,7 +561,7 @@
        
 !CDIR COLLAPSE
-      p_tpr(:,:) = sf(jp_prec)%fnow(:,:) * rn_pfac      ! total precipitation [kg/m2/s]
-!CDIR COLLAPSE
-      p_spr(:,:) = sf(jp_snow)%fnow(:,:) * rn_pfac      ! solid precipitation [kg/m2/s]
+      p_tpr(:,:) = sf(jp_prec)%fnow(:,:,1) * rn_pfac      ! total precipitation [kg/m2/s]
+!CDIR COLLAPSE
+      p_spr(:,:) = sf(jp_snow)%fnow(:,:,1) * rn_pfac      ! solid precipitation [kg/m2/s]
       CALL iom_put( 'snowpre', p_spr )                  ! Snow precipitation 
       !
Index: /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcflx.F90
===================================================================
--- /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 2077)
@@ -126,6 +126,6 @@
          ENDIF
          DO ji= 1, jpfld
-            ALLOCATE( sf(ji)%fnow(jpi,jpj) )
-            ALLOCATE( sf(ji)%fdta(jpi,jpj,2) )
+            ALLOCATE( sf(ji)%fnow(jpi,jpj,1) )
+            ALLOCATE( sf(ji)%fdta(jpi,jpj,1,2) )
          END DO
 
@@ -145,9 +145,9 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               utau(ji,jj) = sf(jp_utau)%fnow(ji,jj)
-               vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj)
-               qns (ji,jj) = sf(jp_qtot)%fnow(ji,jj) - sf(jp_qsr)%fnow(ji,jj)
-               qsr (ji,jj) = sf(jp_qsr )%fnow(ji,jj)
-               emp (ji,jj) = sf(jp_emp )%fnow(ji,jj)
+               utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1)
+               vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1)
+               qns (ji,jj) = sf(jp_qtot)%fnow(ji,jj,1) - sf(jp_qsr)%fnow(ji,jj,1)
+               qsr (ji,jj) = sf(jp_qsr )%fnow(ji,jj,1)
+               emp (ji,jj) = sf(jp_emp )%fnow(ji,jj,1)
             END DO
          END DO
Index: /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcice_if.F90
===================================================================
--- /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcice_if.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcice_if.F90	(revision 2077)
@@ -81,6 +81,6 @@
             CALL ctl_stop( 'sbc_ice_if: unable to allocate sf_ice structure' )   ;   RETURN
          ENDIF
-         ALLOCATE( sf_ice(1)%fnow(jpi,jpj) )
-         ALLOCATE( sf_ice(1)%fdta(jpi,jpj,2) )
+         ALLOCATE( sf_ice(1)%fnow(jpi,jpj,1) )
+         ALLOCATE( sf_ice(1)%fdta(jpi,jpj,1,2) )
 
 
@@ -107,5 +107,5 @@
                !
                zt_fzp  = fr_i(ji,jj)                        ! freezing point temperature
-               zfr_obs = sf_ice(1)%fnow(ji,jj)              ! observed ice cover
+               zfr_obs = sf_ice(1)%fnow(ji,jj,1)              ! observed ice cover
                !                                            ! ocean ice fraction (0/1) from the freezing point temperature
                IF( sst_m(ji,jj) <= zt_fzp ) THEN   ;   fr_i(ji,jj) = 1.e0
Index: /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90
===================================================================
--- /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 2077)
@@ -8,5 +8,4 @@
    !! History :  1.0   !  06-2006  (G. Madec)  from icestp_2.F90
    !!            3.0   !  08-2008  (S. Masson, E. .... ) coupled interface
-   !!            3.3   !  05-2009  (G.Garric) addition of the lim2_evp case
    !!----------------------------------------------------------------------
 #if defined key_lim2
@@ -54,4 +53,6 @@
    PUBLIC sbc_ice_lim_2 ! routine called by sbcmod.F90
    
+   CHARACTER(len=1) ::   cl_grid = 'B'     ! type of grid used in ice dynamics
+
    !! * Substitutions
 #  include "domzgr_substitute.h90"
@@ -171,8 +172,7 @@
          !  Ice model step  !
          ! ---------------- !
-         numit = numit + nn_fsbc                                             ! Ice model time step
-
-                                        CALL lim_rst_opn_2  ( kt )           ! Open Ice restart file
-         IF( .NOT. lk_c1d ) THEN                                             ! Ice dynamics & transport (not in 1D case)
+
+                                        CALL lim_rst_opn_2  ( kt )      ! Open Ice restart file
+         IF( .NOT. lk_c1d ) THEN                                        ! Ice dynamics & transport (not in 1D case)
                                         CALL lim_dyn_2      ( kt )           ! Ice dynamics    ( rheology/dynamics )
                                         CALL lim_trp_2      ( kt )           ! Ice transport   ( Advection/diffusion )
Index: /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 2077)
@@ -75,6 +75,6 @@
                CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN
             ENDIF
-            ALLOCATE( sf_rnf(1)%fnow(jpi,jpj) )
-            ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,2) )
+            ALLOCATE( sf_rnf(1)%fnow(jpi,jpj,1) )
+            ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,1,2) )
          ENDIF
          CALL sbc_rnf_init(sf_rnf)
@@ -93,5 +93,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  IF( gphit(ji,jj) > 40 .AND. gphit(ji,jj) < 65 )   sf_rnf(1)%fnow(ji,jj) = 0.85 * sf_rnf(1)%fnow(ji,jj)
+                  IF( gphit(ji,jj) > 40 .AND. gphit(ji,jj) < 65 )   sf_rnf(1)%fnow(ji,jj,1) = 0.85 * sf_rnf(1)%fnow(ji,jj,1)
                END DO
             END DO
@@ -101,6 +101,6 @@
 
          IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN
-            emp (:,:) = emp (:,:) - rn_rfact * ABS( sf_rnf(1)%fnow(:,:) )
-            emps(:,:) = emps(:,:) - rn_rfact * ABS( sf_rnf(1)%fnow(:,:) )
+            emp (:,:) = emp (:,:) - rn_rfact * ABS( sf_rnf(1)%fnow(:,:,1) )
+            emps(:,:) = emps(:,:) - rn_rfact * ABS( sf_rnf(1)%fnow(:,:,1) )
             CALL iom_put( "runoffs", sf_rnf(1)%fnow )         ! runoffs
          ENDIF
Index: /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 2077)
@@ -115,6 +115,6 @@
                CALL ctl_stop( 'sbc_ssr: unable to allocate sf_sst structure' )   ;   RETURN
             ENDIF
-            ALLOCATE( sf_sst(1)%fnow(jpi,jpj) )
-            ALLOCATE( sf_sst(1)%fdta(jpi,jpj,2) )
+            ALLOCATE( sf_sst(1)%fnow(jpi,jpj,1) )
+            ALLOCATE( sf_sst(1)%fdta(jpi,jpj,1,2) )
             !
             ! fill sf_sst with sn_sst and control print
@@ -128,6 +128,6 @@
                CALL ctl_stop( 'sbc_ssr: unable to allocate sf_sss structure' )   ;   RETURN
             ENDIF
-            ALLOCATE( sf_sss(1)%fnow(jpi,jpj) )
-            ALLOCATE( sf_sss(1)%fdta(jpi,jpj,2) )
+            ALLOCATE( sf_sss(1)%fnow(jpi,jpj,1) )
+            ALLOCATE( sf_sss(1)%fdta(jpi,jpj,1,2) )
             !
             ! fill sf_sss with sn_sss and control print
@@ -153,5 +153,5 @@
                DO jj = 1, jpj
                   DO ji = 1, jpi
-                     zqrp = rn_dqdt * ( sst_m(ji,jj) - sf_sst(1)%fnow(ji,jj) )
+                     zqrp = rn_dqdt * ( sst_m(ji,jj) - sf_sst(1)%fnow(ji,jj,1) )
                      qns(ji,jj) = qns(ji,jj) + zqrp
                      qrp(ji,jj) = zqrp
@@ -167,5 +167,5 @@
                   DO ji = 1, jpi
                      zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) )   &      ! No damping in vicinity of river mouths
-                        &        * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj) )   &
+                        &        * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) )   &
                         &        / ( sss_m(ji,jj) + 1.e-20   )
                      emps(ji,jj) = emps(ji,jj) + zerp
@@ -182,5 +182,5 @@
                   DO ji = 1, jpi                            
                      zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) )   &      ! No damping in vicinity of river mouths
-                        &        * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj) )   &
+                        &        * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) )   &
                         &        / ( sss_m(ji,jj) + 1.e-20   )
                      IF( ln_sssr_bnd )   zerp = SIGN( 1., zerp ) * MIN( zerp_bnd, ABS(zerp) )
Index: /branches/devmercator2010/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- /branches/devmercator2010/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 2076)
+++ /branches/devmercator2010/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 2077)
@@ -142,5 +142,5 @@
 !CDIR NOVERRCHK
                   DO ji = 1, jpi
-                     zchl = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj) ) )
+                     zchl = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) )
                      irgb = NINT( 41 + 20.*LOG10(zchl) + 1.e-15 )
                      zekb(ji,jj) = rkrgb(1,irgb)
@@ -334,6 +334,6 @@
                   CALL ctl_stop( 'tra_qsr_init: unable to allocate sf_chl structure' )   ;   RETURN
                ENDIF
-               ALLOCATE( sf_chl(1)%fnow(jpi,jpj)   )
-               ALLOCATE( sf_chl(1)%fdta(jpi,jpj,2) )
+               ALLOCATE( sf_chl(1)%fnow(jpi,jpj,1)   )
+               ALLOCATE( sf_chl(1)%fdta(jpi,jpj,1,2) )
                !                                        ! fill sf_chl with sn_chl and control print
                CALL fld_fill( sf_chl, (/ sn_chl /), cn_dir, 'tra_qsr_init',   &
Index: /branches/devmercator2010/NVTK/INSTALL/JOBS/job_ORCA2_LIM.ksh
===================================================================
--- /branches/devmercator2010/NVTK/INSTALL/JOBS/job_ORCA2_LIM.ksh	(revision 2076)
+++ /branches/devmercator2010/NVTK/INSTALL/JOBS/job_ORCA2_LIM.ksh	(revision 2077)
@@ -196,5 +196,5 @@
 if [ "${USE_IOSERVER}" = "true" ]
 then
-    cp ${WORK}/../bin/ioserver ioserver
+    cp ${MAINDIR}/modipsl/bin/ioserver ioserver
     chmod 777 ioserver
 fi
Index: /branches/devmercator2010/NVTK/INSTALL/JOBS/job_ORCA2_LIM3.ksh
===================================================================
--- /branches/devmercator2010/NVTK/INSTALL/JOBS/job_ORCA2_LIM3.ksh	(revision 2076)
+++ /branches/devmercator2010/NVTK/INSTALL/JOBS/job_ORCA2_LIM3.ksh	(revision 2077)
@@ -192,5 +192,5 @@
 if [ "${USE_IOSERVER}" = "true" ]
 then
-    cp ${WORK}/../bin/ioserver ioserver
+    cp ${MAINDIR}/modipsl/bin/ioserver ioserver
     chmod 777 ioserver
 fi
