Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DIA/diaar5.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 2000)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 2004)
@@ -175,7 +175,8 @@
       thick0(:,:) = 0.e0
       DO jk = 1, jpkm1
-         vol0        = vol0        + SUM( area (:,:) * tmask(:,:,jk) ) * e3t_0(jk) 
-         thick0(:,:) = thick0(:,:) +    tmask_i(:,:) * tmask(:,:,jk)   * e3t_0(jk)
-      END DO
+         vol0        = vol0        + SUM( area (:,:) * tmask(:,:,jk) * fse3t_0(:,:,jk) )
+         thick0(:,:) = thick0(:,:) +    tmask_i(:,:) * tmask(:,:,jk) * fse3t_0(:,:,jk)
+      END DO
+      IF( lk_mpp )   CALL mpp_sum( vol0 )
       
       CALL iom_open ( 'data_1m_salinity_nomask', inum )
Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 2000)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 2004)
@@ -219,4 +219,13 @@
 #else
    LOGICAL, PUBLIC, PARAMETER ::   lk_agrif = .FALSE.   !: agrif flag
+
+CONTAINS
+   LOGICAL FUNCTION Agrif_Root()
+      Agrif_Root = .TRUE.
+   END FUNCTION Agrif_Root
+
+   CHARACTER(len=3) FUNCTION Agrif_CFixed()
+     Agrif_CFixed = '0' 
+   END FUNCTION Agrif_CFixed
 #endif
 
Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 2000)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 2004)
@@ -62,14 +62,29 @@
       IF( lk_zco )   CALL ctl_stop( 'dom_vvl : key_zco is incompatible with variable volume option key_vvl')
 
-      fsdept(:,:,:) = gdept (:,:,:)
-      fsdepw(:,:,:) = gdepw (:,:,:)
-      fsde3w(:,:,:) = gdep3w(:,:,:)
-      fse3t (:,:,:) = e3t   (:,:,:)
-      fse3u (:,:,:) = e3u   (:,:,:)
-      fse3v (:,:,:) = e3v   (:,:,:)
-      fse3f (:,:,:) = e3f   (:,:,:)
-      fse3w (:,:,:) = e3w   (:,:,:)
-      fse3uw(:,:,:) = e3uw  (:,:,:)
-      fse3vw(:,:,:) = e3vw  (:,:,:)
+      IF( ln_zco) THEN
+         DO jk = 1, jpk
+            gdept(:,:,jk) = gdept_0(jk)
+            gdepw(:,:,jk) = gdepw_0(jk)
+            gdep3w(:,:,jk) = gdepw_0(jk)
+            e3t (:,:,jk) = e3t_0(jk)
+            e3u (:,:,jk) = e3t_0(jk)
+            e3v (:,:,jk) = e3t_0(jk)
+            e3f (:,:,jk) = e3t_0(jk)
+            e3w (:,:,jk) = e3w_0(jk)
+            e3uw(:,:,jk) = e3w_0(jk)
+            e3vw(:,:,jk) = e3w_0(jk)
+         END DO
+      ELSE
+         fsdept(:,:,:) = gdept (:,:,:)
+         fsdepw(:,:,:) = gdepw (:,:,:)
+         fsde3w(:,:,:) = gdep3w(:,:,:)
+         fse3t (:,:,:) = e3t   (:,:,:)
+         fse3u (:,:,:) = e3u   (:,:,:)
+         fse3v (:,:,:) = e3v   (:,:,:)
+         fse3f (:,:,:) = e3f   (:,:,:)
+         fse3w (:,:,:) = e3w   (:,:,:)
+         fse3uw(:,:,:) = e3uw  (:,:,:)
+         fse3vw(:,:,:) = e3vw  (:,:,:)
+      ENDIF
 
       !                                 !==  mu computation  ==!
@@ -139,4 +154,20 @@
       CALL lbc_lnk( sshf_b, 'F', 1. )   ;   CALL lbc_lnk( sshf_n, 'F', 1. )
       !
+         DO jk = 1, jpkm1
+            fsdept(:,:,jk) = fsdept_n(:,:,jk)          ! now local depths stored in fsdep. arrays
+            fsdepw(:,:,jk) = fsdepw_n(:,:,jk)
+            fsde3w(:,:,jk) = fsde3w_n(:,:,jk)
+            !
+            fse3t (:,:,jk) = fse3t_n (:,:,jk)          ! vertical scale factors stored in fse3. arrays
+            fse3u (:,:,jk) = fse3u_n (:,:,jk)
+            fse3v (:,:,jk) = fse3v_n (:,:,jk)
+            fse3f (:,:,jk) = fse3f_n (:,:,jk)
+            fse3w (:,:,jk) = fse3w_n (:,:,jk)
+            fse3uw(:,:,jk) = fse3uw_n(:,:,jk)
+            fse3vw(:,:,jk) = fse3vw_n(:,:,jk)
+         END DO
+
+
+
    END SUBROUTINE dom_vvl
 
Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/domwri.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/domwri.F90	(revision 2000)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/domwri.F90	(revision 2004)
@@ -45,10 +45,16 @@
       !!      domhgr, domzgr, and dommsk. Note: the file contain depends on
       !!      the vertical coord. used (z-coord, partial steps, s-coord)
-      !!                    nmsh = 1  :   'mesh_mask.nc' file
+      !!            MOD(nmsh, 3) = 1  :   'mesh_mask.nc' file
       !!                         = 2  :   'mesh.nc' and mask.nc' files
-      !!                         = 3  :   'mesh_hgr.nc', 'mesh_zgr.nc' and
+      !!                         = 0  :   'mesh_hgr.nc', 'mesh_zgr.nc' and
       !!                                  'mask.nc' files
       !!      For huge size domain, use option 2 or 3 depending on your 
       !!      vertical coordinate.
+      !!
+      !!      if     nmsh <= 3: write full 3D arrays for e3[tuvw] and gdep[tuvw]
+      !!      if 3 < nmsh <= 6: write full 3D arrays for e3[tuvw] and 2D arrays 
+      !!                        corresponding to the depth of the bottom points hdep[tw]
+      !!      if 6 < nmsh <= 9: write 2D arrays corresponding to the depth and the
+      !!                        thickness of the bottom points hdep[tw] and e3[tw]_ps
       !!
       !! ** output file : 
@@ -241,5 +247,5 @@
       !                                     !        close the files 
       !                                     ! ============================
-      SELECT CASE ( nmsh )
+      SELECT CASE ( MOD(nmsh, 3) )
       CASE ( 1 )                
          CALL iom_close( inum0 )
@@ -247,5 +253,5 @@
          CALL iom_close( inum1 )
          CALL iom_close( inum2 )
-      CASE ( 3 )
+      CASE ( 0 )
          CALL iom_close( inum2 )
          CALL iom_close( inum3 )
Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/phycst.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/phycst.F90	(revision 2000)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/phycst.F90	(revision 2004)
@@ -4,8 +4,9 @@
    !!     Definition of of both ocean and ice parameters used in the code
    !!=====================================================================
-   !! History :   OPA  !  1990-10  (C. Levy, G. Madec)  Original code
-   !!                  !  1991-11  (G. Madec, M. Imbard)
-   !!  NEMO       1.0  !  2002-08  (G. Madec, C. Ethe)  F90, add ice constants
+   !! History :   OPA  !  1990-10  (C. Levy - G. Madec)  Original code
+   !!             8.1  !  1991-11  (G. Madec, M. Imbard)  cosmetic changes
+   !!   NEMO      1.0  !  2002-08  (G. Madec, C. Ethe)  F90, add ice constants
    !!              -   !  2006-08  (G. Madec)  style 
+   !!             3.2  !  2006-08  (S. Masson, G. Madec)  suppress useless variables + style 
    !!----------------------------------------------------------------------
 
@@ -23,67 +24,64 @@
    REAL(wp), PUBLIC ::   rpi = 3.141592653589793_wp             !: pi
    REAL(wp), PUBLIC ::   rad = 3.141592653589793_wp / 180._wp   !: conversion from degre into radian
-   REAL(wp), PUBLIC ::   rsmall = 0.5 * EPSILON( 1. )           !: smallest real computer value
+   REAL(wp), PUBLIC ::   rsmall = 0.5 * EPSILON( 1.e0 )         !: smallest real computer value
    
-   REAL(wp), PUBLIC ::          & !:
-      rday = 24.*60.*60.  ,     & !: day (s)
-      rsiyea              ,     & !: sideral year (s)
-      rsiday              ,     & !: sideral day (s)
-      raamo =  12._wp     ,     & !: number of months in one year
-      rjjhh =  24._wp     ,     & !: number of hours in one day
-      rhhmm =  60._wp     ,     & !: number of minutes in one hour
-      rmmss =  60._wp     ,     & !: number of seconds in one minute
-!!!   omega = 7.292115083046061e-5_wp ,  &  !: change the last digit!
-      omega               ,    &  !: earth rotation parameter
-      ra    = 6371229._wp ,    &  !: earth radius (meter)
-      grav  = 9.80665_wp          !: gravity (m/s2)
+   REAL(wp), PUBLIC ::   rday = 24.*60.*60.       !: day (s)
+   REAL(wp), PUBLIC ::   rsiyea                   !: sideral year (s)
+   REAL(wp), PUBLIC ::   rsiday                   !: sideral day (s)
+   REAL(wp), PUBLIC ::   raamo =  12._wp          !: number of months in one year
+   REAL(wp), PUBLIC ::   rjjhh =  24._wp          !: number of hours in one day
+   REAL(wp), PUBLIC ::   rhhmm =  60._wp          !: number of minutes in one hour
+   REAL(wp), PUBLIC ::   rmmss =  60._wp          !: number of seconds in one minute
+!! REAL(wp), PUBLIC ::   omega = 7.292115083046061e-5_wp ,  &  !: change the last digit!
+   REAL(wp), PUBLIC ::   omega                    !: earth rotation parameter
+   REAL(wp), PUBLIC ::   ra    = 6371229._wp      !: earth radius (meter)
+   REAL(wp), PUBLIC ::   grav  = 9.80665_wp       !: gravity (m/s2)
    
-   REAL(wp), PUBLIC ::         &  !:
-      rtt      = 273.16_wp  ,  &  !: triple point of temperature (Kelvin)
-      rt0      = 273.15_wp  ,  &  !: freezing point of water (Kelvin)
+   REAL(wp), PUBLIC ::   rtt      = 273.16_wp     !: triple point of temperature (Kelvin)
+   REAL(wp), PUBLIC ::   rt0      = 273.15_wp     !: freezing point of water (Kelvin)
 #if defined key_lim3
-      rt0_snow = 273.16_wp  ,  &  !: melting point of snow  (Kelvin)
-      rt0_ice  = 273.16_wp  ,  &  !: melting point of ice   (Kelvin)
+   REAL(wp), PUBLIC ::   rt0_snow = 273.16_wp     !: melting point of snow  (Kelvin)
+   REAL(wp), PUBLIC ::   rt0_ice  = 273.16_wp     !: melting point of ice   (Kelvin)
 #else
-      rt0_snow = 273.15_wp  ,  &  !: melting point of snow  (Kelvin)
-      rt0_ice  = 273.05_wp  ,  &  !: melting point of ice   (Kelvin)
+   REAL(wp), PUBLIC ::   rt0_snow = 273.15_wp     !: melting point of snow  (Kelvin)
+   REAL(wp), PUBLIC ::   rt0_ice  = 273.05_wp     !: melting point of ice   (Kelvin)
 #endif
-      rau0     = 1035._wp   ,  &  !: volumic mass of reference (kg/m3)
-      rauw     = 1000._wp   ,  &  !: volumic mass of pure water (kg/m3)
-      rcp      =    4.e+3_wp,  &  !: ocean specific heat
-      ro0cpr                      !: = 1. / ( rau0 * rcp )
 
-   REAL(wp), PUBLIC ::            &  !:
+   REAL(wp), PUBLIC ::   rau0     = 1020._wp      !: reference volumic mass (density)  (kg/m3)
+   REAL(wp), PUBLIC ::   rau0r                    !: reference specific volume         (m3/kg)
+   REAL(wp), PUBLIC ::   rcp      =    4.e+3_wp   !: ocean specific heat
+   REAL(wp), PUBLIC ::   ro0cpr                   !: = 1. / ( rau0 * rcp )
+
 #if defined key_lim3
-      rcdsn   =   0.31_wp     ,   &  !: thermal conductivity of snow
-      rcdic   =   2.034396_wp ,   &  !: thermal conductivity of fresh ice
-      cpic    = 2067.0        ,   &
-      lsub    = 2.834e+6      ,   &  !: pure ice latent heat of sublimation (J.kg-1)
-      lfus    = 0.334e+6      ,   &  !: latent heat of fusion of fresh ice   (J.kg-1)
-      rhoic   = 917._wp       ,   &  !: volumic mass of sea ice (kg/m3)
-      tmut    =   0.054       ,   &  !: decrease of seawater meltpoint with salinity
+   REAL(wp), PUBLIC ::   rcdsn   =   0.31_wp      !: thermal conductivity of snow
+   REAL(wp), PUBLIC ::   rcdic   =   2.034396_wp  !: thermal conductivity of fresh ice
+   REAL(wp), PUBLIC ::   cpic    = 2067.0         !: specific heat of sea ice
+   REAL(wp), PUBLIC ::   lsub    = 2.834e+6       !: pure ice latent heat of sublimation (J.kg-1)
+   REAL(wp), PUBLIC ::   lfus    = 0.334e+6       !: latent heat of fusion of fresh ice   (J.kg-1)
+   REAL(wp), PUBLIC ::   rhoic   = 917._wp        !: volumic mass of sea ice (kg/m3)
+   REAL(wp), PUBLIC ::   tmut    =   0.054        !: decrease of seawater meltpoint with salinity
 #else
-      rcdsn   =   0.22_wp     ,   &  !: conductivity of the snow
-      rcdic   =   2.034396_wp ,   &  !: conductivity of the ice
-      rcpsn   =   6.9069e+5_wp,   &  !: density times specific heat for snow
-      rcpic   =   1.8837e+6_wp,   &  !: volumetric latent heat fusion of sea ice
-      lfus    = 0.3337e+6     ,   &  !: latent heat of fusion of fresh ice   (J.kg-1)
-      xlsn    = 110.121e+6_wp ,   &  !: = lfus * rhosn, volumetric latent heat fusion of snow
-      xlic    = 300.33e+6_wp  ,   &  !: = lfus * rhosn, volumetric latent heat fusion of ice
-      xsn     =   2.8e+6      ,   &  !: latent heat of sublimation of snow
-      rhoic   = 900._wp       ,   &  !: volumic mass of sea ice (kg/m3)
+   REAL(wp), PUBLIC ::   rcdsn   =   0.22_wp      !: conductivity of the snow
+   REAL(wp), PUBLIC ::   rcdic   =   2.034396_wp  !: conductivity of the ice
+   REAL(wp), PUBLIC ::   rcpsn   =   6.9069e+5_wp !: density times specific heat for snow
+   REAL(wp), PUBLIC ::   rcpic   =   1.8837e+6_wp !: volumetric latent heat fusion of sea ice
+   REAL(wp), PUBLIC ::   xlsn    = 110.121e+6_wp  !: volumetric latent heat fusion of snow
+   REAL(wp), PUBLIC ::   xlic    = 300.33e+6_wp   !: volumetric latent heat fusion of ice
+   REAL(wp), PUBLIC ::   xsn     =   2.8e+6       !: latent heat of sublimation of snow
+   REAL(wp), PUBLIC ::   rhoic   = 900._wp        !: volumic mass of sea ice (kg/m3)
 #endif
-      rhosn   = 330._wp       ,   &  !: volumic mass of snow (kg/m3)
-      emic    =   0.97_wp     ,   &  !: emissivity of snow or ice
-      sice    =   6.0_wp      ,   &  !: salinity of ice (psu)
-      soce    =  34.7_wp      ,   &  !: salinity of sea (psu)
-      cevap   =   2.5e+6_wp   ,   &  !: latent heat of evaporation (water)
-      srgamma =   0.9_wp      ,   &  !: correction factor for solar radiation (Oberhuber, 1974)
-      vkarmn  =   0.4_wp      ,   &  !: von Karman constant
-      stefan  =   5.67e-8_wp         !: Stefan-Boltzmann constant 
-      !!----------------------------------------------------------------------
-      !! NEMO/OPA 3.2 , LOCEAN-IPSL (2010) 
-      !! $Id$ 
-      !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-      !!----------------------------------------------------------------------
+   REAL(wp), PUBLIC ::   rhosn   = 330._wp        !: volumic mass of snow (kg/m3)
+   REAL(wp), PUBLIC ::   emic    =   0.97_wp      !: emissivity of snow or ice
+   REAL(wp), PUBLIC ::   sice    =   6.0_wp       !: reference salinity of ice (psu)
+   REAL(wp), PUBLIC ::   soce    =  34.7_wp       !: reference salinity of sea (psu)
+   REAL(wp), PUBLIC ::   cevap   =   2.5e+6_wp    !: latent heat of evaporation (water)
+   REAL(wp), PUBLIC ::   srgamma =   0.9_wp       !: correction factor for solar radiation (Oberhuber, 1974)
+   REAL(wp), PUBLIC ::   vkarmn  =   0.4_wp       !: von Karman constant
+   REAL(wp), PUBLIC ::   stefan  =   5.67e-8_wp   !: Stefan-Boltzmann constant 
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
+   !! $Id$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
    
 CONTAINS
@@ -98,11 +96,17 @@
       !!----------------------------------------------------------------------
 
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' phy_cst : initialization of ocean parameters and constants'
-      IF(lwp) WRITE(numout,*) ' ~~~~~~~'
+      !                                   ! Define additional parameters
+      rsiyea = 365.25 * rday * 2. * rpi / 6.283076
+      rsiday = rday / ( 1. + rday / rsiyea )
+      omega  = 2. * rpi / rsiday 
 
-      ! Ocean Parameters
-      ! ----------------
-      IF(lwp) THEN
+      rau0r  = 1. /   rau0  
+      ro0cpr = 1. / ( rau0 * rcp )
+
+
+      IF(lwp) THEN                        ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' phy_cst : initialization of ocean parameters and constants'
+         WRITE(numout,*) ' ~~~~~~~'
          WRITE(numout,*) '       Domain info'
          WRITE(numout,*) '          dimension of model'
@@ -117,53 +121,30 @@
          WRITE(numout,*) '             jpnij   : ', jpnij
          WRITE(numout,*) '          lateral domain boundary condition type : jperio  = ', jperio
-      ENDIF
-
-      ! Define constants
-      ! ----------------
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) '       Constants'
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) '          mathematical constant                 rpi = ', rpi
-
-      rsiyea = 365.25 * rday * 2. * rpi / 6.283076
-      rsiday = rday / ( 1. + rday / rsiyea )
-      omega  = 2. * rpi / rsiday 
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) '          day                                rday   = ', rday,   ' s'
-      IF(lwp) WRITE(numout,*) '          sideral year                       rsiyea = ', rsiyea, ' s'
-      IF(lwp) WRITE(numout,*) '          sideral day                        rsiday = ', rsiday, ' s'
-      IF(lwp) WRITE(numout,*) '          omega                              omega  = ', omega,  ' s-1'
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) '          nb of months per year               raamo = ', raamo, ' months'
-      IF(lwp) WRITE(numout,*) '          nb of hours per day                 rjjhh = ', rjjhh, ' hours'
-      IF(lwp) WRITE(numout,*) '          nb of minutes per hour              rhhmm = ', rhhmm, ' mn'
-      IF(lwp) WRITE(numout,*) '          nb of seconds per minute            rmmss = ', rmmss, ' s'
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) '          earth radius                         ra   = ', ra, ' m'
-      IF(lwp) WRITE(numout,*) '          gravity                              grav = ', grav , ' m/s^2'
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) '          triple point of temperature      rtt      = ', rtt     , ' K'
-      IF(lwp) WRITE(numout,*) '          freezing point of water          rt0      = ', rt0     , ' K'
-      IF(lwp) WRITE(numout,*) '          melting point of snow            rt0_snow = ', rt0_snow, ' K'
-      IF(lwp) WRITE(numout,*) '          melting point of ice             rt0_ice  = ', rt0_ice , ' K'
-
-      ro0cpr = 1. / ( rau0 * rcp )
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) '          volumic mass of pure water         rauw   = ', rauw, ' kg/m^3'
-      IF(lwp) WRITE(numout,*) '          volumic mass of reference          rau0   = ', rau0, ' kg/m^3'
-      IF(lwp) WRITE(numout,*) '          ocean specific heat                rcp    = ', rcp
-      IF(lwp) WRITE(numout,*) '                       1. / ( rau0 * rcp ) = ro0cpr = ', ro0cpr
-
-#if defined key_lim3
-      xlsn = lfus * rhosn        ! volumetric latent heat fusion of snow [J/m3]
-#else
-      lfus = xlsn / rhosn        ! latent heat of fusion of fresh ice
-#endif
-
-      IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) '       Constants'
+         WRITE(numout,*)
+         WRITE(numout,*) '          mathematical constant                 rpi = ', rpi
+         WRITE(numout,*) '          day                                rday   = ', rday,   ' s'
+         WRITE(numout,*) '          sideral year                       rsiyea = ', rsiyea, ' s'
+         WRITE(numout,*) '          sideral day                        rsiday = ', rsiday, ' s'
+         WRITE(numout,*) '          omega                              omega  = ', omega,  ' s-1'
+         WRITE(numout,*)
+         WRITE(numout,*) '          nb of months per year               raamo = ', raamo, ' months'
+         WRITE(numout,*) '          nb of hours per day                 rjjhh = ', rjjhh, ' hours'
+         WRITE(numout,*) '          nb of minutes per hour              rhhmm = ', rhhmm, ' mn'
+         WRITE(numout,*) '          nb of seconds per minute            rmmss = ', rmmss, ' s'
+         WRITE(numout,*)
+         WRITE(numout,*) '          earth radius                         ra   = ', ra, ' m'
+         WRITE(numout,*) '          gravity                              grav = ', grav , ' m/s^2'
+         WRITE(numout,*)
+         WRITE(numout,*) '          triple point of temperature      rtt      = ', rtt     , ' K'
+         WRITE(numout,*) '          freezing point of water          rt0      = ', rt0     , ' K'
+         WRITE(numout,*) '          melting point of snow            rt0_snow = ', rt0_snow, ' K'
+         WRITE(numout,*) '          melting point of ice             rt0_ice  = ', rt0_ice , ' K'
+         WRITE(numout,*)
+         WRITE(numout,*) '          ocean reference volumic mass       rau0   = ', rau0 , ' kg/m^3'
+         WRITE(numout,*) '          ocean reference specific volume    rau0r  = ', rau0r, ' m^3/Kg'
+         WRITE(numout,*) '          ocean specific heat                rcp    = ', rcp
+         WRITE(numout,*) '                       1. / ( rau0 * rcp ) = ro0cpr = ', ro0cpr
          WRITE(numout,*)
          WRITE(numout,*) '          thermal conductivity of the snow          = ', rcdsn   , ' J/s/m/K'
@@ -189,8 +170,6 @@
          WRITE(numout,*) '          von Karman constant                       = ', vkarmn 
          WRITE(numout,*) '          Stefan-Boltzmann constant                 = ', stefan  , ' J/s/m^2/K^4'
-
          WRITE(numout,*)
          WRITE(numout,*) '          conversion: degre ==> radian          rad = ', rad
-
          WRITE(numout,*)
          WRITE(numout,*) '          smallest real computer value       rsmall = ', rsmall
Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/OBC/obcfla.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/OBC/obcfla.F90	(revision 2000)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/OBC/obcfla.F90	(revision 2004)
@@ -82,10 +82,8 @@
 
       DO ji = nie0, nie1
-         DO jk = 1, jpkm1
-            DO jj = 1, jpj
-               ua_e(ji,jj) = (  ubtfoe(jj) + sqrt( grav*hu(ji,jj) )           &
-                  &            * ( ( sshn_e(ji,jj) + sshn_e(ji+1,jj) ) * 0.5  &
-                  &            - sshfoe(jj) )  ) * uemsk(jj,jk)
-            END DO
+         DO jj = 1, jpj
+            ua_e(ji,jj) = (  ubtfoe(jj) * hur(ji,jj) + sqrt( grav*hur(ji,jj) )   &
+               &            * ( ( sshn_e(ji,jj) + sshn_e(ji+1,jj) ) * 0.5        &
+               &            - sshfoe(jj) )  ) * uemsk(jj,jk)
          END DO
       END DO
@@ -97,5 +95,5 @@
             ssha_e(ji,jj) = ssha_e(ji,jj) * ( 1. - temsk(jj,1) ) &
                &            + temsk(jj,1) * sshfoe(jj)
-            va_e(ji,jj) = vbtfoe(jj) * uemsk(jj,jk)
+            va_e(ji,jj) = vbtfoe(jj) * hvr(ji,jj) * uemsk(jj,jk)
          END DO
       END DO
@@ -120,11 +118,9 @@
 
       DO ji = niw0, niw1
-         DO jk = 1, jpkm1
-            DO jj = 1, jpj
-               ua_e(ji,jj) = ( ubtfow(jj) - sqrt( grav * hu(ji,jj) )          &
-                  &            * ( ( sshn_e(ji,jj) + sshn_e(ji+1,jj) ) * 0.5  &
-                  &                - sshfow(jj) ) ) * uwmsk(jj,jk)
-               va_e(ji,jj) = vbtfow(jj) * uwmsk(jj,jk)
-            END DO
+         DO jj = 1, jpj
+            ua_e(ji,jj) = ( ubtfow(jj) * hur(ji,jj) - sqrt( grav * hur(ji,jj) )   &
+               &            * ( ( sshn_e(ji,jj) + sshn_e(ji+1,jj) ) * 0.5         &
+               &                - sshfow(jj) ) ) * uwmsk(jj,jk)
+            va_e(ji,jj) = vbtfow(jj) * hvr(ji,jj) * uwmsk(jj,jk)
          END DO
          DO jj = 1, jpj
@@ -155,10 +151,8 @@
 
       DO jj = njn0, njn1
-         DO jk = 1, jpkm1
-            DO ji = 1, jpi
-               va_e(ji,jj) = ( vbtfon(ji) + sqrt( grav * hv(ji,jj) )           &
-                  &            * ( ( sshn_e(ji,jj) + sshn_e(ji,jj+1) ) * 0.5   &
-                  &                - sshfon(ji) ) ) * vnmsk(ji,jk)
-            END DO
+         DO ji = 1, jpi
+            va_e(ji,jj) = ( vbtfon(ji) * hvr(ji,jj) + sqrt( grav * hvr(ji,jj) )   &
+               &            * ( ( sshn_e(ji,jj) + sshn_e(ji,jj+1) ) * 0.5         &
+               &                - sshfon(ji) ) ) * vnmsk(ji,jk)
          END DO
       END DO
@@ -170,5 +164,5 @@
             ssha_e(ji,jj) = ssha_e(ji,jj) * ( 1. - tnmsk(ji,1) ) &
                &            + sshfon(ji) * tnmsk(ji,1)
-            ua_e(ji,jj) = ubtfon(ji) * vnmsk(ji,jk)
+            ua_e(ji,jj) = ubtfon(ji) * hur(ji,jj) * vnmsk(ji,jk)
          END DO
       END DO
@@ -193,11 +187,9 @@
 
       DO jj = njs0, njs1
-         DO jk = 1, jpkm1
-            DO ji = 1, jpi
-               va_e(ji,jj) = ( vbtfos(ji) - sqrt( grav * hv(ji,jj) )            &
-                  &            * ( ( sshn_e(ji,jj) + sshn_e(ji,jj+1) ) * 0.5    &
-                  &                - sshfos(ji) ) ) * vsmsk(ji,jk)
-               ua_e(ji,jj) = ubtfos(ji) * vsmsk(ji,jk)
-            END DO
+         DO ji = 1, jpi
+            va_e(ji,jj) = ( vbtfos(ji) * hvr(ji,jj) - sqrt( grav * hvr(ji,jj) )   &
+               &            * ( ( sshn_e(ji,jj) + sshn_e(ji,jj+1) ) * 0.5         &
+               &                - sshfos(ji) ) ) * vsmsk(ji,jk)
+            ua_e(ji,jj) = ubtfos(ji) * hur(ji,jj) * vsmsk(ji,jk)
          END DO
          DO ji = 1, jpi
Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SBC/fldread.F90	(revision 2000)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SBC/fldread.F90	(revision 2004)
@@ -838,6 +838,5 @@
             WRITE(aname,'(a3,i2.2)') 'src',jn
             data_tmp(:,:) = 0
-            CALL iom_get ( inum, jpdom_unknown, aname, data_tmp(1:nlci,1:nlcj), &
-                           kstart=(/nimpp,njmpp/), kcount=(/nlci,nlcj/) )
+            CALL iom_get ( inum, jpdom_data, aname, data_tmp(:,:) )
             data_src(:,:) = INT(data_tmp(:,:))
             ref_wgts(nxt_wgt)%data_jpj(:,:,jn) = 1 + (data_src(:,:)-1) / ref_wgts(nxt_wgt)%ddims(1)
@@ -848,15 +847,14 @@
             aname = ' '
             WRITE(aname,'(a3,i2.2)') 'wgt',jn
-            ref_wgts(nxt_wgt)%data_wgt(1:nlci,1:nlcj,jn) = 0.0
-            CALL iom_get ( inum, jpdom_unknown, aname, ref_wgts(nxt_wgt)%data_wgt(1:nlci,1:nlcj,jn), &
-                           kstart=(/nimpp,njmpp/), kcount=(/nlci,nlcj/) )
+            ref_wgts(nxt_wgt)%data_wgt(:,:,jn) = 0.0
+            CALL iom_get ( inum, jpdom_data, aname, ref_wgts(nxt_wgt)%data_wgt(:,:,jn) )
          END DO
          CALL iom_close (inum)
  
          ! find min and max indices in grid
-         ref_wgts(nxt_wgt)%botleft(1) = MINVAL(ref_wgts(nxt_wgt)%data_jpi(1:nlci,1:nlcj,:))
-         ref_wgts(nxt_wgt)%botleft(2) = MINVAL(ref_wgts(nxt_wgt)%data_jpj(1:nlci,1:nlcj,:))
-         ref_wgts(nxt_wgt)%topright(1) = MAXVAL(ref_wgts(nxt_wgt)%data_jpi(1:nlci,1:nlcj,:))
-         ref_wgts(nxt_wgt)%topright(2) = MAXVAL(ref_wgts(nxt_wgt)%data_jpj(1:nlci,1:nlcj,:))
+         ref_wgts(nxt_wgt)%botleft(1) = MINVAL(ref_wgts(nxt_wgt)%data_jpi(:,:,:))
+         ref_wgts(nxt_wgt)%botleft(2) = MINVAL(ref_wgts(nxt_wgt)%data_jpj(:,:,:))
+         ref_wgts(nxt_wgt)%topright(1) = MAXVAL(ref_wgts(nxt_wgt)%data_jpi(:,:,:))
+         ref_wgts(nxt_wgt)%topright(2) = MAXVAL(ref_wgts(nxt_wgt)%data_jpj(:,:,:))
 
          ! and therefore dimensions of the input box
Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 2000)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 2004)
@@ -139,5 +139,7 @@
                zta =  ro0cpr * qns(ji,jj) * zse3t &                  ! temperature : heat flux 
                 &    - emp(ji,jj) * zsrau * tn(ji,jj,1) * zse3t      ! & cooling/heating effet of EMP flux 
-               zsa = 0.e0                                            ! No salinity concent./dilut. effect
+               zsa = ( emps(ji,jj) - emp(ji,jj) ) &
+                &                 * zsrau * sn(ji,jj,1)  * zse3t     ! concent./dilut. effect due to sea-ice 
+                                                                     ! melt/formation and (possibly) SSS restoration
             ELSE
                zta =  ro0cpr * qns(ji,jj) * zse3t                    ! temperature : heat flux 
Index: branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/lib_mpp.F90
===================================================================
--- branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/lib_mpp.F90	(revision 2000)
+++ branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/lib_mpp.F90	(revision 2004)
@@ -117,5 +117,5 @@
    !! ========================= !!
 !$AGRIF_DO_NOT_TREAT
-#  include <mpif.h>
+   INCLUDE 'mpif.h'
 !$AGRIF_END_DO_NOT_TREAT
    
