Index: branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90
===================================================================
--- branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90	(revision 6059)
+++ branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90	(revision 6060)
@@ -12,8 +12,9 @@
    !!   dom_c1d     : Determine jpizoom/jpjzoom from a given lat/lon
    !!----------------------------------------------------------------------
-   USE phycst                        ! Physical constants (and par_oce)
-   USE iom                           ! I/O library (iom_get)
-   USE in_out_manager                ! I/O manager (ctmp1)
-   USE dom_oce , ONLY : nimpp, njmpp ! Shared/distributed memory setting (mpp_init routine)
+   USE phycst         ! Physical constants (and par_oce)
+   USE dom_oce , ONLY : nimpp, njmpp ! Shared/distributed memory setting
+   !
+   USE iom            ! I/O library (iom_get)
+   USE in_out_manager ! I/O manager (ctmp1)
    USE wrk_nemo                      ! Memory allocation
    USE timing                        ! Timing
@@ -22,8 +23,8 @@
    PRIVATE
 
-   PUBLIC   dom_c1d                  ! Routine called in domcfg.F90
-
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   PUBLIC   dom_c1d   ! called in domcfg.F90
+
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.7 , NEMO Consortium (2015)
    !! $Id$ 
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -43,4 +44,18 @@
       !! ** Action  : Recalculate jpizoom, jpjzoom (indices of C1D zoom)
       !!----------------------------------------------------------------------
+      REAL(wp), INTENT(in) ::  plat, plon    ! Column latitude &  longitude
+      !
+      INTEGER  ::  ji, jj   ! Dummy loop indices
+      INTEGER  ::  inum     ! Coordinate file handle (case 0)
+      INTEGER  ::  ijeq     ! Index of equator T point (case 4)
+      INTEGER  ::  ios      ! Local integer output status for namelist read
+      INTEGER , DIMENSION(2) ::   iloc   ! Minloc returned indices
+      REAL(wp) ::  zlon                            ! Wraparound longitude
+      REAL(wp) ::  zti, ztj, zarg                  ! Local scalars
+      REAL(wp) ::  glam0, gphi0                    ! Variables corresponding to parameters ppglam0 ppgphi0 set in par_oce
+      REAL(wp) ::  zlam1, zcos_alpha, ze1, ze1deg  ! Case 5 local scalars
+      REAL(wp) ::  zphi1, zsin_alpha, zim05, zjm05 !          
+      REAL(wp) , POINTER, DIMENSION(:,:) ::  gphidta, glamdta, zdist ! Global lat/lon
+      !!
       NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,   &
          &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,                  &
@@ -50,22 +65,4 @@
          &             ppsur, ppa0, ppa1, ppkth, ppacr, ppdzmin, pphmax, ldbletanh, &
          &             ppa2, ppkth2, ppacr2
-
-      INTEGER  ::  ji, jj                          ! Dummy loop indices
-      INTEGER  ::  inum                            ! Coordinate file handle (case 0)
-      INTEGER  ::  ijeq                            ! Index of equator T point (case 4)
-      INTEGER  ::  ios                             ! Local integer output status for namelist read
-
-      INTEGER , DIMENSION(2) ::   iloc             ! Minloc returned indices
-
-      REAL(wp), INTENT(in) ::  plat                ! Column latitude
-      REAL(wp), INTENT(in) ::  plon                ! Column longitude
-
-      REAL(wp) ::  zlon                            ! Wraparound longitude
-      REAL(wp) ::  zti, ztj, zarg                  ! Local scalars
-      REAL(wp) ::  glam0, gphi0                    ! Variables corresponding to parameters ppglam0 ppgphi0 set in par_oce
-      REAL(wp) ::  zlam1, zcos_alpha, ze1, ze1deg  ! Case 5 local scalars
-      REAL(wp) ::  zphi1, zsin_alpha, zim05, zjm05 !          "
-
-      REAL(wp) , POINTER, DIMENSION(:,:) ::  gphidta, glamdta, zdist ! Global lat/lon
       !!----------------------------------------------------------------------
 
@@ -74,13 +71,11 @@
       REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep)
       READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 901 )
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in reference namelist', lwp )
-  
+901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist', lwp )
       !
       REWIND( numnam_cfg )              ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep)
       READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp )
-
-      CALL wrk_alloc( jpidta, jpjdta, gphidta, glamdta, zdist )
-
+902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp )
+
+      CALL wrk_alloc( jpidta,jpjdta,   gphidta, glamdta, zdist )
 
       ! ============================= !
@@ -171,5 +166,4 @@
       END SELECT
 
-
       ! ============================== !
       !  Code from dom_ngb:            !
@@ -192,5 +186,5 @@
       jpjzoom = iloc(2) + njmpp - 2  ! corner index of the zoom domain.
 
-      CALL wrk_dealloc( jpidta, jpjdta, gphidta, glamdta, zdist )
+      CALL wrk_dealloc( jpidta,jpjdta,   gphidta, glamdta, zdist )
 
       IF (lwp) THEN
@@ -202,7 +196,7 @@
          WRITE(numout,*)
       ENDIF
-
+      !
       IF( nn_timing == 1 )   CALL timing_stop('dom_c1d')
-
+      !
    END SUBROUTINE dom_c1d
 
