Index: NEMO/trunk/src/OFF/dtadyn.F90
===================================================================
--- NEMO/trunk/src/OFF/dtadyn.F90	(revision 13237)
+++ NEMO/trunk/src/OFF/dtadyn.F90	(revision 13286)
@@ -71,5 +71,5 @@
    INTEGER  , SAVE      ::   jf_uwd         ! index of u-transport
    INTEGER  , SAVE      ::   jf_vwd         ! index of v-transport
-   INTEGER  , SAVE      ::   jf_wwd         ! index of v-transport
+   INTEGER  , SAVE      ::   jf_wwd         ! index of w-transport
    INTEGER  , SAVE      ::   jf_avt         ! index of Kz
    INTEGER  , SAVE      ::   jf_mld         ! index of mixed layer deptht
@@ -128,5 +128,5 @@
       !
       IF( kt == nit000 ) THEN    ;    nprevrec = 0
-      ELSE                       ;    nprevrec = sf_dyn(jf_tem)%nrec_a(2)
+      ELSE                       ;    nprevrec = sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa)
       ENDIF
       CALL fld_read( kt, 1, sf_dyn )      !=  read data at kt time step   ==!
@@ -294,4 +294,8 @@
       !                                         ! fill sf with slf_i and control print
       CALL fld_fill( sf_dyn, slf_d, cn_dir, 'dta_dyn_init', 'Data in file', 'namdta_dyn' )
+      sf_dyn(jf_uwd)%cltype = 'U'   ;   sf_dyn(jf_uwd)%zsgn = -1._wp  
+      sf_dyn(jf_vwd)%cltype = 'V'   ;   sf_dyn(jf_vwd)%zsgn = -1._wp  
+      sf_dyn(jf_ubl)%cltype = 'U'   ;   sf_dyn(jf_ubl)%zsgn =  1._wp  
+      sf_dyn(jf_vbl)%cltype = 'V'   ;   sf_dyn(jf_vbl)%zsgn =  1._wp  
       !
       ! Open file for each variable to get his number of dimension
@@ -330,11 +334,11 @@
            iom_varid( numrtr, 'sshn', ldstop = .FALSE. ) > 0 ) THEN
            IF(lwp) WRITE(numout,*) ' ssh(:,:,Kmm) forcing fields read in the restart file for initialisation'
-           CALL iom_get( numrtr, jpdom_autoglo, 'sshn', ssh(:,:,Kmm)   )
-           CALL iom_get( numrtr, jpdom_autoglo, 'sshb', ssh(:,:,Kbb)   )
+           CALL iom_get( numrtr, jpdom_auto, 'sshn', ssh(:,:,Kmm)   )
+           CALL iom_get( numrtr, jpdom_auto, 'sshb', ssh(:,:,Kbb)   )
         ELSE
            IF(lwp) WRITE(numout,*) ' ssh(:,:,Kmm) forcing fields read in the restart file for initialisation'
            CALL iom_open( 'restart', inum )
-           CALL iom_get( inum, jpdom_autoglo, 'sshn', ssh(:,:,Kmm)   )
-           CALL iom_get( inum, jpdom_autoglo, 'sshb', ssh(:,:,Kbb)   )
+           CALL iom_get( inum, jpdom_auto, 'sshn', ssh(:,:,Kmm)   )
+           CALL iom_get( inum, jpdom_auto, 'sshb', ssh(:,:,Kbb)   )
            CALL iom_close( inum )                                        ! close file
         ENDIF
@@ -388,5 +392,5 @@
          IF(lwp) WRITE(numout,*) ' read in the file depht over which runoffs are distributed'
          CALL iom_open ( "runoffs", inum )                           ! open file
-         CALL iom_get  ( inum, jpdom_data, 'rodepth', h_rnf )   ! read the river mouth array
+         CALL iom_get  ( inum, jpdom_global, 'rodepth', h_rnf )   ! read the river mouth array
          CALL iom_close( inum )                                        ! close file
          !
@@ -452,5 +456,5 @@
       !
       IF( kt == nit000 ) THEN    ;    nprevrec = 0
-      ELSE                       ;    nprevrec = sf_dyn(jf_tem)%nrec_a(2)
+      ELSE                       ;    nprevrec = sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa)
       ENDIF
       CALL fld_read( kt, 1, sf_dyn )      !=  read data at kt time step   ==!
@@ -711,10 +715,11 @@
       !!---------------------------------------------------------------------
       !
-      IF( sf_dyn(jf_tem)%ln_tint ) THEN    ! Computes slopes (here avt is used as workspace)                       
+      IF( sf_dyn(jf_tem)%ln_tint ) THEN    ! Computes slopes (here avt is used as workspace)
+         !
          IF( kt == nit000 ) THEN
             IF(lwp) WRITE(numout,*) ' Compute new slopes at kt = ', kt
-            zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,1) * tmask(:,:,:)   ! temperature
-            zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,1) * tmask(:,:,:)   ! salinity 
-            avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,1) * tmask(:,:,:)   ! vertical diffusive coef.
+            zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,sf_dyn(jf_tem)%nbb) * tmask(:,:,:)   ! temperature
+            zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,sf_dyn(jf_sal)%nbb) * tmask(:,:,:)   ! salinity 
+            avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,sf_dyn(jf_avt)%nbb) * tmask(:,:,:)   ! vertical diffusive coef.
             CALL compute_slopes( kt, zts, zuslp, zvslp, zwslpi, zwslpj, Kbb, Kmm )
             uslpdta (:,:,:,1) = zuslp (:,:,:) 
@@ -723,7 +728,7 @@
             wslpjdta(:,:,:,1) = zwslpj(:,:,:) 
             !
-            zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,2) * tmask(:,:,:)   ! temperature
-            zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,2) * tmask(:,:,:)   ! salinity 
-            avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,2) * tmask(:,:,:)   ! vertical diffusive coef.
+            zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,sf_dyn(jf_tem)%naa) * tmask(:,:,:)   ! temperature
+            zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,sf_dyn(jf_sal)%naa) * tmask(:,:,:)   ! salinity 
+            avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,sf_dyn(jf_avt)%naa) * tmask(:,:,:)   ! vertical diffusive coef.
             CALL compute_slopes( kt, zts, zuslp, zvslp, zwslpi, zwslpj, Kbb, Kmm )
             uslpdta (:,:,:,2) = zuslp (:,:,:) 
@@ -734,6 +739,6 @@
            ! 
            iswap = 0
-           IF( sf_dyn(jf_tem)%nrec_a(2) - nprevrec /= 0 )  iswap = 1
-           IF( nsecdyn > sf_dyn(jf_tem)%nrec_b(2) .AND. iswap == 1 )  THEN    ! read/update the after data
+           IF( sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) - nprevrec /= 0 )  iswap = 1
+           IF( nsecdyn > sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%nbb) .AND. iswap == 1 )  THEN    ! read/update the after data
               IF(lwp) WRITE(numout,*) ' Compute new slopes at kt = ', kt
               uslpdta (:,:,:,1) =  uslpdta (:,:,:,2)         ! swap the data
@@ -742,7 +747,7 @@
               wslpjdta(:,:,:,1) =  wslpjdta(:,:,:,2) 
               !
-              zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,2) * tmask(:,:,:)   ! temperature
-              zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,2) * tmask(:,:,:)   ! salinity 
-              avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,2) * tmask(:,:,:)   ! vertical diffusive coef.
+              zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,sf_dyn(jf_tem)%naa) * tmask(:,:,:)   ! temperature
+              zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,sf_dyn(jf_sal)%naa) * tmask(:,:,:)   ! salinity 
+              avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,sf_dyn(jf_avt)%naa) * tmask(:,:,:)   ! vertical diffusive coef.
               CALL compute_slopes( kt, zts, zuslp, zvslp, zwslpi, zwslpj, Kbb, Kmm )
               !
@@ -756,6 +761,6 @@
       !
       IF( sf_dyn(jf_tem)%ln_tint )  THEN
-         ztinta =  REAL( nsecdyn - sf_dyn(jf_tem)%nrec_b(2), wp )  &
-            &    / REAL( sf_dyn(jf_tem)%nrec_a(2) - sf_dyn(jf_tem)%nrec_b(2), wp )
+         ztinta =  REAL( nsecdyn - sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%nbb), wp )  &
+            &    / REAL( sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) - sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%nbb), wp )
          ztintb =  1. - ztinta
          IF( l_ldfslp .AND. .NOT.lk_c1d ) THEN    ! Computes slopes (here avt is used as workspace)
