Index: trunk/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- trunk/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 474)
+++ trunk/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 503)
@@ -4,16 +4,15 @@
    !! Ocean physics: solar radiation penetration in the top ocean levels
    !!======================================================================
-   !! History :
-   !!   6.0  !  90-10  (B. Blanke)  Original code
-   !!   7.0  !  91-11  (G. Madec)
-   !!        !  96-01  (G. Madec)  s-coordinates
-   !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
-   !!   9.0  !  04-08  (C. Talandier) New trends organization
-   !!   9.0  !  05-11  (G. Madec) zco, zps, sco coordinate
+   !! History :  6.0  !  90-10  (B. Blanke)  Original code
+   !!            7.0  !  91-11  (G. Madec)
+   !!                 !  96-01  (G. Madec)  s-coordinates
+   !!            8.5  !  02-06  (G. Madec)  F90: Free form and module
+   !!            9.0  !  05-11  (G. Madec) zco, zps, sco coordinate
+   !!----------------------------------------------------------------------
+
    !!----------------------------------------------------------------------
    !!   tra_qsr      : trend due to the solar radiation penetration
    !!   tra_qsr_init : solar radiation penetration initialization
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and active tracers
    USE dom_oce         ! ocean space and time domain
@@ -29,25 +28,17 @@
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC tra_qsr      ! routine called by step.F90 (ln_traqsr=T)
-   PUBLIC tra_qsr_init ! routine called by opa.F90
-
-   !! * Shared module variables
-   LOGICAL, PUBLIC ::   ln_traqsr = .TRUE.   !: qsr flag (Default=T)
-
-   !! * Module variables
-   REAL(wp), PUBLIC ::  & !!! * penetrative solar radiation namelist *
-      rabs = 0.58_wp,   &  ! fraction associated with xsi1
-      xsi1 = 0.35_wp,   &  ! first depth of extinction 
-      xsi2 = 23.0_wp       ! second depth of extinction 
-      !                    ! (default values: water type Ib)
-   LOGICAL ::           & 
-      ln_qsr_sms = .false. ! flag to use or not the biological 
-      !                    ! fluxes for light 
+   PUBLIC   tra_qsr      ! routine called by step.F90 (ln_traqsr=T)
+   PUBLIC   tra_qsr_init ! routine called by opa.F90
+
+   !!* Namelist namqsr: penetrative solar radiation
+   LOGICAL , PUBLIC ::   ln_traqsr = .TRUE.   !: qsr flag (Default=T)
+   REAL(wp), PUBLIC ::   rabs = 0.58_wp       ! fraction associated with xsi1
+   REAL(wp), PUBLIC ::   xsi1 = 0.35_wp       ! first depth of extinction 
+   REAL(wp), PUBLIC ::   xsi2 = 23.0_wp       ! second depth of extinction (default values: water type Ib)
+   LOGICAL , PUBLIC ::   ln_qsr_sms = .false. ! flag to use or not the biological fluxes for light 
+   NAMELIST/namqsr/ ln_traqsr, rabs, xsi1, xsi2, ln_qsr_sms
    
-   INTEGER ::    &
-      nksr                 ! number of levels
-   REAL(wp), DIMENSION(jpk) ::   &
-      gdsr                 ! profile of the solar flux penetration
+   INTEGER ::   nksr   ! number of levels
+   REAL(wp), DIMENSION(jpk) ::   gdsr   ! profile of the solar flux penetration
 
    !! * Substitutions
@@ -57,5 +48,5 @@
    !!   OPA 9.0 , LOCEAN-IPSL (2005) 
    !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -86,27 +77,22 @@
       !! ** Action  : - update ta with the penetrative solar radiation trend
       !!              - save the trend in ttrd ('key_trdtra')
-      !!
-      !!----------------------------------------------------------------------
-      !! * Modules used     
-      USE oce, ONLY :    ztrdt => ua,   & ! use ua as 3D workspace   
-                         ztrds => va      ! use va as 3D workspace   
-
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt       ! ocean time-step
-
-      !! * Local declarations
-      INTEGER ::    ji, jj, jk            ! dummy loop indexes
-      REAL(wp) ::   zc0 , zta             ! temporary scalars
+      !!----------------------------------------------------------------------
+      USE oce, ONLY :   ztrdt => ua   ! use ua as 3D workspace   
+      USE oce, ONLY :   ztrds => va   ! use va as 3D workspace   
+      !!
+      INTEGER, INTENT(in) ::   kt     ! ocean time-step
+      !!
+      INTEGER  ::    ji, jj, jk       ! dummy loop indexes
+      REAL(wp) ::   zc0 , zta         ! temporary scalars
       !!----------------------------------------------------------------------
 
       IF( kt == nit000 ) THEN
-         IF ( lwp )  WRITE(numout,*)
-         IF ( lwp )  WRITE(numout,*) 'tra_qsr : penetration of the surface solar radiation'
-         IF ( lwp )  WRITE(numout,*) '~~~~~~~'
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_qsr : penetration of the surface solar radiation'
+         IF(lwp) WRITE(numout,*) '~~~~~~~'
          CALL tra_qsr_init
       ENDIF
 
-      ! Save ta and sa trends
-      IF( l_trdtra )   THEN
+      IF( l_trdtra ) THEN      ! Save ta and sa trends
          ztrdt(:,:,:) = ta(:,:,:) 
          ztrds(:,:,:) = 0.e0
@@ -122,11 +108,8 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  
                   zc0 = ro0cpr  / fse3t(ji,jj,jk)         ! compute the qsr trend
                   zta = zc0 * ( etot3(ji,jj,jk  ) * tmask(ji,jj,jk)     &
                      &        - etot3(ji,jj,jk+1) * tmask(ji,jj,jk+1) )
-                  
                   ta(ji,jj,jk) = ta(ji,jj,jk) + zta       ! add qsr trend to the temperature trend
-                  
                END DO
             END DO
@@ -179,13 +162,11 @@
       ENDIF
 
-      ! qsr tracers trends saved the trends for diagnostics
-      IF( l_trdtra )   THEN
+      IF( l_trdtra ) THEN     ! qsr tracers trends saved for diagnostics
          ztrdt(:,:,:) = ta(:,:,:) - ztrdt(:,:,:)
-         CALL trd_mod( ztrdt, ztrds, jpttdqsr, 'TRA', kt )
-      ENDIF
-
+         CALL trd_mod( ztrdt, ztrds, jptra_trd_qsr, 'TRA', kt )
+      ENDIF
       !                       ! print mean trends (used for debugging)
       IF(ln_ctl)   CALL prt_ctl( tab3d_1=ta, clinfo1=' qsr  - Ta: ', mask1=tmask, clinfo3='tra-ta' )
-
+      !
    END SUBROUTINE tra_qsr
 
@@ -206,23 +187,16 @@
       !! ** Action  : - initialize xsr1, xsr2 and rabs
       !!
-      !! Reference :
-      !!   Jerlov, N. G., 1968 Optical Oceanography, Elsevier, 194pp.
-      !!----------------------------------------------------------------------
-      INTEGER ::    ji,jj,jk, &  ! dummy loop index
-                    indic        ! temporary integer
-      REAL(wp) ::   zc0 , zc1 , zc2 ,   & ! temporary scalars
-         &          zcst, zdp1, zdp2      !    "         "
-
-      NAMELIST/namqsr/ ln_traqsr, rabs, xsi1, xsi2, ln_qsr_sms
-      !!----------------------------------------------------------------------
-
-      ! Read Namelist namqsr : ratio and length of penetration
-      ! --------------------
-      REWIND ( numnam )
+      !! Reference : Jerlov, N. G., 1968 Optical Oceanography, Elsevier, 194pp.
+      !!----------------------------------------------------------------------
+      INTEGER  ::   ji, jj, jk   ! dummy loop index
+      INTEGER  ::   indic        ! temporary integer
+      REAL(wp) ::   zc0 , zc1 , zc2    ! temporary scalars
+      REAL(wp) ::   zcst, zdp1, zdp2   !    "         "
+      !!----------------------------------------------------------------------
+
+      REWIND ( numnam )           ! Read Namelist namqsr : ratio and length of penetration
       READ   ( numnam, namqsr )
 
-      ! Parameter control and print
-      ! ---------------------------
-      IF( ln_traqsr  ) THEN
+      IF( ln_traqsr  ) THEN       ! Parameter control and print
          IF(lwp) THEN
             WRITE(numout,*)
@@ -248,8 +222,7 @@
          CALL ctl_stop( '             0<rabs<1, 0<xsi1, or 0<xsi2 not satisfied' )
 
-      ! Initialization of gdsr
-      ! ----------------------
+      !                           ! Initialization of gdsr
       IF( ln_zco .OR. ln_zps ) THEN
-
+         !
          ! z-coordinate with or without partial step : same w-level everywhere inside the ocean
          gdsr(:) = 0.e0
@@ -283,5 +256,5 @@
             END DO
          ENDIF
-
+         !
       ENDIF
 
@@ -302,6 +275,6 @@
             END DO
          END DO 
-       ENDIF
-
+      ENDIF
+      !
    END SUBROUTINE tra_qsr_init
 
