Index: trunk/NEMO/OPA_SRC/DTA/dtasal.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DTA/dtasal.F90	(revision 704)
+++ trunk/NEMO/OPA_SRC/DTA/dtasal.F90	(revision 719)
@@ -42,5 +42,5 @@
    !!----------------------------------------------------------------------
    !!   OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id$
+   !! $Header$ 
    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
    !!----------------------------------------------------------------------
Index: trunk/NEMO/OPA_SRC/DTA/dtasss.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DTA/dtasss.F90	(revision 719)
+++ trunk/NEMO/OPA_SRC/DTA/dtasss.F90	(revision 719)
@@ -0,0 +1,128 @@
+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
+   INTEGER ::   numsss         !: logical unit for surface salinity data
+   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 iom
+      
+      !! * Arguments
+      INTEGER ::   kt
+
+      !!----------------------------------------------------------------------
+
+      IF( kt == nit000 ) THEN
+
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'dta_sss : yearly mean sea surface salinity data'
+
+         CALL iom_open ( 'sss.nc', numsss ) 
+         CALL iom_get ( numsss, jpdom_data, 'sss', sss, 1 )
+         CALL iom_close ( numsss )
+
+         sss(:,:) = sss(:,:)*tmask(:,:,1)
+
+         IF( lwp ) THEN
+            WRITE(numout,*) ' '
+            WRITE(numout,*) ' read  sea surface salinity ok'
+            WRITE(numout,*) ' '
+            CALL prihre(sss(:,:),jpi,jpj,1,jpi,20,1,jpj,10,1.,numout)
+         ENDIF
+
+      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/dtasst.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DTA/dtasst.F90	(revision 719)
+++ trunk/NEMO/OPA_SRC/DTA/dtasst.F90	(revision 719)
@@ -0,0 +1,196 @@
+MODULE dtasst
+   !!======================================================================
+   !!                       ***  MODULE  dtasst  ***
+   !! Data : Sea Surface Temperature (SST)
+   
+   !!      BUG initialisation  nyearsst !!!!!!bug
+   
+   !!======================================================================
+   
+   !!----------------------------------------------------------------------
+   !!   dta_sst      : Reynolds sst 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_sst
+
+   !! * Shared module variables
+#if defined key_dtasst
+   LOGICAL , PUBLIC, PARAMETER ::   lk_dtasst = .TRUE.   !: sst data flag
+   INTEGER ::   &
+        numsst ,      &              !: logical unit for surface temperature data
+        ndaysst                      !: new day for Reynolds sst
+   CHARACTER (len=34) :: clname      !: filename for daily SST
+#else
+   LOGICAL , PUBLIC, PARAMETER ::   lk_dtasst = .FALSE.  !: sst data flag
+#endif
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !:
+      sst             !: surface temperature
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,2) ::   &  !:
+      rclice          !: climatological ice index (0/1) (2 months)
+   !!----------------------------------------------------------------------
+   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! $Header$ 
+   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !!----------------------------------------------------------------------
+
+CONTAINS
+
+#if defined key_dtasst
+   !!----------------------------------------------------------------------
+   !!   'key_dtasst'                                               SST data
+   !!----------------------------------------------------------------------
+
+   SUBROUTINE dta_sst( kt )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE dta_sst  ***
+      !!                    
+      !! ** Purpose :   Read Reynolds weekly mean sea surface temperature 
+      !!      data and update it at each time step.
+      !!
+      !! ** Method  : - Read a specific REYNOLDS daily sst in Celcius.
+      !!              -  Compute a climatological ice cover rclice (0 or 1)
+      !!
+      !! ** Action  : - sst (Celcius)
+      !!              - rclice, ice/ocean mask (0 or 1)
+      !!
+      !! 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
+      !!----------------------------------------------------------------------
+      !! * Modules used
+      USE iom
+      
+      !! * Arguments
+      INTEGER ::   kt
+
+      !! * Local save
+
+      !! * Local declarations
+      INTEGER ::   ji, jj
+      !!----------------------------------------------------------------------
+
+      ! -------------------- !
+      ! First call kt=nit000 !
+      ! -------------------- !
+
+      IF( kt == nit000 ) THEN
+
+         ndaysst = 0   ! initializations
+         IF(lwp) WRITE(numout,*) 'dta_sst : DAILY sea surface temperature data'
+         CALL iom_open ( 'sst_1d.nc', numsst ) 
+
+      ENDIF
+
+      ! ----------------- !
+      ! Read daily file   !
+      ! ----------------- !
+
+      ! Read daily SST 
+
+      IF( ndaysst /= nday ) THEN 
+         ndaysst = nday
+
+         CALL iom_get ( numsst, jpdom_data, 'sst', sst, nday_year )
+
+         IF ( kt == nit000 .AND. lwp ) THEN
+            WRITE(numout,*) ' '
+            WRITE(numout,*) ' read daily sea surface temperature ok'
+            WRITE(numout,*) ' '
+            WRITE(numout,*) ' Surface temp day: ', ndastp
+            CALL prihre(sst(:,:),jpi,jpj,1,jpi,20,1,jpj,10,1.,numout)
+         ENDIF
+         
+      ENDIF
+      
+      ! 2. At every time step compute temperature data
+      ! ----------------------------------------------
+      
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            ztgel = fzptn(ji,jj)
+            rclice(ji,jj,1) = tmask(ji,jj,1)
+            IF( sst(ji,jj) >= ztgel )   rclice(ji,jj,1) = 0.e0
+            rclice(ji,jj,2) = rclice(ji,jj,1)
+         END DO
+      END DO
+      IF( kt == nit000 .AND. lwp ) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) 'Computed Ice cover rclice'
+         WRITE(numout,*)
+         WRITE(numout,*) 'Ice cover : '
+         CALL prihre( rclice(:,:,1), jpi, jpj, 1, jpi, 20, 1, jpj, 10, 1., numout )
+      ENDIF
+      
+      ! Close the file
+      ! --------------
+      
+      IF( kt == nitend )   CALL iom_close (numsst)
+      
+
+   END SUBROUTINE dta_sst
+
+#else
+   !!----------------------------------------------------------------------
+   !!   Default option :                                        NO SST data
+   !!----------------------------------------------------------------------
+
+   SUBROUTINE dta_sst( kt )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE dta_sst  ***
+      !!                    
+      !! ** Purpose :   sea surface temperature data and update it
+      !!     at each time step.   ???
+      !!
+      !! ** Method  : - sst   = tn
+      !!              - rclice = 1. IF tn =< ztgel
+      !!
+      !! History :
+      !!        !  91-03  ()  Original code
+      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
+      !!----------------------------------------------------------------------
+      !! * Arguments
+      INTEGER, INTENT( in ) ::   kt      ! ocean timestep
+      
+      !! * Local declarations
+      INTEGER :: ji, jj
+      !!---------------------------------------------------------------------
+      
+      IF( kt == nit000 ) THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'dta_sst : No SST data'
+         IF(lwp) WRITE(numout,*) '~~~~~~~'
+      ENDIF
+      
+      ! 1. Update at each time step
+      ! ---------------------------
+
+      sst   (:,:)   = tn   (:,:,1)
+      rclice(:,:,1) = tmask(:,:,1)
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            IF( tn(ji,jj,1) >= fzptn(ji,jj) ) rclice(ji,jj,1) = 0.e0
+         END DO
+      END DO
+      rclice(:,:,2) = rclice(:,:,1)
+      
+   END SUBROUTINE dta_sst
+#endif
+
+   !!======================================================================
+END MODULE dtasst
Index: trunk/NEMO/OPA_SRC/DTA/dtatem.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DTA/dtatem.F90	(revision 704)
+++ trunk/NEMO/OPA_SRC/DTA/dtatem.F90	(revision 719)
@@ -41,5 +41,5 @@
    !!----------------------------------------------------------------------
    !!   OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id$
+   !! $Header$ 
    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
    !!----------------------------------------------------------------------
