Index: trunk/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 1523)
+++ trunk/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 1524)
@@ -2,8 +2,7 @@
    !!======================================================================
    !!                       ***  MODULE  sbcssr  ***
-   !! Surface module :  add to heat and fresh water fluxes a restoring term
-   !!                   toward observed SST/SSS
+   !! Surface module :  heat and fresh water fluxes a restoring term toward observed SST/SSS
    !!======================================================================
-   !! History :  1.0  !  2006-06  (G. Madec)  Original code
+   !! History :  3.0  !  2006-06  (G. Madec)  Original code
    !!            3.2  !  2009-04  (B. Lemaire)  Introduce iom_put
    !!----------------------------------------------------------------------
@@ -29,15 +28,15 @@
    PUBLIC   sbc_ssr    ! routine called in sbcmod
    
-   REAL(wp), ALLOCATABLE, DIMENSION(:)  ::   buffer   ! Temporary buffer for exchange
 
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   erp      !: evaporation damping   [kg/m2/s]
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qrp      !: heat flux damping        [w/m2]
+
+   !                              !!* Namelist namsbc_ssr *
+   INTEGER ::   nn_sstr, nn_sssr   ! SST/SSS restoring indicator
+   REAL(wp) ::  dqdt   , deds      ! restoring factor on SST and SSS
+
+   REAL(wp) , ALLOCATABLE, DIMENSION(:) ::   buffer   ! Temporary buffer for exchange
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_sst   ! structure of input SST (file informations, fields read)
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_sss   ! structure of input SSS (file informations, fields read)
-
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   erp      !: evaporation damping                          [kg/m2/s]
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qrp      !: heat flux damping                            [w/m2]
-
-   !                               !!* Namelist namsbc_ssr *
-   INTEGER ::   nn_sstr, nn_sssr   ! SST/SSS indicator
-   REAL(wp) ::  dqdt   , deds      ! restoring term factor
 
    !! * Substitutions
@@ -77,13 +76,13 @@
       NAMELIST/namsbc_ssr/ cn_dir, nn_sstr, nn_sssr, dqdt, deds, sn_sst, sn_sss
       !!----------------------------------------------------------------------
+      !
       !                                               ! -------------------- !
       IF( kt == nit000 ) THEN                         ! First call kt=nit000 !
          !                                            ! -------------------- !
-         !                         ! set file information
-         nn_sstr = 0
+         nn_sstr = 0                  !* set file information
          nn_sssr = 0
-         dqdt = -40.e0
-         deds = -27.70
-         cn_dir = './'       ! directory in which the model is executed
+         dqdt    = -40.e0
+         deds    = -27.70
+         cn_dir  = './'            ! directory in which the model is executed
          ! ... default values (NB: frequency positive => hours, negative => months)
          !            !   file    ! frequency !  variable  ! time intep !  clim   ! 'yearly' or ! weights  ! rotation   !
@@ -92,8 +91,8 @@
          sn_sss = FLD_N( 'sss'    ,    -1.    ,  'sss'     ,  .true.    , .false. ,   'yearly'  , ''       , ''         )
 
-         REWIND ( numnam )         ! ... read in namlist namflx
+         REWIND ( numnam )            !* read in namlist namflx
          READ( numnam, namsbc_ssr ) 
 
-         IF(lwp) THEN              ! control print
+         IF(lwp) THEN                 !* control print
             WRITE(numout,*)
             WRITE(numout,*) 'sbc_ssr : SST and/or SSS damping term '
@@ -106,5 +105,5 @@
          ENDIF
 
-         IF( nn_sstr == 1 ) THEN      ! set sf_sst structure
+         IF( nn_sstr == 1 ) THEN      !* set sf_sst structure
             !
             ALLOCATE( sf_sst(1), STAT=ierror )
@@ -114,8 +113,7 @@
             ALLOCATE( sf_sst(1)%fnow(jpi,jpj) )
             ALLOCATE( sf_sst(1)%fdta(jpi,jpj,2) )
-
+            !
             ! fill sf_sst with sn_sst and control print
             CALL fld_fill( sf_sst, (/ sn_sst /), cn_dir, 'sbc_ssr', 'SST restoring term toward SST data', 'namsbc_ssr' )
-
          ENDIF
          !
@@ -128,8 +126,7 @@
             ALLOCATE( sf_sss(1)%fnow(jpi,jpj) )
             ALLOCATE( sf_sss(1)%fdta(jpi,jpj,2) )
-
+            !
             ! fill sf_sss with sn_sss and control print
             CALL fld_fill( sf_sss, (/ sn_sss /), cn_dir, 'sbc_ssr', 'SSS restoring term toward SSS data', 'namsbc_ssr' )
-
          ENDIF
          !
@@ -140,17 +137,14 @@
 
       IF( nn_sstr + nn_sssr /= 0 ) THEN
-
-         IF( nn_sstr == 1)   CALL fld_read( kt, nn_fsbc, sf_sst )   ! Read SST data and provides it
-         !                                                          ! at the current time-step
-         IF( nn_sssr >= 1)   CALL fld_read( kt, nn_fsbc, sf_sss )   ! Read SSS data and provides it
-         !                                                          ! at the current time-step
- 
+         !
+         IF( nn_sstr == 1)   CALL fld_read( kt, nn_fsbc, sf_sst )   ! Read SST data and provides it at kt
+         IF( nn_sssr >= 1)   CALL fld_read( kt, nn_fsbc, sf_sss )   ! Read SSS data and provides it at kt
+         !
          !                                         ! ========================= !
          IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN      !    Add restoring term     !
             !                                      ! ========================= !
             !
-            IF( nn_sstr == 1 ) THEN                   ! Temperature restoring term
+            IF( nn_sstr == 1 ) THEN                   !* Temperature restoring term
 !CDIR COLLAPSE
-               ! use zqrp scalar to optimize memory access (speedup the loop)
                DO jj = 1, jpj
                   DO ji = 1, jpi
@@ -163,8 +157,7 @@
             ENDIF
             !
-            IF( nn_sssr == 1 ) THEN                   ! Salinity damping term (salt flux, emps only)
+            IF( nn_sssr == 1 ) THEN                   !* Salinity damping term (salt flux, emps only)
                zsrp = deds / rday                                     ! from [mm/day] to [kg/m2/s]
 !CDIR COLLAPSE
-               ! use zerp scalar to optimize memory access (speedup the loop)
                DO jj = 1, jpj
                   DO ji = 1, jpi
@@ -177,8 +170,7 @@
                END DO
                CALL iom_put( "erp", erp )                             ! freshwater flux damping
-            ELSEIF( nn_sssr == 2 ) THEN               ! Salinity damping term (volume flux, emp and emps)
+            ELSEIF( nn_sssr == 2 ) THEN               !* Salinity damping term (volume flux, emp and emps)
                zsrp = deds / rday                                     ! from [mm/day] to [kg/m2/s]
 !CDIR COLLAPSE
-               ! use zerp scalar to optimize memory access (speedup the loop)
                DO jj = 1, jpj
                   DO ji = 1, jpi                            
