Index: trunk/NEMO/OPA_SRC/eosbn2.F90
===================================================================
--- trunk/NEMO/OPA_SRC/eosbn2.F90	(revision 699)
+++ trunk/NEMO/OPA_SRC/eosbn2.F90	(revision 703)
@@ -5,4 +5,17 @@
    !!                                               - Brunt-Vaisala frequency 
    !!==============================================================================
+   !! History :       !  89-03  (O. Marti)  Original code
+   !!            6.0  !  94-07  (G. Madec, M. Imbard)  add bn2
+   !!            6.0  !  94-08  (G. Madec)  Add Jackett & McDougall eos
+   !!            7.0  !  96-01  (G. Madec)  statement function for e3
+   !!            8.1  !  97-07  (G. Madec)  introduction of neos, OPA8.1
+   !!            8.1  !  97-07  (G. Madec)  density instead of volumic mass
+   !!                 !  99-02  (G. Madec, N. Grima) semi-implicit pressure gradient
+   !!                 !  01-09  (M. Ben Jelloul)  bugfix onlinear eos
+   !!            8.5  !  02-10  (G. Madec)  add eos_init
+   !!            8.5  !  02-11  (G. Madec, A. Bozec)  partial step, eos_insitu_2d
+   !!            9.0  !  03-08  (G. Madec)  F90, free form
+   !!            9.0  !  06-08  (G. Madec)  add tfreez function
+   !!----------------------------------------------------------------------
 
    !!----------------------------------------------------------------------
@@ -13,7 +26,7 @@
    !!   eos_insitu_2d  : Compute the in situ density for 2d fields
    !!   eos_bn2        : Compute the Brunt-Vaisala frequency
+   !!   tfreez         : Compute the surface freezing temperature
    !!   eos_init       : set eos parameters (namelist)
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE dom_oce         ! ocean space and time domain
    USE phycst          ! physical constants
@@ -33,30 +46,28 @@
    END INTERFACE 
 
-   !! * Routine accessibility
-   PUBLIC eos        ! called by step.F90, inidtr.F90, tranpc.F90 and intgrd.F90
-   PUBLIC bn2        ! called by step.F90
-   PUBLIC eos_init   ! called by step.F90
-
-   !! * Share module variables
-   INTEGER , PUBLIC ::   &  !: nameos : ocean physical parameters
-      neos      = 0,     &  !: = 0/1/2 type of eq. of state and Brunt-Vaisala frequ.
-      neos_init = 0         !: control flag for initialization
-
-   REAL(wp), PUBLIC ::   &  !: nameos : ocean physical parameters
-      ralpha = 2.0e-4,   &  !: thermal expension coeff. (linear equation of state)
-      rbeta  = 7.7e-4       !: saline  expension coeff. (linear equation of state)
+   PUBLIC   eos        ! called by step, istate, tranpc and zpsgrd modules
+   PUBLIC   bn2        ! called by step module
+   PUBLIC   tfreez     ! called by sbcice_... modules
+
+   !!* Namelist (nameos)
+   INTEGER , PUBLIC ::   neos   = 0        !: = 0/1/2 type of eq. of state and Brunt-Vaisala frequ.
+   REAL(wp), PUBLIC ::   ralpha = 2.0e-4   !: thermal expension coeff. (linear equation of state)
+   REAL(wp), PUBLIC ::   rbeta  = 7.7e-4   !: saline  expension coeff. (linear equation of state)
+   NAMELIST/nameos/ neos, ralpha, rbeta
    
+   INTEGER ::   neos_init = 0         !: control flag for initialization
+
    !! * Substitutions
 #  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !!   OPA 9.0 , LOCEAN-IPSL (2006) 
    !! $Id$
-   !! 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)
    !!----------------------------------------------------------------------
 
 CONTAINS
 
-   SUBROUTINE eos_insitu ( ptem, psal, prd )
+   SUBROUTINE eos_insitu( ptem, psal, prd )
       !!----------------------------------------------------------------------
       !!                   ***  ROUTINE eos_insitu  ***
@@ -92,24 +103,10 @@
       !! ** Action  :   compute prd , the in situ density (no units)
       !!
-      !! References :
-      !!      Jackett, D.R., and T.J. McDougall. J. Atmos. Ocean. Tech., 1994
-      !!
-      !! History :
-      !!        !  89-03 (o. Marti)  Original code
-      !!        ! 94-08 (G. Madec)
-      !!        !  96-01 (G. Madec) statement function for e3
-      !!        !  97-07 (G. Madec) introduction of neos, OPA8.1
-      !!        !  97-07 (G. Madec) density instead of volumic mass
-      !!        !  99-02 (G. Madec, N. Grima) semi-implicit pressure gradient
-      !!        !  01-09 (M. Ben Jelloul) bugfix   
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in ) ::   &
-         ptem,                 &  ! potential temperature
-         psal                     ! salinity
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( out ) ::   &
-         prd                      ! potential density (surface referenced)
-
-      !! * Local declarations
+      !! References :   Jackett and McDougall, J. Atmos. Ocean. Tech., 1994
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::   ptem   ! potential temperature  [Celcius]
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::   psal   ! salinity               [psu]
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(  out) ::   prd    ! in situ density 
+      !!
       INTEGER ::  ji, jj, jk      ! dummy loop indices
       REAL(wp) ::   &          
@@ -119,20 +116,15 @@
          zd , zc , zaw, za ,   &  !    "         "
          zb1, za1, zkw, zk0       !    "         "
-      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   &
-         zws                      ! temporary workspace
-      !!----------------------------------------------------------------------
-
-
-      ! initialization (in not already done)
-      IF( neos_init == 0 ) CALL eos_init
-
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zws   ! temporary workspace
+      !!----------------------------------------------------------------------
+
+      IF( neos_init == 0 ) CALL eos_init      ! initialization (in not already done)
 
       SELECT CASE ( neos )
-
+      !
       CASE ( 0 )               ! Jackett and McDougall (1994) formulation
-
+         !
 !CDIR NOVERRCHK
          zws(:,:,:) = SQRT( ABS( psal(:,:,:) ) )
-
          !                                                ! ===============
          DO jk = 1, jpkm1                                 ! Horizontal slab
@@ -181,8 +173,7 @@
          END DO                                           !   End of slab
          !                                                ! ===============
-
-
+         !
       CASE ( 1 )               ! Linear formulation function of temperature only
-
+         !
          !                                                ! ===============
          DO jk = 1, jpkm1                                 ! Horizontal slab
@@ -199,8 +190,7 @@
          END DO                                           !   End of slab
          !                                                ! ===============
-
-
+         !
       CASE ( 2 )               ! Linear formulation function of temperature and salinity
-
+         !
          !                                                ! ===============
          DO jk = 1, jpkm1                                 ! Horizontal slab
@@ -217,20 +207,18 @@
          END DO                                           !   End of slab
          !                                                ! ===============
-
+         !
       CASE DEFAULT
-
+         !
          WRITE(ctmp1,*) '          bad flag value for neos = ', neos
          CALL ctl_stop( ctmp1 )
-
+         !
       END SELECT
-
-      IF(ln_ctl)   THEN
-         CALL prt_ctl(tab3d_1=prd, clinfo1=' eos  : ', ovlap=1, kdim=jpk)
-      ENDIF
-
+      !
+      IF(ln_ctl)   CALL prt_ctl(tab3d_1=prd, clinfo1=' eos  : ', ovlap=1, kdim=jpk)
+      !
    END SUBROUTINE eos_insitu
 
 
-   SUBROUTINE eos_insitu_pot ( ptem, psal, prd, prhop)
+   SUBROUTINE eos_insitu_pot( ptem, psal, prd, prhop )
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE eos_insitu_pot  ***
@@ -275,45 +263,27 @@
       !!              - prhop, the potential volumic mass (Kg/m3)
       !!
-      !! References :
-      !!      Jackett, D.R., and T.J. McDougall. J. Atmos. Ocean. Tech., 1994
-      !!      Brown, J. A. and K. A. Campana. Mon. Weather Rev., 1978
-      !!
-      !! History :
-      !!   4.0  !  89-03  (O. Marti)
-      !!        !  94-08  (G. Madec)
-      !!        !  96-01  (G. Madec) statement function for e3
-      !!        !  97-07  (G. Madec) introduction of neos, OPA8.1
-      !!        !  97-07  (G. Madec) density instead of volumic mass
-      !!        !  99-02  (G. Madec, N. Grima) semi-implicit pressure gradient
-      !!        !  01-09  (M. Ben Jelloul) bugfix   
-      !!   9.0  !  03-08  (G. Madec)  F90, free form
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in ) ::   &
-         ptem,   &  ! potential temperature
-         psal       ! salinity
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( out ) ::   &
-         prd,    &  ! potential density (surface referenced)
-         prhop      ! potential density (surface referenced)
-
-      !! * Local declarations
+      !! References :   Jackett and McDougall, J. Atmos. Ocean. Tech., 1994
+      !!                Brown and Campana, Mon. Weather Rev., 1978
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::   ptem   ! potential temperature  [Celcius]
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::   psal   ! salinity               [psu]
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(  out) ::   prd    ! in situ density 
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(  out) ::   prhop  ! potential density (surface referenced)
+
       INTEGER  ::  ji, jj, jk                ! dummy loop indices
       REAL(wp) ::   &             ! temporary scalars
          zt, zs, zh, zsr, zr1, zr2, zr3, zr4, zrhop, ze, zbw,   &
          zb, zd, zc, zaw, za, zb1, za1, zkw, zk0
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zws
-      !!----------------------------------------------------------------------
-
-      ! initialization (in not already done)
-      IF( neos_init == 0 ) CALL eos_init
-
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zws
+      !!----------------------------------------------------------------------
+
+      IF( neos_init == 0 ) CALL eos_init      ! initialization (in not already done)
 
       SELECT CASE ( neos )
-
+      !
       CASE ( 0 )               ! Jackett and McDougall (1994) formulation
-
+         !
 !CDIR NOVERRCHK
          zws(:,:,:) = SQRT( ABS( psal(:,:,:) ) )
-
          !                                                ! ===============
          DO jk = 1, jpkm1                                 ! Horizontal slab
@@ -326,5 +296,4 @@
                   zh = fsdept(ji,jj,jk)
                   ! square root salinity
-!!Edmee           zsr= SQRT( ABS( zs ) )
                   zsr= zws(ji,jj,jk)
                   ! compute volumic mass pure water at atm pressure
@@ -366,8 +335,7 @@
          END DO                                           !   End of slab
          !                                                ! ===============
-
-
+         !
       CASE ( 1 )               ! Linear formulation function of temperature only
-
+         !
          !                                                ! ===============
          DO jk = 1, jpkm1                                 ! Horizontal slab
@@ -385,8 +353,7 @@
          END DO                                           !   End of slab
          !                                                ! ===============
-
-
+         !
       CASE ( 2 )               ! Linear formulation function of temperature and salinity
-
+         !
          !                                                ! ===============
          DO jk = 1, jpkm1                                 ! Horizontal slab
@@ -404,19 +371,18 @@
          END DO                                           !   End of slab
          !                                                ! ===============
-
+         !
       CASE DEFAULT
-
+         !
          WRITE(ctmp1,*) '          bad flag value for neos = ', neos
          CALL ctl_stop( ctmp1 )
-
+         !
       END SELECT
-
-      IF(ln_ctl)   THEN
-         CALL prt_ctl(tab3d_1=prd, clinfo1=' eos-p: ', tab3d_2=prhop, clinfo2=' pot : ', ovlap=1, kdim=jpk)
-      ENDIF
-
+      !
+      IF(ln_ctl)   CALL prt_ctl( tab3d_1=prd, clinfo1=' eos-p: ', tab3d_2=prhop, clinfo2=' pot : ', ovlap=1, kdim=jpk )
+      !
    END SUBROUTINE eos_insitu_pot
 
-   SUBROUTINE eos_insitu_2d ( ptem, psal, pdep, prd )
+
+   SUBROUTINE eos_insitu_2d( ptem, psal, pdep, prd )
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE eos_insitu_2d  ***
@@ -452,37 +418,27 @@
       !! ** Action  : - prd , the in situ density (no units)
       !!
-      !! References :
-      !!      Jackett, D.R., and T.J. McDougall. J. Atmos. Ocean. Tech., 1994
-      !!
-      !! History :
-      !!   8.5  !  02-11  (G. Madec, A. Bozec)  partial step
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      REAL(wp), DIMENSION(jpi,jpj), INTENT( in ) ::   &
-         ptem,                           &  ! potential temperature
-         psal,                           &  ! salinity
-         pdep                               ! depth
-      REAL(wp), DIMENSION(jpi,jpj), INTENT( out ) ::   &
-         prd                                ! potential density (surface referenced)
-
-      !! * Local declarations
-      INTEGER ::  ji, jj                    ! dummy loop indices
+      !! References :   Jackett and McDougall, J. Atmos. Ocean. Tech., 1994
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) ::   ptem   ! potential temperature  [Celcius]
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) ::   psal   ! salinity               [psu]
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) ::   pdep   ! depth                  [m]
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) ::   prd    ! in situ density 
+      !!
+      INTEGER  ::  ji, jj                    ! dummy loop indices
       REAL(wp) ::   &             ! temporary scalars
          zt, zs, zh, zsr, zr1, zr2, zr3, zr4, zrhop, ze, zbw,   &
          zb, zd, zc, zaw, za, zb1, za1, zkw, zk0,               &
          zmask
-      REAL(wp), DIMENSION(jpi,jpj) :: zws
-      !!----------------------------------------------------------------------
-
-
-      ! initialization (in not already done)
-      IF( neos_init == 0 ) CALL eos_init
+      REAL(wp), DIMENSION(jpi,jpj) ::   zws
+      !!----------------------------------------------------------------------
+
+      IF( neos_init == 0 ) CALL eos_init      ! initialization (in not already done)
 
       prd(:,:) = 0.e0
 
       SELECT CASE ( neos )
-
+      !
       CASE ( 0 )               ! Jackett and McDougall (1994) formulation
-
+      !
 !CDIR NOVERRCHK
          DO jj = 1, jpjm1
@@ -496,5 +452,4 @@
             END DO
          END DO
-
          !                                                ! ===============
          DO jj = 1, jpjm1                                 ! Horizontal slab
@@ -505,5 +460,4 @@
             DO ji = 1, fs_jpim1   ! vector opt.
 #endif
-
                zmask = tmask(ji,jj,1)      ! land/sea bottom mask = surf. mask
 
@@ -543,13 +497,12 @@
                ! masked in situ density anomaly
                prd(ji,jj) = ( zrhop / (  1.0 - zh / ( zk0 - zh * ( za - zh * zb ) )  ) - rau0 )   &
-                          / rau0 * zmask
-            END DO
-            !                                             ! ===============
-         END DO                                           !   End of slab
-         !                                                ! ===============
-
-
+                  &       / rau0 * zmask
+            END DO
+            !                                             ! ===============
+         END DO                                           !   End of slab
+         !                                                ! ===============
+         !
       CASE ( 1 )               ! Linear formulation function of temperature only
-
+         !
          !                                                ! ===============
          DO jj = 1, jpjm1                                 ! Horizontal slab
@@ -565,8 +518,7 @@
          END DO                                           !   End of slab
          !                                                ! ===============
-
-
+         !
       CASE ( 2 )               ! Linear formulation function of temperature and salinity
-
+         !
          !                                                ! ===============
          DO jj = 1, jpjm1                                 ! Horizontal slab
@@ -582,14 +534,14 @@
          END DO                                           !   End of slab
          !                                                ! ===============
-
+         !
       CASE DEFAULT
-
+         !
          WRITE(ctmp1,*) '          bad flag value for neos = ', neos
          CALL ctl_stop( ctmp1 )
-
+         !
       END SELECT
 
-      IF(ln_ctl)   CALL prt_ctl(tab2d_1=prd, clinfo1=' eos2d: ')
-
+      IF(ln_ctl)   CALL prt_ctl( tab2d_1=prd, clinfo1=' eos2d: ' )
+      !
    END SUBROUTINE eos_insitu_2d
 
@@ -623,31 +575,17 @@
       !! ** Action  : - pn2 : the brunt-vaisala frequency
       !!
-      !! References :
-      !!      McDougall, T. J., J. Phys. Oceanogr., 17, 1950-1964, 1987.
-      !!
-      !! History :
-      !!   6.0  !  94-07  (G. Madec, M. Imbard)  Original code
-      !!   8.0  !  97-07  (G. Madec) introduction of statement functions
-      !!   8.5  !  02-07  (G. Madec) Free form, F90
-      !!   8.5  !  02-08  (G. Madec) introduction of arguments
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in ) ::   &
-         ptem,                           &  ! potential temperature
-         psal                               ! salinity
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( out ) ::   &
-         pn2                               ! Brunt-Vaisala frequency
-
-      !! * Local declarations
+      !! References :   McDougall, J. Phys. Oceanogr., 17, 1950-1964, 1987.
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::   ptem   ! potential temperature   [Celcius]
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::   psal   ! salinity                [psu]
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(  out) ::   pn2    ! Brunt-Vaisala frequency [s-1]
+
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
-      REAL(wp) ::   &
-         zgde3w, zt, zs, zh,  &  ! temporary scalars 
-         zalbet, zbeta           !    "         "
+      REAL(wp) ::   zgde3w, zt, zs, zh,  &  ! temporary scalars 
+         &          zalbet, zbeta           !    "         "
 #if defined key_zdfddm
       REAL(wp) ::   zds          ! temporary scalars
 #endif
       !!----------------------------------------------------------------------
-      !!  OPA8.5, LODYC-IPSL (2002)
-      !!----------------------------------------------------------------------
 
       ! pn2 : first and last levels
@@ -660,7 +598,7 @@
 
       SELECT CASE ( neos )
-
+      !
       CASE ( 0 )               ! Jackett and McDougall (1994) formulation
-
+         !
          !                                                ! ===============
          DO jk = 2, jpkm1                                 ! Horizontal slab
@@ -712,8 +650,7 @@
          END DO                                           !   End of slab
          !                                                ! ===============
-
-
+         !
       CASE ( 1 )               ! Linear formulation function of temperature only
-
+         !
          !                                                ! ===============
          DO jk = 2, jpkm1                                 ! Horizontal slab
@@ -728,8 +665,7 @@
          END DO                                           !   End of slab
          !                                                ! ===============
-
-
+         !
       CASE ( 2 )               ! Linear formulation function of temperature and salinity
-
+         !
          !                                                ! ===============
          DO jk = 2, jpkm1                                 ! Horizontal slab
@@ -756,22 +692,40 @@
          END DO                                           !   End of slab
          !                                                ! ===============
-
+         !
       CASE DEFAULT
-
+         !
          WRITE(ctmp1,*) '          bad flag value for neos = ', neos
          CALL ctl_stop( ctmp1 )
-
+         !
       END SELECT
 
-      IF(ln_ctl)   THEN
-         CALL prt_ctl(tab3d_1=pn2, clinfo1=' bn2  : ', ovlap=1, kdim=jpk)
+      IF(ln_ctl)   CALL prt_ctl(tab3d_1=pn2, clinfo1=' bn2  : ', ovlap=1, kdim=jpk)
 #if defined key_zdfddm
-         CALL prt_ctl(tab3d_1=rrau, clinfo1=' rrau : ', ovlap=1, kdim=jpk)
+      IF(ln_ctl)   CALL prt_ctl(tab3d_1=rrau, clinfo1=' rrau : ', ovlap=1, kdim=jpk)
 #endif
-      ENDIF
-
+      !
    END SUBROUTINE eos_bn2
 
 
+   FUNCTION tfreez( psal ) RESULT( ptf )
+      !!----------------------------------------------------------------------
+      !!                 ***  ROUTINE eos_init  ***
+      !!
+      !! ** Purpose :   Compute the sea surface freezing temperature [Celcius]
+      !!
+      !! ** Method  :   UNESCO freezing point at the surface (pressure = 0???)
+      !!       freezing point [Celcius]=(-.0575+1.710523e-3*sqrt(abs(s))-2.154996e-4*s)*s-7.53e-4*p
+      !!       checkvalue: tf= -2.588567 Celsius for s=40.0psu, p=500. decibars
+      !!
+      !! Reference  :   UNESCO tech. papers in the marine science no. 28. 1978
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) ::   psal   ! salinity             [psu]
+      REAL(wp), DIMENSION(jpi,jpj)                ::   ptf    ! freezing temperature [Celcius]
+      !!----------------------------------------------------------------------
+      ptf(:,:) = ( - 0.0575 + 1.710523e-3 * SQRT( psal(:,:) )   &
+         &                  - 2.154996e-4 *       psal(:,:)   ) * psal(:,:)
+   END FUNCTION tfreez
+
+
    SUBROUTINE eos_init
       !!----------------------------------------------------------------------
@@ -780,23 +734,10 @@
       !! ** Purpose :   initializations for the equation of state
       !!
-      !! ** Method  :   Read the namelist nameos
-      !!
-      !! ** Action  :   blahblah....
-      !!
-      !! History :
-      !!   8.5  !  02-10  (G. Madec)  Original code
-      !!----------------------------------------------------------------------
-      NAMELIST/nameos/ neos, ralpha, rbeta
-      !!----------------------------------------------------------------------
-      !!  OPA 8.5, LODYC-IPSL (2002)
-      !!----------------------------------------------------------------------
-
-      ! set the initialization flag to 1
-      neos_init = 1           ! indicate that the initialization has been done
-
-      ! namelist nameos : ocean physical parameters
-
-      ! Read Namelist nameos : equation of state
-      REWIND( numnam )
+      !! ** Method  :   Read the namelist nameos and control the parameters
+      !!----------------------------------------------------------------------
+
+      neos_init = 1               ! indicate that the initialization has been done
+
+      REWIND( numnam )            ! Read Namelist nameos : equation of state
       READ  ( numnam, nameos )
 
@@ -807,9 +748,7 @@
          WRITE(numout,*) '~~~~~~~~'
          WRITE(numout,*) '          Namelist nameos : set eos parameters'
-         WRITE(numout,*)
          WRITE(numout,*) '             flag for eq. of state and N^2  neos   = ', neos
          WRITE(numout,*) '             thermal exp. coef. (linear)    ralpha = ', ralpha
          WRITE(numout,*) '             saline  exp. coef. (linear)    rbeta  = ', rbeta
-         WRITE(numout,*)
       ENDIF
 
@@ -817,23 +756,21 @@
 
       CASE ( 0 )               ! Jackett and McDougall (1994) formulation
-
+         IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          use of Jackett & McDougall (1994) equation of state and'
          IF(lwp) WRITE(numout,*) '                 McDougall (1987) Brunt-Vaisala frequency'
-
+         !
       CASE ( 1 )               ! Linear formulation function of temperature only
-
+         IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          use of linear eos rho(T) = rau0 * ( 1.0285 - ralpha * T )'
          IF( lk_zdfddm ) CALL ctl_stop( '          double diffusive mixing parameterization requires',   &
               &                         ' that T and S are used as state variables' )
-
+         !
       CASE ( 2 )               ! Linear formulation function of temperature and salinity
-
+         IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          use of linear eos rho(T,S) = rau0 * ( rbeta * S - ralpha * T )'
-
-      CASE DEFAULT
-
+         !
+      CASE DEFAULT             ! E R R O R in neos 
          WRITE(ctmp1,*) '          bad flag value for neos = ', neos
          CALL ctl_stop( ctmp1 )
-
       END SELECT
 
