Index: branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh.500yfwb0
===================================================================
--- branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh.500yfwb0	(revision 5223)
+++ branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh.500yfwb0	(revision 5259)
@@ -114,5 +114,5 @@
 export VAR1_Ithick  V1It_PREF    V1It_SUFF
 export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
-export VAR1_IvelV   V1IvV_PREF   V1IvV_PREF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_SUFF
 #===================== EXP2 =====================
 export DATE1_2      DATE2_2
@@ -127,4 +127,4 @@
 export VAR2_Ithick  V2It_PREF    V2It_SUFF
 export VAR2_SNOW    V2SNOW_PREF  V2SNOW_SUFF
-export VAR2_IvelV   V2IvV_PREF   V2IvV_PREF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_SUFF
 #
Index: branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh.500yfwb2
===================================================================
--- branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh.500yfwb2	(revision 5223)
+++ branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh.500yfwb2	(revision 5259)
@@ -114,5 +114,5 @@
 export VAR1_Ithick  V1It_PREF    V1It_SUFF
 export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
-export VAR1_IvelV   V1IvV_PREF   V1IvV_PREF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_SUFF
 #===================== EXP2 =====================
 export DATE1_2      DATE2_2
@@ -127,4 +127,4 @@
 export VAR2_Ithick  V2It_PREF    V2It_SUFF
 export VAR2_SNOW    V2SNOW_PREF  V2SNOW_SUFF
-export VAR2_IvelV   V2IvV_PREF   V2IvV_PREF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_SUFF
 #
Index: branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh_example1
===================================================================
--- branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh_example1	(revision 5223)
+++ branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh_example1	(revision 5259)
@@ -112,5 +112,5 @@
 export VAR1_Ithick  V1It_PREF    V1It_SUFF
 export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
-export VAR1_IvelV   V1IvV_PREF   V1IvV_PREF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_SUFF
 #===================== EXP2 =====================
 export DATE1_2      DATE2_2
@@ -125,4 +125,4 @@
 export VAR2_Ithick  V2It_PREF   V2It_SUFF
 export VAR2_SNOW    V2SNOW_PREF V2SNOW_SUFF
-export VAR2_IvelV   V2IvV_PREF   V2IvV_PREF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_SUFF
 #
Index: branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh_example2
===================================================================
--- branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh_example2	(revision 5223)
+++ branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh_example2	(revision 5259)
@@ -112,5 +112,5 @@
 export VAR1_Ithick  V1It_PREF    V1It_SUFF
 export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
-export VAR1_IvelV   V1IvV_PREF   V1IvV_PREF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_SUFF
 #===================== EXP2 =====================
 export DATE1_2      DATE2_2
@@ -125,4 +125,4 @@
 export VAR2_Ithick  V2It_PREF   V2It_SUFF
 export VAR2_SNOW    V2SNOW_PREF V2SNOW_SUFF
-export VAR2_IvelV   V2IvV_PREF   V2IvV_PREF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_SUFF
 #
Index: branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
===================================================================
--- branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 5223)
+++ branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 5259)
@@ -21,4 +21,7 @@
    USE timing         ! preformance summary
    USE wrk_nemo       ! working arrays
+   USE fldread        ! type FLD_N
+   USE phycst         ! physical constant
+   USE in_out_manager  ! I/O manager
 
    IMPLICIT NONE
@@ -208,4 +211,22 @@
       REAL(wp) ::   zztmp  
       REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   zsaldta   ! Jan/Dec levitus salinity
+      ! reading initial file
+      LOGICAL  ::   ln_tsd_init      !: T & S data flag
+      LOGICAL  ::   ln_tsd_tradmp    !: internal damping toward input data flag
+      CHARACTER(len=100)            ::   cn_dir
+      TYPE(FLD_N)                   ::  sn_tem,sn_sal
+      INTEGER  ::   ios=0
+
+      NAMELIST/namtsd/ ln_tsd_init,ln_tsd_tradmp,cn_dir,sn_tem,sn_sal
+      !
+
+      REWIND( numnam_ref )              ! Namelist namtsd in reference namelist :
+      READ  ( numnam_ref, namtsd, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtsd in reference namelist for dia_ar5', lwp )
+      REWIND( numnam_cfg )              ! Namelist namtsd in configuration namelist : Parameters of the run
+      READ  ( numnam_cfg, namtsd, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtsd in configuration namelist for dia_ar5', lwp )
+      IF(lwm) WRITE ( numond, namtsd )
+      !
       !!----------------------------------------------------------------------
       !
@@ -227,8 +248,8 @@
       END DO
       IF( lk_mpp )   CALL mpp_sum( vol0 )
-      
-      CALL iom_open ( 'data_1m_salinity_nomask', inum )
-      CALL iom_get  ( inum, jpdom_data, 'vosaline', zsaldta(:,:,:,1), 1  )
-      CALL iom_get  ( inum, jpdom_data, 'vosaline', zsaldta(:,:,:,2), 12 )
+
+      CALL iom_open ( TRIM( cn_dir )//TRIM(sn_sal%clname), inum )
+      CALL iom_get  ( inum, jpdom_data, TRIM(sn_sal%clvar), zsaldta(:,:,:,1), 1  )
+      CALL iom_get  ( inum, jpdom_data, TRIM(sn_sal%clvar), zsaldta(:,:,:,2), 12 )
       CALL iom_close( inum )
       sn0(:,:,:) = 0.5_wp * ( zsaldta(:,:,:,1) + zsaldta(:,:,:,2) )        
Index: branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 5223)
+++ branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 5259)
@@ -956,8 +956,10 @@
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zdept, zrhh
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp
+      REAL(wp), POINTER, DIMENSION(:,:)   ::   zsshu_n, zsshv_n
       !!----------------------------------------------------------------------
       !
       CALL wrk_alloc( jpi,jpj,jpk, zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp )
       CALL wrk_alloc( jpi,jpj,jpk, zdept, zrhh )
+      CALL wrk_alloc( jpi,jpj, zsshu_n, zsshv_n )
       !
       IF( kt == nit000 ) THEN
@@ -1040,8 +1042,19 @@
 
       ! Z coordinate of U(ji,jj,1:jpkm1) and V(ji,jj,1:jpkm1)
+
+      ! Prepare zsshu_n and zsshv_n
       DO jj = 2, jpjm1
         DO ji = 2, jpim1
-          zu(ji,jj,1) = - ( fse3u(ji,jj,1) - sshn(ji,jj) * znad)    ! probable bug: changed from sshu_n for ztilde compilation
-          zv(ji,jj,1) = - ( fse3v(ji,jj,1) - sshn(ji,jj) * znad)    ! probable bug: changed from sshv_n for ztilde compilation
+          zsshu_n(ji,jj) = (e12u(ji,jj) * sshn(ji,jj) + e12u(ji+1, jj) * sshn(ji+1,jj)) * &
+                         & r1_e12u(ji,jj) * umask(ji,jj,1) * 0.5_wp 
+          zsshv_n(ji,jj) = (e12v(ji,jj) * sshn(ji,jj) + e12v(ji+1, jj) * sshn(ji,jj+1)) * &
+                         & r1_e12v(ji,jj) * vmask(ji,jj,1) * 0.5_wp 
+        END DO
+      END DO
+
+      DO jj = 2, jpjm1
+        DO ji = 2, jpim1
+          zu(ji,jj,1) = - ( fse3u(ji,jj,1) - zsshu_n(ji,jj) * znad) 
+          zv(ji,jj,1) = - ( fse3v(ji,jj,1) - zsshv_n(ji,jj) * znad)
         END DO
       END DO
@@ -1205,4 +1218,5 @@
       CALL wrk_dealloc( jpi,jpj,jpk, zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp )
       CALL wrk_dealloc( jpi,jpj,jpk, zdept, zrhh )
+      CALL wrk_dealloc( jpi,jpj, zsshu_n, zsshv_n )
       !
    END SUBROUTINE hpg_prj
