Index: branches/2014/dev_r4650_UKMO14.5_SST_BIAS_CORRECTION/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- branches/2014/dev_r4650_UKMO14.5_SST_BIAS_CORRECTION/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 5967)
+++ branches/2014/dev_r4650_UKMO14.5_SST_BIAS_CORRECTION/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 5972)
@@ -19,4 +19,5 @@
    !!   dom_nam        : read and contral domain namelists
    !!   dom_ctl        : control print for the ocean domain
+   !!   dom_stiff      : diagnose maximum grid stiffness/hydrostatic consistency (s-coordinate)
    !!----------------------------------------------------------------------
    USE oce             ! ocean variables
@@ -25,7 +26,4 @@
    USE phycst          ! physical constants
    USE closea          ! closed seas
-   USE in_out_manager  ! I/O manager
-   USE lib_mpp         ! distributed memory computing library
-
    USE domhgr          ! domain: set the horizontal mesh
    USE domzgr          ! domain: set the vertical mesh
@@ -36,6 +34,9 @@
    USE c1d             ! 1D vertical configuration
    USE dyncor_c1d      ! Coriolis term (c1d case)         (cor_c1d routine)
+   !
+   USE in_out_manager  ! I/O manager
+   USE lib_mpp         ! distributed memory computing library
+   USE lbclnk          ! ocean lateral boundary condition (or mpp link)
    USE timing          ! Timing
-   USE lbclnk          ! ocean lateral boundary condition (or mpp link)
 
    IMPLICIT NONE
@@ -81,5 +82,5 @@
       ENDIF
       !
-                             CALL dom_nam      ! read namelist ( namrun, namdom, namcla )
+                             CALL dom_nam      ! read namelist ( namrun, namdom )
                              CALL dom_clo      ! Closed seas and lake
                              CALL dom_hgr      ! Horizontal mesh
@@ -88,7 +89,7 @@
       IF( ln_sco )           CALL dom_stiff    ! Maximum stiffness ratio/hydrostatic consistency
       !
-      ht_0(:,:) = 0.0_wp                       ! Reference ocean depth at T-points
-      hu_0(:,:) = 0.0_wp                       ! Reference ocean depth at U-points
-      hv_0(:,:) = 0.0_wp                       ! Reference ocean depth at V-points
+      ht_0(:,:) = 0._wp                        ! Reference ocean depth at T-points
+      hu_0(:,:) = 0._wp                        ! Reference ocean depth at U-points
+      hv_0(:,:) = 0._wp                        ! Reference ocean depth at V-points
       DO jk = 1, jpk
          ht_0(:,:) = ht_0(:,:) + e3t_0(:,:,jk) * tmask(:,:,jk)
@@ -97,5 +98,5 @@
       END DO
       !
-      IF( lk_vvl )           CALL dom_vvl_init ! Vertical variable mesh
+      IF( lk_vvl         )   CALL dom_vvl_init ! Vertical variable mesh
       !
       IF( lk_c1d         )   CALL cor_c1d      ! 1D configuration: Coriolis set at T-point
@@ -131,5 +132,4 @@
       !! ** input   : - namrun namelist
       !!              - namdom namelist
-      !!              - namcla namelist
       !!              - namnc4 namelist   ! "key_netcdf4" only
       !!----------------------------------------------------------------------
@@ -146,5 +146,4 @@
          &             ppsur, ppa0, ppa1, ppkth, ppacr, ppdzmin, pphmax, ldbletanh, &
          &             ppa2, ppkth2, ppacr2
-      NAMELIST/namcla/ nn_cla
 #if defined key_netcdf4
       NAMELIST/namnc4/ nn_nchunks_i, nn_nchunks_j, nn_nchunks_k, ln_nc4zip
@@ -155,9 +154,9 @@
       REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run
       READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namrun in reference namelist', lwp )
+901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist', lwp )
 
       REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run
       READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namrun in configuration namelist', lwp )
+902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist', lwp )
       IF(lwm) WRITE ( numond, namrun )
       !
@@ -251,5 +250,5 @@
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp )
       IF(lwm) WRITE ( numond, namdom )
-
+      !
       IF(lwp) THEN
          WRITE(numout,*)
@@ -293,5 +292,5 @@
          WRITE(numout,*) '                                      ppacr2            = ', ppacr2
       ENDIF
-
+      !
       ntopo     = nn_bathy          ! conversion DOCTOR names into model names (this should disappear soon)
       e3zps_min = rn_e3zps_min
@@ -304,26 +303,4 @@
       rdtmax    = rn_rdtmin
       rdth      = rn_rdth
-
-      REWIND( numnam_ref )              ! Namelist namcla in reference namelist : Cross land advection
-      READ  ( numnam_ref, namcla, IOSTAT = ios, ERR = 905)
-905   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcla in reference namelist', lwp )
-
-      REWIND( numnam_cfg )              ! Namelist namcla in configuration namelist : Cross land advection
-      READ  ( numnam_cfg, namcla, IOSTAT = ios, ERR = 906 )
-906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcla in configuration namelist', lwp )
-      IF(lwm) WRITE( numond, namcla )
-
-      IF(lwp) THEN
-         WRITE(numout,*)
-         WRITE(numout,*) '   Namelist namcla'
-         WRITE(numout,*) '      cross land advection                 nn_cla    = ', nn_cla
-      ENDIF
-      IF ( nn_cla .EQ. 1 ) THEN
-         IF  ( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN   ! ORCA R2 
-            CONTINUE
-         ELSE
-            CALL ctl_stop( 'STOP', 'Cross land advation iplemented only for ORCA2 configuration: cp_cfg = "orca" and jp_cfg = 2 ' )
-         ENDIF
-      ENDIF
 
 #if defined key_netcdf4
@@ -409,4 +386,5 @@
    END SUBROUTINE dom_ctl
 
+
    SUBROUTINE dom_stiff
       !!----------------------------------------------------------------------
@@ -427,8 +405,8 @@
       REAL(wp), DIMENSION(4) :: zr1
       !!----------------------------------------------------------------------
-      rx1(:,:) = 0.e0
-      zrxmax   = 0.e0
-      zr1(:)   = 0.e0
-      
+      rx1(:,:) = 0._wp
+      zrxmax   = 0._wp
+      zr1(:)   = 0._wp
+      !
       DO ji = 2, jpim1
          DO jj = 2, jpjm1
@@ -455,11 +433,10 @@
          END DO
       END DO
-
       CALL lbc_lnk( rx1, 'T', 1. )
-
-      zrxmax = MAXVAL(rx1)
-
+      !
+      zrxmax = MAXVAL( rx1 )
+      !
       IF( lk_mpp )   CALL mpp_max( zrxmax ) ! max over the global domain
-
+      !
       IF(lwp) THEN
          WRITE(numout,*)
@@ -467,8 +444,6 @@
          WRITE(numout,*) '~~~~~~~~~'
       ENDIF
-
+      !
    END SUBROUTINE dom_stiff
-
-
 
    !!======================================================================
