Index: trunk/NEMO/OPA_SRC/DTA/dtasal.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DTA/dtasal.F90	(revision 392)
+++ trunk/NEMO/OPA_SRC/DTA/dtasal.F90	(revision 434)
@@ -79,9 +79,9 @@
          imois, iman, ik, i15,       &  ! temporary integers
          ipi, ipj, ipk, itime           !    "          "
-#  if defined key_tradmp
+#if defined key_tradmp
       INTEGER ::   &
          jk, il0, il1,               &  ! temporary integers
          ii0, ii1, ij0, ij1             !    "          "
-# endif
+#endif
       INTEGER, DIMENSION(jpmois) ::   istep
       REAL(wp) ::   &
@@ -91,202 +91,205 @@
       !!----------------------------------------------------------------------
 
-
-      ! 0. Initialization
-      ! -----------------
-
-      iman  = jpmois
-      i15   = nday / 16
-
-      imois = nmonth + i15 - 1
-      IF( imois == 0 ) imois = iman
-
-      itime = jpmois
-      ipi=jpiglo
-      ipj=jpjglo
-      ipk = jpk
-
-      ! 1. First call kt=nit000
-      ! -----------------------
-
-      IF( kt == nit000 .AND. nlecsa == 0 ) THEN
-         nsal1 = 0
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) ' dta_sal : monthly salinity data in NetCDF file'
-            WRITE(numout,*) ' ~~~~~~~'
-            WRITE(numout,*)
+      IF( cp_cfg /= 'gyre' ) THEN
+
+         ! 0. Initialization
+         ! -----------------
+
+         iman  = jpmois
+         i15   = nday / 16
+
+         imois = nmonth + i15 - 1
+         IF( imois == 0 ) imois = iman
+
+         itime = jpmois
+         ipi=jpiglo
+         ipj=jpjglo
+         ipk = jpk
+
+         ! 1. First call kt=nit000
+         ! -----------------------
+
+         IF( kt == nit000 .AND. nlecsa == 0 ) THEN
+            nsal1 = 0
+            IF(lwp) THEN
+               WRITE(numout,*)
+               WRITE(numout,*) ' dta_sal : monthly salinity data in NetCDF file'
+               WRITE(numout,*) ' ~~~~~~~'
+               WRITE(numout,*)
+            ENDIF
+
+            ! open file
+            
+            clname = 'data_1m_salinity_nomask'
+#if defined key_agrif
+            if ( .NOT. Agrif_Root() ) then
+               clname = TRIM(Agrif_CFixed())//'_'//TRIM(clname)
+            endif
+#endif             
+            CALL flinopen(TRIM(clname),mig(1),nlci,mjg(1),nlcj,.FALSE.   &
+                 ,ipi,ipj,ipk,zlon,zlat,zlev,itime,istep,zdate0,rdt,numsdt)
+
+            ! title, dimensions and tests
+
+            IF( itime /= jpmois ) THEN
+               IF(lwp) THEN
+                  WRITE(numout,*)
+                  WRITE(numout,*) 'problem with time coordinates'
+                  WRITE(numout,*) ' itime ',itime,' jpmois ',jpmois
+               ENDIF
+               STOP 'dta_sal'
+            ENDIF
+            IF( ipi /= jpidta .OR. ipj /= jpjdta .OR. ipk /= jpk ) THEN
+               IF(lwp) THEN
+                  WRITE(numout,*)
+                  WRITE(numout,*) 'problem with dimensions'
+                  WRITE(numout,*) ' ipi ',ipi,' jpidta ',jpidta
+                  WRITE(numout,*) ' ipj ',ipj,' jpjdta ',jpjdta
+                  WRITE(numout,*) ' ipk ',ipk,' jpk ',jpk
+               ENDIF
+               STOP 'dta_sal'
+            ENDIF
+            IF(lwp)WRITE(numout,*) itime,istep,zdate0,rdt,numsdt
+
          ENDIF
 
-         ! open file
-         
-         clname = 'data_1m_salinity_nomask'
-#if defined key_agrif
-         if ( .NOT. Agrif_Root() ) then
-            clname = TRIM(Agrif_CFixed())//'_'//TRIM(clname)
-         endif
-#endif          
-         CALL flinopen(TRIM(clname),mig(1),nlci,mjg(1),nlcj,.FALSE.   &
-              ,ipi,ipj,ipk,zlon,zlat,zlev,itime,istep,zdate0,rdt,numsdt)
-
-         ! title, dimensions and tests
-
-         IF( itime /= jpmois ) THEN
+
+         ! 2. Read monthly file
+         ! -------------------
+
+         IF( ( kt == nit000 .AND. nlecsa == 0) .OR. imois /= nsal1 ) THEN
+            nlecsa = 1
+            
+            ! 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 
+
+            CALL flinget(numsdt,'vosaline',jpidta,jpjdta,jpk,jpmois,nsal1,   &
+              nsal1,mig(1),nlci,mjg(1),nlcj,saldta(1:nlci,1:nlcj,1:jpk,1))
+
+            CALL flinget(numsdt,'vosaline',jpidta,jpjdta,jpk,jpmois,nsal2,   &
+              nsal2,mig(1),nlci,mjg(1),nlcj,saldta(1:nlci,1:nlcj,1:jpk,2))
+
+            
             IF(lwp) THEN
                WRITE(numout,*)
-               WRITE(numout,*) 'problem with time coordinates'
-               WRITE(numout,*) ' itime ',itime,' jpmois ',jpmois
-            ENDIF
-            STOP 'dta_sal'
-         ENDIF
-         IF( ipi /= jpidta .OR. ipj /= jpjdta .OR. ipk /= jpk ) THEN
+               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)
+                     DO jk = 13, 13
+                        saldta(ji,jj,jk,:) = saldta(ji,jj,jk,:) - 0.15
+                     END DO
+                     DO jk = 14, 15
+                        saldta(ji,jj,jk,:) = saldta(ji,jj,jk,:) - 0.25
+                     END DO
+                     DO jk = 16, 17
+                        saldta(ji,jj,jk,:) = saldta(ji,jj,jk,:) - 0.30
+                     END DO
+                     DO jk = 18, 25
+                        saldta(ji,jj,jk,:) = saldta(ji,jj,jk,:) - 0.35
+                     END DO
+                  END DO
+               END DO
+               IF( n_cla == 1 ) THEN 
+                  !                                         ! New salinity profile at Gibraltar
+                  il0 = 138   ;   il1 = 138   
+                  ij0 = 101   ;   ij1 = 101
+                  ii0 = 139   ;   ii1 = 139   
+                  saldta( mi0(ii0):mi1(ii1), mj0(ij0):mj1(ij1) , : , : ) =   &
+                     &                                    saldta( mi0(il0):mi1(il1) , mj0(ij0):mj1(ij1) , : , : )
+                  ij0 = 101   ;   ij1 = 101
+                  saldta( mi0(ii0):mi1(ii1), mj0(ij0):mj1(ij1) , : , : ) =   &
+                     &                                    saldta( mi0(il0):mi1(il1) , mj0(ij0):mj1(ij1) , : , : )
+                  il0 = 138   ;   il1 = 138   
+                  ij0 = 101   ;   ij1 = 102
+                  ii0 = 139   ;   ii1 = 139   
+                  DO jl = mi0(il0), mi1(il1)                ! New salinity profile at Gibraltar
+                     DO jj = mj0(ij0), mj1(ij1)
+                        DO ji = mi0(ii0), mi1(ii1)
+                           saldta(ji,jj,:,:) = saldta(jl,jj,:,:)
+                        END DO
+                     END DO
+                  END DO
+
+                  il0 = 164   ;   il1 = 164   
+                  ij0 =  88   ;   ij1 =  88
+                  ii0 = 161   ;   ii1 = 163   
+                  DO jl = mi0(il0), mi1(il1)                ! New salinity profile at Bab el Mandeb
+                     DO jj = mj0(ij0), mj1(ij1)
+                        DO ji = mi0(ii0), mi1(ii1)
+                           saldta(ji,jj,:,:) = saldta(jl,jj,:,:)
+                        END DO
+                     END DO
+                     ij0 =  87   ;   ij1 =  87
+                     DO jj = mj0(ij0), mj1(ij1)
+                        DO ji = mi0(ii0), mi1(ii1)
+                           saldta(ji,jj,:,:) = saldta(jl,jj,:,:)
+                        END DO
+                     END DO
+                  END DO
+
+               ENDIF
+
+            ENDIF
+#endif   
+            
+            !                                     ! Mask
+            DO jl = 1, 2
+               saldta(:,:,:,jl) = saldta(:,:,:,jl)*tmask(:,:,:)
+               saldta(:,:,jpk,jl) = 0.
+               IF( lk_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(ik) - fsdept(ji,jj,ik) ) / ( gdept(ik) - gdept(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
+            
+
             IF(lwp) THEN
-               WRITE(numout,*)
-               WRITE(numout,*) 'problem with dimensions'
-               WRITE(numout,*) ' ipi ',ipi,' jpidta ',jpidta
-               WRITE(numout,*) ' ipj ',ipj,' jpjdta ',jpjdta
-               WRITE(numout,*) ' ipk ',ipk,' jpk ',jpk
-            ENDIF
-            STOP 'dta_sal'
-         ENDIF
-         IF(lwp)WRITE(numout,*) itime,istep,zdate0,rdt,numsdt
-
-      ENDIF
-
-
-      ! 2. Read monthly file
-      ! -------------------
-
-      IF( ( kt == nit000 .AND. nlecsa == 0) .OR. imois /= nsal1 ) THEN
-         nlecsa = 1
-         
-         ! 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 
-
-         CALL flinget(numsdt,'vosaline',jpidta,jpjdta,jpk,jpmois,nsal1,   &
-           nsal1,mig(1),nlci,mjg(1),nlcj,saldta(1:nlci,1:nlcj,1:jpk,1))
-
-         CALL flinget(numsdt,'vosaline',jpidta,jpjdta,jpk,jpmois,nsal2,   &
-           nsal2,mig(1),nlci,mjg(1),nlcj,saldta(1:nlci,1:nlcj,1:jpk,2))
-
-         
-         IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) ' read Levitus salinity ok'
-            WRITE(numout,*)
+               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
          
-#  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)
-                  DO jk = 13, 13
-                     saldta(ji,jj,jk,:) = saldta(ji,jj,jk,:) - 0.15
-                  END DO
-                  DO jk = 14, 15
-                     saldta(ji,jj,jk,:) = saldta(ji,jj,jk,:) - 0.25
-                  END DO
-                  DO jk = 16, 17
-                     saldta(ji,jj,jk,:) = saldta(ji,jj,jk,:) - 0.30
-                  END DO
-                  DO jk = 18, 25
-                     saldta(ji,jj,jk,:) = saldta(ji,jj,jk,:) - 0.35
-                  END DO
-               END DO
-            END DO
-            IF( n_cla == 1 ) THEN 
-               !                                         ! New salinity profile at Gibraltar
-               il0 = 138   ;   il1 = 138   
-               ij0 = 101   ;   ij1 = 101
-               ii0 = 139   ;   ii1 = 139   
-               saldta( mi0(ii0):mi1(ii1), mj0(ij0):mj1(ij1) , : , : ) =   &
-                  &                                    saldta( mi0(il0):mi1(il1) , mj0(ij0):mj1(ij1) , : , : )
-               ij0 = 101   ;   ij1 = 101
-               saldta( mi0(ii0):mi1(ii1), mj0(ij0):mj1(ij1) , : , : ) =   &
-                  &                                    saldta( mi0(il0):mi1(il1) , mj0(ij0):mj1(ij1) , : , : )
-               il0 = 138   ;   il1 = 138   
-               ij0 = 101   ;   ij1 = 102
-               ii0 = 139   ;   ii1 = 139   
-               DO jl = mi0(il0), mi1(il1)                ! New salinity profile at Gibraltar
-                  DO jj = mj0(ij0), mj1(ij1)
-                     DO ji = mi0(ii0), mi1(ii1)
-                        saldta(ji,jj,:,:) = saldta(jl,jj,:,:)
-                     END DO
-                  END DO
-               END DO
-
-               il0 = 164   ;   il1 = 164   
-               ij0 =  88   ;   ij1 =  88
-               ii0 = 161   ;   ii1 = 163   
-               DO jl = mi0(il0), mi1(il1)                ! New salinity profile at Bab el Mandeb
-                  DO jj = mj0(ij0), mj1(ij1)
-                     DO ji = mi0(ii0), mi1(ii1)
-                        saldta(ji,jj,:,:) = saldta(jl,jj,:,:)
-                     END DO
-                  END DO
-                  ij0 =  87   ;   ij1 =  87
-                  DO jj = mj0(ij0), mj1(ij1)
-                     DO ji = mi0(ii0), mi1(ii1)
-                        saldta(ji,jj,:,:) = saldta(jl,jj,:,:)
-                     END DO
-                  END DO
-               END DO
-
-            ENDIF
-
-         ENDIF
-#endif
-         
-         !                                     ! Mask
-         DO jl = 1, 2
-            saldta(:,:,:,jl) = saldta(:,:,:,jl)*tmask(:,:,:)
-            saldta(:,:,jpk,jl) = 0.
-            IF( lk_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(ik) - fsdept(ji,jj,ik) ) / ( gdept(ik) - gdept(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
-         
-
-         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
+ 
+         ! 3. At every time step compute salinity data
+         ! -------------------------------------------
+
+         zxy = FLOAT(nday + 15 - 30*i15)/30.
+         s_dta(:,:,:) = ( 1.- zxy ) * saldta(:,:,:,1) + zxy * saldta(:,:,:,2)
+
       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)
 
    END SUBROUTINE dta_sal
Index: trunk/NEMO/OPA_SRC/DTA/dtasss.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DTA/dtasss.F90	(revision 434)
+++ trunk/NEMO/OPA_SRC/DTA/dtasss.F90	(revision 434)
@@ -0,0 +1,158 @@
+MODULE dtasss
+   !!======================================================================
+   !!                       ***  MODULE  dtasss  ***
+   !! Data : Sea Surface Salinity (SSS)
+   !!======================================================================
+   
+   !!----------------------------------------------------------------------
+   !!   dta_sss      : sss data
+   !!----------------------------------------------------------------------
+   !! * Modules used
+   USE oce             ! ocean dynamics and tracers
+   USE dom_oce         ! ocean space and time domain
+   USE in_out_manager  ! I/O manager
+   USE ocfzpt          ! ???
+   USE daymod          ! calendar
+
+   IMPLICIT NONE
+   PRIVATE
+
+   !! * Shared routine
+   PUBLIC dta_sss
+
+   !! * Shared module variables
+#if defined key_dtasss
+   LOGICAL , PUBLIC, PARAMETER ::   lk_dtasss = .TRUE.   !: sss data flag
+#else
+   LOGICAL , PUBLIC, PARAMETER ::   lk_dtasss = .FALSE.  !: sss data flag
+#endif
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !:
+      sss             !: surface salinity
+
+   !!----------------------------------------------------------------------
+   !!   OPA 9.0 , IPSL-LODYC  (2005)
+   !!----------------------------------------------------------------------
+
+CONTAINS
+
+#if defined key_dtasss
+   !!----------------------------------------------------------------------
+   !!   'key_dtasss'                                               SSS data
+   !!----------------------------------------------------------------------
+
+   SUBROUTINE dta_sss( kt )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE dta_sss  ***
+      !!                    
+      !! ** Purpose :   Read surface salinity data 
+      !!
+      !! ** Method  : - Read a specific sss.
+      !!
+      !! ** Action  : - sss 
+      !!
+      !! History :
+      !!        !  90-03  (O. Marti and Ph Dandin)  Original code
+      !!        !  92-07  (M. Imbard)
+      !!        !  96-11  (E. Guilyardi)  Daily AGCM input files
+      !!        !  00-04  (M. Imbard)  NetCDF FORMAT
+      !!        !  00-10  (J.-P. Boulanger)  passage ORCA a TDH
+      !!        !  01-10  (A. Lazar)  Reynolds default
+      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
+      !!        !  02-11  (C. Levy)  MPP/MPI NetCDF read
+      !!        !  05-03  (M. Levy) adapt SST to SSS
+      !!----------------------------------------------------------------------
+      !! * Modules used
+      USE ioipsl
+      
+      !! * Arguments
+      INTEGER ::   kt
+
+      !! * Local declarations
+      INTEGER ::   idy
+      INTEGER ::   istep(1)
+      INTEGER ::   ipi, ipj, ipk
+
+      REAL(wp) ::   zdate0, zdt
+      REAL(wp) ::   zlon(jpi,jpj), zlat(jpi,jpj), zlev(jpk)
+      CHARACTER (len=45) ::   &
+         clname = "sss.nc"      ! filename for SSS
+      !!----------------------------------------------------------------------
+
+      IF( kt == nit000 ) THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'dta_sss : sea surface salinity data'
+         IF(lwp) WRITE(numout,*) '~~~~~~~   read in file: ', clname
+         sss(:,:) = 0.e0   ! required for extra halos in mpp
+
+         ipi = jpiglo
+         ipj = jpjglo
+         ipk = 0
+
+         zdate0 = 0.e0
+         zdt = 0.e0
+         IF(lwp) WRITE (numout,*) 'open sss file = ', clname
+
+         CALL flinopen( TRIM(clname), mig(1), nlci, mjg(1), nlcj, .FALSE., ipi, ipj,  &
+            &           ipk, zlon, zlat, zlev, idy, istep, zdate0, zdt, numsss )
+
+
+         IF( ipi /= jpidta .OR. ipj /= jpjdta ) THEN
+            IF(lwp) WRITE(numout,*)
+            IF(lwp) WRITE(numout,*) 'problem with dimensions'
+            IF(lwp) WRITE(numout,*) ' ipi ', ipi, ' jpidta ', jpidta
+            IF(lwp) WRITE(numout,*) ' ipj ', ipj, ' jpjdta ', jpjdta
+            nstop = nstop + 1
+         ENDIF
+         IF(lwp) WRITE(numout,*) idy, istep, zdate0, zdt 
+
+         CALL flinget( numsss, 'sss', jpidta, jpjdta, 1, idy, 1,   &
+            &          1, mig(1), nlci, mjg(1), nlcj, sss(1:nlci,1:nlcj) )
+         
+         sss(:,:) = sss(:,:)*tmask(:,:,1)
+
+         IF( kt == nit000 .AND. lwp ) THEN
+            WRITE(numout,*) ' '
+            WRITE(numout,*) ' read  sea surface salinity ok'
+            WRITE(numout,*) ' '
+            CALL prihre(sss(1,1),jpi,jpj,1,jpi,20,1,jpj,10,1.,numout)
+         ENDIF
+         CALL flinclo(numsss)
+
+      ENDIF
+
+   END SUBROUTINE dta_sss
+
+#else
+   !!----------------------------------------------------------------------
+   !!   Default option :                                        NO SSS data
+   !!----------------------------------------------------------------------
+
+   SUBROUTINE dta_sss( kt )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE dta_sss  ***
+      !!                    
+      !! ** Purpose :   sea surface salinity data and update it
+      !!     at each time step.   ???
+      !!
+      !! ** Method  : - sss  
+      !!
+      !! History :
+      !!        !  91-03  ()  Original code
+      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
+      !!----------------------------------------------------------------------
+      !! * Arguments
+      INTEGER, INTENT( in ) ::   kt      ! ocean timestep
+      !!---------------------------------------------------------------------
+      
+      IF( kt == nit000 ) THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'dta_sss : No SSS data'
+         IF(lwp) WRITE(numout,*) '~~~~~~~'
+      ENDIF
+
+      
+   END SUBROUTINE dta_sss
+#endif
+
+   !!======================================================================
+END MODULE dtasss
Index: trunk/NEMO/OPA_SRC/DTA/dtatem.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DTA/dtatem.F90	(revision 392)
+++ trunk/NEMO/OPA_SRC/DTA/dtatem.F90	(revision 434)
@@ -98,189 +98,191 @@
       !!----------------------------------------------------------------------
 
-      cl_tdata = 'data_1m_potential_temperature_nomask '
-
+      IF( cp_cfg /= 'gyre' ) THEN
+
+         ! 0. Initialization
+         ! -----------------
+
+         iman  = jpmois
+         i15   = nday / 16
+         imois = nmonth + i15 - 1
+         IF( imois == 0 )   imois = iman
+
+         itime = jpmois
+         ipi = jpiglo
+         ipj = jpjglo
+         ipk = jpk
+
+         ! 1. First call kt=nit000
+         ! -----------------------
+
+         IF( kt == nit000 .AND. nlecte == 0 ) THEN
+            ntem1 = 0
+            IF(lwp) WRITE(numout,*)
+            IF(lwp) WRITE(numout,*) ' dtatem : Levitus monthly fields'
+            IF(lwp) WRITE(numout,*) ' ~~~~~~'
+            IF(lwp) WRITE(numout,*) '             NetCDF FORMAT'
+            IF(lwp) WRITE(numout,*)
+            
+            ! open file
+
+            cl_tdata = 'data_1m_potential_temperature_nomask '
 #if defined key_agrif
-      if ( .NOT. Agrif_Root() ) then
-         cl_tdata = TRIM(Agrif_CFixed())//'_'//TRIM(cl_tdata)
-      endif
-#endif         
-
-      ! 0. Initialization
-      ! -----------------
-
-      iman  = jpmois
-      i15   = nday / 16
-      imois = nmonth + i15 - 1
-      IF( imois == 0 )   imois = iman
-
-      itime = jpmois
-      ipi = jpiglo
-      ipj = jpjglo
-      ipk = jpk
-
-      ! 1. First call kt=nit000
-      ! -----------------------
-
-      IF( kt == nit000 .AND. nlecte == 0 ) THEN
-         ntem1 = 0
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) ' dtatem : Levitus monthly fields'
-         IF(lwp) WRITE(numout,*) ' ~~~~~~'
-         IF(lwp) WRITE(numout,*) '             NetCDF FORMAT'
-         IF(lwp) WRITE(numout,*)
+            if ( .NOT. Agrif_Root() ) then
+               cl_tdata = TRIM(Agrif_CFixed())//'_'//TRIM(cl_tdata)
+            endif
+#endif            
+            CALL flinopen( TRIM(cl_tdata), mig(1), nlci , mjg(1),  nlcj   &
+               &          , .false.     , ipi   , ipj  , ipk   , zlon     &
+               &          , zlat        , zlev  , itime, istep , zdate0   &
+               &          , rdt         , numtdt                        )
+
+            ! title, dimensions and tests
+
+            IF( itime /= jpmois ) THEN
+               IF(lwp) THEN
+                  WRITE(numout,*)
+                  WRITE(numout,*) 'problem with time coordinates'
+                  WRITE(numout,*) ' itime ',itime,' jpmois ',jpmois
+               ENDIF
+               STOP 'dtatem'
+            ENDIF
+            IF( ipi /= jpidta .OR. ipj /= jpjdta .OR. ipk /= jpk ) THEN
+               IF(lwp) THEN
+                  WRITE(numout,*)
+                  WRITE(numout,*) 'problem with dimensions'
+                  WRITE(numout,*) ' ipi ',ipi,' jpidta ',jpidta
+                  WRITE(numout,*) ' ipj ',ipj,' jpjdta ',jpjdta
+                  WRITE(numout,*) ' ipk ',ipk,' jpk ',jpk
+               ENDIF
+               STOP 'dtatem'
+            ENDIF
+            IF(lwp) WRITE(numout,*) itime,istep,zdate0,rdt,numtdt
+
+         ENDIF
+
+
+         ! 2. Read monthly file
+         ! -------------------
+
+         IF( ( kt == nit000 .AND. nlecte == 0 ) .OR. imois /= ntem1 ) THEN
+            nlecte = 1
+
+            ! 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 
+            
+            CALL flinget( numtdt, 'votemper', jpidta, jpjdta, jpk   &
+                        , jpmois, ntem1     , ntem1 , mig(1), nlci   &
+                        , mjg(1), nlcj      , temdta(1:nlci,1:nlcj,1:jpk,1)     )
+            CALL flinget( numtdt, 'votemper', jpidta, jpjdta, jpk   &
+                        , jpmois, ntem2     , ntem2 , mig(1), nlci   &
+                        , mjg(1), nlcj      , temdta(1:nlci,1:nlcj,1:jpk,2)     )
+
+            IF(lwp) WRITE(numout,*)
+            IF(lwp) WRITE(numout,*) ' read Levitus temperature ok'
+            IF(lwp) WRITE(numout,*)
+            
+#if defined key_tradmp
+            IF( cp_cfg == "orca"  .AND. jp_cfg == 2 ) THEN
          
-         ! open file
-
-         CALL flinopen( TRIM(cl_tdata), mig(1), nlci , mjg(1),  nlcj   &
-                      , .false.     , ipi   , ipj  , ipk   , zlon   &
-                      , zlat        , zlev  , itime, istep , zdate0   &
-                      , rdt         , numtdt                        )
-
-         ! title, dimensions and tests
-
-         IF( itime /= jpmois ) THEN
-            IF(lwp) THEN
-               WRITE(numout,*)
-               WRITE(numout,*) 'problem with time coordinates'
-               WRITE(numout,*) ' itime ',itime,' jpmois ',jpmois
-            ENDIF
-            STOP 'dtatem'
-         ENDIF
-         IF( ipi /= jpidta .OR. ipj /= jpjdta .OR. ipk /= jpk ) THEN
-            IF(lwp) THEN
-               WRITE(numout,*)
-               WRITE(numout,*) 'problem with dimensions'
-               WRITE(numout,*) ' ipi ',ipi,' jpidta ',jpidta
-               WRITE(numout,*) ' ipj ',ipj,' jpjdta ',jpjdta
-               WRITE(numout,*) ' ipk ',ipk,' jpk ',jpk
-            ENDIF
-            STOP 'dtatem'
-         ENDIF
-         IF(lwp) WRITE(numout,*) itime,istep,zdate0,rdt,numtdt
-
-      ENDIF
-
-
-      ! 2. Read monthly file
-      ! -------------------
-
-      IF( ( kt == nit000 .AND. nlecte == 0 ) .OR. imois /= ntem1 ) THEN
-         nlecte = 1
-
-         ! 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 
-         
-         CALL flinget( numtdt, 'votemper', jpidta, jpjdta, jpk   &
-                     , jpmois, ntem1     , ntem1 , mig(1), nlci   &
-                     , mjg(1), nlcj      , temdta(1:nlci,1:nlcj,1:jpk,1)     )
-         CALL flinget( numtdt, 'votemper', jpidta, jpjdta, jpk   &
-                     , jpmois, ntem2     , ntem2 , mig(1), nlci   &
-                     , mjg(1), nlcj      , temdta(1:nlci,1:nlcj,1:jpk,2)     )
-
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) ' read Levitus temperature ok'
-         IF(lwp) WRITE(numout,*)
-         
-#  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)
-                  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
+               !                                        ! =======================
+               !                                        !  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)
+                     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
+                  END DO
                END DO
-            END DO
-         
-            IF( n_cla == 0 ) THEN 
-               !                                         ! Reduced temperature at Red Sea
-               ij0 =  87   ;   ij1 =  96
-               ii0 = 148   ;   ii1 = 160
-               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
-            ELSE
-               il0 = 138   ;   il1 = 138
-               ij0 = 101   ;   ij1 = 102
-               ii0 = 139   ;   ii1 = 139
-               DO jl = mi0(il0), mi1(il1)                ! New temperature profile at Gibraltar
-                  DO jj = mj0(ij0), mj1(ij1)
-                     DO ji = mi0(ii0), mi1(ii1)
-                        temdta(ji,jj,:,:) = temdta(jl,jj,:,:)
+            
+               IF( n_cla == 0 ) THEN 
+                  !                                         ! Reduced temperature at Red Sea
+                  ij0 =  87   ;   ij1 =  96
+                  ii0 = 148   ;   ii1 = 160
+                  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
+               ELSE
+                  il0 = 138   ;   il1 = 138
+                  ij0 = 101   ;   ij1 = 102
+                  ii0 = 139   ;   ii1 = 139
+                  DO jl = mi0(il0), mi1(il1)                ! New temperature profile at Gibraltar
+                     DO jj = mj0(ij0), mj1(ij1)
+                        DO ji = mi0(ii0), mi1(ii1)
+                           temdta(ji,jj,:,:) = temdta(jl,jj,:,:)
+                        END DO
                      END DO
                   END DO
-               END DO
-               il0 = 164   ;   il1 = 164
-               ij0 =  88   ;   ij1 =  88
-               ii0 = 161   ;   ii1 = 163
-               DO jl = mi0(il0), mi1(il1)                ! New temperature profile at Bab el Mandeb
-                  DO jj = mj0(ij0), mj1(ij1)
-                     DO ji = mi0(ii0), mi1(ii1)
-                        temdta(ji,jj,:,:) = temdta(jl,jj,:,:)
+                  il0 = 164   ;   il1 = 164
+                  ij0 =  88   ;   ij1 =  88
+                  ii0 = 161   ;   ii1 = 163
+                  DO jl = mi0(il0), mi1(il1)                ! New temperature profile at Bab el Mandeb
+                     DO jj = mj0(ij0), mj1(ij1)
+                        DO ji = mi0(ii0), mi1(ii1)
+                           temdta(ji,jj,:,:) = temdta(jl,jj,:,:)
+                        END DO
+                     END DO
+                     ij0 =  87   ;   ij1 =  87
+                     DO jj = mj0(ij0), mj1(ij1)
+                        DO ji = mi0(ii0), mi1(ii1)
+                           temdta(ji,jj,:,:) = temdta(jl,jj,:,:)
+                        END DO
                      END DO
                   END DO
-                  ij0 =  87   ;   ij1 =  87
-                  DO jj = mj0(ij0), mj1(ij1)
-                     DO ji = mi0(ii0), mi1(ii1)
-                        temdta(ji,jj,:,:) = temdta(jl,jj,:,:)
+               ENDIF
+
+            ENDIF
+#endif
+
+            !                                  ! Mask
+            DO jl = 1, 2
+               temdta(:,:,:,jl) = temdta(:,:,:,jl) * tmask(:,:,:)
+               temdta(:,:,jpk,jl) = 0.
+               IF( lk_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(ik) - fsdept(ji,jj,ik) ) / ( gdept(ik) - gdept(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
-               END DO
+               ENDIF
+            END DO
+
+            IF(lwp) THEN
+               WRITE(numout,*) ' temperature Levitus month ', ntem1, ntem2
+               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
-#  endif
-
-         !                                  ! Mask
-         DO jl = 1, 2
-            temdta(:,:,:,jl) = temdta(:,:,:,jl) * tmask(:,:,:)
-            temdta(:,:,jpk,jl) = 0.
-            IF( lk_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(ik) - fsdept(ji,jj,ik) ) / ( gdept(ik) - gdept(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
-
-         IF(lwp) THEN
-            WRITE(numout,*) ' temperature Levitus month ', ntem1, ntem2
-            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
+
+ 
+         ! 2. At every time step compute temperature data
+         ! ----------------------------------------------
+
+         zxy = FLOAT( nday + 15 - 30 * i15 ) / 30.
+         t_dta(:,:,:) = (1.-zxy) * temdta(:,:,:,1) + zxy * temdta(:,:,:,2)
+
       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)
 
    END SUBROUTINE dta_tem
