Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/ARCH/CMCC/arch-ifort_athena.fcm
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/ARCH/CMCC/arch-ifort_athena.fcm	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/ARCH/CMCC/arch-ifort_athena.fcm	(revision 5282)
@@ -15,6 +15,6 @@
 
 
-%NCDF_INC -I$NETCDF/include
-%NCDF_LIB -L$NETCDF/lib -lnetcdf -lnetcdff
+%NCDF_INC -I${NETCDF}/include
+%NCDF_LIB -L${NETCDF}/lib -lnetcdf -lnetcdff
 %CPP                 cpp
 %FC mpiifort
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/ARCH/CMCC/arch-ifort_athena_xios.fcm
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/ARCH/CMCC/arch-ifort_athena_xios.fcm	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/ARCH/CMCC/arch-ifort_athena_xios.fcm	(revision 5282)
@@ -32,25 +32,27 @@
 
 # required modules
-# module load  INTEL/intel_xe_2013 NETCDF/netcdf-4.3_parallel NETCDF/parallel-netcdf-1.3.1 HDF5/hdf5-1.8.11_parallel
+# module load  INTEL/intel_xe_2013 NETCDF/netcdf-4.3_parallel_shared NETCDF/parallel-netcdf-1.3.1 HDF5/hdf5-1.8.11_parallel_shared
 
 # Environment variables set by user. Others should automatically define when loading modules.
-# export XIOS=/users/home/models/nemo/xios
+#export XIOS=/users/home/models/nemo/xios
+#export HDF5=/users/home/opt/hdf5/hdf5-1.8.11_parallel_shared
+#export NETCDF=/users/home/opt/netcdf/netcdf-4.3_parallel_shared
 
-%NCDF_INC            -I$NETCDF/include -I$PNETCDF/include
-%NCDF_LIB            -L$NETCDF/lib -lnetcdff -lnetcdf -L$PNETCDF/lib -lpnetcdf
-%HDF5_INC            -I$PHDF5/include
-%HDF5_LIB            -L$PHDF5/lib -lhdf5_hl -lhdf5
+%NCDF_INC            -I${NETCDF}/include 
+%NCDF_LIB            -L${NETCDF}/lib -lnetcdff -lnetcdf
+%HDF5_INC            -I$HDF5/include
+%HDF5_LIB            -L$HDF5/lib -lhdf5_hl -lhdf5 
 %XIOS_INC            -I$XIOS/inc
 %XIOS_LIB            -L$XIOS/lib -lxios
 %CPP                 cpp
 %FC                  mpiifort
-%FCFLAGS             -r8 -O3 -xHost -fp-model source -traceback
+%FCFLAGS             -r8 -O3 -xHost -fp-model source -traceback ${CFLAGS} 
 %FFLAGS              %FCFLAGS
 %LD                  mpiifort
 %FPPFLAGS            -P -C -traditional
-%LDFLAGS             -lstdc++ -lz -lgpfs -lcurl
+%LDFLAGS             -lstdc++ -lz -lgpfs -lcurl  ${LDFLAGS}
 %AR                  ar 
 %ARFLAGS             -r
 %MK                  gmake
-%USER_INC            %XIOS_INC %NCDF_INC %HDF5_INC
+%USER_INC            %XIOS_INC %NCDF_INC %HDF5_INC 
 %USER_LIB            %XIOS_LIB %NCDF_LIB %HDF5_LIB
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 5282)
@@ -50,7 +50,4 @@
 !-----------------------------------------------------------------------
    rn_rdt      =   600.    !  time step for the dynamics (and tracer if nn_acc=0)
-   rn_rdtmin   =   600.          !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   =   600.          !  maximum time step on tracers (used if nn_acc=1)
-   rn_rdth     =   600.          !  depth variation of tracer time step  (used if nn_acc=1)
    ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
    ppgphi0     =  999999.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
@@ -422,6 +419,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg	(revision 5282)
@@ -41,7 +41,5 @@
    rn_bathy    = 4198.     !  value of the bathymetry. if (=0) bottom flat at jpkm1
    nn_msh      =    0      !  create (=1) a mesh file or not (=0)
-   rn_rdt      =  360.     !  time step for the dynamics (and tracer if nn_acc=0)
-   rn_rdtmin   =  360.           !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   =  360.           !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdt      =  360.     !  time step for the dynamics 
    jphgr_msh   =       1                 !  type of horizontal mesh
    ppglam0     =    -150.0               !  longitude of first raw and column T-point (jphgr_msh = 1)
@@ -174,8 +172,4 @@
 /
 !-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobc        !   open boundaries parameters                           ("key_obc")
 !-----------------------------------------------------------------------
@@ -356,7 +350,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-   ln_neptramp       = .false.  ! ramp down Neptune velocity in shallow water
-/
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg	(revision 5282)
@@ -43,7 +43,5 @@
 !-----------------------------------------------------------------------
    nn_bathy    =    0      !  compute (=0) or read (=1) the bathymetry file
-   rn_rdt      = 7200.     !  time step for the dynamics (and tracer if nn_acc=0)
-   rn_rdtmin   = 7200.           !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   = 7200.           !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdt      = 7200.     !  time step for the dynamics 
    jphgr_msh   =       5                 !  type of horizontal mesh
    ppglam0     =       0.0               !  longitude of first raw and column T-point (jphgr_msh = 1)
@@ -156,8 +154,4 @@
 /
 !-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobc        !   open boundaries parameters                           ("key_obc")
 !-----------------------------------------------------------------------
@@ -376,7 +370,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-   ln_neptramp       = .false.  ! ramp down Neptune velocity in shallow water
-/
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg	(revision 5282)
@@ -46,7 +46,5 @@
 !-----------------------------------------------------------------------
    nn_bathy    =    0      !  compute (=0) or read (=1) the bathymetry file
-   rn_rdt      = 7200.     !  time step for the dynamics (and tracer if nn_acc=0)
-   rn_rdtmin   = 7200.           !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   = 7200.           !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdt      = 7200.     !  time step for the dynamics 
    jphgr_msh   =       5                 !  type of horizontal mesh
    ppglam0     =       0.0               !  longitude of first raw and column T-point (jphgr_msh = 1)
@@ -161,8 +159,4 @@
 /
 !-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobc        !   open boundaries parameters                           ("key_obc")
 !-----------------------------------------------------------------------
@@ -358,7 +352,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-   ln_neptramp       = .false.  ! ramp down Neptune velocity in shallow water
-/
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 5282)
@@ -36,7 +36,5 @@
 !-----------------------------------------------------------------------
    nn_bathy    =    0      !  compute (=0) or read (=1) the bathymetry file
-   rn_rdt      = 7200.     !  time step for the dynamics (and tracer if nn_acc=0)
-   rn_rdtmin   = 7200.           !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   = 7200.           !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdt      = 7200.     !  time step for the dynamics 
    jphgr_msh   =       5                 !  type of horizontal mesh
    ppglam0     =       0.0               !  longitude of first raw and column T-point (jphgr_msh = 1)
@@ -104,8 +102,4 @@
 /
 !-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nambfr        !   bottom friction
 !-----------------------------------------------------------------------
@@ -213,7 +207,3 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-   ln_neptramp       = .false.  ! ramp down Neptune velocity in shallow water
-/
+
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg	(revision 5282)
@@ -40,8 +40,6 @@
 !-----------------------------------------------------------------------
    nn_bathy    =    0      !  compute (=0) or read (=1) the bathymetry file
-   rn_rdt      = 7200.     !  time step for the dynamics (and tracer if nn_acc=0)
+   rn_rdt      = 7200.     !  time step for the dynamics 
 !   nn_baro     =   60      !  number of barotropic time step            ("key_dynspg_ts")
-   rn_rdtmin   = 7200.           !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   = 7200.           !  maximum time step on tracers (used if nn_acc=1)
    jphgr_msh   =       5                 !  type of horizontal mesh
    ppglam0     =       0.0               !  longitude of first raw and column T-point (jphgr_msh = 1)
@@ -150,8 +148,4 @@
 /
 !-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobc        !   open boundaries parameters                           ("key_obc")
 !-----------------------------------------------------------------------
@@ -195,5 +189,5 @@
 &nameos        !   ocean physical parameters
 !-----------------------------------------------------------------------
-   nn_eos      =   2       !  type of equation of state and Brunt-Vaisala frequency
+   nn_eos      =   0       !  type of equation of state and Brunt-Vaisala frequency
 /
 !-----------------------------------------------------------------------
@@ -330,7 +324,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-   ln_neptramp       = .false.  ! ramp down Neptune velocity in shallow water
-/
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ISOMIP/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ISOMIP/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ISOMIP/EXP00/namelist_cfg	(revision 5282)
@@ -5,5 +5,5 @@
 !!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,
 !!                                    namsbc_apr, namsbc_ssr, namsbc_alb)
-!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide)
+!!              4 - lateral boundary (namlbc, namobc, namagrif, nambdy, nambdy_tide)
 !!              5 - bottom  boundary (nambfr, nambbc, nambbl)
 !!              6 - Tracer           (nameos, namtra_adv, namtra_ldf, namtra_dmp)
@@ -41,5 +41,4 @@
    nn_stock    =  999999   !  frequency of creation of a restart file (modulo referenced to 1)
    nn_write    =  999999   !  frequency of write in the output file   (modulo referenced to nn_it000)
-   ln_dimgnnn  = .false.   !  DIMG file format: 1 file for all processors (F) or by processor (T)
    ln_mskland  = .false.   !  mask land points in NetCDF outputs (costly: + ~15%)
    ln_clobber  = .false.   !  clobber (overwrite) an existing file
@@ -99,11 +98,6 @@
    rn_e3zps_rat=    0.1    !  rn_e3zps_min and rn_e3zps_rat*e3t, with 0<rn_e3zps_rat<1
                            !
-   rn_rdt      = 1800.     !  time step for the dynamics (and tracer if nn_acc=0)
+   rn_rdt      = 1800.     !  time step for the dynamics 
    rn_atfp     =    0.1    !  asselin time filter parameter
-   nn_acc      =    0      !  acceleration of convergence : =1      used, rdt < rdttra(k)
-                                 !                          =0, not used, rdt = rdttra
-   rn_rdtmin   = 1800.           !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   = 1800.           !  maximum time step on tracers (used if nn_acc=1)
-   rn_rdth     =  800.           !  depth variation of tracer time step  (used if nn_acc=1)
    ln_crs      = .false.      !  Logical switch for coarsening module
    jphgr_msh   =       1               !  type of horizontal mesh
@@ -290,5 +284,4 @@
 !!======================================================================
 !!   namlbc        lateral momentum boundary condition
-!!   namcla        cross land advection
 !!   namobc        open boundaries parameters                           ("key_obc")
 !!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif")
@@ -302,8 +295,4 @@
    rn_shlat    =    0.     !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
                            !  free slip  !   partial slip  !   no slip   ! strong slip
-/
-!-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -420,6 +409,4 @@
    !                                           (normally=0; not used with Griffies)
    rn_slpmax        =     0.01  !  slope limit
-   rn_chsmag        =     1.    !  multiplicative factor in Smagorinsky diffusivity
-   rn_smsh          =     1.    !  Smagorinsky diffusivity: = 0 - use only sheer
    rn_aht_m         =   100.    !  upper limit or stability criteria for lateral eddy diffusivity (m2/s)
 /
@@ -482,7 +469,4 @@
    rn_ahmb_0        =     0.    !  background eddy viscosity for ldf_iso [m2/s]
    rn_ahm_0_blp     =     0.    !  horizontal bilaplacian eddy viscosity [m4/s]
-   rn_cmsmag_1      =     3.    !  constant in laplacian Smagorinsky viscosity
-   rn_cmsmag_2      =     3     !  constant in bilaplacian Smagorinsky viscosity
-   rn_cmsh          =     1.    !  1 or 0 , if 0 -use only shear for Smagorinsky viscosity
    rn_ahm_m_blp     =    -1.e12 !  upper limit for bilap  abs(ahm) < min( dx^4/128rdt, rn_ahm_m_blp)
    rn_ahm_m_lap     =   600.    !  upper limit for lap  ahm < min(dx^2/16rdt, rn_ahm_m_lap)
@@ -659,6 +643,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 5282)
@@ -50,7 +50,5 @@
    ppkth2      =  999999.              !
    ppacr2      =  999999.              !
-   rn_rdt      = 2880.     !  time step for the dynamics (and tracer if nn_acc=0)
-   rn_rdtmin   = 14400.          !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   = 14400.          !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdt      = 2880.     !  time step for the dynamics 
 /
 !-----------------------------------------------------------------------
@@ -117,8 +115,4 @@
 /
 !-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namagrif      !  AGRIF zoom                                            ("key_agrif")
 !-----------------------------------------------------------------------
@@ -218,8 +212,4 @@
 /
 !-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobs       !  observation usage                                      ('key_diaobs')
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 5282)
@@ -93,8 +93,4 @@
 /
 !-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nambfr        !   bottom friction
 !-----------------------------------------------------------------------
@@ -185,8 +181,4 @@
 /
 !-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobs       !  observation usage                                      ('key_diaobs')
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg	(revision 5282)
@@ -50,7 +50,5 @@
    ppkth2      =  999999.              !
    ppacr2      =  999999.              !
-   rn_rdt      = 2880.     !  time step for the dynamics (and tracer if nn_acc=0)
-   rn_rdtmin   = 14400.          !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   = 14400.          !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdt      = 2880.     !  time step for the dynamics
 /
 !-----------------------------------------------------------------------
@@ -117,8 +115,4 @@
 /
 !-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namagrif      !  AGRIF zoom                                            ("key_agrif")
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 5282)
@@ -93,8 +93,4 @@
 /
 !-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nambfr        !   bottom friction
 !-----------------------------------------------------------------------
@@ -187,6 +183,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg	(revision 5282)
@@ -5,5 +5,5 @@
 !!                                    namsbc_cpl, namtra_qsr, namsbc_rnf, 
 !!                                    namsbc_apr, namsbc_ssr, namsbc_alb)
-!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide)
+!!              4 - lateral boundary (namlbc, namobc, namagrif, nambdy, nambdy_tide)
 !!              5 - bottom  boundary (nambfr, nambbc, nambbl)
 !!              6 - Tracer           (nameos, namtra_adv, namtra_ldf, namtra_dmp)
@@ -40,5 +40,4 @@
    nn_stock    =   10950   !  frequency of creation of a restart file (modulo referenced to 1)
    nn_write    =   10950   !  frequency of write in the output file   (modulo referenced to nn_it000)
-   ln_dimgnnn  = .false.   !  DIMG file format: 1 file for all processors (F) or by processor (T)
    ln_mskland  = .false.   !  mask land points in NetCDF outputs (costly: + ~15%)
    ln_clobber  = .false.   !  clobber (overwrite) an existing file
@@ -85,12 +84,7 @@
    rn_e3zps_rat=    0.1    !  rn_e3zps_min and rn_e3zps_rat*e3t, with 0<rn_e3zps_rat<1
                            !
-   rn_rdt      = 2880.     !  time step for the dynamics (and tracer if nn_acc=0)
+   rn_rdt      = 2880.     !  time step for the dynamics 
    nn_baro     =   64      !  number of barotropic time step            ("key_dynspg_ts")
    rn_atfp     =    0.1    !  asselin time filter parameter
-   nn_acc      =    0      !  acceleration of convergence : =1      used, rdt < rdttra(k)
-                                 !                          =0, not used, rdt = rdttra
-   rn_rdtmin   = 14400.          !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   = 14400.          !  maximum time step on tracers (used if nn_acc=1)
-   rn_rdth     =  800.           !  depth variation of tracer time step  (used if nn_acc=1)
 /
 !-----------------------------------------------------------------------
@@ -302,5 +296,4 @@
 !!======================================================================
 !!   namlbc        lateral momentum boundary condition
-!!   namcla        cross land advection
 !!   namobc        open boundaries parameters                           ("key_obc")
 !!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif") 
@@ -314,9 +307,4 @@
    rn_shlat    =    2.     !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
                            !  free slip  !   partial slip  !   no slip   ! strong slip
-/
-!-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-   nn_cla      =    0      !  advection between 2 ocean pts separates by land
 /
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg	(revision 5282)
@@ -132,8 +132,4 @@
 /
 !-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobc        !   open boundaries parameters                           ("key_obc")
 !-----------------------------------------------------------------------
@@ -291,6 +287,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 5282)
@@ -93,8 +93,4 @@
 /
 !-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nambfr        !   bottom friction
 !-----------------------------------------------------------------------
@@ -184,6 +180,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg	(revision 5282)
@@ -32,7 +32,5 @@
 !-----------------------------------------------------------------------
    nn_msh      =    1      !  create (=1) a mesh file or not (=0)
-   rn_rdt      = 21600.    !  time step for the dynamics (and tracer if nn_acc=0)
-   rn_rdtmin   = 21600.          !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   = 21600.          !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdt      = 21600.    !  time step for the dynamics 
    jphgr_msh   =       0               !  type of horizontal mesh
    ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
@@ -77,9 +75,4 @@
 !-----------------------------------------------------------------------
 /      
-
-!-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-/
 !-----------------------------------------------------------------------
 &nambbl        !   bottom boundary layer scheme
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5282)
@@ -5,5 +5,5 @@
 !!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,
 !!                                    namsbc_apr, namsbc_ssr, namsbc_alb)
-!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide)
+!!              4 - lateral boundary (namlbc, namobc, namagrif, nambdy, nambdy_tide)
 !!              5 - bottom  boundary (nambfr, nambbc, nambbl)
 !!              6 - Tracer           (nameos, namtra_adv, namtra_ldf, namtra_dmp)
@@ -41,5 +41,4 @@
    nn_stock    =    5475   !  frequency of creation of a restart file (modulo referenced to 1)
    nn_write    =    5475   !  frequency of write in the output file   (modulo referenced to nn_it000)
-   ln_dimgnnn  = .false.   !  DIMG file format: 1 file for all processors (F) or by processor (T)
    ln_mskland  = .false.   !  mask land points in NetCDF outputs (costly: + ~15%)
    ln_clobber  = .false.   !  clobber (overwrite) an existing file
@@ -121,11 +120,6 @@
    rn_e3zps_rat=    0.1    !  rn_e3zps_min and rn_e3zps_rat*e3t, with 0<rn_e3zps_rat<1
                            !
-   rn_rdt      = 5760.     !  time step for the dynamics (and tracer if nn_acc=0)
+   rn_rdt      = 5760.     !  time step for the dynamics 
    rn_atfp     =    0.1    !  asselin time filter parameter
-   nn_acc      =    0      !  acceleration of convergence : =1      used, rdt < rdttra(k)
-                                 !                          =0, not used, rdt = rdttra
-   rn_rdtmin   = 28800.          !  minimum time step on tracers (used if nn_acc=1)
-   rn_rdtmax   = 28800.          !  maximum time step on tracers (used if nn_acc=1)
-   rn_rdth     =  800.           !  depth variation of tracer time step  (used if nn_acc=1)
    ln_crs      = .false.      !  Logical switch for coarsening module
    jphgr_msh   =       0               !  type of horizontal mesh
@@ -526,5 +520,4 @@
 !!======================================================================
 !!   namlbc        lateral momentum boundary condition
-!!   namcla        cross land advection
 !!   namobc        open boundaries parameters                           ("key_obc")
 !!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif")
@@ -539,9 +532,4 @@
                            !  free slip  !   partial slip  !   no slip   ! strong slip
    ln_vorlat   = .false.   !  consistency of vorticity boundary condition with analytical eqs.
-/
-!-----------------------------------------------------------------------
-&namcla        !   cross land advection
-!-----------------------------------------------------------------------
-   nn_cla      =    0      !  advection between 2 ocean pts separates by land
 /
 !-----------------------------------------------------------------------
@@ -783,6 +771,4 @@
    !                                           (normally=0; not used with Griffies)
    rn_slpmax        =     0.01  !  slope limit
-   rn_chsmag        =     1.    !  multiplicative factor in Smagorinsky diffusivity
-   rn_smsh          =     1.    !  Smagorinsky diffusivity: = 0 - use only sheer
    rn_aht_m         =  2000.    !  upper limit or stability criteria for lateral eddy diffusivity (m2/s)
 /
@@ -876,7 +862,4 @@
    rn_ahmb_0        =     0.    !  background eddy viscosity for ldf_iso [m2/s]
    rn_ahm_0_blp     =     0.    !  horizontal bilaplacian eddy viscosity [m4/s]
-   rn_cmsmag_1      =     3.    !  constant in laplacian Smagorinsky viscosity
-   rn_cmsmag_2      =     3     !  constant in bilaplacian Smagorinsky viscosity
-   rn_cmsh          =     1.    !  1 or 0 , if 0 -use only shear for Smagorinsky viscosity
    rn_ahm_m_blp     =    -1.e12 !  upper limit for bilap  abs(ahm) < min( dx^4/128rdt, rn_ahm_m_blp)
    rn_ahm_m_lap     = 40000.    !  upper limit for lap  ahm < min(dx^2/16rdt, rn_ahm_m_lap)
@@ -1259,17 +1242,2 @@
    cn_dir_cdg  = './'  !  root directory for the location of drag coefficient files
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-   ! Suggested lengthscale values are those of Eby & Holloway (1994) for a coarse model
-   ln_neptsimp       = .false.  ! yes/no use simplified neptune
-
-   ln_smooth_neptvel = .false.  ! yes/no smooth zunep, zvnep
-   rn_tslse          =  1.2e4   ! value of lengthscale L at the equator
-   rn_tslsp          =  3.0e3   ! value of lengthscale L at the pole
-   ! Specify whether to ramp down the Neptune velocity in shallow
-   ! water, and if so the depth range controlling such ramping down
-   ln_neptramp       = .true.   ! ramp down Neptune velocity in shallow water
-   rn_htrmin         =  100.0   ! min. depth of transition range
-   rn_htrmax         =  200.0   ! max. depth of transition range
-/
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/cfg.txt
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/cfg.txt	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/CONFIG/cfg.txt	(revision 5282)
@@ -1,3 +1,2 @@
-GYRE_PISCES OPA_SRC TOP_SRC
 ORCA2_LIM_CFC_C14b OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC
 GYRE_XIOS OPA_SRC
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 5282)
@@ -88,5 +88,5 @@
       CALL ice_run_2                   ! read in namelist some run parameters
       !          
-      rdt_ice = nn_fsbc * rdttra(1)    ! sea-ice time step
+      rdt_ice = nn_fsbc * rdt           ! sea-ice time step
       numit   = nit000 - 1
       !
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90	(revision 5282)
@@ -67,5 +67,4 @@
             WRITE(numout,*)
             SELECT CASE ( jprstlib )
-            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ice restart binary file: '//clname
             CASE DEFAULT         ;   WRITE(numout,*) '             open ice restart NetCDF file: '//clname
             END SELECT
@@ -185,11 +184,4 @@
       ENDIF
 
-      IF ( jprstlib == jprstdimg ) THEN
-        ! eventually read netcdf file (monobloc)  for restarting on different number of processors
-        ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90
-        INQUIRE( FILE = TRIM(cn_icerst_in)//'.nc', EXIST = llok )
-        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
-      ENDIF
-
       CALL iom_open ( cn_icerst_in, numrir, kiolib = jlibalt )
 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90	(revision 5282)
@@ -85,10 +85,4 @@
 
 #if ! defined key_iomput
-# if defined key_dimgout
-   !!----------------------------------------------------------------------
-   !!   'key_dimgout'                                    Direct Access file
-   !!----------------------------------------------------------------------
-# include "limwri_dimg_2.h90"
-# else
    SUBROUTINE lim_wri_2( kt )
       !!-------------------------------------------------------------------
@@ -215,6 +209,4 @@
       !
    END SUBROUTINE lim_wri_2
-     
-#endif     
 
    SUBROUTINE lim_wri_init_2
Index: anches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_2/limwri_dimg_2.h90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_2/limwri_dimg_2.h90	(revision 5281)
+++ 	(revision )
@@ -1,217 +1,0 @@
-    SUBROUTINE lim_wri_2(kt)
-   !!----------------------------------------------------------------------
-   !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010)
-   !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-    !!-------------------------------------------------------------------
-    !!  This routine computes the average of some variables and write it
-    !!  on the ouput files.
-    !!  ATTENTION cette routine n'est valable que si le pas de temps est
-    !!  egale a une fraction entiere de 1 jours.
-    !!  Diff 1-D 3-D : suppress common also included in etat
-    !!                 suppress cmoymo 11-18
-    !!  modif : 03/06/98
-    !!-------------------------------------------------------------------
-    USE  diadimg                ! use of dia_wri_dimg
-
-    INTEGER, INTENT(in) ::   kt     ! number of iteration
-
-    INTEGER , SAVE ::   nmoyice   !: counter for averaging
-    INTEGER , SAVE ::   nwf       !: number of fields to write on disk
-    INTEGER, SAVE,DIMENSION (:), ALLOCATABLE  :: nsubindex   !: subindex to be saved
-    INTEGER , SAVE ::   nice, nhorid, ndim, niter, ndepid
-    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE :: rcmoy
-
-    INTEGER ::  ji, jj, jf, ii   ! dummy loop indices and array index
-    INTEGER :: iyear, iday, imon ! 
-    INTEGER :: ialloc
-    CHARACTER(LEN=80) :: clname, cltext, clmode
-    REAL(wp), DIMENSION(1) ::   zdept
-    REAL(wp) ::   zsto, zsec, zjulian,zout
-    REAL(wp) ::   zindh, zinda, zindb, ztmu
-    REAL(wp), POINTER, DIMENSION(:,:)     ::   zfield
-
-#if ! defined key_diainstant
-    LOGICAL, PARAMETER :: ll_dia_inst=.false.      ! local logical variable 
-#else
-    LOGICAL, PARAMETER :: ll_dia_inst=.true.
-#endif
-    !!-------------------------------------------------------------------
-    IF( .NOT. ALLOCATED(rcmoy) )THEN
-        ALLOCATE(rcmoy(jpi,jpj,jpnoumax),  STAT=ialloc )
-       !
-       IF( lk_mpp      )   CALL mpp_sum ( ialloc  )
-       IF( ialloc /= 0 )   CALL ctl_warn('lim_wri_2 (limwri_dimg_2.h90) : failed to allocate arrays')
-    ENDIF
-
-    CALL wrk_alloc( jpi, jpj, zfield )
-
-    IF ( kt == nit000 ) THEN 
-       !
-       CALL lim_wri_init_2 
-
-       nwf = 0 
-       ii  = 0
-
-       IF (lwp ) THEN
-          WRITE(numout,*) 'lim_wri_2 : Write ice outputs in dimg'
-          WRITE(numout,*) '~~~~~~~~'
-          WRITE(numout,*) '   According to namelist_ice, following fields saved:'
-          DO jf =1, noumef
-             IF (nc(jf) == 1 ) THEN
-                WRITE(numout,* ) '    -',titn(jf), nam(jf), uni(jf)
-             ENDIF
-          END DO
-       ENDIF
-
-       DO jf = 1, noumef
-          IF (nc(jf) == 1 ) nwf = nwf + 1
-       END DO
-
-       ALLOCATE( nsubindex (nwf) )
-
-       DO jf = 1, noumef
-          IF (nc(jf) == 1 ) THEN 
-             ii = ii +1 
-             nsubindex(ii) = jf
-          END IF
-       END DO
-
-       rcmoy(:,:,:) = 0.0_wp
-       zsto     = rdt_ice
-       zout     = nwrite * rdt_ice / nn_fsbc
-       zsec     = 0.
-       niter    = 0
-       zdept(1) = 0.
-       nmoyice  = 0
-
-    ENDIF
-
-#if ! defined key_diainstant 
-    !-- Compute mean values
-
-    zcmo(:,:, 1:jpnoumax ) = 0.e0 
-    DO jj = 2 , jpjm1
-       DO ji = 2 , jpim1
-          zindh  = MAX( zzero , SIGN( zone , hicif(ji,jj) * (1.0 - frld(ji,jj) ) - 0.10 ) )
-          zinda  = MAX( zzero , SIGN( zone , ( 1.0 - frld(ji,jj) ) - 0.10 ) )
-          zindb  = zindh * zinda
-          zcmo(ji,jj,1)  = hsnif (ji,jj)
-          zcmo(ji,jj,2)  = hicif (ji,jj)
-          zcmo(ji,jj,3)  = hicifp(ji,jj)
-          zcmo(ji,jj,4)  = frld  (ji,jj)
-          zcmo(ji,jj,5)  = sist  (ji,jj)
-          zcmo(ji,jj,6)  = fbif  (ji,jj)
-          IF (lk_lim2_vp) THEN
-            ztmu   = MAX( 0.5 * zone , ( tmu(ji,jj) + tmu(ji+1,jj) + tmu(ji,jj+1) + tmu(ji+1,jj+1) ) ) 
-            zcmo(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj  ) + u_ice(ji+1,jj  ) * tmu(ji+1,jj  )   &
-             &                      + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &
-               / ztmu 
-
-            zcmo(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmu(ji,jj  ) + v_ice(ji+1,jj  ) * tmu(ji+1,jj  )   &
-             &                      + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &
-               / ztmu
-           ELSE
-            zcmo(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj) + u_ice(ji-1,jj) * tmu(ji-1,jj) )/ 2.0
-            zcmo(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmv(ji,jj) + v_ice(ji,jj-1) * tmv(ji,jj-1) )/ 2.0
-           ENDIF
-
-          zcmo(ji,jj,9)  = sst_m(ji,jj)
-          zcmo(ji,jj,10) = sss_m(ji,jj)
-
-          zcmo(ji,jj,11) = qns(ji,jj) + qsr(ji,jj)
-          zcmo(ji,jj,12) = qsr(ji,jj)
-          zcmo(ji,jj,13) = qns(ji,jj)
-          ! See thersf for the coefficient
-          zcmo(ji,jj,14) = - sfx (ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce
-          zcmo(ji,jj,15) = utau_ice(ji,jj)
-          zcmo(ji,jj,16) = vtau_ice(ji,jj)
-          zcmo(ji,jj,17) = qsr_ice(ji,jj,1)
-          zcmo(ji,jj,18) = qns_ice(ji,jj,1)
-          zcmo(ji,jj,19) = sprecip(ji,jj)
-       END DO
-    END DO
-    ! Cumulates values between outputs           
-    rcmoy(:,:,:)= rcmoy(:,:,:) + zcmo(:,:,:)
-    nmoyice = nmoyice + 1 
-    ! compute mean value if it is time to write on file
-    IF ( MOD(kt+nn_fsbc-1-nit000+1,nwrite) == 0 ) THEN
-       rcmoy(:,:,:) = rcmoy(:,:,:) / FLOAT(nmoyice)
-#else  
-       IF ( MOD(kt-nn_fsbc-1-nit000+1,nwrite) == 0 ) THEN 
-          !  case of instantaneaous output rcmoy(:,:, 1:jpnoumax ) = 0.e0
-          DO jj = 2 , jpjm1
-             DO ji = 2 , jpim1
-                zindh  = MAX( zzero , SIGN( zone , hicif(ji,jj) * (1.0 - frld(ji,jj) ) - 0.10 ) )
-                zinda  = MAX( zzero , SIGN( zone , ( 1.0 - frld(ji,jj) ) - 0.10 ) )
-                zindb  = zindh * zinda
-                rcmoy(ji,jj,1)  = hsnif (ji,jj)
-                rcmoy(ji,jj,2)  = hicif (ji,jj)
-                rcmoy(ji,jj,3)  = hicifp(ji,jj)
-                rcmoy(ji,jj,4)  = frld  (ji,jj)
-                rcmoy(ji,jj,5)  = sist  (ji,jj)
-                rcmoy(ji,jj,6)  = fbif  (ji,jj)
-                IF (lk_lim2_vp) THEN
-                   ztmu   = MAX( 0.5 * zone , ( tmu(ji,jj) + tmu(ji+1,jj) + tmu(ji,jj+1) + tmu(ji+1,jj+1) ) )
-                   rcmoy(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj  ) + u_ice(ji+1,jj  ) * tmu(ji+1,jj  )   &
-                      &                      + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &
-                        / ztmu
-
-                   rcmoy(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmu(ji,jj  ) + v_ice(ji+1,jj  ) * tmu(ji+1,jj  )   &
-                      &                      + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &
-                       / ztmu
-                ELSE
-                   rcmoy(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj) + u_ice(ji-1,jj) * tmu(ji-1,jj) )/ 2.0
-                   rcmoy(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmv(ji,jj) + v_ice(ji,jj-1) * tmv(ji,jj-1) )/ 2.0
-                ENDIF
-                rcmoy(ji,jj,9)  = sst_m(ji,jj)
-                rcmoy(ji,jj,10) = sss_m(ji,jj)
-
-                rcmoy(ji,jj,11) = qns(ji,jj) + qsr(ji,jj)
-                rcmoy(ji,jj,12) = qsr(ji,jj)
-                rcmoy(ji,jj,13) = qns(ji,jj)
-                ! See thersf for the coefficient
-                rcmoy(ji,jj,14) = - sfx (ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce
-                rcmoy(ji,jj,15) = utau_ice(ji,jj)
-                rcmoy(ji,jj,16) = vtau_ice(ji,jj)
-                rcmoy(ji,jj,17) = qsr_ice(ji,jj,1)
-                rcmoy(ji,jj,18) = qns_ice(ji,jj,1)
-                rcmoy(ji,jj,19) = sprecip(ji,jj)
-             END DO
-          END DO
-#endif
-
-          !
-          niter = niter + 1
-          DO jf = 1 , noumef
-             zfield(:,:) = (rcmoy(:,:,jf) * cmulti(jf) + cadd(jf)) * tmask(:,:,1)
-
-             SELECT CASE (jf) 
-             CASE ( 7, 8, 15, 16 ) ! velocity or stress fields (vectors)
-                CALL lbc_lnk( zfield, 'T', -1. )
-             CASE DEFAULT          ! scalar fields
-                CALL lbc_lnk( zfield, 'T',  1. )
-             END SELECT
-             rcmoy(:,:,jf) = zfield(:,:)
-          END DO
-
-          IF (ll_dia_inst) THEN
-           clmode='instantaneous'
-          ELSE
-           WRITE(clmode,'(f5.1,a)' ) nwrite*rdt/86400.,' days average'
-          END IF
-          iyear = ndastp/10000
-          imon = (ndastp-iyear*10000)/100
-          iday = ndastp - imon*100 - iyear*10000
-          WRITE(clname,9000) TRIM(cexper),'ICEMOD',iyear,imon,iday
-          cltext=TRIM(cexper)//' ice modele output'//TRIM(clmode)
-          CALL dia_wri_dimg (clname, cltext, rcmoy, nwf , 'I', nsubindex)
-9000      FORMAT(a,"_",a,"_y",i4.4,"m",i2.2,"d",i2.2,".dimgproc")
-
-          rcmoy(:,:,:) = 0.0
-          nmoyice = 0 
-       END IF     !  MOD(kt+nn_fsbc-1-nit000+1, nwrite == 0 ) !
-       CALL wrk_dealloc( jpi,jpj, zfield )
-
-     END SUBROUTINE lim_wri_2
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90	(revision 5282)
@@ -82,5 +82,5 @@
       CALL lim_thd_sal_init            ! set ice salinity parameters
       !
-      rdt_ice   = nn_fsbc * rdttra(1)  ! sea-ice timestep
+      rdt_ice   = nn_fsbc * rdt        ! sea-ice timestep
       r1_rdtice = 1._wp / rdt_ice      ! sea-ice timestep inverse
       !
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 5282)
@@ -73,5 +73,4 @@
             WRITE(numout,*)
             SELECT CASE ( jprstlib )
-            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ice restart binary file: '//clname
             CASE DEFAULT         ;   WRITE(numout,*) '             open ice restart NetCDF file: '//clname
             END SELECT
@@ -326,11 +325,4 @@
       ENDIF
 
-      IF ( jprstlib == jprstdimg ) THEN
-        ! eventually read netcdf file (monobloc)  for restarting on different number of processors
-        ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90
-        INQUIRE( FILE = TRIM(cn_icerst_in)//'.nc', EXIST = llok )
-        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
-      ENDIF
-
       CALL iom_open ( cn_icerst_in, numrir, kiolib = jprstlib )
 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 5282)
@@ -42,7 +42,4 @@
 CONTAINS
 
-#if defined key_dimgout
-# include "limwri_dimg.h90"
-#else
 
    SUBROUTINE lim_wri( kindic )
@@ -280,5 +277,4 @@
       
    END SUBROUTINE lim_wri
-#endif
 
  
Index: anches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_3/limwri_dimg.h90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/LIM_SRC_3/limwri_dimg.h90	(revision 5281)
+++ 	(revision )
@@ -1,198 +1,0 @@
-SUBROUTINE lim_wri
-   !!----------------------------------------------------------------------
-   !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)
-   !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-   !!-------------------------------------------------------------------
-   !!  This routine computes the average of some variables and write it
-   !!  on the ouput files.
-   !!  ATTENTION cette routine n'est valable que si le pas de temps est
-   !!  egale a une fraction entiere de 1 jours.
-   !!  Diff 1-D 3-D : suppress common also included in etat
-   !!                 suppress cmoymo 11-18
-   !!  modif : 03/06/98
-   !!-------------------------------------------------------------------
-   USE  diawri, ONLY : dia_wri_dimg
-   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)
-
-   REAL(wp),DIMENSION(1) ::   zdept
-
-   REAL(wp) ::   zsto, zsec, zjulian,zout, &
-   REAL(wp) ::   zindh,zinda,zindb, ztmu
-   REAL(wp), DIMENSION(jpi,jpj,jpnoumax) ::   zcmo
-   REAL(wp), DIMENSION(jpi,jpj) ::   zfield
-   INTEGER, SAVE ::   nmoyice   !: counter for averaging
-   INTEGER, SAVE ::   nwf       !: number of fields to write on disk
-   INTEGER, SAVE,DIMENSION (:), ALLOCATABLE  :: nsubindex   !: subindex to be saved
-   ! according to namelist
-
-   REAL(wp), SAVE, DIMENSION(jpi,jpj,jpnoumax) :: rcmoy
-#if ! defined key_diainstant
-   LOGICAL, PARAMETER :: ll_dia_inst=.false.      ! local logical variable 
-#else
-   LOGICAL, PARAMETER :: ll_dia_inst=.true.
-#endif
-   INTEGER ::  ji, jj, jf, ii   ! dummy loop indices and array index
-   INTEGER :: iyear, iday, imon ! 
-
-   CHARACTER(LEN=80) :: clname, cltext, clmode
-
-
-   INTEGER , SAVE ::   nice, nhorid, ndim, niter, ndepid
-   INTEGER , DIMENSION( jpij ) , SAVE ::   ndex51  
-   !!-------------------------------------------------------------------
-   IF ( numit == nstart ) THEN 
-
-      CALL lim_wri_init 
-
-      nwf = 0 
-      ii  = 0
-
-      IF (lwp ) THEN
-         WRITE(numout,*) 'lim_wri : Write ice outputs in dimg'
-         WRITE(numout,*) '~~~~~~~~'
-         WRITE(numout,*) '   According to namelist_ice, following fields saved:'
-         DO jf =1, noumef
-            IF (nc(jf) == 1 ) THEN
-               WRITE(numout,* ) '    -',titn(jf), nam(jf), uni(jf)
-            ENDIF
-         END DO
-      ENDIF
-
-      DO jf = 1, noumef
-         IF (nc(jf) == 1 ) nwf = nwf + 1
-      END DO
-
-      ALLOCATE( nsubindex (nwf) )
-
-      DO jf = 1, noumef
-         IF (nc(jf) == 1 ) THEN 
-            ii = ii +1 
-            nsubindex(ii) = jf
-         END IF
-      END DO
-
-      zsto     = rdt_ice
-      zout     = nwrite * rdt_ice / nn_fsbc
-      zsec     = 0.
-      niter    = 0
-      zdept(1) = 0.
-      nmoyice  = 0
-
-   ENDIF
-
-#if ! defined key_diainstant 
-   !-- calculs des valeurs instantanees
-
-   zcmo(:,:, 1:jpnoumax ) = 0.e0 
-   DO jj = 2 , jpjm1
-      DO ji = 2 , jpim1   ! NO vector opt.
-         zindh  = MAX( 0._wp , SIGN( 1._wp , ht_i(ji,jj,1) * (1.0 - frld(ji,jj) ) - 0.10 ) )
-         zinda  = MAX( 0._wp , SIGN( 1._wp , ( 1.0 - frld(ji,jj) ) - 0.10 ) )
-         zindb  = zindh * zinda
-         ztmu   = MAX( 0.5 * 1._wp , ( tmu(ji,jj) + tmu(ji+1,jj) + tmu(ji,jj+1) + tmu(ji+1,jj+1) ) ) 
-         zcmo(ji,jj,1)  = ht_s (ji,jj,1)
-         zcmo(ji,jj,2)  = ht_i (ji,jj,1)
-         zcmo(ji,jj,3)  = 0.
-         zcmo(ji,jj,4)  = frld  (ji,jj)
-         zcmo(ji,jj,5)  = sist  (ji,jj)
-         zcmo(ji,jj,6)  = fhtur  (ji,jj)
-         zcmo(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj  ) + u_ice(ji+1,jj  ) * tmu(ji+1,jj  )   &
-            + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &
-            / ztmu 
-
-         zcmo(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmu(ji,jj  ) + v_ice(ji+1,jj  ) * tmu(ji+1,jj  )   &
-            + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &
-            / ztmu
-         zcmo(ji,jj,9)  = sst_m(ji,jj)
-         zcmo(ji,jj,10) = sss_m(ji,jj)
-
-         zcmo(ji,jj,11) = qns(ji,jj) + qsr(ji,jj)
-         zcmo(ji,jj,12) = qsr(ji,jj)
-         zcmo(ji,jj,13) = qns(ji,jj)
-         ! See thersf for the coefficient
-         zcmo(ji,jj,14) = - sfx (ji,jj) * rday      ! converted in Kg/m2/day = mm/day
-         zcmo(ji,jj,15) = utau_ice(ji,jj)
-         zcmo(ji,jj,16) = vtau_ice(ji,jj)
-         zcmo(ji,jj,17) = qsr (ji,jj)
-         zcmo(ji,jj,18) = qns(ji,jj)
-         zcmo(ji,jj,19) = sprecip(ji,jj)
-      END DO
-   END DO
-   ! Cumulates values between outputs           
-   rcmoy(:,:,:)= rcmoy(:,:,:) + zcmo(:,:,:)
-   nmoyice = nmoyice + 1 
-   ! compute mean value if it is time to write on file
-   IF ( MOD(numit,nwrite) == 0 ) THEN
-      rcmoy(:,:,:) = rcmoy(:,:,:) / FLOAT(nmoyice)
-#else  
-      IF ( MOD(numit,nwrite) == 0 ) THEN 
-         !  case of instantaneaous output rcmoy(:,:, 1:jpnoumax ) = 0.e0
-         DO jj = 2 , jpjm1
-            DO ji = 2 , jpim1   ! NO vector opt.
-               zindh  = MAX( 0._wp , SIGN( 1._wp , ht_i(ji,jj,1) * (1.0 - frld(ji,jj) ) - 0.10 ) )
-               zinda  = MAX( 0._wp , SIGN( 1._wp , ( 1.0 - frld(ji,jj) ) - 0.10 ) )
-               zindb  = zindh * zinda
-               ztmu   = MAX( 0.5 * 1._wp , ( tmu(ji,jj) + tmu(ji+1,jj) + tmu(ji,jj+1) + tmu(ji+1,jj+1) ) )
-               rcmoy(ji,jj,1)  = ht_s (ji,jj,1)
-               rcmoy(ji,jj,2)  = ht_i (ji,jj,1)
-               rcmoy(ji,jj,3)  = 0.
-               rcmoy(ji,jj,4)  = frld  (ji,jj)
-               rcmoy(ji,jj,5)  = sist  (ji,jj)
-               rcmoy(ji,jj,6)  = fhtur  (ji,jj)
-               rcmoy(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj  ) + u_ice(ji+1,jj  ) * tmu(ji+1,jj  )   &
-                  + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &
-                  / ztmu
-
-               rcmoy(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmu(ji,jj  ) + v_ice(ji+1,jj  ) * tmu(ji+1,jj  )   &
-                  + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &
-                  / ztmu
-               rcmoy(ji,jj,9)  = sst_m(ji,jj)
-               rcmoy(ji,jj,10) = sss_m(ji,jj)
-
-               rcmoy(ji,jj,11) = qns(ji,jj) + qsr(ji,jj)
-               rcmoy(ji,jj,12) = qsr(ji,jj)
-               rcmoy(ji,jj,13) = qns(ji,jj)
-               ! See thersf for the coefficient
-               rcmoy(ji,jj,14) = - sfx (ji,jj) * rday      ! converted in mm/day
-               rcmoy(ji,jj,15) = utau_ice(ji,jj)
-               rcmoy(ji,jj,16) = vtau_ice(ji,jj)
-               rcmoy(ji,jj,17) = qsr(ji,jj)
-               rcmoy(ji,jj,18) = qns(ji,jj)
-               rcmoy(ji,jj,19) = sprecip(ji,jj)
-            END DO
-         END DO
-#endif
-
-         !
-         niter = niter + 1
-         DO jf = 1 , noumef
-            zfield(:,:) = (rcmoy(:,:,jf) * cmulti(jf) + cadd(jf)) * tmask(:,:,1)
-
-            IF ( jf == 7  .OR. jf == 8  .OR. jf == 15 .OR. jf == 16 ) THEN 
-               CALL lbc_lnk( zfield, 'T', -1. )
-            ELSE 
-               CALL lbc_lnk( zfield, 'T',  1. )
-            ENDIF
-            rcmoy(:,:,jf) = zfield(:,:)
-         END DO
-
-         IF (ll_dia_inst) THEN
-            clmode='instantaneous'
-         ELSE
-            WRITE(clmode,'(f5.1,a)' ) nwrite*rdt/86400.,' days average'
-         END IF
-         iyear = ndastp/10000
-         imon = (ndastp-iyear*10000)/100
-         iday = ndastp - imon*100 - iyear*10000
-         WRITE(clname,9000) TRIM(cexper),'ICEMOD',iyear,imon,iday
-         cltext=TRIM(cexper)//' ice modele output'//TRIM(clmode)
-         CALL dia_wri_dimg (clname, cltext, rcmoy, nwf , 'I', nsubindex)
-9000     FORMAT(a,"_",a,"_y",i4.4,"m",i2.2,"d",i2.2,".dimgproc")
-
-         rcmoy(:,:,:) = 0.0
-         nmoyice = 0 
-      END IF     !  MOD(numit, nwrite == 0 ) !
-
-   END SUBROUTINE lim_wri
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OFF_SRC/domain.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OFF_SRC/domain.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OFF_SRC/domain.F90	(revision 5282)
@@ -69,5 +69,5 @@
       ENDIF
 
-      CALL dom_nam      ! read namelist ( namrun, namdom, namcla )
+      CALL dom_nam      ! read namelist ( namrun, namdom )
       CALL dom_zgr      ! Vertical mesh and bathymetry option
       CALL dom_rea      ! Create a domain file
@@ -112,5 +112,4 @@
       !! ** input   : - namrun namelist
       !!              - namdom namelist
-      !!              - namcla namelist
       !!----------------------------------------------------------------------
       USE ioipsl
@@ -118,13 +117,10 @@
       NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl,   &
          &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   &
-         &             nn_write, ln_dimgnnn, ln_mskland  , ln_clobber   , nn_chunksz, nn_euler
+         &             nn_write, ln_mskland  , ln_clobber   , nn_chunksz, nn_euler
       NAMELIST/namdom/ nn_bathy , rn_bathy, rn_e3zps_min, rn_e3zps_rat, nn_msh    , rn_hmin,   &
-         &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,            &
-         &             rn_rdtmax, rn_rdth     , nn_baro     , nn_closea , ln_crs, &
-         &             jphgr_msh, &
+         &             rn_atfp  , rn_rdt   , nn_baro     , nn_closea , ln_crs, jphgr_msh,  &
          &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, &
          &             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
@@ -157,5 +153,4 @@
          WRITE(numout,*) '      frequency of restart file       nn_stock   = ', nn_stock
          WRITE(numout,*) '      frequency of output file        nn_write   = ', nn_write
-         WRITE(numout,*) '      multi file dimgout              ln_dimgnnn = ', ln_dimgnnn
          WRITE(numout,*) '      mask land points                ln_mskland = ', ln_mskland
          WRITE(numout,*) '      overwrite an existing file      ln_clobber = ', ln_clobber
@@ -188,5 +183,5 @@
       ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day)
       ndastp = ndate0 - 1        ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00
-      adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday
+      adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday
 
 #if defined key_agrif
@@ -233,8 +228,4 @@
          WRITE(numout,*) '      asselin time filter parameter        rn_atfp   = ', rn_atfp
          WRITE(numout,*) '      time-splitting: nb of sub time-step  nn_baro   = ', nn_baro
-         WRITE(numout,*) '      acceleration of converge             nn_acc    = ', nn_acc
-         WRITE(numout,*) '        nn_acc=1: surface tracer rdt       rn_rdtmin = ', rn_rdtmin
-         WRITE(numout,*) '                  bottom  tracer rdt       rdtmax    = ', rn_rdtmax
-         WRITE(numout,*) '                  depth of transition      rn_rdth   = ', rn_rdth
          WRITE(numout,*) '      suppression of closed seas (=0)      nn_closea = ', nn_closea
          WRITE(numout,*) '      type of horizontal mesh jphgr_msh           = ', jphgr_msh
@@ -262,26 +253,6 @@
       e3zps_rat = rn_e3zps_rat
       nmsh      = nn_msh
-      nacc      = nn_acc
       atfp      = rn_atfp
       rdt       = rn_rdt
-      rdtmin    = rn_rdtmin
-      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 defined key_netcdf4
       !                             ! NetCDF 4 case   ("key_netcdf4" defined)
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 5282)
@@ -208,8 +208,4 @@
       ENDIF
 
-      IF ( nacc /= 0 ) &
-         & CALL ctl_stop( ' nacc /= 0 and key_asminc :',  &
-         &                ' Assimilation increments have only been implemented', &
-         &                ' for synchronous time stepping' )
 
       IF ( ( ln_asmdin ).AND.( ln_asmiau ) )   &
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 5282)
@@ -316,5 +316,5 @@
       ENDIF
 
-      IF ( nsec_day == NINT(0.5_wp * rdttra(1)) .AND. zflag==1 ) THEN
+      IF ( nsec_day == NINT(0.5_wp * rdt) .AND. zflag==1 ) THEN
         !
         kt_tide = kt
@@ -431,6 +431,6 @@
             ! We refresh nodal factors every day below
             ! This should be done somewhere else
-            IF ( nsec_day == NINT(0.5_wp * rdttra(1)) .AND. lk_first_btstp ) THEN
-               !
+            IF ( nsec_day == NINT(0.5_wp * rdt) .AND. lk_first_btstp ) THEN
+                !
                kt_tide = kt               
                !
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90	(revision 5282)
@@ -44,7 +44,5 @@
       !!----------------------------------------------------------------------
       NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,   &
-         &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,                  &
-         &             rn_rdtmax, rn_rdth     , nn_closea , ln_crs,    &
-         &             jphgr_msh, &
+         &             rn_atfp , rn_rdt,nn_closea , ln_crs,  jphgr_msh,        &
          &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, &
          &             ppsur, ppa0, ppa1, ppkth, ppacr, ppdzmin, pphmax, ldbletanh, &
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90	(revision 5282)
@@ -52,5 +52,5 @@
       !!      2. At time of output, rescale [1] by dimension and time
       !!         to yield the spatial and temporal average.
-      !!  See. diawri_dimg.h90, sbcmod.F90
+      !!  See.  sbcmod.F90
       !!
       !! ** Method  :  
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 5282)
@@ -21,4 +21,7 @@
    USE timing         ! preformance summary
    USE wrk_nemo       ! working arrays
+   USE fldread        ! type FLD_N
+   USE phycst         ! physical constant
+   USE in_out_manager  ! I/O manager
 
    IMPLICIT NONE
@@ -197,4 +200,22 @@
       REAL(wp) ::   zztmp  
       REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   zsaldta   ! Jan/Dec levitus salinity
+      ! reading initial file
+      LOGICAL  ::   ln_tsd_init      !: T & S data flag
+      LOGICAL  ::   ln_tsd_tradmp    !: internal damping toward input data flag
+      CHARACTER(len=100)            ::   cn_dir
+      TYPE(FLD_N)                   ::  sn_tem,sn_sal
+      INTEGER  ::   ios=0
+
+      NAMELIST/namtsd/ ln_tsd_init,ln_tsd_tradmp,cn_dir,sn_tem,sn_sal
+      !
+
+      REWIND( numnam_ref )              ! Namelist namtsd in reference namelist :
+      READ  ( numnam_ref, namtsd, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtsd in reference namelist for dia_ar5', lwp )
+      REWIND( numnam_cfg )              ! Namelist namtsd in configuration namelist : Parameters of the run
+      READ  ( numnam_cfg, namtsd, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtsd in configuration namelist for dia_ar5', lwp )
+      IF(lwm) WRITE ( numond, namtsd )
+      !
       !!----------------------------------------------------------------------
       !
@@ -216,8 +237,8 @@
       END DO
       IF( lk_mpp )   CALL mpp_sum( vol0 )
-      
-      CALL iom_open ( 'data_1m_salinity_nomask', inum )
-      CALL iom_get  ( inum, jpdom_data, 'vosaline', zsaldta(:,:,:,1), 1  )
-      CALL iom_get  ( inum, jpdom_data, 'vosaline', zsaldta(:,:,:,2), 12 )
+
+      CALL iom_open ( TRIM( cn_dir )//TRIM(sn_sal%clname), inum )
+      CALL iom_get  ( inum, jpdom_data, TRIM(sn_sal%clvar), zsaldta(:,:,:,1), 1  )
+      CALL iom_get  ( inum, jpdom_data, TRIM(sn_sal%clvar), zsaldta(:,:,:,2), 12 )
       CALL iom_close( inum )
       sn0(:,:,:) = 0.5_wp * ( zsaldta(:,:,:,1) + zsaldta(:,:,:,2) )        
Index: anches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diadimg.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diadimg.F90	(revision 5281)
+++ 	(revision )
@@ -1,229 +1,0 @@
-MODULE diadimg
-   !!======================================================================
-   !!                     ***  MODULE  diadimg  ***
-   !! Ocean diagnostics :  write ocean output files in dimg direct access format (mpp)
-   !!=====================================================================
-# if defined key_dimgout
-   !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers 
-   USE dom_oce         ! ocean space and time domain
-   USE in_out_manager  ! I/O manager
-   USE daymod          ! calendar
-   USE lib_mpp
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC dia_wri_dimg            ! called by trd_mld (eg)
-   PUBLIC dia_wri_dimg_alloc      ! called by nemo_alloc in nemogcm.F90
-
-
-   !! These workspace arrays are inside the module so that we can make them
-   !! allocatable in a clean way. Not done in wrk_nemo because these are of KIND(sp).
-   REAL(sp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: z42d    ! 2d temporary workspace (sp)
-   REAL(sp), ALLOCATABLE, SAVE, DIMENSION(:)   :: z4dep   ! vertical level (sp)
-
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
-   !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-CONTAINS
-
-   FUNCTION dia_wri_dimg_alloc()
-      !!---------------------------------------------------------------------
-      !!        *** ROUTINE dia_wri_dimg_alloc ***
-      !!
-      !!---------------------------------------------------------------------
-      INTEGER :: dia_wri_dimg_alloc   ! return value
-      !!---------------------------------------------------------------------
-      !
-      IF( .NOT. ALLOCATED( z42d ) )THEN
-
-         ALLOCATE( z42d(jpi,jpj), z4dep(jpk), STAT=dia_wri_dimg_alloc )
-
-         IF( lk_mpp                  )   CALL mpp_sum ( dia_wri_dimg_alloc )
-         IF( dia_wri_dimg_alloc /= 0 )   CALL ctl_warn('dia_wri_dimg_alloc: allocation of array failed.')
-
-      ELSE
-
-         dia_wri_dimg_alloc = 0
-
-      ENDIF
-      !
-  END FUNCTION dia_wri_dimg_alloc
-
-
-  SUBROUTINE dia_wri_dimg( cd_name, cd_text, ptab, klev, cd_type , ksubi )
-    !!-------------------------------------------------------------------------
-    !!        *** ROUTINE dia_wri_dimg ***
-    !!
-    !! ** Purpose :   write ptab in the dimg file cd_name, with comment cd_text.
-    !!              ptab has klev x 2D fields
-    !!
-    !! ** Action :   Define header variables from the config parameters
-    !!               Open the dimg file on unit inum = 14 ( IEEE I4R4 file )
-    !!               Write header on record 1
-    !!               Write ptab on the following klev records
-    !!
-    !! History :  2003-12 (J.M. Molines ) : Original. Replace ctl_opn, writn2d
-    !!---------------------------------------------------------------------------
-    CHARACTER(len=*),INTENT(in) ::   &
-         &                            cd_name,  &  ! dimg file name
-         &                            cd_text      ! comment to write on record #1
-    INTEGER, INTENT(in) ::            klev         ! number of level in ptab to write
-    REAL(wp),INTENT(in), DIMENSION(:,:,:) :: ptab  ! 3D array to write 
-    CHARACTER(LEN=1),INTENT(in) ::    cd_type      ! either 'T', 'W' or '2' , depending on the vertical
-    !                                              ! grid for ptab. 2 stands for 2D file
-    INTEGER, INTENT(in), OPTIONAL, DIMENSION(klev) :: ksubi 
-
-    !! * Local declarations
-    INTEGER :: jk, jn           ! dummy loop indices
-    INTEGER :: irecl4,             &    ! record length in bytes
-         &       inum,             &    ! logical unit (set to 14)
-         &       irec,             &    ! current record to be written
-         &       irecend                ! record number where nclit... are stored
-    REAL(sp)                    :: zdx,zdy,zspval,zwest,ztimm
-    REAL(sp)                    :: zsouth
-
-    CHARACTER(LEN=80) :: clname                ! name of file in case of dimgnnn
-    CHARACTER(LEN=4) :: clver='@!01'           ! dimg string identifier
-    !!---------------------------------------------------------------------------
-
-    !                                      ! allocate dia_wri_dimg array
-    IF( dia_wri_dimg_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dia_wri_dimg : unable to allocate arrays' )
-
-    !! * Initialisations
-
-    irecl4 = MAX(jpi*jpj*sp , 84+(18+1+jpk)*sp )
-
-    zspval=0.0_sp    ! special values on land
-    !  the 'numerical' grid is described. The geographical one is in a grid file
-    zdx=1._sp
-    zdy=1._sp
-    zsouth=njmpp * 1._sp
-    zwest=nimpp * 1._sp
-    !  time in days since the historical begining of the run (nit000 = 0 ) 
-    ztimm=adatrj
-
-    SELECT CASE ( cd_type )
-
-    CASE ( 'T')
-       z4dep(:)=gdept_1d(:)
-
-    CASE ( 'W' )
-       z4dep(:)=gdepw_1d(:)
-
-    CASE ( '2' )
-       z4dep(1:klev) =(/(jk, jk=1,klev)/)
-
-    CASE ( 'I' )
-       z4dep(1:klev) = ksubi(1:klev)
-
-    CASE DEFAULT
-       IF(lwp) WRITE(numout,*) ' E R R O R : bad cd_type in dia_wri_dimg '
-       STOP 'dia_wri_dimg'
-
-    END SELECT
-
-    IF ( ln_dimgnnn  ) THEN
-     irecl4 = MAX(jpi*jpj*sp , 84+(18+jpk)*sp + 8*jpnij*sp  )
-       WRITE(clname,'(a,a,i3.3)') TRIM(cd_name),'.',narea
-       CALL ctl_opn(inum, clname,'UNKNOWN','UNFORMATTED','DIRECT',irecl4,numout,lwp)
-       WRITE(inum,REC=1 ) clver, cd_text, irecl4, &
-            &     jpi,jpj, klev, 1 , 1 ,            &
-            &     zwest, zsouth, zdx, zdy, zspval,  &
-            &     z4dep(1:klev),                    &
-            &     ztimm,                            &
-            &     narea, jpnij,jpiglo,jpjglo,jpizoom, jpjzoom,    &    ! extension to dimg for mpp output
-            &     nlcit,nlcjt, nldit, nldjt, nleit, nlejt, nimppt, njmppt  !
-
-       !! * Write klev levels
-       IF ( cd_type == 'I' ) THEN
-
-          DO jk = 1, klev
-             irec =1 + jk
-             z42d(:,:) = ptab(:,:,ksubi(jk))
-             WRITE(inum,REC=irec)  z42d(:,:)
-          END DO
-       ELSE
-          DO jk = 1, klev
-             irec =1 + jk
-             z42d(:,:) = ptab(:,:,jk)
-             WRITE(inum,REC=irec)  z42d(:,:)
-          END DO
-       ENDIF
-    ELSE
-       clver='@!03'           ! dimg string identifier
-       ! note that version @!02 is optimized with respect to record length.
-       ! The vertical dep variable is reduced to klev instead of klev*jpnij :
-       !   this is OK for jpnij < 181 (jpk=46)
-       ! for more processors, irecl4 get huge and that's why we switch to '@!03':
-       !  In this case we just add an extra integer to the standard dimg structure,
-       !  which is a record number where the arrays nlci etc... starts (1 per record)
-       
-       !! Standard dimgproc (1 file per variable, all procs. write to this file )
-       !! * Open file
-       CALL ctl_opn(inum, cd_name,'UNKNOWN','UNFORMATTED','DIRECT',irecl4,numout,lwp)
-
-       !! * Write header on record #1
-       irecend=1 + klev*jpnij 
-       IF(lwp) WRITE(inum,REC=1 ) clver, cd_text, irecl4, &
-            &     jpi,jpj, klev, 1 , 1 ,            &
-            &     zwest, zsouth, zdx, zdy, zspval,  &
-            &     z4dep(1:klev),       &
-            &     ztimm,                            &
-            &     narea, jpnij,jpiglo,jpjglo,jpizoom, jpjzoom, irecend 
-       IF (lwp ) THEN
-         WRITE(inum,REC=irecend + 1 ) nlcit
-         WRITE(inum,REC=irecend + 2 ) nlcjt
-         WRITE(inum,REC=irecend + 3 ) nldit
-         WRITE(inum,REC=irecend + 4 ) nldjt
-         WRITE(inum,REC=irecend + 5 ) nleit
-         WRITE(inum,REC=irecend + 6 ) nlejt
-         WRITE(inum,REC=irecend + 7 ) nimppt
-         WRITE(inum,REC=irecend + 8 ) njmppt
-       ENDIF
-      !   &    ! extension to dimg for mpp output
-      !   &     nlcit,nlcjt, nldit, nldjt, nleit, nlejt, nimppt, njmppt  !
-
-       !! * Write klev levels
-       IF ( cd_type == 'I' ) THEN
-
-          DO jk = 1, klev
-             irec =1 + klev * (narea -1) + jk
-             z42d(:,:) = ptab(:,:,ksubi(jk))
-             WRITE(inum,REC=irec)  z42d(:,:)
-          END DO
-       ELSE
-          DO jk = 1, klev
-             irec =1 + klev * (narea -1) + jk
-             z42d(:,:) = ptab(:,:,jk)
-             WRITE(inum,REC=irec)  z42d(:,:)
-          END DO
-       ENDIF
-    ENDIF
-
-    !! * Close the file
-    CLOSE(inum)
-
-  END SUBROUTINE dia_wri_dimg
-
-#  else
-   !!----------------------------------------------------------------------
-   !!   Default option :                                       Empty module
-   !!----------------------------------------------------------------------
-CONTAINS
-
-   SUBROUTINE dia_wri_dimg( cd_name, cd_exper, ptab, klev, cd_type )
-      REAL, DIMENSION(:,:,:) :: ptab
-      INTEGER :: klev
-      CHARACTER(LEN=80) :: cd_name, cd_exper,cd_type
-      WRITE(*,*) ' This print must never occur ', cd_name, cd_exper,ptab, klev, cd_type
-      WRITE(*,*) ' this routine is here just for compilation '
-   END SUBROUTINE dia_wri_dimg
-# endif
-   !!======================================================================
-END MODULE diadimg
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90	(revision 5282)
@@ -115,5 +115,5 @@
          
          ! Conversion in m3
-         a_fwf    = a_fwf * rdttra(1) * 1.e-3 
+         a_fwf    = a_fwf * rdt * 1.e-3
          
          ! fwf correction to bring back the mean ssh to zero
@@ -382,5 +382,5 @@
          WRITE(inum,*)
          WRITE(inum,*)    'Net freshwater budget '
-         WRITE(inum,9010) '  fwf    = ',a_fwf,   ' m3 =', a_fwf   /(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv'
+         WRITE(inum,9010) '  fwf    = ',a_fwf,   ' m3 =', a_fwf   /(FLOAT(nitend-nit000+1)*rdt) * 1.e-6,' Sv'
          WRITE(inum,*)
          WRITE(inum,9010) '  zarea =',zarea
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 5282)
@@ -23,5 +23,4 @@
    USE ioipsl          ! NetCDF IPSL library
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE diadimg         ! To write dimg
    USE timing          ! preformance summary
    USE wrk_nemo        ! working arrays
@@ -388,17 +387,11 @@
       !!----------------------------------------------------------------------
 
-#if defined key_dimgout
-      cdfile_name_T = TRIM(cexper)//'_Tidal_harmonics_gridT.dimgproc'
-      cdfile_name_U = TRIM(cexper)//'_Tidal_harmonics_gridU.dimgproc'
-      cdfile_name_V = TRIM(cexper)//'_Tidal_harmonics_gridV.dimgproc'
-#endif
+!#if 
+!#endif
 
       IF(lwp) WRITE(numout,*) '  '
       IF(lwp) WRITE(numout,*) 'dia_wri_harm : Write harmonic analysis results'
-#if defined key_dimgout
-      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~  Output files: ', TRIM(cdfile_name_T)
-      IF(lwp) WRITE(numout,*) '                             ', TRIM(cdfile_name_U)
-      IF(lwp) WRITE(numout,*) '                             ', TRIM(cdfile_name_V)
-#endif
+!#if 
+!#endif
       IF(lwp) WRITE(numout,*) '  '
 
@@ -406,39 +399,33 @@
       !/////////////
       !
-#if defined key_dimgout
-      cltext='Elevation amplitude and phase'
-      CALL dia_wri_dimg(TRIM(cdfile_name_T), TRIM(cltext), out_eta, 2*nb_ana, '2')
-#else
+!#if 
+!#else
       DO jh = 1, nb_ana
       CALL iom_put( TRIM(tname(jh))//'x', out_eta(:,:,jh) )
       CALL iom_put( TRIM(tname(jh))//'y', out_eta(:,:,nb_ana+jh) )
       END DO
-#endif
+!#endif
 
       ! B) ubar
       !/////////
       !
-#if defined key_dimgout
-      cltext='ubar amplitude and phase'
-      CALL dia_wri_dimg(TRIM(cdfile_name_U), TRIM(cltext), out_u, 2*nb_ana, '2')
-#else
+!#if 
+!#else
       DO jh = 1, nb_ana
       CALL iom_put( TRIM(tname(jh))//'x_u', out_u(:,:,jh) )
       CALL iom_put( TRIM(tname(jh))//'y_u', out_u(:,:,nb_ana+jh) )
       END DO
-#endif
+!#endif
 
       ! C) vbar
       !/////////
       !
-#if defined key_dimgout
-      cltext='vbar amplitude and phase'
-      CALL dia_wri_dimg(TRIM(cdfile_name_V), TRIM(cltext), out_v, 2*nb_ana, '2')
-#else
+!#if 
+!#else
       DO jh = 1, nb_ana
          CALL iom_put( TRIM(tname(jh))//'x_v', out_v(:,:,jh       ) )
          CALL iom_put( TRIM(tname(jh))//'y_v', out_v(:,:,jh+nb_ana) )
       END DO
-#endif
+!#endif
       !
    END SUBROUTINE dia_wri_harm
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/dianam.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/dianam.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/dianam.F90	(revision 5282)
@@ -72,5 +72,5 @@
 
       IF( llfsec .OR. kfreq < 0 ) THEN   ;   inbsec = kfreq                       ! output frequency already in seconds
-      ELSE                               ;   inbsec = kfreq * NINT( rdttra(1) )   ! from time-step to seconds
+      ELSE                               ;   inbsec = kfreq * NINT( rdt )   ! from time-step to seconds
       ENDIF
       iddss = NINT( rday          )                                         ! number of seconds in 1 day
@@ -116,6 +116,6 @@
       ! date of the beginning and the end of the run
 
-      zdrun = rdttra(1) / rday * REAL( nitend - nit000, wp )                ! length of the run in days
-      zjul  = fjulday - rdttra(1) / rday
+      zdrun = rdt / rday * REAL( nitend - nit000, wp )                ! length of the run in days
+      zjul  = fjulday - rdt / rday
       CALL ju2ymds( zjul        , iyear1, imonth1, iday1, zsec1 )           ! year/month/day of the beginning of run
       CALL ju2ymds( zjul + zdrun, iyear2, imonth2, iday2, zsec2 )           ! year/month/day of the end       of run
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 5282)
@@ -585,5 +585,4 @@
          niter = ( nit000 - 1 ) / nn_fptr
          zdt = rdt
-         IF( nacc == 1 )   zdt = rdtmin
          !
          IF(lwp) THEN
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5282)
@@ -43,5 +43,4 @@
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE in_out_manager  ! I/O manager
-   USE diadimg         ! dimg direct access file format output
    USE iom
    USE ioipsl
@@ -97,15 +96,8 @@
   END FUNCTION dia_wri_alloc
 
-#if defined key_dimgout
-   !!----------------------------------------------------------------------
-   !!   'key_dimgout'                                      DIMG output file
-   !!----------------------------------------------------------------------
-#   include "diawri_dimg.h90"
-
-#else
    !!----------------------------------------------------------------------
    !!   Default option                                   NetCDF output file
    !!----------------------------------------------------------------------
-# if defined key_iomput
+#if defined key_iomput
    !!----------------------------------------------------------------------
    !!   'key_iomput'                                        use IOM library
@@ -418,5 +410,4 @@
       ! Define frequency of output and means
       zdt = rdt
-      IF( nacc == 1 ) zdt = rdtmin
       IF( ln_mskland )   THEN   ;   clop = "only(x)"   ! put 1.e+20 on land (very expensive!!)
       ELSE                      ;   clop = "x"         ! no use of the mask value (require less cpu time)
@@ -762,5 +753,5 @@
       IF( lk_vvl ) THEN
          zw3d(:,:,:) = ( ( fse3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2
-         CALL histwrite( nid_T, "vovvle3t", it, fse3t_n (:,:,:) , ndim_T , ndex_T  )   ! level thickness
+         CALL histwrite( nid_T, "vovvle3t", it, fse3t_n(:,:,:) , ndim_T , ndex_T  )   ! level thickness
          CALL histwrite( nid_T, "vovvldep", it, fsdept_n(:,:,:) , ndim_T , ndex_T  )   ! t-point depth
          CALL histwrite( nid_T, "vovvldef", it, zw3d             , ndim_T , ndex_T  )   ! level thickness deformation
@@ -914,7 +905,7 @@
       !
    END SUBROUTINE dia_wri
-# endif
-
-#endif
+#endif
+
+
 
    SUBROUTINE dia_wri_state( cdfile_name, kt )
@@ -1035,5 +1026,5 @@
       ! -----------------
       CALL histclo( id_i )
-#if ! defined key_iomput && ! defined key_dimgout
+#if ! defined key_iomput
       IF( ninist /= 1  ) THEN
          CALL histclo( nid_T )
Index: anches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diawri_dimg.h90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diawri_dimg.h90	(revision 5281)
+++ 	(revision )
@@ -1,372 +1,0 @@
-  !!----------------------------------------------------------------------
-  !!                        ***  diawri_dimg.h90  ***
-  !!----------------------------------------------------------------------
-  !! NEMO/OPA 3.3 , NEMO Consortium (2010)
-  !! $Id $
-  !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
-  !!----------------------------------------------------------------------
-
-  SUBROUTINE dia_wri( kt )
-    !!----------------------------------------------------------------------
-    !!           *** routine dia_wri ***
-    !!
-    !! ** Purpose : output dynamics and tracer fields on direct access file
-    !!              suitable for MPP computing
-    !!
-    !! ** define key : 'key_dimgout'
-    !!
-    !! **  Method : Default is to cumulate the values over the interval between
-    !!      2 output, and each nwrite time-steps  the mean value is  computed 
-    !!      and written to the direct access file.
-    !!     If 'key_diainstant' is defined, no mean values are computed and the 
-    !!     instantaneous fields are dump.
-    !!       Each processor creates its own file with its local data
-    !!     Merging all the files is performed off line by a dedicated program
-    !!
-    !! ** Arguments :
-    !!     kt      : time-step number
-    !!     kindinc :  error condition indicator : >=0 :  OK, < 0 : error.
-    !!
-    !! ** Naming convention for files
-    !!
-    !! {cexper}_{var}_y----m--d--.dimg
-    !!   cexper is the name of the experience, given in the namelist
-    !!   var can be either U, V, T, S, KZ, SSH, ...
-    !!   var can also be 2D, which means that each level of the file is a 2D field as described below
-    !!    y----m--d--  is the date at the time of the dump
-    !!    For mpp output, each processor dumps its own memory, on appropriate record range 
-    !!    (direct access : for level jk of a klev field on proc narea irec = 1+ klev*(narea -1) + jk )
-    !!    To be tested with a lot of procs !!!!
-    !!
-    !!  level 1:  utau(:,:) * umask(:,:,1) zonal stress in N.m-2
-    !!  level 2:  vtau(:,:) * vmask(:,:,1) meridional stress in N. m-2
-    !!  level 3:  qsr + qns                total heat flux (W/m2)
-    !!  level 4:  ( emp (:,:)-rnf(:,:) )   E-P flux (mm/day)
-    !!  level 5:  tb  (:,:,1)-sst          model SST -forcing sst (degree C) ! deprecated
-    !!  level 6:  bsfb(:,:)		   streamfunction (m**3/s)
-    !!  level 7:  qsr (:,:)		   solar flux (W/m2)
-    !!  level 8:  qrp (:,:)                relax component of T flux.
-    !!  level 9:  erp (:,:)                relax component of S flux
-    !!  level 10: hmld(:,:)                turbocline depth
-    !!  level 11: hmlp(:,:)                mixed layer depth
-    !!  level 12: fr_i(:,:)                ice fraction (between 0 and 1)
-    !!  level 13: sst(:,:)                 the observed SST we relax to. ! deprecated
-    !!  level 14: qct(:,:)                 equivalent flux due to treshold SST
-    !!  level 15: fbt(:,:)                 feedback term .
-    !!  level 16: ( emp * sss )            concentration/dilution term on salinity
-    !!  level 17: ( emp * sst )            concentration/dilution term on temperature
-    !!  level 17: fsalt(:,:)               Ice=>ocean net freshwater
-    !!  level 18: gps(:,:)                 the surface pressure (m).
-    !!  level 19: spgu(:,:)                the surface pressure gradient in X direction.
-    !!  level 20: spgv(:,:)                the surface pressure gradient in Y direction.
-    !! 
-    !! History:  OPA  ! 1997-02 ( Clipper Group ) dimg files
-    !!            -   ! 2003-12 ( J.M. Molines) f90, mpp output for OPA9.0
-    !!   NEMO    1.0  ! 2005-05  (S. Theetten) add emps fsalt move gps spgu spgv 2 lines below
-    !!            -   ! 2005-11  (V. Garnier) Surface pressure gradient organization
-    !!----------------------------------------------------------------------
-    USE lib_mpp
-    !!
-    INTEGER ,INTENT(in) :: kt
-    !!
-#if defined key_diainstant
-    LOGICAL, PARAMETER :: ll_dia_inst=.TRUE.  !: for instantaneous output
-#else
-    LOGICAL, PARAMETER :: ll_dia_inst=.FALSE. !: for average output
-#endif
-    INTEGER              , SAVE                    ::  nmoyct 
-    REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:,:,:) ::  um , vm, wm   ! mean u, v, w fields
-    REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:,:,:) ::  avtm          ! mean kz fields
-    REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:,:,:) ::  tm , sm       ! mean t, s fields
-    REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:,:,:) ::  fsel          ! mean 2d fields
-    
-    INTEGER :: inbsel, jk
-    INTEGER :: iyear,imon,iday
-    INTEGER :: ialloc
-    REAL(wp) :: zdtj
-    CHARACTER(LEN=80) :: clname
-    CHARACTER(LEN=80) :: cltext
-    CHARACTER(LEN=80) :: clmode
-    CHARACTER(LEN= 4) :: clver
-    !!----------------------------------------------------------------------
-    IF( nn_timing == 1 )   CALL timing_start('dia_wri')
-    !
-    !  Initialization
-    !  ---------------
-    !
-    IF( .NOT. ALLOCATED(um) )THEN
-       ALLOCATE(um(jpi,jpj,jpk), vm(jpi,jpj,jpk), &
-                wm(jpi,jpj,jpk),                  &
-                avtm(jpi,jpj,jpk),                &
-                tm(jpi,jpj,jpk), sm(jpi,jpj,jpk), &
-                fsel(jpi,jpj,jpk),                &
-                STAT=ialloc )
-       !
-       IF( lk_mpp      )   CALL mpp_sum ( ialloc  )
-       IF( ialloc /= 0 )   CALL ctl_warn('dia_wri( diawri_dimg.h90) : failed to allocate arrays')
-    ENDIF
-
-
-    inbsel = 18
-
-    IF( inbsel >  jpk ) THEN
-       IF(lwp) WRITE(numout,*)  ' STOP inbsel =',inbsel,' is larger than jpk=',jpk
-       STOP
-    ENDIF
-
-    iyear = ndastp/10000
-    imon = (ndastp-iyear*10000)/100
-    iday = ndastp - imon*100 - iyear*10000
-
-    !     
-    !! dimg format V1.0 should start with the 4 char. string '@!01'
-    !!
-    clver='@!01'
-    !
-    IF( .NOT. ll_dia_inst ) THEN
-       !
-       !! * Mean output section
-       !! ----------------------
-       !
-       IF( kt == nit000 .AND. lwp ) WRITE(numout,*) &
-            'THE OUTPUT FILES CONTAINS THE AVERAGE OF EACH FIELD'
-       !
-       IF( kt == nit000  ) THEN
-          ! reset arrays for average computation
-          nmoyct = 0
-          !
-          um(:,:,:) = 0._wp
-          vm(:,:,:) = 0._wp
-          wm(:,:,:) = 0._wp
-          avtm(:,:,:) = 0._wp
-          tm(:,:,:) = 0._wp
-          sm(:,:,:) = 0._wp
-          fsel(:,:,:) = 0._wp
-          !
-       ENDIF
-
-       !  cumulate values
-       !  ---------------
-
-       nmoyct = nmoyct+1
-       !
-       um(:,:,:)=um(:,:,:) + un (:,:,:)
-       vm(:,:,:)=vm(:,:,:) + vn (:,:,:)
-       wm(:,:,:)=wm(:,:,:) + wn (:,:,:)
-       avtm(:,:,:)=avtm(:,:,:) + avt (:,:,:)
-       tm(:,:,:)=tm(:,:,:) + tsn(:,:,:,jp_tem)
-       sm(:,:,:)=sm(:,:,:) + tsn(:,:,:,jp_sal)
-       !
-       fsel(:,:,1 ) = fsel(:,:,1 ) + utau(:,:) * umask(:,:,1)
-       fsel(:,:,2 ) = fsel(:,:,2 ) + vtau(:,:) * vmask(:,:,1)
-       fsel(:,:,3 ) = fsel(:,:,3 ) + qsr (:,:) + qns  (:,:) 
-       fsel(:,:,4 ) = fsel(:,:,4 ) + ( emp(:,:)-rnf(:,:) ) 
-       !        fsel(:,:,5 ) = fsel(:,:,5 ) + tsb(:,:,1,jp_tem)  !RB not used
-       fsel(:,:,6 ) = fsel(:,:,6 ) + sshn(:,:) 
-       fsel(:,:,7 ) = fsel(:,:,7 ) + qsr(:,:)
-       IF( ln_ssr ) THEN
-          IF( nn_sstr /= 0 )   fsel(:,:,8 ) = fsel(:,:,8 ) + qrp (:,:)
-          IF( nn_sssr /= 0 )   fsel(:,:,9 ) = fsel(:,:,9 ) + erp (:,:)
-       ENDIF
-       fsel(:,:,10) = fsel(:,:,10) + hmld(:,:)
-       fsel(:,:,11) = fsel(:,:,11) + hmlp(:,:)
-       fsel(:,:,12) = fsel(:,:,12) + fr_i(:,:)
-       !        fsel(:,:,13) = fsel(:,:,13)   !RB not used
-       !        fsel(:,:,14) = fsel(:,:,14) + qct(:,:)
-       !        fsel(:,:,15) = fsel(:,:,15) + fbt(:,:)
-       fsel(:,:,16) = fsel(:,:,16) + ( emp(:,:)*tsn(:,:,1,jp_sal) ) 
-       fsel(:,:,17) = fsel(:,:,17) + ( emp(:,:)*tsn(:,:,1,jp_tem) ) 
-       !
-       ! Output of dynamics and tracer fields and selected fields
-       ! --------------------------------------------------------
-       !
-       !
-       zdtj=rdt/86400.   ! time step in days
-       WRITE(clmode,'(f5.1,a)' ) nwrite*zdtj,' days average'
-
-       !       iwrite=NINT(adatrj/rwrite)
-       !      IF (abs(adatrj-iwrite*rwrite) < zdtj/2.      &
-
-       IF(  ( MOD (kt-nit000+1,nwrite) ==  0 )          &
-            &   .OR. ( kt == 1 .AND. ninist ==1 )  ) THEN
-          ! it is time to make a dump on file 
-          ! compute average
-          um(:,:,:) = um(:,:,:) / nmoyct
-          vm(:,:,:) = vm(:,:,:) / nmoyct
-          wm(:,:,:) = wm(:,:,:) / nmoyct
-          avtm(:,:,:) = avtm(:,:,:) / nmoyct
-          tm(:,:,:) = tm(:,:,:) / nmoyct
-          sm(:,:,:) = sm(:,:,:) / nmoyct
-          !
-          fsel(:,:,:) = fsel(:,:,:) / nmoyct
-          !
-          ! note : the surface pressure is not averaged, but rather 
-          ! computed from the averaged gradients.
-          !
-          ! mask mean field with tmask except utau vtau (1,2)
-          DO jk=3,inbsel
-            fsel(:,:,jk)=fsel(:,:,jk)*tmask(:,:,1)
-          END DO
-       ENDIF
-       !
-    ELSE   ! ll_dia_inst true
-       !
-       !! * Instantaneous output section
-       !! ------------------------------
-       !
-       IF( kt == nit000 .AND. lwp ) WRITE(numout,*) &
-            'THE OUTPUT FILES CONTAINS INSTANTANEOUS VALUES OF EACH FIELD'
-       !
-       zdtj=rdt/86400.   ! time step in days
-       !  iwrite=NINT(adatrj/rwrite)
-       clmode='instantaneous'
-       !     IF (abs(adatrj-iwrite*rwrite) < zdtj/2.  &
-       IF (  ( MOD (kt-nit000+1,nwrite) ==  0 )          &
-            &   .OR. ( kt == 1 .AND. ninist == 1 )  ) THEN
-          !
-          ! transfer wp arrays to sp arrays for dimg files
-          fsel(:,:,:) = 0._wp
-          !
-          fsel(:,:,1 ) = utau(:,:) * umask(:,:,1)
-          fsel(:,:,2 ) = vtau(:,:) * vmask(:,:,1)
-          fsel(:,:,3 ) = (qsr (:,:) + qns (:,:)) * tmask(:,:,1)
-          fsel(:,:,4 ) = ( emp(:,:)-rnf(:,:) ) * tmask(:,:,1) 
-          !         fsel(:,:,5 ) = (tsb(:,:,1,jp_tem) - sf_sst(1)%fnow(:,:) ) *tmask(:,:,1) !RB not used
-
-          fsel(:,:,6 ) = sshn(:,:)
-          fsel(:,:,7 ) = qsr (:,:) * tmask(:,:,1)
-          IF( ln_ssr ) THEN
-             IF( nn_sstr /= 0 )   fsel(:,:,8 ) = qrp (:,:) * tmask(:,:,1)
-             IF( nn_sssr /= 0 )   fsel(:,:,9 ) = erp (:,:) * tmask(:,:,1)
-          ENDIF
-          fsel(:,:,10) = hmld(:,:) * tmask(:,:,1)
-          fsel(:,:,11) = hmlp(:,:) * tmask(:,:,1)
-          fsel(:,:,12) = fr_i(:,:) * tmask(:,:,1)
-          !         fsel(:,:,13) = sf_sst(1)%fnow(:,:) !RB not used
-          !         fsel(:,:,14) =  qct(:,:)
-          !         fsel(:,:,15) =  fbt(:,:)
-          fsel(:,:,16) = ( emp(:,:)-tsn(:,:,1,jp_sal) ) * tmask(:,:,1) 
-          fsel(:,:,17) = ( emp(:,:)-tsn(:,:,1,jp_tem) ) * tmask(:,:,1) 
-          !
-          !         qct(:,:) = 0._wp
-       ENDIF
-    ENDIF
-    !
-    ! Opening of the datrj.out file with the absolute time in day of each dump
-    ! this file gives a record of the dump date for post processing ( ASCII file )
-    !
-    IF(  ( MOD (kt-nit000+1,nwrite) ==  0 )          &
-         &   .OR. ( kt == 1 .AND. ninist == 1 )  ) THEN
-
-       IF( lwp) WRITE(numout,*)'Days since the begining of the run :',adatrj
-
-       !! * U section
-
-       WRITE(clname,9000) TRIM(cexper),'U',iyear,imon,iday
-       cltext=TRIM(cexper)//' U(m/s) '//TRIM(clmode)
-       !
-       IF( ll_dia_inst) THEN   ;   CALL dia_wri_dimg(clname, cltext, un, jpk, 'T')
-       ELSE                    ;   CALL dia_wri_dimg(clname, cltext, um, jpk, 'T')
-       ENDIF
-
-       !! * V section
-
-       WRITE(clname,9000) TRIM(cexper),'V',iyear,imon,iday
-       cltext=TRIM(cexper)//' V(m/s) '//TRIM(clmode)
-       !
-       IF( ll_dia_inst) THEN
-          CALL dia_wri_dimg(clname, cltext, vn, jpk, 'T')
-       ELSE
-          CALL dia_wri_dimg(clname, cltext, vm, jpk, 'T')
-       ENDIF
-       !
-
-       !! * KZ section
-
-       WRITE(clname,9000) TRIM(cexper),'KZ',iyear,imon,iday
-       cltext=TRIM(cexper)//' KZ(m2/s) '//TRIM(clmode)
-
-       IF( ll_dia_inst) THEN
-          CALL dia_wri_dimg(clname, cltext, avt, jpk, 'W')
-       ELSE
-          CALL dia_wri_dimg(clname, cltext, avtm, jpk, 'W')
-       ENDIF
-       !
-
-       !! * W section
-
-       WRITE(clname,9000) TRIM(cexper),'W',iyear,imon,iday
-       cltext=TRIM(cexper)//' W(m/s) '//TRIM(clmode)
-
-       IF( ll_dia_inst) THEN
-          CALL dia_wri_dimg(clname, cltext, wn, jpk, 'W')
-       ELSE
-          CALL dia_wri_dimg(clname, cltext, wm, jpk, 'W')
-       ENDIF
-
-       !! * T section
-
-       WRITE(clname,9000) TRIM(cexper),'T',iyear,imon,iday
-       cltext=TRIM(cexper)//' T (DegC) '//TRIM(clmode)
-
-       IF( ll_dia_inst) THEN
-          CALL dia_wri_dimg(clname, cltext, tsn(:,:,:,jp_tem), jpk, 'T')
-       ELSE
-          CALL dia_wri_dimg(clname, cltext, tm               , jpk, 'T')
-       ENDIF
-       !
-
-       !! * S section
-
-       WRITE(clname,9000) TRIM(cexper),'S',iyear,imon,iday
-       cltext=TRIM(cexper)//' S (PSU) '//TRIM(clmode)
-
-       IF( ll_dia_inst) THEN
-          CALL dia_wri_dimg(clname, cltext, tsn(:,:,:,jp_sal), jpk, 'T')
-       ELSE
-          CALL dia_wri_dimg(clname, cltext, sm               , jpk, 'T')
-       ENDIF
-       !
-
-       !! * 2D section
-
-       WRITE(clname,9000) TRIM(cexper),'2D',iyear,imon,iday
-       cltext='2D fields '//TRIM(clmode)
-
-       IF( ll_dia_inst) THEN
-          CALL dia_wri_dimg(clname, cltext, fsel, inbsel, '2')
-       ELSE
-          CALL dia_wri_dimg(clname, cltext, fsel, inbsel, '2')
-       ENDIF
-
-       IF( lk_mpp )   CALL mppsync   ! synchronization in mpp
-
-       !! * Log message in numout 
-
-       IF( lwp)WRITE(numout,*) ' '
-       IF( lwp)WRITE(numout,*) ' **** WRITE in dimg file ',kt
-
-       IF( lwp .AND.        ll_dia_inst) WRITE(numout,*) '    instantaneous fields'
-       IF( lwp .AND. .NOT.  ll_dia_inst) WRITE(numout,*) '    average fields with ',nmoyct,'pdt'
-       !
-       !
-       !! * Reset cumulating arrays  and counter to 0 after writing
-       !
-       IF( .NOT. ll_dia_inst ) THEN
-          nmoyct = 0
-          !
-          um(:,:,:) = 0._wp
-          vm(:,:,:) = 0._wp
-          wm(:,:,:) = 0._wp
-          tm(:,:,:) = 0._wp
-          sm(:,:,:) = 0._wp
-          fsel(:,:,:) = 0._wp
-          avtm(:,:,:) = 0._wp
-       ENDIF
-    ENDIF
-    !
-    IF( nn_timing == 1 )   CALL timing_stop('dia_wri')
-    !
-9000 FORMAT(a,"_",a,"_y",i4.4,"m",i2.2,"d",i2.2,".dimgproc")
-    !
-  END SUBROUTINE dia_wri
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 5282)
@@ -20,5 +20,5 @@
    !!
    !!   we suppose that the time step is deviding the number of second of in a day
-   !!             ---> MOD( rday, rdttra(1) ) == 0
+   !!             ---> MOD( rday, rdt ) == 0
    !!
    !!           ----------- WARNING -----------
@@ -73,12 +73,12 @@
       !!----------------------------------------------------------------------
       !
-      ! all calendar staff is based on the fact that MOD( rday, rdttra(1) ) == 0
-      IF( MOD( rday     , rdttra(1) ) /= 0. )   CALL ctl_stop( 'the time step must devide the number of second of in a day' )
+      ! all calendar staff is based on the fact that MOD( rday, rdt ) == 0
+      IF( MOD( rday     , rdt ) /= 0. )   CALL ctl_stop( 'the time step must devide the number of second of in a day' )
       IF( MOD( rday     , 2.        ) /= 0. )   CALL ctl_stop( 'the number of second of in a day must be an even number'    )
-      IF( MOD( rdttra(1), 2.        ) /= 0. )   CALL ctl_stop( 'the time step (in second) must be an even number'           )
+      IF( MOD( rdt, 2.        ) /= 0. )   CALL ctl_stop( 'the time step (in second) must be an even number'           )
       nsecd   = NINT(rday           )
       nsecd05 = NINT(0.5 * rday     )
-      ndt     = NINT(      rdttra(1))
-      ndt05   = NINT(0.5 * rdttra(1))
+      ndt     = NINT(      rdt)
+      ndt05   = NINT(0.5 * rdt)
 
       IF( .NOT. lk_offline ) CALL day_rst( nit000, 'READ' )
@@ -218,6 +218,6 @@
       nsec_week  = nsec_week  + ndt
       nsec_day   = nsec_day   + ndt
-      adatrj  = adatrj  + rdttra(1) / rday
-      fjulday = fjulday + rdttra(1) / rday
+      adatrj  = adatrj  + rdt / rday
+      fjulday = fjulday + rdt / rday
       IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec )   fjulday = REAL(NINT(fjulday),wp)   ! avoid truncation error
       IF( ABS(adatrj  - REAL(NINT(adatrj ),wp)) < zprec )   adatrj  = REAL(NINT(adatrj ),wp)   ! avoid truncation error
@@ -334,5 +334,5 @@
                ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day)
                ndastp = ndate0 - 1     ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00
-               adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday
+               adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday
                ! note this is wrong if time step has changed during run
             ENDIF
@@ -340,5 +340,5 @@
             ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day)
             ndastp = ndate0 - 1        ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00
-            adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday
+            adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday
          ENDIF
          IF( ABS(adatrj  - REAL(NINT(adatrj),wp)) < 0.1 / rday )   adatrj = REAL(NINT(adatrj),wp)   ! avoid truncation error
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 5282)
@@ -35,10 +35,6 @@
    REAL(wp), PUBLIC ::   rn_e3zps_rat    !: minimum thickness ration for partial steps
    INTEGER , PUBLIC ::   nn_msh          !: = 1 create a mesh-mask file
-   INTEGER , PUBLIC ::   nn_acc          !: = 0/1 use of the acceleration of convergence technique
    REAL(wp), PUBLIC ::   rn_atfp         !: asselin time filter parameter
-   REAL(wp), PUBLIC ::   rn_rdt          !: time step for the dynamics (and tracer if nacc=0)
-   REAL(wp), PUBLIC ::   rn_rdtmin       !: minimum time step on tracers
-   REAL(wp), PUBLIC ::   rn_rdtmax       !: maximum time step on tracers
-   REAL(wp), PUBLIC ::   rn_rdth         !: depth variation of tracer step
+   REAL(wp), PUBLIC ::   rn_rdt          !: time step for the dynamics and tracer
    INTEGER , PUBLIC ::   nn_closea       !: =0 suppress closed sea/lake from the ORCA domain or not (=1)
    INTEGER , PUBLIC ::   nn_euler        !: =0 start with forward time step or not (=1)
@@ -94,19 +90,11 @@
    REAL(wp), PUBLIC ::   e3zps_rat       !: minimum thickness ration for partial steps
    INTEGER , PUBLIC ::   nmsh            !: = 1 create a mesh-mask file
-   INTEGER , PUBLIC ::   nacc            !: = 0/1 use of the acceleration of convergence technique
    REAL(wp), PUBLIC ::   atfp            !: asselin time filter parameter
-   REAL(wp), PUBLIC ::   rdt             !: time step for the dynamics (and tracer if nacc=0)
-   REAL(wp), PUBLIC ::   rdtmin          !: minimum time step on tracers
-   REAL(wp), PUBLIC ::   rdtmax          !: maximum time step on tracers
-   REAL(wp), PUBLIC ::   rdth            !: depth variation of tracer step
+   REAL(wp), PUBLIC ::   rdt             !: time step for the dynamics and tracer
 
    !                                                  !!! associated variables
    INTEGER , PUBLIC                 ::   neuler        !: restart euler forward option (0=Euler)
    REAL(wp), PUBLIC                 ::   atfp1         !: asselin time filter coeff. (atfp1= 1-2*atfp)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   rdttra  !: vertical profile of tracer time step
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   r2dtra  !: = 2*rdttra except at nit000 (=rdttra) if neuler=0
-
-   !                                         !!* Namelist namcla : cross land advection
-   INTEGER, PUBLIC ::   nn_cla               !: =1 cross land advection for exchanges through some straits (ORCA2)
+   REAL(wp), PUBLIC ::   r2dt         !: = 2*rdt except at nit000 (=rdt) if neuler=0
 
    !!----------------------------------------------------------------------
@@ -336,7 +324,7 @@
       ierr(:) = 0
       !
-      ALLOCATE( rdttra(jpk), r2dtra(jpk), mig(jpi), mjg(jpj), nfiimpp(jpni,jpnj),  &
+      ALLOCATE( mig(jpi), mjg(jpj), nfiimpp(jpni,jpnj),  &
          &      nfipproc(jpni,jpnj), nfilcit(jpni,jpnj), STAT=ierr(1) )
-         !
+        !
       ALLOCATE( nimppt(jpnij) , ibonit(jpnij) , nlcit(jpnij) , nlcjt(jpnij) ,     &
          &      njmppt(jpnij) , ibonjt(jpnij) , nldit(jpnij) , nldjt(jpnij) ,     &
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 5282)
@@ -81,5 +81,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
@@ -131,5 +131,4 @@
       !! ** input   : - namrun namelist
       !!              - namdom namelist
-      !!              - namcla namelist
       !!              - namnc4 namelist   ! "key_netcdf4" only
       !!----------------------------------------------------------------------
@@ -137,13 +136,11 @@
       NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl,   &
          &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   &
-         &             nn_write, ln_dimgnnn, ln_mskland  , ln_clobber   , nn_chunksz, nn_euler
+         &             nn_write, ln_mskland  , ln_clobber   , nn_chunksz, nn_euler
       NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,   &
-         &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,                  &
-         &             rn_rdtmax, rn_rdth     , nn_closea , ln_crs,    &
-         &             jphgr_msh, &
+         &             rn_atfp, rn_rdt ,  nn_closea , ln_crs,  jphgr_msh,       &
          &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, &
          &             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
@@ -180,5 +177,4 @@
          WRITE(numout,*) '      frequency of restart file       nn_stock   = ', nn_stock
          WRITE(numout,*) '      frequency of output file        nn_write   = ', nn_write
-         WRITE(numout,*) '      multi file dimgout              ln_dimgnnn = ', ln_dimgnnn
          WRITE(numout,*) '      mask land points                ln_mskland = ', ln_mskland
          WRITE(numout,*) '      overwrite an existing file      ln_clobber = ', ln_clobber
@@ -259,8 +255,4 @@
          WRITE(numout,*) '      ocean time step                       rn_rdt    = ', rn_rdt
          WRITE(numout,*) '      asselin time filter parameter         rn_atfp   = ', rn_atfp
-         WRITE(numout,*) '      acceleration of converge              nn_acc    = ', nn_acc
-         WRITE(numout,*) '        nn_acc=1: surface tracer rdt        rn_rdtmin = ', rn_rdtmin
-         WRITE(numout,*) '                  bottom  tracer rdt        rdtmax    = ', rn_rdtmax
-         WRITE(numout,*) '                  depth of transition       rn_rdth   = ', rn_rdth
          WRITE(numout,*) '      suppression of closed seas (=0)       nn_closea = ', nn_closea
          WRITE(numout,*) '      online coarsening of dynamical fields ln_crs    = ', ln_crs
@@ -289,32 +281,6 @@
       e3zps_rat = rn_e3zps_rat
       nmsh      = nn_msh
-      nacc      = nn_acc
       atfp      = rn_atfp
       rdt       = rn_rdt
-      rdtmin    = rn_rdtmin
-      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
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 5282)
@@ -134,6 +134,4 @@
          IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN    ! ORCA R2 configuration
             !                                             ! =====================
-            IF( nn_cla == 0 ) THEN
-               !
                ii0 = 139   ;   ii1 = 140        ! Gibraltar Strait (e2u = 20 km)
                ij0 = 102   ;   ij1 = 102   ;   e2u( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  20.e3
@@ -147,5 +145,4 @@
                IF(lwp) WRITE(numout,*) '             orca_r2: Bab el Mandeb: e2u reduced to 30 km'
                IF(lwp) WRITE(numout,*) '                                     e1v reduced to 18 km'
-            ENDIF
 
             ii0 = 145   ;   ii1 = 146        ! Danish Straits (e2u = 10 km)
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 5282)
@@ -366,5 +366,4 @@
       IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN   ! ORCA_R2 configuration
          !                                                 ! Increased lateral friction near of some straits
-         IF( nn_cla == 0 ) THEN
             !                                ! Gibraltar strait  : partial slip (fmask=0.5)
             ij0 = 101   ;   ij1 = 101
@@ -379,5 +378,4 @@
             ii0 = 159   ;   ii1 = 159   ;   fmask( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 1:jpk ) =  1._wp
             !
-         ENDIF
          !                                ! Danish straits  : strong slip (fmask > 2)
 ! We keep this as an example but it is instable in this case 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90	(revision 5282)
@@ -41,17 +41,9 @@
       !!      filter parameter read in namelist
       !!              - Model time step:
-      !!      nacc = 0 : synchronous time intergration. 
-      !!      There is one time step only, defined by: rdt, rdttra(k)=rdt
-      !!      nacc = 1 : accelerating the convergence. There is 2 different
-      !!      time steps for dynamics and tracers:
-      !!        rdt      : dynamical part
-      !!        rdttra(k): temperature and salinity
-      !!      The tracer time step is a function of vertical level. the model
-      !!      reference time step ( i.e. for wind stress, surface heat and
-      !!      salt fluxes) is the surface tracer time step is rdttra(1).
-      !!         N.B. depth dependent acceleration of convergence is not im-
-      !!      plemented for s-coordinate.
+      !!                synchronous time intergration.
+      !!      There is one time step only, defined by: rdt for dynamics and
+      !!      tracer,wind stress, surface heat and salt fluxes
       !!
-      !! ** Action  : - rdttra   : vertical profile of tracer time step
+      !! ** Action  : [REMOVED - rdttra: vertical profile of tracer time step]
       !!              - atfp1    : = 1 - 2*atfp
       !!
@@ -72,37 +64,7 @@
       atfp1 = 1. - 2. * atfp
 
-      SELECT CASE ( nacc )
+      IF(lwp) WRITE(numout,*)'               synchronous time stepping'
+      IF(lwp) WRITE(numout,*)'               dynamics and tracer time step = ', rdt/3600., ' hours'
 
-         CASE ( 0 )                ! Synchronous time stepping
-            IF(lwp) WRITE(numout,*)'               synchronous time stepping'
-            IF(lwp) WRITE(numout,*)'               dynamics and tracer time step = ', rdt/3600., ' hours'
-
-            rdttra(:) = rdt
-
-         CASE ( 1 )                ! Accelerating the convergence
-            IF(lwp) WRITE(numout,*) '              no tracer damping in the turbocline'
-            IF(lwp) WRITE(numout,*)'               accelerating the convergence'
-            IF(lwp) WRITE(numout,*)'               dynamics time step = ', rdt/3600., ' hours'
-            IF( ln_sco .AND. rdtmin /= rdtmax .AND. lk_vvl )   &
-                 & CALL ctl_stop ( ' depth dependent acceleration of convergence not implemented in s-coordinates &
-                 &                   nor in variable volume' )
-            IF(lwp) WRITE(numout,*)'         tracers   time step :  dt (hours)  level'
-
-            DO jk = 1, jpk
-               IF( gdept_1d(jk) <= rdth ) rdttra(jk) = rdtmin
-               IF( gdept_1d(jk) >  rdth ) THEN
-                  rdttra(jk) = rdtmin + ( rdtmax - rdtmin )   &
-                                      * ( EXP( ( gdept_1d(jk ) - rdth ) / rdth ) - 1. )   &
-                                      / ( EXP( ( gdept_1d(jpk) - rdth ) / rdth ) - 1. )
-               ENDIF
-               IF(lwp) WRITE(numout,"(36x,f5.2,5x,i3)") rdttra(jk)/3600., jk
-            END DO  
-
-         CASE DEFAULT              ! E R R O R 
-
-            WRITE(ctmp1,*) ' nacc value e r r o r, nacc= ',nacc
-            CALL ctl_stop( ctmp1 )
-
-      END SELECT
 
    END SUBROUTINE dom_stp
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 5282)
@@ -156,8 +156,8 @@
       ! Vertical scale factor interpolations
       ! ------------------------------------
-      CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W'  )
+      CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n(:,:,:), 'W'  )
       CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' )
       CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' )
-      CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3w_b (:,:,:), 'W'  )
+      CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3w_b(:,:,:), 'W'  )
       CALL dom_vvl_interpol( fse3u_b(:,:,:), fse3uw_b(:,:,:), 'UW' )
       CALL dom_vvl_interpol( fse3v_b(:,:,:), fse3vw_b(:,:,:), 'VW' )
@@ -627,11 +627,11 @@
       ! - ML - fse3u_b and fse3v_b are allready computed in dynnxt
       ! - JC - hu_b, hv_b, hur_b, hvr_b also
-      CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n (:,:,:), 'F'  )
+      CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n(:,:,:), 'F'  )
       ! Vertical scale factor interpolations
       ! ------------------------------------
-      CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W'  )
+      CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n(:,:,:), 'W'  )
       CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' )
       CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' )
-      CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3w_b (:,:,:), 'W'  )
+      CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3w_b(:,:,:), 'W'  )
       CALL dom_vvl_interpol( fse3u_b(:,:,:), fse3uw_b(:,:,:), 'UW' )
       CALL dom_vvl_interpol( fse3v_b(:,:,:), fse3vw_b(:,:,:), 'VW' )
@@ -663,6 +663,6 @@
       ! Local depth and Inverse of the local depth of the water column at u- and v- points
       ! ----------------------------------------------------------------------------------
-      hu (:,:) = hu_a (:,:)
-      hv (:,:) = hv_a (:,:)
+      hu(:,:) = hu_a(:,:)
+      hv(:,:) = hv_a(:,:)
 
       ! Inverse of the local depth
@@ -680,6 +680,6 @@
       ! =============
       z_e3t_def(:,:,:) = ( ( fse3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2
-      CALL iom_put( "cellthc" , fse3t_n  (:,:,:) )
-      CALL iom_put( "tpt_dep" , fsde3w_n (:,:,:) )
+      CALL iom_put( "cellthc" , fse3t_n(:,:,:) )
+      CALL iom_put( "tpt_dep" , fsde3w_n(:,:,:) )
       CALL iom_put( "e3tdef"  , z_e3t_def(:,:,:) )
 
@@ -1057,6 +1057,4 @@
          !                                             ! =====================
       !! acc
-         IF( nn_cla == 0 ) THEN
-            !
             ii0 = 139   ;   ii1 = 140        ! Gibraltar Strait (e2u was modified)
             ij0 = 102   ;   ij1 = 102
@@ -1105,5 +1103,4 @@
                END DO
             END DO
-         ENDIF
 
          ii0 = 145   ;   ii1 = 146        ! Danish Straits (e2u was modified)
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 5282)
@@ -507,6 +507,5 @@
             IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN    ! ORCA R2 configuration
                !                                             ! =====================
-               IF( nn_cla == 0 ) THEN
-                  ii0 = 140   ;   ii1 = 140                  ! Gibraltar Strait open 
+                  ii0 = 140   ;   ii1 = 140                  ! Gibraltar Strait open
                   ij0 = 102   ;   ij1 = 102                  ! (Thomson, Ocean Modelling, 1995)
                   DO ji = mi0(ii0), mi1(ii1)
@@ -527,5 +526,4 @@
                   IF(lwp) WRITE(numout,*)
                   IF(lwp) WRITE(numout,*) '      orca_r2: Bab el Mandeb strait open at i=',ii0,' j=',ij0
-               ENDIF
                !
             ENDIF
@@ -548,6 +546,5 @@
             IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN    ! ORCA R2 configuration
                !
-              IF( nn_cla == 0 ) THEN
-                 ii0 = 140   ;   ii1 = 140                   ! Gibraltar Strait open 
+                 ii0 = 140   ;   ii1 = 140                   ! Gibraltar Strait open
                  ij0 = 102   ;   ij1 = 102                   ! (Thomson, Ocean Modelling, 1995)
                  DO ji = mi0(ii0), mi1(ii1)
@@ -568,5 +565,4 @@
                  IF(lwp) WRITE(numout,*)
                  IF(lwp) WRITE(numout,*) '             orca_r2: Bab el Mandeb strait open at i=',ii0,' j=',ij0
-              ENDIF
               !
            ENDIF
@@ -1995,8 +1991,8 @@
 
       IF( nprint == 1 .AND. lwp )   THEN
-         WRITE(numout,*) ' MAX val hif   t ', MAXVAL( hift (:,:) ), ' f ', MAXVAL( hiff (:,:) ),  &
-            &                        ' u ',   MAXVAL( hifu (:,:) ), ' v ', MAXVAL( hifv (:,:) )
-         WRITE(numout,*) ' MIN val hif   t ', MINVAL( hift (:,:) ), ' f ', MINVAL( hiff (:,:) ),  &
-            &                        ' u ',   MINVAL( hifu (:,:) ), ' v ', MINVAL( hifv (:,:) )
+         WRITE(numout,*) ' MAX val hif   t ', MAXVAL( hift(:,:) ), ' f ', MAXVAL( hiff(:,:) ),  &
+            &                        ' u ',   MAXVAL( hifu(:,:) ), ' v ', MAXVAL( hifv(:,:) )
+         WRITE(numout,*) ' MIN val hif   t ', MINVAL( hift(:,:) ), ' f ', MINVAL( hiff(:,:) ),  &
+            &                        ' u ',   MINVAL( hifu(:,:) ), ' v ', MINVAL( hifv(:,:) )
          WRITE(numout,*) ' MAX val hbat  t ', MAXVAL( hbatt(:,:) ), ' f ', MAXVAL( hbatf(:,:) ),  &
             &                        ' u ',   MAXVAL( hbatu(:,:) ), ' v ', MAXVAL( hbatv(:,:) )
@@ -2068,14 +2064,14 @@
 #endif
 
-      fsdept(:,:,:) = gdept_0 (:,:,:)
-      fsdepw(:,:,:) = gdepw_0 (:,:,:)
+      fsdept(:,:,:) = gdept_0(:,:,:)
+      fsdepw(:,:,:) = gdepw_0(:,:,:)
       fsde3w(:,:,:) = gdep3w_0(:,:,:)
-      fse3t (:,:,:) = e3t_0   (:,:,:)
-      fse3u (:,:,:) = e3u_0   (:,:,:)
-      fse3v (:,:,:) = e3v_0   (:,:,:)
-      fse3f (:,:,:) = e3f_0   (:,:,:)
-      fse3w (:,:,:) = e3w_0   (:,:,:)
-      fse3uw(:,:,:) = e3uw_0  (:,:,:)
-      fse3vw(:,:,:) = e3vw_0  (:,:,:)
+      fse3t(:,:,:) = e3t_0(:,:,:)
+      fse3u(:,:,:) = e3u_0(:,:,:)
+      fse3v(:,:,:) = e3v_0(:,:,:)
+      fse3f(:,:,:) = e3f_0(:,:,:)
+      fse3w(:,:,:) = e3w_0(:,:,:)
+      fse3uw(:,:,:) = e3uw_0(:,:,:)
+      fse3vw(:,:,:) = e3vw_0(:,:,:)
 !!
       ! HYBRID : 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90	(revision 5282)
@@ -174,28 +174,4 @@
             END DO
          END DO
-         IF( nn_cla == 1 ) THEN                          ! Cross Land advection
-            il0 = 138   ;   il1 = 138                          ! set T & S profile at Gibraltar Strait
-            ij0 = 101   ;   ij1 = 102
-            ii0 = 139   ;   ii1 = 139
-            DO jl = mi0(il0), mi1(il1)
-               DO jj = mj0(ij0), mj1(ij1)
-                  DO ji = mi0(ii0), mi1(ii1)
-                     sf_tsd(jp_tem)%fnow(ji,jj,:) = sf_tsd(jp_tem)%fnow(jl,jj,:)
-                     sf_tsd(jp_sal)%fnow(ji,jj,:) = sf_tsd(jp_sal)%fnow(jl,jj,:)
-                  END DO
-               END DO
-            END DO
-            il0 = 164   ;   il1 = 164                          ! set T & S profile at Bab el Mandeb Strait
-            ij0 =  87   ;   ij1 =  88
-            ii0 = 161   ;   ii1 = 163
-            DO jl = mi0(il0), mi1(il1)
-               DO jj = mj0(ij0), mj1(ij1)
-                  DO ji = mi0(ii0), mi1(ii1)
-                     sf_tsd(jp_tem)%fnow(ji,jj,:) = sf_tsd(jp_tem)%fnow(jl,jj,:)
-                     sf_tsd(jp_sal)%fnow(ji,jj,:) = sf_tsd(jp_sal)%fnow(jl,jj,:)
-                  END DO
-               END DO
-            END DO
-         ELSE                                            ! No Cross Land advection
             ij0 =  87   ;   ij1 =  96                          ! Reduced temperature in Red Sea
             ii0 = 148   ;   ii1 = 160
@@ -203,5 +179,4 @@
             sf_tsd(jp_tem)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 11:13 ) = 6.5_wp
             sf_tsd(jp_tem)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 14:20 ) = 6.0_wp
-         ENDIF
       ENDIF
       !
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90	(revision 5282)
@@ -17,4 +17,5 @@
    !!            3.3  ! 2010-09  (D.Storkey and E.O'Dea) bug fixes for BDY module
    !!             -   ! 2010-10  (R. Furner, G. Madec) runoff and cla added directly here
+   !!            3.6  ! 2014-15  cla removed
    !!----------------------------------------------------------------------
 
@@ -28,5 +29,4 @@
    USE sbcrnf          ! river runoff 
    USE sbcisf          ! ice shelf 
-   USE cla             ! cross land advection             (cla_div routine)
    USE in_out_manager  ! I/O manager
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
@@ -68,5 +68,5 @@
       !!         hdivn = 1/(e1t*e2t*e3t) ( di[e2u*e3u un] + dj[e1v*e3v vn] )
       !!      correct hdiv with runoff inflow (div_rnf), ice shelf melting (div_isf)
-      !!      and cross land flow (div_cla) 
+      !!      [REMOVED cross land flow (div_cla)]
       !!              II. vorticity :
       !!         - save the curl computed at the previous time-step
@@ -229,6 +229,5 @@
       IF( ln_rnf      )   CALL sbc_rnf_div( hdivn )          ! runoffs   (update hdivn field)
       IF( ln_divisf .AND. (nn_isf /= 0) )   CALL sbc_isf_div( hdivn )          ! ice shelf (update hdivn field)
-      IF( nn_cla == 1 )   CALL cla_div    ( kt )             ! Cross Land Advection (Update Hor. divergence)
-      
+
       ! 4. Lateral boundary conditions on hdivn and rotn
       ! ---------------------------------=======---======
@@ -259,5 +258,6 @@
       !!      - compute the now divergence given by :
       !!         hdivn = 1/(e1t*e2t*e3t) ( di[e2u*e3u un] + dj[e1v*e3v vn] )
-      !!      correct hdiv with runoff inflow (div_rnf) and cross land flow (div_cla) 
+      !!      correct hdiv with runoff inflow (div_rnf) 
+      !!      [REMOVED cross land flow (div_cla)]
       !!              - Relavtive Vorticity :
       !!      - save the curl computed at the previous time-step (rotb = rotn)
@@ -328,5 +328,4 @@
       IF( ln_rnf      )   CALL sbc_rnf_div( hdivn )                            ! runoffs (update hdivn field)
       IF( ln_divisf .AND. (nn_isf .GT. 0) )   CALL sbc_isf_div( hdivn )          ! ice shelf (update hdivn field)
-      IF( nn_cla == 1 )   CALL cla_div    ( kt )             ! Cross Land Advection (update hdivn field)
       !
       CALL lbc_lnk( hdivn, 'T', 1. )   ;   CALL lbc_lnk( rotn , 'F', 1. )     ! lateral boundary cond. (no sign change)
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 5282)
@@ -753,5 +753,5 @@
                &                   * (  rhd(ji,jj,1)                                    &
                &                     + 0.5_wp * ( rhd(ji,jj,2) - rhd(ji,jj,1) )         &
-               &                              * ( fse3w (ji,jj,1) - fsde3w(ji,jj,1) )   &
+               &                              * ( fse3w(ji,jj,1) - fsde3w(ji,jj,1) )   &
                &                              / ( fsde3w(ji,jj,2) - fsde3w(ji,jj,1) )  )
          END DO
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90	(revision 5282)
@@ -140,8 +140,7 @@
          
          ! Multiply by the eddy viscosity coef. (at u- and v-points)
-         zlu(:,:,jk) = zlu(:,:,jk) * ( fsahmu(:,:,jk) * (1-nkahm_smag) + nkahm_smag)
-
-         zlv(:,:,jk) = zlv(:,:,jk) * ( fsahmv(:,:,jk) * (1-nkahm_smag) + nkahm_smag)
-         
+          zlu(:,:,jk) = zlu(:,:,jk) * ( fsahmu(:,:,jk) )
+
+          zlv(:,:,jk) = zlv(:,:,jk) * ( fsahmv(:,:,jk) )
          ! Contravariant "laplacian"
          zcu(:,:) = e1u(:,:) * zlu(:,:,jk)
@@ -197,6 +196,6 @@
                   &  + ( zut(ji,jj+1,jk) - zut(ji  ,jj,jk) ) / e2v(ji,jj)
                ! add it to the general momentum trends
-               ua(ji,jj,jk) = ua(ji,jj,jk) + zua * ( fsahmu(ji,jj,jk)*nkahm_smag +(1 -nkahm_smag ))
-               va(ji,jj,jk) = va(ji,jj,jk) + zva * ( fsahmv(ji,jj,jk)*nkahm_smag +(1 -nkahm_smag ))
+               ua(ji,jj,jk) = ua(ji,jj,jk) + zua
+               va(ji,jj,jk) = va(ji,jj,jk) + zva
             END DO
          END DO
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90	(revision 5282)
@@ -434,5 +434,5 @@
          ! II.3 Divergence of vertical fluxes added to the horizontal divergence
          ! ---------------------------------------------------------------------
-         IF( (kahm -nkahm_smag) ==1 ) THEN
+         IF( kahm ==1 ) THEN
             ! multiply the laplacian by the eddy viscosity coefficient
             DO jk = 1, jpkm1
@@ -449,5 +449,5 @@
                END DO
             END DO
-         ELSEIF( (kahm +nkahm_smag ) == 2 ) THEN
+         ELSEIF( kahm == 2 ) THEN
             ! second call, no multiplication
             DO jk = 1, jpkm1
Index: anches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90	(revision 5281)
+++ 	(revision )
@@ -1,596 +1,0 @@
-MODULE dynnept
-   !!======================================================================
-   !!                       ***  MODULE  dynnept  ***
-   !! Ocean dynamics: Neptune effect as proposed by Greg Holloway,
-   !!                 recoded version of simplest case (u*, v* only)
-   !!======================================================================
-   !! History :  1.0  !  2007-06  (Michael Dunphy)  Modular form: - new namelist parameters
-   !!                                                             - horizontal diffusion for Neptune
-   !!                                                             - vertical diffusion for gm in momentum eqns
-   !!                                                             - option to use Neptune in Coriolis eqn
-   !!                    2011-08  (Jeff Blundell, NOCS) Simplified form for temporally invariant u*, v*
-   !!                                               Horizontal and vertical diffusivity formulations removed
-   !!                                               Dynamic allocation of storage added
-   !!                                               Option of ramping Neptune vel. down
-   !!                                               to zero added in shallow depths added
-   !!----------------------------------------------------------------------
-   !! dynnept_alloc        :
-   !! dyn_nept_init        :
-   !! dyn_nept_div_cur_init:
-   !! dyn_nept_cor         :
-   !! dyn_nept_vel         :
-   !! dyn_nept_smooth_vel  :
-   !!----------------------------------------------------------------------
-   USE oce              ! ocean dynamics and tracers
-   USE dom_oce          ! ocean space and time domain
-   USE in_out_manager   ! I/O manager
-   USE lib_mpp          ! distributed memory computing
-   USE prtctl           ! Print control
-   USE phycst
-   USE lbclnk
-   USE wrk_nemo        ! Memory Allocation
-
-   IMPLICIT NONE
-   PRIVATE
-
-   !! * Routine accessibility
-   PUBLIC dyn_nept_init      ! routine called by nemogcm.F90
-   PUBLIC dyn_nept_cor       ! routine called by step.F90
-   !! dynnept_alloc()         is called only by dyn_nept_init, within this module
-   !! dyn_nept_div_cur_init   is called only by dyn_nept_init, within this module
-   !! dyn_nept_vel            is called only by dyn_nept_cor,  within this module
-
-   !! * Shared module variables
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)    :: zunep, zvnep  ! Neptune u and v
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)  :: zhdivnep      ! hor. div for Neptune vel.
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)  :: zmrotnep      ! curl for Neptune vel.
-
-
-   !! * Namelist namdyn_nept variables
-   LOGICAL, PUBLIC  ::  ln_neptsimp          ! yes/no simplified neptune
-
-   LOGICAL          ::  ln_smooth_neptvel    ! yes/no smooth zunep, zvnep
-   REAL(wp)         ::  rn_tslse             ! value of lengthscale L at the equator
-   REAL(wp)         ::  rn_tslsp             ! value of lengthscale L at the pole
-!! Specify whether to ramp down the Neptune velocity in shallow
-!! water, and the depth range controlling such ramping down
-   LOGICAL          ::  ln_neptramp          ! ramp down Neptune velocity in shallow water
-   REAL(wp)         ::  rn_htrmin            ! min. depth of transition range
-   REAL(wp)         ::  rn_htrmax            ! max. depth of transition range
-
-   !! * Module variables
-
-
-   !! * Substitutions
-#  include "vectopt_loop_substitute.h90"
-#  include "domzgr_substitute.h90"
-   !!----------------------------------------------------------------------
-   !!   OPA 9.0 , implemented by Bedford Institute of Oceanography
-   !!----------------------------------------------------------------------
-
- CONTAINS
-
-   INTEGER FUNCTION dynnept_alloc()
-      !!----------------------------------------------------------------------
-      !!                    ***  ROUTINE dynnept_alloc  ***
-      !!----------------------------------------------------------------------
-      ALLOCATE( zunep(jpi,jpj) , zvnep(jpi,jpj) ,     &
-         &      zhdivnep(jpi,jpj,jpk) , zmrotnep(jpi,jpj,jpk) , STAT=dynnept_alloc )
-         !
-      IF( dynnept_alloc /= 0 )   CALL ctl_warn('dynnept_alloc: array allocate failed.')
-   END FUNCTION dynnept_alloc
-
-
-   SUBROUTINE dyn_nept_init
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE dyn_nept_init  ***
-      !!
-      !! ** Purpose :   Read namelist parameters, initialise arrays
-      !!                and compute the arrays zunep and zvnep
-      !!
-      !! ** Method  :   zunep =
-      !!                zvnep =
-      !!
-      !! ** History :  1.0  !   07-05  (Zeliang Wang)   Original code for zunep, zvnep
-      !!               1.1  !   07-06  (Michael Dunphy) namelist and  initialisation
-      !!               2.0  ! 2011-07  (Jeff Blundell, NOCS)
-      !!                    ! Simplified form for temporally invariant u*, v*
-      !!                    ! Horizontal and vertical diffusivity formulations removed
-      !!                    ! Includes optional tapering-off in shallow depths
-      !!----------------------------------------------------------------------
-      USE iom
-      !!
-      INTEGER  ::   ji, jj, jk    ! dummy loop indices
-      REAL(wp) :: unemin,unemax,vnemin,vnemax   ! extrema of (u*, v*) fields
-      REAL(wp) :: zhdivmin,zhdivmax             ! extrema of horizontal divergence of (u*, v*) fields
-      REAL(wp) :: zmrotmin,zmrotmax             ! extrema of the curl of the (u*, v*) fields
-      REAL(wp) :: ustar,vstar                   ! (u*, v*) before tapering in shallow water
-      REAL(wp) :: hramp                         ! depth over which Neptune vel. is ramped down
-      !
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zht, htn, tscale, tsp, hur_n, hvr_n, hu_n, hv_n      
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: znmask
-      !!
-      NAMELIST/namdyn_nept/ ln_neptsimp, ln_smooth_neptvel, rn_tslse, rn_tslsp,      &
-                            ln_neptramp, rn_htrmin, rn_htrmax
-      INTEGER  ::   ios
-      !!----------------------------------------------------------------------
-      ! Define the (simplified) Neptune parameters
-      ! ==========================================
-
-      REWIND( numnam_ref )              ! Namelist namdyn_nept in reference namelist : Simplified Neptune
-      READ  ( numnam_ref, namdyn_nept, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_nept in reference namelist', lwp )
-
-      REWIND( numnam_cfg )              ! Namelist namdyn_nept in reference namelist : Simplified Neptune
-      READ  ( numnam_cfg, namdyn_nept, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_nept in configuration namelist', lwp )
-      IF(lwm) WRITE ( numond, namdyn_nept )
-
-      IF(lwp) THEN                      ! Control print
-         WRITE(numout,*)
-         WRITE(numout,*) 'dyn_nept_init : Simplified Neptune module'
-         WRITE(numout,*) '~~~~~~~~~~~~~'
-         WRITE(numout,*) ' -->   Reading namelist namdyn_nept parameters:'
-         WRITE(numout,*) '       ln_neptsimp          = ', ln_neptsimp
-         WRITE(numout,*)
-         IF( ln_neptsimp ) THEN
-            WRITE(numout,*) '       ln_smooth_neptvel    = ', ln_smooth_neptvel
-            WRITE(numout,*) '       rn_tslse             = ', rn_tslse
-            WRITE(numout,*) '       rn_tslsp             = ', rn_tslsp
-            WRITE(numout,*)
-            WRITE(numout,*) '       ln_neptramp          = ', ln_neptramp
-            WRITE(numout,*) '       rn_htrmin            = ', rn_htrmin
-            WRITE(numout,*) '       rn_htrmax            = ', rn_htrmax
-            WRITE(numout,*)
-         ENDIF
-      ENDIF
-      !
-      IF( .NOT. ln_neptsimp ) RETURN
-      !                                 ! Dynamically allocate local work arrays
-      CALL wrk_alloc( jpi, jpj     , zht, htn, tscale, tsp, hur_n, hvr_n, hu_n, hv_n  ) 
-      CALL wrk_alloc( jpi, jpj, jpk, znmask                                          ) 
-
-      IF( ln_smooth_neptvel ) THEN
-         IF(lwp) WRITE(numout,*) ' -->   neptune velocities will be smoothed'
-      ELSE
-         IF(lwp) WRITE(numout,*) ' -->   neptune velocities will not be smoothed'
-      ENDIF
-
-      IF( ln_neptramp ) THEN
-          IF(lwp) WRITE(numout,*) ' -->   ln_neptramp enabled, ramp down Neptune'
-          IF(lwp) WRITE(numout,*) ' -->   velocity components in shallow water'
-      ELSE
-          IF(lwp) WRITE(numout,*) ' -->   ln_neptramp disabled'
-      ENDIF
-
-
-!!    Perform dynamic allocation of shared module variables
-      IF( dynnept_alloc() /= 0 )   CALL ctl_warn('dynnept_alloc: array allocate failed.')
-
-      IF( .not. ln_rstart ) THEN      ! If restarting, these arrays are read from the restart file
-         zhdivnep(:,:,:) = 0.0_wp
-         zmrotnep(:,:,:) = 0.0_wp
-      END IF
-
-      ! Computation of nmask: same as fmask, but fmask cannot be used
-      ! because it is modified after it is computed in dom_msk
-      ! (this can be optimised to save memory, such as merge into next loop)
-      DO jk = 1, jpk
-         DO jj = 1, jpjm1
-            DO ji = 1, fs_jpim1   ! vector loop
-               znmask(ji,jj,jk) = tmask(ji,jj  ,jk) * tmask(ji+1,jj  ,jk)   &
-                   &            * tmask(ji,jj+1,jk) * tmask(ji+1,jj+1,jk)
-            END DO
-         END DO
-      END DO
-
-      CALL lbc_lnk( znmask, 'F', 1.0_wp )
-
-
-      ! now compute zunep, zvnep (renamed from earlier versions)
-
-      zunep(:,:) = 0.0_wp
-      zvnep(:,:) = 0.0_wp
-
-      htn(:,:) = 0.0_wp            ! ocean depth at F-point
-      DO jk = 1, jpk
-         htn(:,:) = htn(:,:) + fse3f(:,:,jk) * znmask(:,:,jk)
-      END DO
-
-      IF( ln_smooth_neptvel ) THEN
-         CALL dyn_nept_smooth_vel( htn, zht, .TRUE. )
-      !! overwrites zht with a smoothed version of htn
-      ELSE
-         zht(:,:) = htn(:,:)
-      !! use unsmoothed version of htn
-      ENDIF
-      CALL lbc_lnk( zht, 'F', 1.0_wp )
-
-      !! Compute tsp, a stream function for the Neptune velocity,
-      !! with the usual geophysical sign convention
-      !! Then zunep = -latitudinal derivative "-(1/H)*d(tsp)/dy"
-      !!      zvnep = longitudinal derivative " (1/H)*d(tsp)/dx"
-
-      tsp(:,:)    = 0.0_wp
-      tscale(:,:) = 0.0_wp
-
-      tscale(:,:) = rn_tslsp + (rn_tslse - rn_tslsp) *   &
-                   ( 0.5_wp + 0.5_wp * COS( 2.0_wp * rad * gphif(:,:) )  )
-      tsp   (:,:) = -2.0_wp * omega * SIN( rad * gphif(:,:) ) * tscale(:,:) * tscale(:,:) * zht(:,:)
-
-
-      IF( ln_smooth_neptvel ) THEN
-         CALL dyn_nept_smooth_vel( hu, hu_n, .TRUE. )
-      !! overwrites hu_n with a smoothed version of hu
-      ELSE
-         hu_n(:,:) = hu(:,:)
-      !! use unsmoothed version of hu
-      ENDIF
-      CALL lbc_lnk( hu_n, 'U', 1.0_wp )
-      hu_n(:,:) = hu_n(:,:) * umask(:,:,1)
-
-      WHERE( hu_n(:,:) == 0.0_wp )
-         hur_n(:,:) = 0.0_wp
-      ELSEWHERE
-         hur_n(:,:) = 1.0_wp / hu_n(:,:)
-      END WHERE
-
-
-      IF( ln_smooth_neptvel ) THEN
-         CALL dyn_nept_smooth_vel( hv, hv_n, .TRUE. )
-      !! overwrites hv_n with a smoothed version of hv
-      ELSE
-         hv_n(:,:) = hv(:,:)
-      !! use unsmoothed version of hv
-      ENDIF
-      CALL lbc_lnk( hv_n, 'V', 1.0_wp )
-      hv_n(:,:) = hv_n(:,:) * vmask(:,:,1)
-
-      WHERE( hv_n == 0.0_wp )
-         hvr_n(:,:) = 0.0_wp
-      ELSEWHERE
-         hvr_n(:,:) = 1.0_wp / hv_n(:,:)
-      END WHERE
-
-
-      unemin =  1.0e35
-      unemax = -1.0e35
-      vnemin =  1.0e35
-      vnemax = -1.0e35
-      hramp = rn_htrmax - rn_htrmin
-      DO jj = 2, jpj-1
-         DO ji = 2, jpi-1
-            if ( umask(ji,jj,1) /= 0.0_wp ) then
-               ustar =-1.0_wp/e2u(ji,jj) * hur_n(ji,jj) * ( tsp(ji,jj)-tsp(ji,jj-1) ) * umask(ji,jj,1)
-               if ( ln_neptramp ) then
-!!                Apply ramp down to velocity component
-                  if ( hu_n(ji,jj) <= rn_htrmin ) then
-                    zunep(ji,jj) = 0.0_wp
-                   else if ( hu_n(ji,jj) >= rn_htrmax ) then
-                    zunep(ji,jj) = ustar
-                   else if ( hramp > 0.0_wp ) then
-                    zunep(ji,jj) = ( hu_n(ji,jj) - rn_htrmin) * ustar/hramp
-                  endif
-                else
-                 zunep(ji,jj) = ustar
-               endif 
-             else
-              zunep(ji,jj) = 0.0_wp
-            endif
-            if ( vmask(ji,jj,1) /= 0.0_wp ) then
-               vstar = 1.0_wp/e1v(ji,jj) * hvr_n(ji,jj) * ( tsp(ji,jj)-tsp(ji-1,jj) ) * vmask(ji,jj,1)
-               if ( ln_neptramp ) then
-!!                Apply ramp down to velocity component
-                  if ( hv_n(ji,jj) <= rn_htrmin ) then
-                    zvnep(ji,jj) = 0.0_wp
-                   else if ( hv_n(ji,jj) >= rn_htrmax ) then
-                    zvnep(ji,jj) = vstar
-                   else if ( hramp > 0.0_wp ) then
-                    zvnep(ji,jj) = ( hv_n(ji,jj) - rn_htrmin) * vstar/hramp
-                  endif
-                else
-                  zvnep(ji,jj) = vstar
-               endif
-             else
-              zvnep(ji,jj) = 0.0_wp
-            endif
-            unemin = min( unemin, zunep(ji,jj) )
-            unemax = max( unemax, zunep(ji,jj) )
-            vnemin = min( vnemin, zvnep(ji,jj) )
-            vnemax = max( vnemax, zvnep(ji,jj) )
-         END DO
-      END DO
-      CALL lbc_lnk( zunep, 'U', -1.0_wp )
-      CALL lbc_lnk( zvnep, 'V', -1.0_wp )
-      WRITE(numout,*) '      zunep: min, max       = ', unemin,unemax
-      WRITE(numout,*) '      zvnep: min, max       = ', vnemin,vnemax
-      WRITE(numout,*)
-
-      !!  Compute, once and for all, the horizontal divergence (zhdivnep)
-      !!  and the curl (zmrotnep) of the Neptune velocity field (zunep, zvnep)
-      CALL dyn_nept_div_cur_init
-
-      !! Check the ranges of the computed divergence & vorticity
-      zhdivmin =  1.0e35
-      zhdivmax = -1.0e35
-      zmrotmin =  1.0e35
-      zmrotmax = -1.0e35
-      hramp = rn_htrmax - rn_htrmin
-      DO jk = 1, jpkm1                                 ! Horizontal slab
-         DO jj = 2, jpj-1
-            DO ji = 2, jpi-1
-               zhdivmin = min( zhdivmin, zhdivnep(ji,jj,jk) )
-               zhdivmax = max( zhdivmax, zhdivnep(ji,jj,jk) )
-               zmrotmin = min( zmrotmin, zmrotnep(ji,jj,jk) )
-               zmrotmax = max( zmrotmax, zmrotnep(ji,jj,jk) )
-            END DO
-         END DO
-      END DO
-      WRITE(numout,*) '   zhdivnep: min, max       = ', zhdivmin,zhdivmax
-      WRITE(numout,*) '   zmrotnep: min, max       = ', zmrotmin,zmrotmax
-      WRITE(numout,*)
-
-!!    Deallocate temporary workspace arrays, which are all local to
-!!    this routine, except where passed as arguments to other routines
-      CALL wrk_dealloc( jpi, jpj     , zht, htn, tscale, tsp, hur_n, hvr_n, hu_n, hv_n  ) 
-      CALL wrk_dealloc( jpi, jpj, jpk, znmask                                          ) 
-      !
-   END SUBROUTINE dyn_nept_init
-
-
-   SUBROUTINE dyn_nept_div_cur_init
-      !!----------------------------------------------------------------------
-      !!             ***  ROUTINE dyn_nept_div_cur_init  ***
-      !!
-      !! ** Purpose :   compute the horizontal divergence and the relative
-      !!                vorticity of the time-invariant u* and v* Neptune
-      !!                effect velocities (called zunep, zvnep)
-      !!
-      !! ** Method  : - Divergence:
-      !!      - compute the divergence given by :
-      !!         zhdivnep = 1/(e1t*e2t*e3t) ( di[e2u*e3u zunep] + dj[e1v*e3v zvnep] )
-      !!      - compute the curl in tensorial formalism:
-      !!         zmrotnep = 1/(e1f*e2f) ( di[e2v zvnep] - dj[e1u zunep] )
-      !!      Note: Coastal boundary condition: lateral friction set through
-      !!      the value of fmask along the coast (see dommsk.F90) and shlat
-      !!      (namelist parameter)
-      !!
-      !! ** Action  : - compute zhdivnep, the hor. divergence of (u*, v*)
-      !!              - compute zmrotnep, the rel. vorticity  of (u*, v*)
-      !!
-      !! History :  OPA  ! 1987-06  (P. Andrich, D. L Hostis)  Original code
-      !!            4.0  ! 1991-11  (G. Madec)
-      !!            6.0  ! 1993-03  (M. Guyon)  symetrical conditions
-      !!            7.0  ! 1996-01  (G. Madec)  s-coordinates
-      !!            8.0  ! 1997-06  (G. Madec)  lateral boundary cond., lbc
-      !!            8.1  ! 1997-08  (J.M. Molines)  Open boundaries
-      !!            8.2  ! 2000-03  (G. Madec)  no slip accurate
-      !!  NEMO      1.0  ! 2002-09  (G. Madec, E. Durand)  Free form, F90
-      !!             -   ! 2005-01  (J. Chanut) Unstructured open boundaries
-      !!             -   ! 2003-08  (G. Madec)  merged of cur and div, free form, F90
-      !!             -   ! 2005-01  (J. Chanut, A. Sellar) unstructured open boundaries
-      !!            3.3  ! 2010-09  (D.Storkey and E.O'Dea) bug fixes for BDY module
-      !!                 ! 2011-06  (Jeff Blundell, NOCS) Adapt code from divcur.F90
-      !!                 !           to compute Neptune effect fields only
-      !!----------------------------------------------------------------------
-      !
-      INTEGER  ::   ji, jj, jk          ! dummy loop indices
-      !!----------------------------------------------------------------------
-      !    
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'dyn_nept_div_cur_init :'
-      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~'
-      IF(lwp) WRITE(numout,*) 'horizontal velocity divergence and'
-      IF(lwp) WRITE(numout,*) 'relative vorticity of Neptune flow'
-#if defined key_noslip_accurate
-   !!----------------------------------------------------------------------
-   !!   'key_noslip_accurate'                     2nd order centered scheme
-   !!                                                4th order at the coast
-   !!----------------------------------------------------------------------
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'WARNING: key_noslip_accurate option'
-      IF(lwp) WRITE(numout,*) 'not implemented in simplified Neptune'
-      CALL ctl_warn( ' noslip_accurate option not implemented' )
-#endif
-
-   !!----------------------------------------------------------------------
-   !!   Default option                           2nd order centered schemes
-   !!----------------------------------------------------------------------
-
-      ! Apply the div and curl operators to the depth-dependent velocity
-      ! field produced by multiplying (zunep, zvnep) by (umask, vmask), exactly
-      ! equivalent to the equivalent calculation in the unsimplified code
-      !                                                ! ===============
-      DO jk = 1, jpkm1                                 ! Horizontal slab
-         !                                             ! ===============
-         !                                             ! --------
-         ! Horizontal divergence                       !   div
-         !                                             ! --------
-         DO jj = 2, jpjm1
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-               zhdivnep(ji,jj,jk) =   &
-               &   (  e2u(ji  ,jj  )*fse3u(ji  ,jj  ,jk) * zunep(ji  ,jj  ) * umask(ji  ,jj  ,jk)    &
-               &    - e2u(ji-1,jj  )*fse3u(ji-1,jj  ,jk) * zunep(ji-1,jj  ) * umask(ji-1,jj  ,jk)    &
-               &    + e1v(ji  ,jj  )*fse3v(ji  ,jj  ,jk) * zvnep(ji  ,jj  ) * vmask(ji  ,jj  ,jk)    &
-               &    - e1v(ji  ,jj-1)*fse3v(ji  ,jj-1,jk) * zvnep(ji  ,jj-1) * vmask(ji  ,jj-1,jk) )  &
-               &  / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-            END DO
-         END DO
-
-         IF( .NOT. AGRIF_Root() ) THEN
-            IF ((nbondi ==  1).OR.(nbondi == 2))  zhdivnep(nlci-1 , :     ,jk) = 0.0_wp   ! east
-            IF ((nbondi == -1).OR.(nbondi == 2))  zhdivnep(2      , :     ,jk) = 0.0_wp   ! west
-            IF ((nbondj ==  1).OR.(nbondj == 2))  zhdivnep(:      ,nlcj-1 ,jk) = 0.0_wp   ! north
-            IF ((nbondj == -1).OR.(nbondj == 2))  zhdivnep(:      ,2      ,jk) = 0.0_wp   ! south
-         ENDIF
-
-         !                                             ! --------
-         ! relative vorticity                          !   rot
-         !                                             ! --------
-         DO jj = 1, jpjm1
-            DO ji = 1, fs_jpim1   ! vector opt.
-               zmrotnep(ji,jj,jk) =   &
-                  &       (  e2v(ji+1,jj  ) * zvnep(ji+1,jj  ) * vmask(ji+1,jj  ,jk)     &
-                  &        - e2v(ji  ,jj  ) * zvnep(ji  ,jj  ) * vmask(ji  ,jj  ,jk)     &
-                  &        - e1u(ji  ,jj+1) * zunep(ji  ,jj+1) * umask(ji  ,jj+1,jk)     &
-                  &        + e1u(ji  ,jj  ) * zunep(ji  ,jj  ) * umask(ji  ,jj  ,jk)  )  &
-                  &       * fmask(ji,jj,jk) / ( e1f(ji,jj) * e2f(ji,jj) )
-            END DO
-         END DO
-         !                                             ! ===============
-      END DO                                           !   End of slab
-      !                                                ! ===============
-
-      ! 4. Lateral boundary conditions on zhdivnep and zmrotnep
-      ! ----------------------------------=======-----=======
-      CALL lbc_lnk( zhdivnep, 'T', 1. )   ;   CALL lbc_lnk( zmrotnep , 'F', 1. )     ! lateral boundary cond. (no sign change)
-      !
-   END SUBROUTINE dyn_nept_div_cur_init
-
-
-   SUBROUTINE dyn_nept_cor( kt )
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE dyn_nept_cor  ***
-      !!
-      !! ** Purpose :  Add or subtract the Neptune velocity from the now velocities
-      !!
-      !! ** Method  :  First call : kt not equal to lastkt -> subtract zunep, zvnep
-      !!               Second call: kt     equal to lastkt -> add zunep, zvnep
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   kt       ! ocean time-step index
-      !!
-      INTEGER, SAVE :: lastkt             ! store previous kt
-      DATA lastkt/-1/                     ! initialise previous kt
-      !!----------------------------------------------------------------------
-      !
-      IF( ln_neptsimp ) THEN
-         !
-         IF( lastkt /= kt ) THEN          ! 1st call for this kt: subtract the Neptune velocities zunep, zvnep from un, vn
-            CALL dyn_nept_vel( -1 )      ! -1 = subtract
-            !
-         ELSE                              ! 2nd call for this kt: add the Neptune velocities zunep, zvnep to un, vn
-            CALL dyn_nept_vel(  1 )      !  1 = add
-            !
-         ENDIF
-         !
-         lastkt = kt     ! Store kt
-         !
-      ENDIF
-      !
-   END SUBROUTINE dyn_nept_cor
-
-
-   SUBROUTINE dyn_nept_vel( ksign )
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE dyn_nept_vel  ***
-      !!
-      !! ** Purpose :  Add or subtract the Neptune velocity from the now
-      !!               velocities based on ksign
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   ksign    ! 1 or -1 to add or subtract neptune velocities
-      !!
-      INTEGER :: jk                       ! dummy loop index
-      !!----------------------------------------------------------------------
-      !
-      ! Adjust the current velocity un, vn by adding or subtracting the
-      ! Neptune velocities zunep, zvnep, as determined by argument ksign
-      DO jk=1, jpk
-         un(:,:,jk) = un(:,:,jk) + ksign * zunep(:,:) * umask(:,:,jk)
-         vn(:,:,jk) = vn(:,:,jk) + ksign * zvnep(:,:) * vmask(:,:,jk)
-      END DO
-      !
-   END SUBROUTINE dyn_nept_vel
-
-
-   SUBROUTINE dyn_nept_smooth_vel( htold, htnew, ld_option )
-
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE dyn_nept_smooth_vel  ***
-      !!
-      !! ** Purpose :  Compute smoothed topography field.
-      !!
-      !! ** Action : - Updates the array htnew (output) with a smoothed
-      !!               version of the (input) array htold. Form of smoothing
-      !!               algorithm is controlled by the (logical) argument ld_option.
-      !!----------------------------------------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   )  ::  htold      ! temporary 2D workspace
-      LOGICAL                     , INTENT(in   )  ::  ld_option  ! temporary 2D workspace
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout)  ::  htnew      ! temporary 2D workspace
-      !
-      INTEGER                           ::  ji, jj  ! dummy loop indices
-      INTEGER , POINTER, DIMENSION(:,:) ::  nb, iwork
-      REAL(wp), POINTER, DIMENSION(:,:) ::  work    ! temporary 2D workspace
-      !!----------------------------------------------------------------------
-      !
-      CALL wrk_alloc( jpi, jpj, nb, iwork ) 
-      CALL wrk_alloc( jpi, jpj, work      ) 
-      !
-      iwork(:,:) = 0
-
-      !! iwork is a mask of gridpoints: iwork = 1 => ocean, iwork = 0 => land
-      WHERE( htold(:,:) > 0 )
-         iwork(:,:) = 1
-         htnew(:,:) = htold(:,:)
-      ELSEWHERE
-         iwork(:,:) = 0
-         htnew(:,:) = 0.0_wp
-      END WHERE
-      !! htnew contains valid ocean depths from htold, or zero
-
-      !! set work to a smoothed/averaged version of htnew; choice controlled by ld_option
-      !! nb is set to the sum of the weights of the valid values used in work
-      IF( ld_option ) THEN
-
-         !! Apply scale-selective smoothing in determining work from htnew
-         DO jj=2,jpj-1
-            DO ji=2,jpi-1
-               work(ji,jj) = 4.0*htnew( ji , jj ) +                        &
-                           & 2.0*htnew(ji+1, jj ) + 2.0*htnew(ji-1, jj ) + &
-                           & 2.0*htnew( ji ,jj+1) + 2.0*htnew( ji ,jj-1) + &
-                           &     htnew(ji+1,jj+1) +     htnew(ji+1,jj-1) + &
-                           &     htnew(ji-1,jj+1) +     htnew(ji-1,jj-1)
-
-               nb(ji,jj)   = 4 * iwork( ji , jj ) +                        &
-                           & 2 * iwork(ji+1, jj ) + 2 * iwork(ji-1, jj ) + &
-                           & 2 * iwork( ji ,jj+1) + 2 * iwork( ji ,jj-1) + &
-                           &     iwork(ji+1,jj+1) +     iwork(ji+1,jj-1) + &
-                           &     iwork(ji-1,jj+1) +     iwork(ji-1,jj-1)
-            END DO
-         END DO
-
-      ELSE
-
-         !! Apply simple 9-point averaging in determining work from htnew
-         DO jj=2,jpj-1
-            DO ji=2,jpi-1
-               work(ji,jj) =  htnew( ji , jj ) +                    &
-                           &  htnew(ji+1, jj ) + htnew(ji-1, jj ) + &
-                           &  htnew( ji ,jj+1) + htnew( ji ,jj-1) + &
-                           &  htnew(ji+1,jj+1) + htnew(ji+1,jj-1) + &
-                           &  htnew(ji-1,jj+1) + htnew(ji-1,jj-1)
-
-               nb(ji,jj) =    iwork( ji , jj ) +                    &
-                           &  iwork(ji+1, jj ) + iwork(ji-1, jj ) + &
-                           &  iwork( ji ,jj+1) + iwork( ji ,jj-1) + &
-                           &  iwork(ji+1,jj+1) + iwork(ji+1,jj-1) + &
-                           &  iwork(ji-1,jj+1) + iwork(ji-1,jj-1)
-            END DO
-         END DO
-
-      ENDIF
-
-      !! write averaged value of work into htnew,
-      !! if average is valid and point is unmasked
-      WHERE( (htold(:,:) /= 0.0_wp ) .AND. ( nb(:,:) /= 0 ) )
-         htnew(:,:) = work(:,:)/real(nb(:,:))
-      ELSEWHERE
-         htnew(:,:) = 0.0_wp
-      END WHERE
-
-      !!    Deallocate temporary workspace arrays, all local to this routine
-      CALL wrk_dealloc( jpi, jpj, nb, iwork ) 
-      CALL wrk_dealloc( jpi, jpj, work      ) 
-      !
-   END SUBROUTINE dyn_nept_smooth_vel
-
-END MODULE dynnept
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 5282)
@@ -272,9 +272,4 @@
 #endif
 
-      !                        ! Control of timestep choice
-      IF( lk_dynspg_ts .OR. lk_dynspg_exp ) THEN
-         IF( nn_cla == 1 )   CALL ctl_stop( 'Crossland advection not implemented for this free surface formulation' )
-      ENDIF
-
       !			       ! Control of hydrostatic pressure choice
       IF( lk_dynspg_ts .AND. ln_dynhpg_imp ) THEN
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 5282)
@@ -36,5 +36,4 @@
    USE bdydyn          ! ocean open boundary condition on dynamics
    USE bdyvol          ! ocean open boundary condition (bdy_vol routine)
-   USE cla             ! cross land advection
    USE trd_oce         ! trends: ocean variables
    USE trddyn          ! trend manager: dynamics
@@ -206,5 +205,4 @@
       CALL Agrif_dyn( kt )    ! Update velocities on each coarse/fine interfaces 
 #endif
-      IF( nn_cla == 1 .AND. cp_cfg == 'orca' .AND. jp_cfg == 2 )   CALL cla_dynspg( kt )      ! Cross Land Advection (update (ua,va))
 
       ! compute the next vertically averaged velocity (effect of the additional force not included)
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 5282)
@@ -35,5 +35,4 @@
 
    INTEGER  ::   nzdf = 0   ! type vertical diffusion algorithm used, defined from ln_zdf... namlist logicals
-   REAL(wp) ::   r2dt       ! time-step, = 2 rdttra except at nit000 (=rdttra) if neuler=0
 
    !! * Substitutions
@@ -64,6 +63,6 @@
       !
       !                                          ! set time step
-      IF( neuler == 0 .AND. kt == nit000     ) THEN   ;   r2dt =      rdt   ! = rdtra (restart with Euler time stepping)
-      ELSEIF(               kt <= nit000 + 1 ) THEN   ;   r2dt = 2. * rdt   ! = 2 rdttra (leapfrog)
+      IF( neuler == 0 .AND. kt == nit000     ) THEN   ;   r2dt =      rdt   ! = rdt(restart with Euler time stepping)
+      ELSEIF(               kt <= nit000 + 1 ) THEN   ;   r2dt = 2. * rdt   ! = 2 rdt (leapfrog)
       ENDIF
 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 5282)
@@ -38,6 +38,4 @@
    INTEGER       ::   nn_write         !: model standard output frequency
    INTEGER       ::   nn_stock         !: restart file frequency
-   LOGICAL       ::   ln_dimgnnn       !: type of dimgout. (F): 1 file for all proc
-                                                       !:                  (T): 1 file per proc
    LOGICAL       ::   ln_mskland       !: mask land points in NetCDF outputs (costly: + ~15%)
    LOGICAL       ::   ln_clobber       !: clobber (overwrite) an existing file
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 5282)
@@ -8,4 +8,5 @@
    !!            3.0  ! 2007-07  (D. Storkey) Changes to iom_gettime
    !!            3.4  ! 2012-12  (R. Bourdalle-Badie and G. Reffray)  add C1D case  
+   !!            3.6  ! 2014-15  DIMG format removed
    !!--------------------------------------------------------------------
 
@@ -23,7 +24,5 @@
    USE lbclnk          ! lateal boundary condition / mpp exchanges
    USE iom_def         ! iom variables definitions
-   USE iom_ioipsl      ! NetCDF format with IOIPSL library
    USE iom_nf90        ! NetCDF format with native NetCDF library
-   USE iom_rstdimg     ! restarts access direct format "dimg" style...
    USE in_out_manager  ! I/O manager
    USE lib_mpp           ! MPP library
@@ -205,5 +204,5 @@
       CHARACTER(LEN=256)    ::   clname    ! the name of the file based on cdname [[+clcpu]+clcpu]
       CHARACTER(LEN=256)    ::   cltmpn    ! tempory name to store clname (in writting mode)
-      CHARACTER(LEN=10)     ::   clsuffix  ! ".nc" or ".dimg"
+      CHARACTER(LEN=10)     ::   clsuffix  ! ".nc" 
       CHARACTER(LEN=15)     ::   clcpu     ! the cpu number (max jpmax_digits digits)
       CHARACTER(LEN=256)    ::   clinfo    ! info character
@@ -268,9 +267,7 @@
       ! which suffix should we use?
       SELECT CASE (iolib)
-      CASE (jpioipsl ) ;   clsuffix = '.nc'
       CASE (jpnf90   ) ;   clsuffix = '.nc'
-      CASE (jprstdimg) ;   clsuffix = '.dimg'
       CASE DEFAULT     ;   clsuffix = ''
-         CALL ctl_stop( TRIM(clinfo), 'accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+         CALL ctl_stop( TRIM(clinfo), 'accepted IO library is only jpnf90 (jpioipsl option has been removed) ' )
       END SELECT
       ! Add the suffix if needed
@@ -285,7 +282,6 @@
       IF( .NOT.llok ) THEN
          ! we try to add the cpu number to the name
-         IF( iolib == jprstdimg ) THEN   ;   WRITE(clcpu,*) narea
-         ELSE                            ;   WRITE(clcpu,*) narea-1
-         ENDIF
+         WRITE(clcpu,*) narea-1
+
          clcpu  = TRIM(ADJUSTL(clcpu))
          iln = INDEX(clname,TRIM(clsuffix), back = .TRUE.)
@@ -334,5 +330,5 @@
          END SELECT
       ENDIF
-      ! Open the NetCDF or RSTDIMG file
+      ! Open the NetCDF file
       ! =============
       ! do we have some free file identifier?
@@ -358,9 +354,7 @@
       IF( istop == nstop ) THEN   ! no error within this routine
          SELECT CASE (iolib)
-         CASE (jpioipsl )   ;   CALL iom_ioipsl_open(  clname, kiomid, llwrt, llok, idompar )
          CASE (jpnf90   )   ;   CALL iom_nf90_open(    clname, kiomid, llwrt, llok, idompar )
-         CASE (jprstdimg)   ;   CALL iom_rstdimg_open( clname, kiomid, llwrt, llok, idompar )
          CASE DEFAULT
-            CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+            CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed) ' )
          END SELECT
       ENDIF
@@ -397,9 +391,7 @@
             IF( iom_file(jf)%nfid > 0 ) THEN
                SELECT CASE (iom_file(jf)%iolib)
-               CASE (jpioipsl )   ;   CALL iom_ioipsl_close(  jf )
                CASE (jpnf90   )   ;   CALL iom_nf90_close(    jf )
-               CASE (jprstdimg)   ;   CALL iom_rstdimg_close( jf )
                CASE DEFAULT
-                  CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+                  CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
                END SELECT
                iom_file(jf)%nfid       = 0          ! free the id 
@@ -456,9 +448,7 @@
                IF( iiv <= jpmax_vars ) THEN
                   SELECT CASE (iom_file(kiomid)%iolib)
-                  CASE (jpioipsl )   ;   iom_varid = iom_ioipsl_varid( kiomid, cdvar, iiv, kdimsz )
                   CASE (jpnf90   )   ;   iom_varid = iom_nf90_varid  ( kiomid, cdvar, iiv, kdimsz, kndims )
-                  CASE (jprstdimg)   ;   iom_varid = -1   ! all variables are listed in iom_file
-                  CASE DEFAULT   
-                     CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+                  CASE DEFAULT
+                     CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
                   END SELECT
                ELSE
@@ -518,9 +508,7 @@
                                  &                         'Use ncwa -a to suppress the unnecessary dimensions' )
             SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpioipsl )   ;   CALL iom_ioipsl_get(  kiomid, idvar, pvar, itime )
             CASE (jpnf90   )   ;   CALL iom_nf90_get(    kiomid, idvar, pvar, itime )
-            CASE (jprstdimg)   ;   CALL iom_rstdimg_get( kiomid, idvar, pvar )
-            CASE DEFAULT    
-               CALL ctl_stop( 'iom_g0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+            CASE DEFAULT
+               CALL ctl_stop( 'iom_g0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
             END SELECT
          ENDIF
@@ -785,12 +773,8 @@
       
          SELECT CASE (iom_file(kiomid)%iolib)
-         CASE (jpioipsl )   ;   CALL iom_ioipsl_get(  kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2,   &
-            &                                         pv_r1d, pv_r2d, pv_r3d )
          CASE (jpnf90   )   ;   CALL iom_nf90_get(    kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2,   &
             &                                         pv_r1d, pv_r2d, pv_r3d )
-         CASE (jprstdimg)   ;   CALL iom_rstdimg_get( kiomid, idom, idvar, ix1, ix2, iy1, iy2,   &
-            &                                         pv_r1d, pv_r2d, pv_r3d )
-         CASE DEFAULT    
-            CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+         CASE DEFAULT
+            CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
          END SELECT
 
@@ -879,9 +863,7 @@
                   IF( iom_file(kiomid)%dimsz(1,idvar) <= size(ptime) ) THEN
                      SELECT CASE (iom_file(kiomid)%iolib)
-                     CASE (jpioipsl )   ;   CALL iom_ioipsl_gettime( kiomid, idvar, ptime, cdunits, cdcalendar )
                      CASE (jpnf90   )   ;   CALL iom_nf90_gettime(   kiomid, idvar, ptime, cdunits, cdcalendar )
-                     CASE (jprstdimg)   ;   CALL ctl_stop( TRIM(clinfo)//' case IO library == jprstdimg not coded...' )
-                     CASE DEFAULT    
-                        CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+                     CASE DEFAULT
+                        CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
                      END SELECT
                   ELSE
@@ -914,9 +896,7 @@
          IF( iom_file(kiomid)%nfid > 0 ) THEN
             SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpioipsl )   ;   CALL ctl_stop('iom_getatt: only nf90 available')
             CASE (jpnf90   )   ;   CALL iom_nf90_getatt( kiomid, cdatt, pvar )
-            CASE (jprstdimg)   ;   CALL ctl_stop('iom_getatt: only nf90 available')
-            CASE DEFAULT    
-               CALL ctl_stop( 'iom_g0d_att: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+            CASE DEFAULT
+               CALL ctl_stop( 'iom_g0d_att: accepted IO library is only jpnf90' )
             END SELECT
          ENDIF
@@ -940,9 +920,7 @@
             ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
             SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar )
             CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar )
-            CASE (jprstdimg)   ;   IF( kt == kwrite )    CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pvar )
-            CASE DEFAULT     
-               CALL ctl_stop( 'iom_rp0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+            CASE DEFAULT
+               CALL ctl_stop( 'iom_rp0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
             END SELECT
          ENDIF
@@ -962,9 +940,7 @@
             ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
             SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar )
             CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar )
-            CASE (jprstdimg)   ;   IF( kt == kwrite )    CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r1d = pvar )
-            CASE DEFAULT     
-               CALL ctl_stop( 'iom_rp1d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+            CASE DEFAULT
+               CALL ctl_stop( 'iom_rp1d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
             END SELECT
          ENDIF
@@ -984,9 +960,7 @@
             ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
             SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar )
             CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar )
-            CASE (jprstdimg)   ;   IF( kt == kwrite )   CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r2d = pvar ) 
-            CASE DEFAULT     
-               CALL ctl_stop( 'iom_rp2d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+            CASE DEFAULT
+               CALL ctl_stop( 'iom_rp2d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
             END SELECT
          ENDIF
@@ -1006,9 +980,7 @@
             ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
             SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar )
             CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar )
-            CASE (jprstdimg)   ;   IF( kt == kwrite )   CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r3d = pvar )
-            CASE DEFAULT     
-               CALL ctl_stop( 'iom_rp3d: accepted IO library are only jpioipsl and jprstdimg' )
+            CASE DEFAULT
+               CALL ctl_stop( 'iom_rp3d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
             END SELECT
          ENDIF
@@ -1417,5 +1389,5 @@
             idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@')
             DO WHILE ( idx /= 0 ) 
-               cldate = iom_sdate( fjulday - rdttra(1) / rday )
+               cldate = iom_sdate( fjulday - rdt / rday )
                clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+11:LEN_TRIM(clname))
                idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@')
@@ -1424,5 +1396,5 @@
             idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@')
             DO WHILE ( idx /= 0 ) 
-               cldate = iom_sdate( fjulday - rdttra(1) / rday, ldfull = .TRUE. )
+               cldate = iom_sdate( fjulday - rdt / rday, ldfull = .TRUE. )
                clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+15:LEN_TRIM(clname))
                idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@')
@@ -1431,5 +1403,5 @@
             idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@')
             DO WHILE ( idx /= 0 ) 
-               cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. )
+               cldate = iom_sdate( fjulday + rdt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. )
                clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+9:LEN_TRIM(clname))
                idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@')
@@ -1438,5 +1410,5 @@
             idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@')
             DO WHILE ( idx /= 0 ) 
-               cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. )
+               cldate = iom_sdate( fjulday + rdt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. )
                clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+13:LEN_TRIM(clname))
                idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@')
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90	(revision 5282)
@@ -28,12 +28,7 @@
    INTEGER, PARAMETER, PUBLIC ::   jpdom_autodta       = 9   !: 
 
-   INTEGER, PARAMETER, PUBLIC ::   jpioipsl    = 100      !: Use ioipsl (fliocom only) library
    INTEGER, PARAMETER, PUBLIC ::   jpnf90      = 101      !: Use nf90 library
-   INTEGER, PARAMETER, PUBLIC ::   jprstdimg   = 102      !: Use restart dimgs (fortran direct acces) library
-#if defined key_dimgout
-   INTEGER, PARAMETER, PUBLIC ::   jprstlib  = jprstdimg  !: restarts io library
-#else
+
    INTEGER, PARAMETER, PUBLIC ::   jprstlib  = jpnf90     !: restarts io library
-#endif
 
    INTEGER, PARAMETER, PUBLIC ::   jp_r8    = 200      !: write REAL(8)
@@ -54,5 +49,6 @@
       CHARACTER(LEN=240)                        ::   name     !: name of the file
       INTEGER                                   ::   nfid     !: identifier of the file (0 if closed)
-      INTEGER                                   ::   iolib    !: library used to read the file (jpioipsl, jpnf90 or jprstdimg)
+      INTEGER                                   ::   iolib    !: library used to read the file (jpnf90 or new formats,
+                                                              !: jpioipsl option has been removed)
       INTEGER                                   ::   nvars    !: number of identified varibles in the file
       INTEGER                                   ::   iduld    !: id of the unlimited dimension
Index: anches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom_ioipsl.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom_ioipsl.F90	(revision 5281)
+++ 	(revision )
@@ -1,439 +1,0 @@
-MODULE iom_ioipsl
-   !!=====================================================================
-   !!                    ***  MODULE  iom_ioipsl ***
-   !! Input/Output manager :  Library to read input files with IOIPSL (only fliocom module)
-   !!====================================================================
-   !! History :  9.0  ! 05 12  (J. Belier) Original code
-   !!            9.0  ! 06 02  (S. Masson) Adaptation to NEMO
-   !!             "   ! 07 07  (D. Storkey) Changes to iom_ioipsl_gettime
-   !!--------------------------------------------------------------------
-   !!gm  caution add !DIR nec: improved performance to be checked as well as no result changes
-
-   !!--------------------------------------------------------------------
-   !!   iom_open       : open a file read only
-   !!   iom_close      : close a file or all files opened by iom
-   !!   iom_get        : read a field (interfaced to several routines)
-   !!   iom_gettime    : read the time axis kvid in the file
-   !!   iom_varid      : get the id of a variable in a file
-   !!   iom_rstput     : write a field in a restart file (interfaced to several routines)
-   !!--------------------------------------------------------------------
-   USE dom_oce         ! ocean space and time domain
-   USE iom_def         ! iom variables definitions
-   USE ioipsl          ! IOIPSL library
-   USE in_out_manager  ! I/O manager
-   USE lib_mpp         ! MPP library
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC iom_ioipsl_open, iom_ioipsl_close, iom_ioipsl_varid, iom_ioipsl_get, iom_ioipsl_gettime, iom_ioipsl_rstput
-
-   INTERFACE iom_ioipsl_get
-      MODULE PROCEDURE iom_ioipsl_g0d, iom_ioipsl_g123d
-   END INTERFACE
-   INTERFACE iom_ioipsl_rstput
-      MODULE PROCEDURE iom_ioipsl_rp0123d
-   END INTERFACE
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
-   !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE iom_ioipsl_open( cdname, kiomid, ldwrt, ldok, kdompar )
-      !!---------------------------------------------------------------------
-      !!                   ***  SUBROUTINE  iom_open  ***
-      !!
-      !! ** Purpose :  open an input file with IOIPSL (only fliocom module)
-      !!---------------------------------------------------------------------
-      CHARACTER(len=*)       , INTENT(inout)           ::   cdname      ! File name
-      INTEGER                , INTENT(  out)           ::   kiomid      ! ioipsl identifier of the opened file
-      LOGICAL                , INTENT(in   )           ::   ldwrt       ! read or write the file?
-      LOGICAL                , INTENT(in   )           ::   ldok        ! check the existence 
-      INTEGER, DIMENSION(2,5), INTENT(in   ), OPTIONAL ::   kdompar     ! domain parameters: 
-
-      CHARACTER(LEN=100) ::   clinfo      ! info character
-      CHARACTER(LEN=10 ) ::   clstatus    ! status of opened file (REPLACE or NEW)
-      INTEGER            ::   iln         ! lengths of character
-      INTEGER            ::   istop       ! temporary storage of nstop
-      INTEGER            ::   ifliodom    ! model domain identifier (see flio_dom_set)
-      INTEGER            ::   ioipslid    ! ioipsl identifier of the opened file
-      INTEGER            ::   jl          ! loop variable
-      LOGICAL            ::   llclobber   ! local definition of ln_clobber
-      !---------------------------------------------------------------------
-
-      clinfo = '                    iom_ioipsl_open ~~~  '
-      istop = nstop
-      !
-      llclobber = ldwrt .AND. ln_clobber
-      IF( ldok .AND. .NOT. llclobber ) THEN      ! Open existing file...
-         !                 ! =============
-         IF( ldwrt ) THEN  ! ... in write mode
-            IF(lwp) WRITE(numout,*) TRIM(clinfo)//' open existing file: '//TRIM(cdname)//' in WRITE mode'
-            CALL flioopfd( TRIM(cdname), ioipslid, "WRITE" )
-         ELSE              ! ... in read mode
-            IF(lwp) WRITE(numout,*) TRIM(clinfo)//' open existing file: '//TRIM(cdname)//' in READ mode'
-            CALL flioopfd( TRIM(cdname), ioipslid )
-         ENDIF
-      ELSE                 ! the file does not exist
-         !                 ! =============
-         iln = INDEX( cdname, '.nc' )
-         IF( ldwrt ) THEN  ! the file should be open in write mode so we create it...
-            IF( llclobber ) THEN   ;   clstatus = 'REPLACE 64' 
-            ELSE                   ;   clstatus = 'NEW 64'
-            ENDIF
-            IF( jpnij > 1 ) THEN
-               ! define the domain position regarding to the global domain (mainly useful in mpp)
-               CALL flio_dom_set( jpnij, narea-1, (/1, 2/), (/jpiglo, jpjglo/)   &
-                  &             , kdompar(:,1), kdompar(:,2), kdompar(:,3), kdompar(:,4), kdompar(:,5)   &
-                  &             , 'BOX', ifliodom )        
-               ! Note that fliocrfd may change the value of cdname (add the cpu number...)
-               IF(lwp) WRITE(numout,*) TRIM(clinfo)//' create new file: '//cdname(1:iln-1)//'... in WRITE mode'
-               CALL fliocrfd( cdname, (/'x'         , 'y'         , 'z', 't'/)   &
-                  &         , (/kdompar(1,1), kdompar(2,1), jpk, -1 /), ioipslid, ifliodom, mode = clstatus )
-            ELSE              ! the file should be open for read mode so it must exist...
-               IF(lwp) WRITE(numout,*) TRIM(clinfo)//' create new file: '//cdname//' in WRITE mode'
-               CALL fliocrfd( cdname, (/'x'         , 'y'         , 'z', 't'/)   &
-                  &         , (/kdompar(1,1), kdompar(2,1), jpk, -1 /), ioipslid,           mode = clstatus )
-            ENDIF
-         ELSE              ! the file should be open for read mode so it must exist...
-            CALL ctl_stop( TRIM(clinfo), ' should be impossible case...' )
-         ENDIF
-      ENDIF
-      ! start to fill file informations
-      ! =============
-      IF( istop == nstop ) THEN   ! no error within this routine
-!does not work with some compilers         kiomid = MINLOC(iom_file(:)%nfid, dim = 1)
-         kiomid = 0
-         DO jl = jpmax_files, 1, -1
-            IF( iom_file(jl)%nfid == 0 )   kiomid = jl
-         ENDDO
-         iom_file(kiomid)%name   = TRIM(cdname)
-         iom_file(kiomid)%nfid   = ioipslid
-         iom_file(kiomid)%iolib  = jpioipsl
-         iom_file(kiomid)%nvars  = 0
-         iom_file(kiomid)%irec   = -1   ! useless for NetCDF files
-         CALL flioinqf( ioipslid, id_uld = iom_file(kiomid)%iduld )
-         IF(lwp) WRITE(numout,*) '                   ---> '//TRIM(cdname)//' OK'
-      ELSE
-         kiomid = 0               ! return error flag
-      ENDIF
-      !
-   END SUBROUTINE iom_ioipsl_open
-
-
-   SUBROUTINE iom_ioipsl_close( kiomid )
-      !!--------------------------------------------------------------------
-      !!                   ***  SUBROUTINE  iom_ioipsl_close  ***
-      !!
-      !! ** Purpose : close an input file with IOIPSL (only fliocom module) 
-      !!--------------------------------------------------------------------
-      INTEGER, INTENT(in) ::   kiomid   ! iom identifier of the file to be closed
-      !---------------------------------------------------------------------
-      !
-      CALL flioclo( iom_file(kiomid)%nfid )
-      !    
-   END SUBROUTINE iom_ioipsl_close
-
-
-   FUNCTION iom_ioipsl_varid ( kiomid, cdvar, kiv, kdimsz )  
-      !!-----------------------------------------------------------------------
-      !!                  ***  FUNCTION  iom_varid  ***
-      !!
-      !! ** Purpose : get the id of a variable in a file with IOIPSL (only fliocom module)
-      !!-----------------------------------------------------------------------
-      INTEGER              , INTENT(in   )           ::   kiomid   ! file Identifier
-      CHARACTER(len=*)     , INTENT(in   )           ::   cdvar    ! name of the variable
-      INTEGER              , INTENT(in   )           ::   kiv   ! 
-      INTEGER, DIMENSION(:), INTENT(  out), OPTIONAL ::   kdimsz   ! size of the dimensions
-      !
-      INTEGER                        ::   iom_ioipsl_varid  ! iom variable Id
-      INTEGER                        ::   ioipslid          ! ioipsl file identifier
-      INTEGER                        ::   ji                ! dummy loop index
-      INTEGER                        ::   i_nvd             ! number of dimension of the variable
-      INTEGER, DIMENSION(jpmax_dims) ::   idimid            ! dimension ids of the variable
-      LOGICAL                        ::   ll_fnd            ! found test
-      CHARACTER(LEN=100)             ::   clinfo            ! info character
-      !!-----------------------------------------------------------------------
-      clinfo = 'iom_ioipsl_varid, file: '//trim(iom_file(kiomid)%name)//', var: '//trim(cdvar)
-      iom_ioipsl_varid = 0                  ! default definition
-      IF( PRESENT(kdimsz) ) kdimsz(:) = 0   ! default definition
-      ioipslid = iom_file(kiomid)%nfid      ! get back ioipsl file identifier 
-      CALL flioinqv( ioipslid, cdvar, ll_fnd, nb_dims = i_nvd )   ! does the variable exist in the file
-      IF( ll_fnd ) THEN
-         IF( i_nvd <= jpmax_dims ) THEN
-            iom_ioipsl_varid = kiv
-            iom_file(kiomid)%nvars       = kiv
-            iom_file(kiomid)%nvid(kiv)   = -1   ! variable id is not available in ioipsl
-            iom_file(kiomid)%cn_var(kiv) = TRIM(cdvar)
-            iom_file(kiomid)%ndims(kiv)  = i_nvd
-            iom_file(kiomid)%dimsz(:,kiv) = 0   ! reset dimsz in case previously used
-            CALL flioinqv( ioipslid, cdvar, ll_fnd,   &
-                  &           len_dims = iom_file(kiomid)%dimsz(1:i_nvd,kiv), &   ! dimensions size
-                  &           id_dims  = idimid(1:i_nvd) )                        ! dimensions ids
-            iom_file(kiomid)%luld(kiv) = .FALSE.   ! default value
-            DO ji = 1, i_nvd                       ! find the unlimited dimension
-               IF( idimid(ji) == iom_file(kiomid)%iduld ) iom_file(kiomid)%luld(kiv) = .TRUE.
-            END DO
-            !---------- Deal with scale_factor and add_offset
-            CALL flioinqa( ioipslid, cdvar, 'scale_factor', ll_fnd )
-            IF( ll_fnd) THEN
-               CALL fliogeta( ioipslid, cdvar, 'scale_factor', iom_file(kiomid)%scf(kiv) )
-            ELSE
-               iom_file(kiomid)%scf(kiv) = 1.
-            END IF
-            CALL flioinqa( ioipslid, cdvar, 'add_offset', ll_fnd )
-            IF( ll_fnd ) THEN
-               CALL fliogeta( ioipslid, cdvar, 'add_offset', iom_file(kiomid)%ofs(kiv) )
-            ELSE
-               iom_file(kiomid)%ofs(kiv) = 0.
-            END IF
-            ! return the simension size
-            IF( PRESENT(kdimsz) ) THEN 
-               IF( i_nvd == SIZE(kdimsz) ) THEN
-                  kdimsz(:) = iom_file(kiomid)%dimsz(1:i_nvd,kiv)
-               ELSE
-                  WRITE(ctmp1,*) i_nvd, SIZE(kdimsz)
-                  CALL ctl_stop( TRIM(clinfo), 'error in kdimsz size'//TRIM(ctmp1) )
-               ENDIF
-            ENDIF
-         ELSE
-            CALL ctl_stop( TRIM(clinfo), 'Too many dimensions in the file '//iom_file(kiomid)%name,   &
-                  &                       'increase the parameter jpmax_vars')
-         ENDIF
-      ELSE  
-         iom_ioipsl_varid = -1   !   variable not found, return error code: -1
-      ENDIF
-      !
-   END FUNCTION iom_ioipsl_varid
-
-
-   SUBROUTINE iom_ioipsl_g0d( kiomid, kvid, pvar, kstart )
-      !!-----------------------------------------------------------------------
-      !!                  ***  ROUTINE  iom_ioipsl_g0d  ***
-      !!
-      !! ** Purpose : read a scalar with IOIPSL (only fliocom module)
-      !!-----------------------------------------------------------------------
-      INTEGER ,               INTENT(in   )            ::   kiomid    ! Identifier of the file
-      INTEGER ,               INTENT(in   )            ::   kvid      ! variable id
-      REAL(wp),               INTENT(  out)            ::   pvar      ! read field
-      INTEGER , DIMENSION(1), INTENT(in   ), OPTIONAL  ::   kstart    ! start position of the reading in each axis
-      !
-      CALL fliogetv( iom_file(kiomid)%nfid, TRIM(iom_file(kiomid)%cn_var(kvid)), pvar, kstart )
-      ! 
-   END SUBROUTINE iom_ioipsl_g0d
-
-
-   SUBROUTINE iom_ioipsl_g123d( kiomid, kvid, knbdim, kstart, kcount, kx1, kx2, ky1, ky2,   &
-         &                      pv_r1d, pv_r2d, pv_r3d)
-      !!-----------------------------------------------------------------------
-      !!                  ***  ROUTINE  iom_ioipsl_g123d  ***
-      !!
-      !! ** Purpose : read a 1D/2D/3D variable with IOIPSL (only fliocom module)
-      !!
-      !! ** Method : read ONE record at each CALL
-      !!-----------------------------------------------------------------------
-      INTEGER                    , INTENT(in   )           ::   kiomid     ! iom identifier of the file
-      INTEGER                    , INTENT(in   )           ::   kvid       ! Name of the variable
-      INTEGER                    , INTENT(in   )           ::   knbdim     ! number of dimensions of the variable
-      INTEGER , DIMENSION(:)     , INTENT(in   )           ::   kstart     ! start position of the reading in each axis 
-      INTEGER , DIMENSION(:)     , INTENT(in   )           ::   kcount     ! number of points to be read in each axis
-      INTEGER ,                    INTENT(in   )           ::   kx1, kx2, ky1, ky2   ! subdomain indexes
-      REAL(wp), DIMENSION(:)     , INTENT(  out), OPTIONAL ::   pv_r1d     ! read field (1D case)
-      REAL(wp), DIMENSION(:,:)   , INTENT(  out), OPTIONAL ::   pv_r2d     ! read field (2D case)
-      REAL(wp), DIMENSION(:,:,:) , INTENT(  out), OPTIONAL ::   pv_r3d     ! read field (3D case)
-      !
-      INTEGER               ::   ioipslid   ! ioipsl file identifier
-      CHARACTER(LEN=100)    ::   clvn       ! variable name
-      !---------------------------------------------------------------------
-      clvn = TRIM(iom_file(kiomid)%cn_var(kvid))   ! get back variable name 
-      ioipslid = iom_file(kiomid)%nfid             ! get back IPIPSL file id
-      !
-      IF( PRESENT(pv_r1d) ) THEN
-         CALL fliogetv( ioipslid, clvn, pv_r1d(:                ), start = kstart(1:knbdim), count = kcount(1:knbdim) )
-      ELSEIF( PRESENT(pv_r2d) ) THEN
-         CALL fliogetv( ioipslid, clvn, pv_r2d(kx1:kx2,ky1:ky2  ), start = kstart(1:knbdim), count = kcount(1:knbdim) )
-      ELSEIF( PRESENT(pv_r3d) ) THEN
-         CALL fliogetv( ioipslid, clvn, pv_r3d(kx1:kx2,ky1:ky2,:), start = kstart(1:knbdim), count = kcount(1:knbdim) )
-      ENDIF
-      !
-      !
-   END SUBROUTINE iom_ioipsl_g123d
-
-
-   SUBROUTINE iom_ioipsl_gettime( kiomid, kvid, ptime, cdunits, cdcalendar )
-      !!--------------------------------------------------------------------
-      !!                   ***  SUBROUTINE iom_gettime  ***
-      !!
-      !! ** Purpose : read the time axis kvid in the file with IOIPSL (only fliocom module)
-      !!--------------------------------------------------------------------
-      INTEGER                   , INTENT(in   ) ::   kiomid     ! file Identifier
-      INTEGER                   , INTENT(in   ) ::   kvid       ! variable id
-      REAL(wp), DIMENSION(:)    , INTENT(  out) ::   ptime      ! the time axis
-      CHARACTER(len=*), OPTIONAL, INTENT(  out) ::   cdunits    ! units attribute
-      CHARACTER(len=*), OPTIONAL, INTENT(  out) ::   cdcalendar ! calendar attribute
-      !---------------------------------------------------------------------
-      !
-      CALL fliogetv( iom_file(kiomid)%nfid, TRIM(iom_file(kiomid)%cn_var(kvid)), ptime(:),   &
-            &         start=(/ 1 /), count=(/ iom_file(kiomid)%dimsz(1, kvid) /) )
-      IF ( PRESENT(cdunits) ) THEN 
-         CALL fliogeta( iom_file(kiomid)%nfid, TRIM(iom_file(kiomid)%cn_var(kvid)), "units", cdunits )
-      ENDIF
-      IF ( PRESENT(cdcalendar) ) THEN 
-         CALL fliogeta( iom_file(kiomid)%nfid, TRIM(iom_file(kiomid)%cn_var(kvid)), "calendar", cdcalendar )
-      ENDIF
-      !
-   END SUBROUTINE iom_ioipsl_gettime
-
-
-   SUBROUTINE iom_ioipsl_rp0123d( kt, kwrite, kiomid, cdvar , kvid  , ktype,   &
-         &                                 pv_r0d, pv_r1d, pv_r2d, pv_r3d )
-      !!--------------------------------------------------------------------
-      !!                   ***  SUBROUTINE  iom_ioipsl_rstput  ***
-      !!
-      !! ** Purpose : read the time axis cdvar in the file 
-      !!--------------------------------------------------------------------
-      INTEGER                     , INTENT(in)           ::   kt       ! ocean time-step
-      INTEGER                     , INTENT(in)           ::   kwrite   ! writing time-step
-      INTEGER                     , INTENT(in)           ::   kiomid   ! Identifier of the file 
-      CHARACTER(len=*)            , INTENT(in)           ::   cdvar    ! variable name
-      INTEGER                     , INTENT(in)           ::   kvid     ! variable id
-      INTEGER                     , INTENT(in), OPTIONAL ::   ktype    ! variable type (default R8)
-      REAL(wp)                    , INTENT(in), OPTIONAL ::   pv_r0d   ! written Od field
-      REAL(wp), DIMENSION(      :), INTENT(in), OPTIONAL ::   pv_r1d   ! written 1d field
-      REAL(wp), DIMENSION(:, :   ), INTENT(in), OPTIONAL ::   pv_r2d   ! written 2d field
-      REAL(wp), DIMENSION(:, :, :), INTENT(in), OPTIONAL ::   pv_r3d   ! written 3d field
-      !
-      INTEGER               :: idims                ! number of dimension
-      INTEGER               :: idvar                ! variable id
-      INTEGER               :: itype                ! variable type
-      INTEGER               :: ix1, ix2, iy1, iy2   ! subdomain indexes
-      INTEGER, DIMENSION(4) :: idimsz               ! dimensions size  
-      INTEGER, DIMENSION(4) :: idimid               ! dimensions id
-      CHARACTER(LEN=100)    :: clinfo               ! info character
-      INTEGER               :: ioipslid             ! ioipsl file identifier
-      !---------------------------------------------------------------------
-      !
-      clinfo = '          iom_ioipsl_rp0123d, file: '//TRIM(iom_file(kiomid)%name)//', var: '//TRIM(cdvar)
-      ioipslid = iom_file(kiomid)%nfid
-      !
-      ! define dimension variables if it is not already done
-      ! ==========================
-      IF( iom_file(kiomid)%nvars == 0 ) THEN
-         ! define the dimension variables if it is not already done
-         CALL fliodefv( ioipslid,'nav_lon', (/1,2/), v_t=flio_r4   , axis='X',   &
-               &                  long_name="Longitude", units="degrees_east" )
-         CALL fliodefv( ioipslid,'nav_lat', (/1,2/), v_t=flio_r4   , axis='Y',   &
-               &                  long_name="Latitude", units="degrees_north" )
-         CALL fliodefv( ioipslid,'nav_lev', (/3/)  , v_t=flio_i4   , axis='Z',   &
-               &                  long_name="Model levels",units="model_levels")
-         CALL fliodefv( ioipslid,'time_counter', (/4/), v_t=flio_r4, axis='T',   &
-               &                  long_name="Time axis", units='seconds since 0001-01-01 00:00:00' )
-         ! update informations structure related the dimension variable we just added...
-         iom_file(kiomid)%nvars       = 4
-         iom_file(kiomid)%luld(1:4)   = (/ .FALSE., .FALSE., .FALSE., .TRUE. /)
-         iom_file(kiomid)%cn_var(1:3) = (/ 'nav_lon', 'nav_lat', 'nav_lev' /)
-         iom_file(kiomid)%cn_var(4)   = 'time_counter'
-         iom_file(kiomid)%ndims(1:4)  = (/ 2, 2, 1, 1 /)
-         ! trick: defined to 0 to say that dimension variables are defined but not yet written
-         iom_file(kiomid)%dimsz(1, 1) = 0   
-         IF(lwp) WRITE(numout,*) TRIM(clinfo)//' define dimension variables done'
-      ENDIF
-
-      ! define the data if it is not already done
-      ! ===============
-      IF( kvid <= 0 ) THEN
-         ! variable definition
-         IF(     PRESENT(pv_r0d) ) THEN   ;   idims = 0
-         ELSEIF( PRESENT(pv_r1d) ) THEN   ;   idims = 2   ;   idimid(1:idims) = (/    3,4/)
-         ELSEIF( PRESENT(pv_r2d) ) THEN   ;   idims = 3   ;   idimid(1:idims) = (/1,2  ,4/)
-         ELSEIF( PRESENT(pv_r3d) ) THEN   ;   idims = 4   ;   idimid(1:idims) = (/1,2,3,4/)
-         ENDIF
-         IF( PRESENT(ktype) ) THEN   ! variable external type
-            SELECT CASE (ktype)
-            CASE (jp_r8)  ;   itype = flio_r8
-            CASE (jp_r4)  ;   itype = flio_r4
-            CASE (jp_i4)  ;   itype = flio_i4
-            CASE (jp_i2)  ;   itype = flio_i2
-            CASE (jp_i1)  ;   itype = flio_i1   !   fliocom does not handle i1 type of variable
-            CASE DEFAULT   ;   CALL ctl_stop( TRIM(clinfo)//' unknown variable type' )
-            END SELECT
-         ELSE
-            itype = flio_r8
-         ENDIF
-         IF( PRESENT(pv_r0d) ) THEN   ;   CALL fliodefv (ioipslid, TRIM(cdvar)                 , v_t = itype)
-         ELSE                         ;   CALL fliodefv (ioipslid, TRIM(cdvar), idimid(1:idims), v_t = itype)
-         ENDIF
-         ! update informations structure related the new variable we want to add...
-         idvar                          = iom_file(kiomid)%nvars + 1
-         iom_file(kiomid)%nvars         = idvar
-         iom_file(kiomid)%cn_var(idvar) = TRIM(cdvar)
-         iom_file(kiomid)%nvid(idvar)   = -1   ! netcdf variable id is not available in ioipsl
-         iom_file(kiomid)%scf(idvar)    = 1.
-         iom_file(kiomid)%ofs(idvar)    = 0.
-         iom_file(kiomid)%ndims(idvar)  = idims
-         IF( .NOT. PRESENT(pv_r0d) ) THEN
-            iom_file(kiomid)%luld(idvar) = .TRUE.
-            CALL flioinqf( ioipslid, ln_dim = idimsz )
-            iom_file(kiomid)%dimsz(1:idims-1,idvar) = idimsz(idimid(1:idims-1))
-         ELSE                               
-            iom_file(kiomid)%luld(idvar) = .FALSE.
-         ENDIF
-         IF(lwp) WRITE(numout,*) TRIM(clinfo)//' defined ok'
-      ELSE
-         idvar = kvid
-      ENDIF
-
-      ! time step kwrite : write the variable
-      IF( kt == kwrite ) THEN
-         ! on what kind of domain must the data be written?
-         IF( PRESENT(pv_r2d) .OR. PRESENT(pv_r3d) ) THEN
-            idimsz(1:2) = iom_file(kiomid)%dimsz(1:2,idvar)
-            IF(     idimsz(1) == (nlei - nldi + 1) .AND. idimsz(2) == (nlej - nldj + 1) ) THEN
-               ix1 = nldi   ;   ix2 = nlei   ;   iy1 = nldj   ;   iy2 = nlej
-            ELSEIF( idimsz(1) == nlci              .AND. idimsz(2) == nlcj              ) THEN
-               ix1 = 1      ;   ix2 = nlci   ;   iy1 = 1      ;   iy2 = nlcj
-            ELSEIF( idimsz(1) == jpi               .AND. idimsz(2) == jpj               ) THEN
-               ix1 = 1      ;   ix2 = jpi    ;   iy1 = 1      ;   iy2 = jpj
-            ELSE 
-               CALL ctl_stop( 'iom_ioipsl_rp0123d: should have been an impossible case...' )
-            ENDIF
-
-            ! write dimension variables if it is not already done
-            ! =============
-            ! trick: is defined to 0 => dimension variable are defined but not yet written
-            IF( iom_file(kiomid)%dimsz(1, 1) == 0 ) THEN
-               CALL flioputv( ioipslid, 'nav_lon'     , glamt(ix1:ix2, iy1:iy2) )
-               CALL flioputv( ioipslid, 'nav_lat'     , gphit(ix1:ix2, iy1:iy2) )
-               CALL flioputv( ioipslid, 'nav_lev'     , gdept_1d )
-               ! +++ WRONG VALUE: to be improved but not really useful...
-               CALL flioputv( ioipslid, 'time_counter', kt )
-               ! update the values of the variables dimensions size
-               CALL flioinqf( ioipslid, ln_dim = idimsz )
-               iom_file(kiomid)%dimsz(1:2, 1) = idimsz(1:2)
-               iom_file(kiomid)%dimsz(1:2, 2) = idimsz(1:2)
-               iom_file(kiomid)%dimsz(1, 3:4) = (/idimsz(3), 1/)
-               IF(lwp) WRITE(numout,*) TRIM(clinfo)//' write dimension variables done'
-            ENDIF
-         ENDIF
-
-         ! write the data
-         ! =============
-         IF(     PRESENT(pv_r0d) ) THEN   ;   CALL flioputv( ioipslid, cdvar, pv_r0d                      )
-         ELSEIF( PRESENT(pv_r1d) ) THEN   ;   CALL flioputv( ioipslid, cdvar, pv_r1d(                  :) )
-         ELSEIF( PRESENT(pv_r2d) ) THEN   ;   CALL flioputv( ioipslid, cdvar, pv_r2d(ix1:ix2, iy1:iy2   ) )
-         ELSEIF( PRESENT(pv_r3d) ) THEN   ;   CALL flioputv( ioipslid, cdvar, pv_r3d(ix1:ix2, iy1:iy2, :) )
-         ENDIF
-         ! add 1 to the size of the temporal dimension (not really useful...)
-         IF( iom_file(kiomid)%luld(idvar) )   iom_file(kiomid)%dimsz(iom_file(kiomid)%ndims(idvar), idvar)    &
-               &                            = iom_file(kiomid)%dimsz(iom_file(kiomid)%ndims(idvar), idvar) + 1
-         IF(lwp) WRITE(numout,*) TRIM(clinfo)//' written ok'
-      ENDIF
-      !     
-   END SUBROUTINE iom_ioipsl_rp0123d
-
-
-   !!======================================================================
-END MODULE iom_ioipsl
Index: anches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom_rstdimg.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/iom_rstdimg.F90	(revision 5281)
+++ 	(revision )
@@ -1,504 +1,0 @@
-MODULE iom_rstdimg
-   !!=====================================================================
-   !!                    ***  MODULE  iom_rstdimg ***
-   !! Input/Output manager :  Library to read input rstdimg files
-   !!====================================================================
-   !! History :  9.0  ! 06 09  (S. Masson) Original code
-   !!--------------------------------------------------------------------
-
-   !!--------------------------------------------------------------------
-   !!   iom_open       : open a file read only
-   !!   iom_close      : close a file or all files opened by iom
-   !!   iom_get        : read a field (interfaced to several routines)
-   !!   iom_gettime    : read the time axis kvid in the file
-   !!   iom_varid      : get the id of a variable in a file
-   !!   iom_rstput     : write a field in a restart file (interfaced to several routines)
-   !!--------------------------------------------------------------------
-   USE in_out_manager  ! I/O manager
-   USE lib_mpp         ! MPP library
-   USE dom_oce         ! ocean space and time domain
-   USE lbclnk          ! lateal boundary condition / mpp exchanges
-   USE iom_def         ! iom variables definitions
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC iom_rstdimg_open, iom_rstdimg_close, iom_rstdimg_get, iom_rstdimg_rstput
-
-   INTERFACE iom_rstdimg_get
-      MODULE PROCEDURE iom_rstdimg_g0d, iom_rstdimg_g123d
-   END INTERFACE
-   INTERFACE iom_rstdimg_rstput
-      MODULE PROCEDURE iom_rstdimg_rp0d, iom_rstdimg_rp123d
-   END INTERFACE
-
-   INTEGER, PARAMETER ::   jpvnl          = 32   ! variable name length
-      
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
-   !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE iom_rstdimg_open( cdname, kiomid, ldwrt, ldok, kdompar )
-      !!---------------------------------------------------------------------
-      !!                   ***  SUBROUTINE  iom_open  ***
-      !!
-      !! ** Purpose :  open an input file read only (return 0 if not found)
-      !!---------------------------------------------------------------------
-      CHARACTER(len=*)       , INTENT(inout)           ::   cdname      ! File name
-      INTEGER                , INTENT(  out)           ::   kiomid      ! iom identifier of the opened file
-      LOGICAL                , INTENT(in   )           ::   ldwrt       ! read or write the file?
-      LOGICAL                , INTENT(in   )           ::   ldok        ! check the existence 
-      INTEGER, DIMENSION(2,5), INTENT(in   ), OPTIONAL ::   kdompar     ! domain parameters: 
-
-      CHARACTER(LEN=100)                      ::   clinfo                     ! info character
-      CHARACTER(LEN=100)                      ::   cltmp                      ! temporary character
-      CHARACTER(LEN=10 )                      ::   clstatus                   ! status of opened file (REPLACE or NEW)
-      INTEGER                                 ::   jv                         ! loop counter
-      INTEGER                                 ::   istop                      ! temporary storage of nstop
-      INTEGER                                 ::   idrst                      ! logical unit of the restart file
-      INTEGER                                 ::   iln                        ! lengths of character
-      INTEGER                                 ::   irecl8                     ! record length
-      INTEGER                                 ::   ios                        ! IO status
-      INTEGER                                 ::   irhd                       ! record of the header infos
-      INTEGER                                 ::   ivnum                      ! number of variables
-      INTEGER                                 ::   ishft                      ! counter shift
-      INTEGER                                 ::   inx, iny, inz              ! x,y,z dimension of the variable
-      INTEGER                                 ::   in0d, in1d, in2d, in3d     ! number of 0/1/2/3D variables
-      INTEGER                                 ::   ipni, ipnj, ipnij, iarea   ! domain decomposition 
-      INTEGER                                 ::   iiglo, ijglo               ! domain global size 
-      INTEGER                                 ::   jl                         ! loop variable
-      LOGICAL                                 ::   llclobber                  ! local definition of ln_clobber
-      CHARACTER(LEN=jpvnl), DIMENSION(jpmax_vars) ::   clna0d, clna1d, clna2d, clna3d     ! name of 0/1/2/3D variables
-      REAL(wp),             DIMENSION(jpmax_vars) ::   zval0d, zval1d, zval2d, zval3d     ! value of 0d variables or record
-      !                                                                                   ! position for 1/2/3D variables
-      !---------------------------------------------------------------------
-      clinfo = '                    iom_rstdimg_open ~~~  '
-      istop = nstop      ! store the actual value of nstop
-      ios = 0            ! default definition
-      kiomid = 0         ! default definition
-      llclobber = ldwrt .AND. ln_clobber
-      ! get a free unit
-      idrst = get_unit()  ! get a free logical unit for the restart file
-!!$#if defined key_agrif 
-!!$      idrst = Agrif_Get_Unit()      
-!!$#endif 
-      ! Open the file...
-      ! =============
-      IF( ldok .AND. .NOT. llclobber ) THEN      ! Open existing file...
-         ! find the record length
-         OPEN( idrst, FILE = TRIM(cdname), FORM = 'unformatted', ACCESS = 'direct'   &
-            &       , RECL = 8, STATUS = 'old', ACTION = 'read', IOSTAT = ios, ERR = 987 )
-         READ( idrst, REC = 1, IOSTAT = ios, ERR = 987 ) irecl8
-         CLOSE( idrst )
-         ! Open the file with the appropriate record length and parameters
-         IF( ldwrt ) THEN  ! ... in readwrite mode
-            IF(lwp) WRITE(numout,*) TRIM(clinfo)//' open existing file: '//TRIM(cdname)//' in READWRITE mode'
-            OPEN( idrst, FILE = TRIM(cdname), FORM = 'unformatted', ACCESS = 'direct'   &
-               &       , RECL = irecl8, STATUS = 'old', ACTION = 'readwrite', IOSTAT = ios, ERR = 987 )
-         ELSE              ! ... in read mode
-            IF(lwp) WRITE(numout,*) TRIM(clinfo)//' open existing file: '//TRIM(cdname)//' in READ mode'
-            OPEN( idrst, FILE = TRIM(cdname), FORM = 'unformatted', ACCESS = 'direct'   &
-               &       , RECL = irecl8, STATUS = 'old', ACTION = 'read'     , IOSTAT = ios, ERR = 987 )
-         ENDIF
-      ELSE                                       ! the file does not exist (or we overwrite it)
-         iln = INDEX( cdname, '.dimg' )
-         IF( ldwrt ) THEN  ! the file should be open in readwrite mode so we create it...
-            irecl8= MAX( kdompar(1,1) * kdompar(2,1) * wp, ( 8*jpnij + 15 ) * 4 )
-            IF( jpnij > 1 ) THEN
-               WRITE(cltmp,'(a,a,i4.4,a)') cdname(1:iln-1), '_', narea, '.dimg'
-               cdname = TRIM(cltmp)
-            ENDIF
-            IF(lwp) WRITE(numout,*) TRIM(clinfo)//' create new file: '//TRIM(cdname)//' in READWRITE mode'
-            
-            IF( llclobber ) THEN   ;   clstatus = 'REPLACE' 
-            ELSE                   ;   clstatus = 'NEW'
-            ENDIF
-            OPEN( idrst, FILE = TRIM(cdname), FORM = 'UNFORMATTED', ACCESS = 'DIRECT'   &
-               &       , RECL = irecl8, STATUS = TRIM(clstatus), ACTION = 'readwrite', IOSTAT = ios, ERR = 987 )
-         ELSE              ! the file should be open for read mode so it must exist...
-            CALL ctl_stop( TRIM(clinfo), ' should be impossible case...' )
-         ENDIF
-      ENDIF
-      ! Performs checks on the file
-      ! =============
-      IF( ldok .AND. .NOT. llclobber ) THEN      ! old file
-         READ( idrst, REC = 1   , IOSTAT = ios, ERR = 987 )              &
-              &   irecl8, inx, iny, inz, in0d, in1d, in2d, in3d, irhd,   &
-              &   ipni, ipnj, ipnij, iarea, iiglo, ijglo
-         READ( idrst, REC = irhd, IOSTAT = ios, ERR = 987 )                       &
-            &   clna0d(1:in0d), zval0d(1:in0d), clna1d(1:in1d), zval1d(1:in1d),   &
-            &   clna2d(1:in2d), zval2d(1:in2d), clna3d(1:in3d), zval3d(1:in3d)
-         clinfo = TRIM(clinfo)//' file '//TRIM(cdname)
-         IF( iiglo /= jpiglo       )   CALL ctl_stop( TRIM(clinfo), 'Mismatch in global domain size in i direction' )
-         IF( ijglo /= jpjglo       )   CALL ctl_stop( TRIM(clinfo), 'Mismatch in global domain size in j direction' )
-         IF( ldwrt ) THEN
-            IF( inx   /= kdompar(1,1) )   CALL ctl_stop( TRIM(clinfo), 'Mismatch in local domain size in i direction' )
-            IF( iny   /= kdompar(2,1) )   CALL ctl_stop( TRIM(clinfo), 'Mismatch in local domain size in j direction' )
-         ENDIF
-         IF( inz   /= jpk          )   CALL ctl_stop( TRIM(clinfo), 'Mismatch in domain size in k direction' )
-         IF( ipni  /= jpni         )   CALL ctl_stop( TRIM(clinfo), 'Processor splitting changed along I' )
-         IF( ipnj  /= jpnj         )   CALL ctl_stop( TRIM(clinfo), 'Processor splitting changed along J' )
-         IF( ipnij /= jpnij        )   CALL ctl_stop( TRIM(clinfo), 'Total number of processors changed' )
-         IF( iarea /= narea        )   CALL ctl_stop( TRIM(clinfo), 'Mismatch in area numbering ...' )
-      ENDIF
-      ! fill file informations
-      ! =============
-      IF( istop == nstop ) THEN   ! no error within this routine
-!does not work with some compilers         kiomid = MINLOC(iom_file(:)%nfid, dim = 1)
-         kiomid = 0
-         DO jl = jpmax_files, 1, -1
-            IF( iom_file(jl)%nfid == 0 )   kiomid = jl
-         ENDDO
-         iom_file(kiomid)%name    = TRIM(cdname)
-         iom_file(kiomid)%nfid    = idrst
-         iom_file(kiomid)%iolib   = jprstdimg
-         iom_file(kiomid)%iduld   = -1
-         IF( ldok ) THEN      ! old file
-            ! read variables informations from the file header
-            IF(  TRIM(clna0d(1)) == 'no0d' )   in0d = 0
-            IF(  TRIM(clna1d(1)) == 'no1d' )   in1d = 0
-            IF(  TRIM(clna2d(1)) == 'no2d' )   in2d = 0
-            IF(  TRIM(clna3d(1)) == 'no3d' )   in3d = 0
-            ivnum = in0d + in1d + in2d + in3d
-            iom_file(kiomid)%nvars            = ivnum
-            iom_file(kiomid)%irec             = 2 + in1d + in2d + inz * in3d
-            iom_file(kiomid)%luld(   1:ivnum) = .FALSE.
-            iom_file(kiomid)%scf(    1:ivnum) = 1.
-            ! scalar variable
-            DO jv = 1, in0d
-               iom_file(kiomid)%cn_var(jv) = TRIM(clna0d(jv))
-               iom_file(kiomid)%nvid(  jv) = 1
-               iom_file(kiomid)%ndims( jv) = 0
-               iom_file(kiomid)%ofs(   jv) = zval0d(jv)   ! warning: trick... we use ofs to store the value
-            END DO
-            ! 1d variable
-            ishft = in0d
-            DO jv = 1, in1d
-               iom_file(kiomid)%cn_var(    ishft + jv) = TRIM(clna1d(jv))
-               iom_file(kiomid)%nvid(      ishft + jv) = zval1d(jv)
-               iom_file(kiomid)%ndims(     ishft + jv) = 1
-               iom_file(kiomid)%dimsz(1  , ishft + jv) = jpk
-               iom_file(kiomid)%ofs(       ishft + jv) = 0.
-            END DO
-            ! 2d variable
-            ishft = in0d + in1d
-            DO jv = 1, in2d
-               iom_file(kiomid)%cn_var(    ishft + jv) = TRIM(clna2d(jv))
-               iom_file(kiomid)%nvid(      ishft + jv) = zval2d(jv)
-               iom_file(kiomid)%ndims(     ishft + jv) = 2
-               iom_file(kiomid)%dimsz(1:2, ishft + jv) = (/ inx, iny /)
-               iom_file(kiomid)%ofs(       ishft + jv) = 0.
-            END DO
-            ! 3d variable
-            ishft = in0d + in1d + in2d 
-            DO jv = 1, in3d
-               iom_file(kiomid)%cn_var(    ishft + jv) = TRIM(clna3d(jv))
-               iom_file(kiomid)%nvid(      ishft + jv) = zval3d(jv)
-               iom_file(kiomid)%ndims(     ishft + jv) = 3
-               iom_file(kiomid)%dimsz(1:3, ishft + jv) = (/ inx, iny, jpk /)
-               iom_file(kiomid)%ofs(       ishft + jv) = 0.
-            END DO
-         ELSE                 ! new file
-            iom_file(kiomid)%nvars = 0
-            iom_file(kiomid)%irec  = 2
-            ! store file informations
-            WRITE( idrst, REC = 1, IOSTAT = ios, ERR = 987 ) irecl8, kdompar(:,1), jpk   ! store domain size
-         ENDIF
-      ENDIF
-987   CONTINUE
-      IF( ios /= 0 ) THEN
-         WRITE(ctmp1,*) '           iostat = ', ios
-         CALL ctl_stop( TRIM(clinfo), '   error in opening file '//TRIM(cdname), ctmp1 )
-      ENDIF
-      !
-   END SUBROUTINE iom_rstdimg_open
-
-
-   SUBROUTINE iom_rstdimg_close( kiomid )
-      !!--------------------------------------------------------------------
-      !!                   ***  SUBROUTINE  iom_rstdimg_close  ***
-      !!
-      !! ** Purpose : close an input file
-      !!--------------------------------------------------------------------
-      INTEGER, INTENT(in) ::   kiomid   ! iom identifier of the file to be closed
-      !
-      CHARACTER(LEN=100)                      ::   clinfo                     ! info character
-      INTEGER                                 ::   jv                         ! loop counter
-      INTEGER                                 ::   irecl8                     ! record length
-      INTEGER                                 ::   ios                        ! IO status
-      INTEGER                                 ::   irhd                       ! record of the header infos
-      INTEGER                                 ::   ivnum                      ! number of variables
-      INTEGER                                 ::   idrst                      ! file logical unit
-      INTEGER                                 ::   inx, iny, inz              ! x,y,z dimension of the variable
-      INTEGER                                 ::   in0d, in1d, in2d, in3d     ! number of 0/1/2/3D variables
-      CHARACTER(LEN=jpvnl), DIMENSION(jpmax_vars) ::   clna0d, clna1d, clna2d, clna3d    ! name of 0/1/2/3D variables
-      REAL(wp),          DIMENSION(jpmax_vars) ::   zval0d, zval1d, zval2d, zval3d    ! value of 0d variables or record
-      !                                                                               ! position for 1/2/3D variables
-      !---------------------------------------------------------------------
-      !
-      clinfo = '                    iom_rstdimg_close ~~~  '
-      idrst = iom_file(kiomid)%nfid   ! get back the logical unit of the restart file
-      ! test if we can write in the file (test with INQUIRE gives alsways YES even with read only files...)
-      READ(  idrst, REC = 1, IOSTAT = ios, ERR = 987 ) irecl8, inx, iny, inz   
-      WRITE( idrst, REC = 1, IOSTAT = ios            ) irecl8, inx, iny, inz   
-      ! We can write in the file => we update its header before closing
-      IF( ios == 0 ) THEN
-         READ( idrst, REC = 1, IOSTAT = ios, ERR = 987 ) irecl8, inx, iny, inz   ! get back domain size
-         irhd = iom_file(kiomid)%irec
-         ivnum = iom_file(kiomid)%nvars
-         in0d = 0   ;   in1d = 0   ;   in2d = 0   ;   in3d = 0
-         DO jv = 1, ivnum   ! loop on each variable to get its name and value/record position
-            SELECT CASE (iom_file(kiomid)%ndims(jv))
-            CASE (0)   ! scalar variable
-               in0d = in0d + 1
-               clna0d(in0d) = TRIM(iom_file(kiomid)%cn_var(jv))
-               zval0d(in0d) = iom_file(kiomid)%ofs(jv)   ! warning: trick... we use ofs to store the value
-            CASE (1)   ! 1d variable
-               in1d = in1d + 1
-               clna1d(in1d) = TRIM(iom_file(kiomid)%cn_var(jv))
-               zval1d(in1d) = iom_file(kiomid)%nvid(jv)
-            CASE (2)   ! 2d variable
-               in2d = in2d + 1
-               clna2d(in2d) = TRIM(iom_file(kiomid)%cn_var(jv))
-               zval2d(in2d) = iom_file(kiomid)%nvid(jv)
-            CASE (3)   ! 3d variable
-               in3d = in3d + 1
-               clna3d(in3d) = TRIM(iom_file(kiomid)%cn_var(jv))
-               zval3d(in3d) = iom_file(kiomid)%nvid(jv)
-            CASE DEFAULT   ;   CALL ctl_stop( TRIM(clinfo), 'Should not ne there...' )
-            END SELECT
-         END DO
-         ! force to have at least 1 variable in each list (not necessary (?), but safer...)
-         IF( in0d == 0 ) THEN   ;   in0d = 1   ;   clna0d(1) = 'no0d'   ;   zval0d(1) = -1.   ;   ENDIF
-         IF( in1d == 0 ) THEN   ;   in1d = 1   ;   clna1d(1) = 'no1d'   ;   zval1d(1) = -1.   ;   ENDIF
-         IF( in2d == 0 ) THEN   ;   in2d = 1   ;   clna2d(1) = 'no2d'   ;   zval2d(1) = -1.   ;   ENDIF
-         IF( in3d == 0 ) THEN   ;   in3d = 1   ;   clna3d(1) = 'no3d'   ;   zval3d(1) = -1.   ;   ENDIF
-         ! update the file header before closing it
-         WRITE( idrst, REC = 1, IOSTAT = ios, ERR = 987 )              &
-            &   irecl8, inx, iny, inz, in0d, in1d, in2d, in3d, irhd,   &
-            &   jpni, jpnj, jpnij, narea, jpiglo, jpjglo,              &
-            &   nlcit, nlcjt, nldit, nldjt, nleit, nlejt, nimppt, njmppt
-         IF( (ivnum * (jpvnl + wp)) > irecl8 ) THEN 
-            CALL ctl_stop( TRIM(clinfo),   &
-                 &   'Last record size is too big... You could reduce the value of jpvnl' )
-         ELSE 
-            WRITE( idrst, REC = irhd, IOSTAT = ios, ERR = 987 )                        &
-                 &   clna0d(1:in0d), zval0d(1:in0d), clna1d(1:in1d), zval1d(1:in1d),   &
-                 &   clna2d(1:in2d), zval2d(1:in2d), clna3d(1:in3d), zval3d(1:in3d)
-         ENDIF
-      ELSE
-         ios = 0   ! we cannot write in the file
-      ENDIF
-      !
-      CLOSE( idrst, IOSTAT = ios, ERR = 987 )
-987   CONTINUE
-      IF( ios /= 0 ) THEN
-         WRITE(ctmp1,*) '           iostat = ', ios
-         CALL ctl_stop( TRIM(clinfo),   &
-            &   '   error when updating the header of '//TRIM(iom_file(kiomid)%name), ctmp1 )
-      ENDIF
-      !    
-   END SUBROUTINE iom_rstdimg_close
-
-
-   SUBROUTINE iom_rstdimg_g0d( kiomid, kvid, pvar )
-      !!-----------------------------------------------------------------------
-      !!                  ***  ROUTINE  iom_rstdimg_g0d  ***
-      !!
-      !! ** Purpose : read a scalar with RSTDIMG
-      !!-----------------------------------------------------------------------
-      INTEGER,  INTENT(in   ) ::   kiomid    ! Identifier of the file
-      INTEGER,  INTENT(in   ) ::   kvid      ! variable id
-      REAL(wp), INTENT(  out) ::   pvar      ! read field
-      !---------------------------------------------------------------------
-      !
-      pvar = iom_file(kiomid)%ofs(kvid)   ! warning: trick... we use ofs to store the value
-      !
-   END SUBROUTINE iom_rstdimg_g0d
-
-
-   SUBROUTINE iom_rstdimg_rp0d( kiomid, cdvar, kvid, pv_r0d )
-      !!--------------------------------------------------------------------
-      !!                   ***  SUBROUTINE  iom_rstdimg_rstput  ***
-      !!
-      !! ** Purpose : write a scalar with RSTDIMG
-      !!--------------------------------------------------------------------
-      INTEGER                   , INTENT(in) ::   kiomid   ! Identifier of the file 
-      CHARACTER(len=*)          , INTENT(in) ::   cdvar    ! time axis name
-      INTEGER                   , INTENT(in) ::   kvid     ! variable id
-      REAL(wp)                  , INTENT(in) ::   pv_r0d   ! written 0d field
-      !
-      CHARACTER(LEN=100) ::   clinfo     ! info character
-      INTEGER            ::   idvar      ! variable id
-      !---------------------------------------------------------------------
-      !  
-      clinfo = '                    iom_rstdimg_rp0d ~~~  '
-      IF( kvid <= 0 ) THEN   !   new variable
-         idvar = iom_file(kiomid)%nvars + 1
-      ELSE                   !   the variable already exists in the file
-         idvar = kvid
-      ENDIF
-      IF( idvar <= jpmax_vars ) THEN
-         iom_file(kiomid)%nvars = idvar
-         iom_file(kiomid)%cn_var(idvar) = TRIM(cdvar)
-         iom_file(kiomid)%nvid(   idvar) = 1   ! useless, Od variables a strored in record 1
-         iom_file(kiomid)%ndims(  idvar) = 0
-         iom_file(kiomid)%luld(   idvar) = .FALSE.
-         iom_file(kiomid)%scf(    idvar) = 1.
-         iom_file(kiomid)%ofs(    idvar) = pv_r0d   ! warning: trick... we use ofs to store the value
-      ELSE
-         CALL ctl_stop( TRIM(clinfo), 'increase the value of jpmax_vars' )
-      ENDIF
-   END SUBROUTINE iom_rstdimg_rp0d
-
-
-   SUBROUTINE iom_rstdimg_g123d( kiomid, kdom  , kvid, kx1, kx2, ky1, ky2,   &
-         &                       pv_r1d, pv_r2d, pv_r3d )
-      !!-----------------------------------------------------------------------
-      !!                  ***  ROUTINE  iom_rstdimg_g123d  ***
-      !!
-      !! ** Purpose : read a 1D/2D/3D variable with RSTDIMG
-      !!
-      !! ** Method : read ONE record at each CALL
-      !!-----------------------------------------------------------------------
-      INTEGER                    , INTENT(in   )           ::   kiomid     ! iom identifier of the file
-      INTEGER                    , INTENT(in   )           ::   kdom       ! Type of domain to be read
-      INTEGER                    , INTENT(in   )           ::   kvid       ! variable id
-      INTEGER ,                    INTENT(inout)           ::   kx1, kx2, ky1, ky2   ! subdomain indexes
-      REAL(wp), DIMENSION(:)     , INTENT(  out), OPTIONAL ::   pv_r1d     ! read field (1D case)
-      REAL(wp), DIMENSION(:,:)   , INTENT(  out), OPTIONAL ::   pv_r2d     ! read field (2D case)
-      REAL(wp), DIMENSION(:,:,:) , INTENT(  out), OPTIONAL ::   pv_r3d     ! read field (3D case)
-
-      CHARACTER(LEN=100) ::   clinfo               ! info character
-      INTEGER            ::   ios                  ! IO status
-      INTEGER            ::   jk                   ! loop counter
-      INTEGER            ::   idrst                ! logical unit of the restart file
-      !---------------------------------------------------------------------
-      clinfo = '                    iom_rstdimg_g123d ~~~  '
-      !
-      IF( kdom == jpdom_data .OR. kdom == jpdom_global ) THEN
-         CALL ctl_stop( TRIM(clinfo), TRIM(iom_file(kiomid)%cn_var(kvid))//': case not coded for rstdimg files' )
-      ELSE
-      !
-         idrst = iom_file(kiomid)%nfid   ! get back the logical unit of the restart file
-         ! modify the subdomain indexes because we cannot directly extract the appropriate subdomaine
-         IF(     kdom == jpdom_local_full    ) THEN   ;   kx1 = 1   ;   kx2 = jpi    ;   ky1 = 1
-         ELSEIF( kdom == jpdom_local_noextra ) THEN   ;   kx1 = 1   ;   kx2 = nlci   ;   ky1 = 1
-         ENDIF
-         !
-         IF(     PRESENT(pv_r1d) ) THEN   ! read 1D variables
-            READ(    idrst, REC = iom_file(kiomid)%nvid(kvid)         , IOSTAT = ios, ERR = 987 )   pv_r1d(:)
-         ELSEIF( PRESENT(pv_r2d) ) THEN   ! read 2D variables
-            READ(    idrst, REC = iom_file(kiomid)%nvid(kvid)         , IOSTAT = ios, ERR = 987 )   pv_r2d(kx1:kx2, ky1:ky2    )
-         ELSEIF( PRESENT(pv_r3d) ) THEN   ! read 3D variables
-            DO jk = 1, iom_file(kiomid)%dimsz(3,kvid)   ! do loop on each level
-               READ( idrst, REC = iom_file(kiomid)%nvid(kvid) + jk - 1, IOSTAT = ios, ERR = 987 )   pv_r3d(kx1:kx2, ky1:ky2, jk)
-            END DO
-         ENDIF
-987      CONTINUE
-         IF( ios /= 0 ) THEN
-            WRITE(ctmp1,*) '           iostat = ', ios
-            CALL ctl_stop( TRIM(clinfo), '   IO error with file '//TRIM(iom_file(kiomid)%name), ctmp1 )
-         ENDIF
-      ENDIF
-      !
-   END SUBROUTINE iom_rstdimg_g123d
-
-
-   SUBROUTINE iom_rstdimg_rp123d( kiomid, cdvar, kvid, pv_r1d, pv_r2d, pv_r3d )
-      !!--------------------------------------------------------------------
-      !!                   ***  SUBROUTINE  iom_rstdimg_rstput  ***
-      !!
-      !! ** Purpose : write a 2D/3D variable with RSTDIMG
-      !!--------------------------------------------------------------------
-      INTEGER                         , INTENT(in)           ::   kiomid   ! Identifier of the file 
-      CHARACTER(len=*)                , INTENT(in)           ::   cdvar    ! time axis name
-      INTEGER                         , INTENT(in)           ::   kvid     ! variable id
-      REAL(wp), DIMENSION(          :), INTENT(in), OPTIONAL ::   pv_r1d   ! written 1d field
-      REAL(wp), DIMENSION(:  ,:      ), INTENT(in), OPTIONAL ::   pv_r2d   ! written 2d field
-      REAL(wp), DIMENSION(:  ,:  ,:  ), INTENT(in), OPTIONAL ::   pv_r3d   ! written 3d field
-      !
-      CHARACTER(LEN=100)    ::   clinfo               ! info character
-      INTEGER               ::   irecl8               ! reacord length
-      INTEGER               ::   ios                  ! IO status
-      INTEGER               ::   idrst                ! reacord length
-      INTEGER               ::   inx, iny, inz        ! x,y,z dimension of the variable
-      INTEGER               ::   idvar                ! variable id
-      INTEGER               ::   istop                ! temporary storage of nstop
-      INTEGER               ::   irec                 ! record number
-      INTEGER               ::   ix1, ix2, iy1, iy2   ! subdomain indexes
-      INTEGER               ::   jk                   ! loop counter
-      !---------------------------------------------------------------------
-      !
-      clinfo = '          iom_rstdimg_rp123d, file: '//TRIM(iom_file(kiomid)%name)//', var: '//TRIM(cdvar)
-      istop = nstop                   ! store the actual value of nstop
-      irec = iom_file(kiomid)%irec    ! get back the record number of the variable
-      idrst = iom_file(kiomid)%nfid   ! get back the logical unit of the restart file
-      IF( kvid <= 0 ) THEN   !   new variable
-         idvar = iom_file(kiomid)%nvars + 1
-      ELSE                   !   the variable already exists in the file
-         idvar = kvid
-      ENDIF
-      IF( idvar > jpmax_vars )   CALL ctl_stop( TRIM(clinfo), 'increase the value of jpmax_vars' )
-      IF( .NOT. PRESENT(pv_r1d) ) THEN
-         ! find which part of data must be written
-         READ( idrst, REC = 1, IOSTAT = ios, ERR = 987 ) irecl8, inx, iny, inz
-         IF(     inx == (nlei - nldi + 1) .AND. iny == (nlej - nldj + 1) ) THEN
-            ix1 = nldi   ;   ix2 = nlei   ;   iy1 = nldj   ;   iy2 = nlej
-         ELSEIF( inx == nlci              .AND. iny == nlcj              ) THEN
-            ix1 = 1      ;   ix2 = nlci   ;   iy1 = 1      ;   iy2 = nlcj
-         ELSEIF( inx == jpi               .AND. iny == jpj               ) THEN
-            ix1 = 1      ;   ix2 = jpi    ;   iy1 = 1      ;   iy2 = jpj
-         ELSE 
-            CALL ctl_stop( clinfo, 'should have been an impossible case...' )
-         ENDIF
-      ENDIF
-      IF( istop == nstop ) THEN
-         ! write the data
-         IF(     PRESENT(pv_r1d) ) THEN   ! 1D variable
-            WRITE( idrst, REC = irec            , IOSTAT = ios, ERR = 987 ) pv_r1d(:)
-         ELSEIF( PRESENT(pv_r2d) ) THEN   ! 2D variable
-            WRITE( idrst, REC = irec            , IOSTAT = ios, ERR = 987 ) pv_r2d(ix1:ix2, iy1:iy2    )
-         ELSEIF( PRESENT(pv_r3d) ) THEN   ! 3D variable
-            DO jk = 1, jpk   ! do loop on each level
-               WRITE( idrst, REC = irec + jk - 1, IOSTAT = ios, ERR = 987 ) pv_r3d(ix1:ix2, iy1:iy2, jk)
-            END DO
-         ENDIF
-         ! fill the file informations
-         iom_file(kiomid)%nvars = idvar
-         IF(     PRESENT(pv_r1d) ) THEN
-            iom_file(kiomid)%irec              = irec + 1
-            iom_file(kiomid)%ndims(     idvar) = 1
-            iom_file(kiomid)%dimsz(1  , idvar) = inz
-         ELSEIF( PRESENT(pv_r2d) ) THEN
-            iom_file(kiomid)%irec              = irec + 1
-            iom_file(kiomid)%ndims(     idvar) = 2
-            iom_file(kiomid)%dimsz(1:2, idvar) = (/ inx, iny /)
-         ELSEIF( PRESENT(pv_r3d) ) THEN
-            iom_file(kiomid)%irec              = irec + inz
-            iom_file(kiomid)%ndims(     idvar) = 3
-            iom_file(kiomid)%dimsz(1:3, idvar) = (/ inx, iny, inz /)
-         ENDIF
-         iom_file(kiomid)%cn_var(idvar) = TRIM(cdvar)
-         iom_file(kiomid)%nvid(  idvar) = irec
-         iom_file(kiomid)%luld(  idvar) = .FALSE.
-         iom_file(kiomid)%scf(   idvar) = 1.
-         iom_file(kiomid)%ofs(   idvar) = 0.
-      ENDIF
-987   CONTINUE
-      IF( ios /= 0 ) THEN
-         WRITE(ctmp1,*) '           iostat = ', ios
-         CALL ctl_stop( TRIM(clinfo), '   IO error with file '//TRIM(iom_file(kiomid)%name), ctmp1 )
-      ELSE
-         IF(lwp) WRITE(numout,*) TRIM(clinfo)//' written ok'
-      ENDIF
-      !     
-   END SUBROUTINE iom_rstdimg_rp123d
-
-
-   !!======================================================================
-END MODULE iom_rstdimg
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 5282)
@@ -82,5 +82,4 @@
             WRITE(numout,*)
             SELECT CASE ( jprstlib )
-            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ocean restart binary file: '//clname
             CASE DEFAULT         ;   WRITE(numout,*) '             open ocean restart NetCDF file: '//clname
             END SELECT
@@ -110,6 +109,5 @@
       !!----------------------------------------------------------------------
 
-                     CALL iom_rstput( kt, nitrst, numrow, 'rdt'    , rdt       )   ! dynamics time step
-                     CALL iom_rstput( kt, nitrst, numrow, 'rdttra1', rdttra(1) )   ! surface tracer time step
+                     CALL iom_rstput( kt, nitrst, numrow, 'rdt'    , rdt       )   ! dynamics and tracer time step
 
                      CALL iom_rstput( kt, nitrst, numrow, 'ub'     , ub        )     ! before fields
@@ -165,5 +163,4 @@
             SELECT CASE ( jprstlib )
             CASE ( jpnf90    )   ;   WRITE(numout,*) 'rst_read : read oce NetCDF restart file'
-            CASE ( jprstdimg )   ;   WRITE(numout,*) 'rst_read : read oce binary restart file'
             END SELECT
             IF ( snc4set%luse )      WRITE(numout,*) 'rst_read : configured with NetCDF4 support'
@@ -171,10 +168,4 @@
          ENDIF
 
-         IF ( jprstlib == jprstdimg ) THEN
-           ! eventually read netcdf file (monobloc)  for restarting on different number of processors
-           ! if {cn_ocerst_in}.nc exists, then set jlibalt to jpnf90
-           INQUIRE( FILE = TRIM(cn_ocerst_in)//'.nc', EXIST = llok )
-           IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
-         ENDIF
          CALL iom_open( cn_ocerst_in, numror, kiolib = jlibalt )
       ENDIF
@@ -189,5 +180,5 @@
       !! ** Method  :   Read in restart.nc file fields which are necessary for restart
       !!----------------------------------------------------------------------
-      REAL(wp) ::   zrdt, zrdttra1
+      REAL(wp) ::   zrdt
       INTEGER  ::   jk
       LOGICAL  ::   llok
@@ -201,9 +192,5 @@
          IF( zrdt /= rdt )   neuler = 0
       ENDIF
-      IF( iom_varid( numror, 'rdttra1', ldstop = .FALSE. ) > 0 )   THEN
-         CALL iom_get( numror, 'rdttra1', zrdttra1 )
-         IF( zrdttra1 /= rdttra(1) )   neuler = 0
-      ENDIF
-      ! 
+      !
       IF( iom_varid( numror, 'ub', ldstop = .FALSE. ) > 0 ) THEN
          CALL iom_get( numror, jpdom_autoglo, 'ub'     , ub      )   ! before fields
Index: anches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LBC/cla.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LBC/cla.F90	(revision 5281)
+++ 	(revision )
@@ -1,732 +1,0 @@
-MODULE cla
-   !!======================================================================
-   !!                    ***  MODULE  cla  ***
-   !! Cross Land Advection : specific update of the horizontal divergence,
-   !!                        tracer trends and after velocity
-   !!
-   !!                 ---   Specific to ORCA_R2   ---
-   !!
-   !!======================================================================
-   !! History :  1.0  ! 2002-11 (A. Bozec)  Original code
-   !!            3.2  ! 2009-07 (G. Madec)  merge cla, cla_div, tra_cla, cla_dynspg
-   !!                 !                     and correct a mpp bug reported by A.R. Porter
-   !!----------------------------------------------------------------------
-   !!   cla_div           : update of horizontal divergence at cla straits
-   !!   tra_cla           : update of tracers at cla straits
-   !!   cla_dynspg        : update of after horizontal velocities at cla straits
-   !!   cla_init          : initialisation - control check
-   !!   cla_bab_el_mandeb : cross land advection for Bab-el-mandeb strait
-   !!   cla_gibraltar     : cross land advection for Gibraltar strait
-   !!   cla_hormuz        : cross land advection for Hormuz strait
-   !!----------------------------------------------------------------------
-   USE oce            ! ocean dynamics and tracers
-   USE dom_oce        ! ocean space and time domain
-   USE sbc_oce        ! surface boundary condition: ocean
-   USE dynspg_oce     ! ocean dynamics: surface pressure gradient variables
-   USE in_out_manager ! I/O manager
-   USE lib_mpp        ! distributed memory computing library
-   USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
-   USE lib_mpp        ! MPP library
-
-   IMPLICIT NONE
-   PRIVATE
-   
-   PUBLIC   cla_init     ! routine called by opa.F90
-   PUBLIC   cla_div      ! routine called by divcur.F90
-   PUBLIC   cla_traadv   ! routine called by traadv.F90
-   PUBLIC   cla_dynspg   ! routine called by dynspg_flt.F90
-
-   INTEGER  ::   nbab, ngib, nhor   ! presence or not of required grid-point on local domain
-   !                                ! for Bab-el-Mandeb, Gibraltar, and Hormuz straits
-   
-   !                                           !   fixed part  !  time evolving    !!! profile of hdiv for some straits
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:) ::   hdiv_139_101, hdiv_139_101_kt    ! Gibraltar     (i,j)=(172,101)
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:) ::   hdiv_139_102                     ! Gibraltar     (i,j)=(139,102)
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:) ::   hdiv_141_102, hdiv_141_102_kt    ! Gibraltar     (i,j)=(141,102)
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:) ::   hdiv_161_88 , hdiv_161_88_kt     ! Bab-el-Mandeb (i,j)=(161,88)
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:) ::   hdiv_161_87                      ! Bab-el-Mandeb (i,j)=(161,87)
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:) ::   hdiv_160_89 , hdiv_160_89_kt     ! Bab-el-Mandeb (i,j)=(160,89)
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:) ::   hdiv_172_94                      ! Hormuz        (i,j)=(172, 94)
-
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:) ::   t_171_94_hor, s_171_94_hor       ! Temperature, salinity in Hormuz strait
-   
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
-   !! $Id$
-   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-CONTAINS
-
-   SUBROUTINE cla_div( kt )
-      !!----------------------------------------------------------------------
-      !!                 ***  ROUTINE div_cla  ***
-      !!
-      !! ** Purpose :   update the horizontal divergence of the velocity field
-      !!              at some straits ( Gibraltar, Bab el Mandeb and Hormuz ).
-      !!
-      !! ** Method  : - first time-step: initialisation of cla
-      !!              - all   time-step: using imposed transport at each strait, 
-      !!              the now horizontal divergence is updated
-      !!
-      !! ** Action  :   phdivn   updted now horizontal divergence at cla straits
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
-      !!----------------------------------------------------------------------
-      !     
-      IF( kt == nit000 ) THEN
-         !
-         CALL cla_init                                        ! control check 
-         !
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'div_cla : cross land advection on hdiv '
-         IF(lwp) WRITE(numout,*) '~~~~~~~~'
-         !
-         IF( nbab == 1 )   CALL cla_bab_el_mandeb('ini')    ! Bab el Mandeb ( Red Sea - Indian ocean )
-         IF( ngib == 1 )   CALL cla_gibraltar    ('ini')    ! Gibraltar strait (Med Sea - Atlantic ocean)
-         IF( nhor == 1 )   CALL cla_hormuz       ('ini')    ! Hormuz Strait ( Persian Gulf - Indian ocean )
-         !
-      ENDIF                           
-      !
-      IF( nbab == 1    )   CALL cla_bab_el_mandeb('div')    ! Bab el Mandeb ( Red Sea - Indian ocean )
-      IF( ngib == 1    )   CALL cla_gibraltar    ('div')    ! Gibraltar strait (Med Sea - Atlantic ocean)
-      IF( nhor == 1    )   CALL cla_hormuz       ('div')    ! Hormuz Strait ( Persian Gulf - Indian ocean )
-      !
-!!gm  lbc useless here, no?
-!!gm      CALL lbc_lnk( hdivn, 'T', 1. )                    ! Lateral boundary conditions on hdivn
-      !
-   END SUBROUTINE cla_div
-   
-   
-   SUBROUTINE cla_traadv( kt )
-      !!----------------------------------------------------------------------
-      !!                 ***  ROUTINE tra_cla  ***
-      !!                   
-      !! ** Purpose :   Update the now trend due to the advection of tracers
-      !!      and add it to the general trend of passive tracer equations
-      !!      at some straits ( Bab el Mandeb, Gibraltar, Hormuz ).
-      !!
-      !! ** Method  :   using both imposed transport at each strait and T & S
-      !!              budget, the now tracer trends is updated
-      !!
-      !! ** Action  :   (ta,sa)   updated now tracer trends at cla straits
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   kt         ! ocean time-step index
-      !!----------------------------------------------------------------------
-      !
-      IF( kt == nit000 ) THEN 
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'tra_cla : cross land advection on tracers '
-         IF(lwp) WRITE(numout,*) '~~~~~~~~'
-      ENDIF
-      !
-      IF( nbab == 1    )   CALL cla_bab_el_mandeb('tra')      ! Bab el Mandeb strait
-      IF( ngib == 1    )   CALL cla_gibraltar    ('tra')      ! Gibraltar strait
-      IF( nhor == 1    )   CALL cla_hormuz       ('tra')      ! Hormuz Strait ( Persian Gulf)
-      !
-   END SUBROUTINE cla_traadv
-
-   
-   SUBROUTINE cla_dynspg( kt )
-      !!----------------------------------------------------------------------
-      !!                 ***  ROUTINE cla_dynspg  ***
-      !!                   
-      !! ** Purpose :   Update the after velocity at some straits 
-      !!              (Bab el Mandeb, Gibraltar, Hormuz).
-      !!
-      !! ** Method  :   required to compute the filtered surface pressure gradient 
-      !!
-      !! ** Action  :   (ua,va)   after velocity at the cla straits
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   kt         ! ocean time-step index
-      !!----------------------------------------------------------------------
-      !
-      IF( kt == nit000 ) THEN 
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'cla_dynspg : cross land advection on (ua,va) '
-         IF(lwp) WRITE(numout,*) '~~~~~~~~~~'
-      ENDIF
-      !
-      IF( nbab == 1    )   CALL cla_bab_el_mandeb('spg')      ! Bab el Mandeb strait
-      IF( ngib == 1    )   CALL cla_gibraltar    ('spg')      ! Gibraltar strait
-      IF( nhor == 1    )   CALL cla_hormuz       ('spg')      ! Hormuz Strait ( Persian Gulf)
-      !
-!!gm lbc is needed here, not?
-!!gm      CALL lbc_lnk( hdivn, 'U', -1. )   ;   CALL lbc_lnk( hdivn, 'V', -1. )      ! Lateral boundary conditions 
-      !
-   END SUBROUTINE cla_dynspg
-
-
-   SUBROUTINE cla_init
-      !! -------------------------------------------------------------------
-      !!                   ***  ROUTINE cla_init  ***
-      !!           
-      !! ** Purpose :   control check for mpp computation  
-      !!
-      !! ** Method  : - All the strait grid-points must be inside one of the 
-      !!              local domain interior for the cla advection to work
-      !!              properly in mpp (i.e. inside (2:jpim1,2:jpjm1) ).
-      !!              Define the corresponding indicators (nbab, ngib, nhor)
-      !!              - The profiles of cross-land fluxes are currently hard
-      !!              coded for L31 levels. Stop if jpk/=31
-      !!
-      !! ** Action  :   nbab, ngib, nhor   strait inside the local domain or not
-      !!---------------------------------------------------------------------
-      REAL(wp) ::   ztemp   ! local scalar
-      INTEGER  ::   ierr    ! local integer
-      !!---------------------------------------------------------------------
-      !
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'cla_init : cross land advection initialisation '
-      IF(lwp) WRITE(numout,*) '~~~~~~~~~'
-      !
-      !                           ! Allocate arrays for this module
-      ALLOCATE( hdiv_139_101(jpk) , hdiv_139_101_kt(jpk) ,     &    ! Gibraltar
-         &      hdiv_139_102(jpk) ,                            &
-         &      hdiv_141_102(jpk) , hdiv_141_102_kt(jpk) ,     &
-         &      hdiv_161_88 (jpk) , hdiv_161_88_kt (jpk) ,     &    ! Bab-el-Mandeb
-         &      hdiv_161_87 (jpk) ,                            &                     
-         &      hdiv_160_89 (jpk) , hdiv_160_89_kt (jpk) ,     &     ! Hormuz
-         &      hdiv_172_94 (jpk) ,                            &
-         &      t_171_94_hor(jpk) , s_171_94_hor   (jpk) , STAT=ierr )
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
-      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'cla_init: unable to allocate arrays' )
-      !
-      IF( .NOT.lk_dynspg_flt )   CALL ctl_stop( 'cla_init: Cross Land Advection works only with lk_dynspg_flt=T ' )
-      !
-      IF( lk_vvl             )   CALL ctl_stop( 'cla_init: Cross Land Advection does not work with lk_vvl=T option' )
-      !
-      IF( jpk /= 31          )   CALL ctl_stop( 'cla_init: Cross Land Advection hard coded for ORCA_R2_L31' )
-      !
-      !                                        _|_______|_______|_
-      !                                     89  |       |///////|  
-      !                                        _|_______|_______|_
-      ! ------------------------ !          88  |///////|       | 
-      !   Bab el Mandeb strait   !             _|_______|_______|_
-      ! ------------------------ !          87  |///////|       | 
-      !                                        _|_______|_______|_
-      !                                         |  160  |  161  |  
-      !
-      ! The 6 Bab el Mandeb grid-points must be inside one of the interior of the
-      ! local domain for the cla advection to work properly (i.e. (2:jpim1,2:jpjm1)
-      nbab = 0
-      IF(  ( 1 <= mj0( 88) .AND. mj1( 89) <= jpj ) .AND.    &  !* (161,89), (161,88) and (161,88) on the local pocessor
-         & ( 1 <= mi0(160) .AND. mi1(161) <= jpi )       )    nbab = 1 
-      !
-      ! test if there is no local domain that includes all required grid-points
-      ztemp = REAL( nbab )
-      IF( lk_mpp )   CALL mpp_sum( ztemp )      ! sum with other processors value
-      IF( ztemp == 0 ) THEN                     ! Only 2 points in each direction, this should never be a problem
-         CALL ctl_stop( ' cross land advection at Bab-el_Mandeb does not work with your processor cutting: change it' )
-      ENDIF
-      !                                        ___________________________
-      ! ------------------------ !         102  |       |///////|       |
-      !     Gibraltar strait     !             _|_______|_______|_______|_
-      ! ------------------------ !         101  |       |///////|       |
-      !                                        _|_______|_______|_______|_ 
-      !                                         |  139  |  140  |  141  |
-      !
-      ! The 6 Gibraltar grid-points must be inside one of the interior of the
-      ! local domain for the cla advection to work properly (i.e. (2:jpim1,2:jpjm1)
-      ngib = 0
-      IF(  ( 2 <= mj0(101) .AND. mj1(102) <= jpjm1 ) .AND.    &  !* (139:141,101:102) on the local pocessor
-         & ( 2 <= mi0(139) .AND. mi1(141) <= jpim1 )       )    ngib = 1 
-      !
-      ! test if there is no local domain that includes all required grid-points
-      ztemp = REAL( ngib )
-      IF( lk_mpp )   CALL mpp_sum( ztemp )      ! sum with other processors value
-      IF( ztemp == 0 ) THEN                     ! 3 points in i-direction, this may be a problem with some cutting
-           CALL ctl_stop( ' cross land advection at Gibraltar does not work with your processor cutting: change it' )
-      ENDIF
-      !                                        _______________
-      ! ------------------------ !          94  |/////|     | 
-      !       Hormuz strait      !             _|_____|_____|_
-      ! ------------------------ !                171   172     
-      !           
-      ! The 2 Hormuz grid-points must be inside one of the interior of the
-      ! local domain for the cla advection to work properly (i.e. (2:jpim1,2:jpjm1)
-      nhor = 0
-      IF(    2 <= mj0( 94) .AND. mj1( 94) <= jpjm1  .AND.  & 
-         &   2 <= mi0(171) .AND. mi1(172) <= jpim1         )   nhor = 1 
-      !
-      ! test if there is no local domain that includes all required grid-points
-      ztemp = REAL( nhor )
-      IF( lk_mpp )   CALL mpp_sum( ztemp )      ! sum with other processors value
-      IF( ztemp == 0 ) THEN                     ! 3 points in i-direction, this may be a problem with some cutting
-           CALL ctl_stop( ' cross land advection at Hormuz does not work with your processor cutting: change it' )
-      ENDIF
-      !
-   END SUBROUTINE cla_init
-
-
-   SUBROUTINE cla_bab_el_mandeb( cd_td )
-      !!----------------------------------------------------------------------
-      !!                ***  ROUTINE cla_bab_el_mandeb  ***
-      !!       
-      !! ** Purpose :   update the now horizontal divergence, the tracer tendancy
-      !!              and the after velocity in vicinity of Bab el Mandeb ( Red Sea - Indian ocean).
-      !!
-      !! ** Method  :   compute the exchanges at each side of the strait :
-      !!
-      !!       surf. zio_flow
-      !! (+ balance of emp) /\  |\\\\\\\\\\\|
-      !!                    ||  |\\\\\\\\\\\|  
-      !!    deep zio_flow   ||  |\\\\\\\\\\\|  
-      !!            |  ||   ||  |\\\\\\\\\\\|  
-      !!        89  |  ||   ||  |\\\\\\\\\\\|  
-      !!            |__\/_v_||__|____________ 
-      !!            !\\\\\\\\\\\|          surf. zio_flow
-      !!            |\\\\\\\\\\\|<===    (+ balance of emp)
-      !!            |\\\\\\\\\\\u
-      !!        88  |\\\\\\\\\\\|<---      deep  zrecirc (upper+deep at 2 different levels)
-      !!            |___________|__________   
-      !!            !\\\\\\\\\\\|         
-      !!            |\\\\\\\\\\\| ---\     deep  zrecirc (upper+deep) 
-      !!        87  !\\\\\\\\\\\u ===/   + deep  zio_flow   (all at the same level)
-      !!            !\\\\\\\\\\\|  
-      !!            !___________|__________ 
-      !!                160         161
-      !!
-      !!----------------------------------------------------------------------
-      CHARACTER(len=1), INTENT(in) ::   cd_td   ! ='div' update the divergence
-      !                                         ! ='tra' update the tracers
-      !                                         ! ='spg' update after velocity
-      INTEGER  ::   ji, jj, jk   ! dummy loop indices
-      REAL(wp) ::   zemp_red     ! temporary scalar
-      REAL(wp) ::   zio_flow, zrecirc_upp, zrecirc_mid, zrecirc_bot
-      !!---------------------------------------------------------------------
-      !
-      SELECT CASE( cd_td ) 
-      !                     ! ---------------- !
-      CASE( 'ini' )         !  initialisation  ! 
-         !                  ! ---------------- ! 
-         !                                   
-         zio_flow    = 0.4e6                       ! imposed in/out flow
-         zrecirc_upp = 0.2e6                       ! imposed upper recirculation water
-         zrecirc_bot = 0.5e6                       ! imposed bottom  recirculation water
-
-         hdiv_161_88(:) = 0.e0                     ! (161,88) Gulf of Aden side, north point
-         hdiv_161_87(:) = 0.e0                     ! (161,87) Gulf of Aden side, south point
-         hdiv_160_89(:) = 0.e0                     ! (160,89) Red sea side
-
-         DO jj = mj0(88), mj1(88)              !** profile of hdiv at (161,88)   (Gulf of Aden side, north point)
-            DO ji = mi0(161), mi1(161)         !------------------------------
-               DO jk = 1, 8                        ! surface in/out flow   (Ind -> Red)   (div >0)
-                  hdiv_161_88(jk) = + zio_flow / ( 8. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-               END DO
-               !                                   ! recirculation water   (Ind -> Red)   (div >0)
-               hdiv_161_88(20) =                 + zrecirc_upp   / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,20) )
-               hdiv_161_88(21) = + ( zrecirc_bot - zrecirc_upp ) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,21) )
-            END DO
-         END DO
-         !
-         DO jj = mj0(87), mj1(87)              !** profile of hdiv at (161,88)   (Gulf of Aden side, south point)
-            DO ji = mi0(161), mi1(161)         !------------------------------
-               !                                   ! deep out flow + recirculation   (Red -> Ind)   (div <0)
-               hdiv_161_87(21) = - ( zio_flow + zrecirc_bot ) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,21) )
-            END DO
-         END DO
-         !
-         DO jj = mj0(89), mj1(89)              !** profile of hdiv at (161,88)   (Red sea side)
-            DO ji = mi0(160), mi1(160)         !------------------------------
-               DO jk = 1, 8                        ! surface inflow    (Ind -> Red)   (div <0)
-                  hdiv_160_89(jk) = - zio_flow / ( 8. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-               END DO
-               !                                   ! deep    outflow   (Red -> Ind)   (div >0)
-               hdiv_160_89(16)    = + zio_flow / (      e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,16) )
-            END DO
-         END DO
-         !                  ! ---------------- !
-      CASE( 'div' )         !   update hdivn   ! (call by divcur module)
-         !                  ! ---------=====-- ! 
-         !                                     !** emp on the Red Sea   (div >0) 
-         zemp_red = 0.e0                       !---------------------
-         DO jj = mj0(87), mj1(96)                  ! sum over the Red sea
-            DO ji = mi0(148), mi1(160) 
-               zemp_red = zemp_red + emp(ji,jj) * e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj)
-            END DO
-         END DO
-         IF( lk_mpp )   CALL mpp_sum( zemp_red )   ! sum with other processors value
-         zemp_red = zemp_red * 1.e-3               ! convert in m3
-         !
-         !                                     !** Correct hdivn (including emp adjustment)
-         !                                     !-------------------------------------------
-         DO jj = mj0(88), mj1(88)                  !* profile of hdiv at (161,88)   (Gulf of Aden side, north point)
-            DO ji = mi0(161), mi1(161) 
-               hdiv_161_88_kt(:) = hdiv_161_88(:)
-               DO jk = 1, 8                              ! increase the inflow from the Indian   (div >0) 
-                  hdiv_161_88_kt(jk) = hdiv_161_88(jk) + zemp_red / (8. * e2u(ji,jj) * fse3u(ji,jj,jk) )
-               END DO
-               hdivn(ji,jj,:) = hdivn(ji,jj,:) + hdiv_161_88_kt(:)
-            END DO
-         END DO
-         DO jj = mj0(87), mj1(87)                  !* profile of divergence at (161,87)   (Gulf of Aden side, south point)
-            DO ji = mi0(161), mi1(161) 
-               hdivn(ji,jj,:) = hdivn(ji,jj,:) + hdiv_161_87(:)
-            END DO
-         END DO
-         DO jj = mj0(89), mj1(89)                  !* profile of divergence at (160,89)   (Red sea side)
-            DO ji = mi0(160), mi1(160) 
-               hdiv_160_89_kt(:) = hdiv_160_89(:)
-               DO jk = 1, 18                              ! increase the inflow from the Indian   (div <0) 
-                  hdiv_160_89_kt(jk) = hdiv_160_89(jk) - zemp_red / (10. * e1v(ji,jj) * fse3v(ji,jj,jk) )
-               END DO
-               hdivn(ji, jj,:) = hdivn(ji, jj,:) + hdiv_160_89_kt(:)
-            END DO
-         END DO
-         !                  ! ---------------- !
-      CASE( 'tra' )         !  update (ta,sa)  ! (call by traadv module)
-         !                  ! --------=======- !
-         !
-         DO jj = mj0(88), mj1(88)              !** (161,88)   (Gulf of Aden side, north point)
-            DO ji = mi0(161), mi1(161) 
-               DO jk = 1, jpkm1                         ! surf inflow + reciculation (from Gulf of Aden)
-                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_161_88_kt(jk) * tsn(ji,jj,jk,jp_tem)
-                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_161_88_kt(jk) * tsn(ji,jj,jk,jp_sal)
-               END DO
-            END DO
-         END DO
-         DO jj = mj0(87), mj1(87)              !** (161,87)   (Gulf of Aden side, south point)
-            DO ji = mi0(161), mi1(161) 
-               jk =  21                                 ! deep outflow + recirulation (combined flux)
-               tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) + hdiv_161_88(20) * tsn(ji  ,jj+1,20,jp_tem)   &  ! upper recirculation from Gulf of Aden
-                  &                        + hdiv_161_88(21) * tsn(ji  ,jj+1,21,jp_tem)   &  ! deep  recirculation from Gulf of Aden
-                  &                        + hdiv_160_89(16) * tsn(ji-1,jj+2,16,jp_tem)      ! deep inflow from Red sea
-               tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) + hdiv_161_88(20) * tsn(ji  ,jj+1,20,jp_sal)   &
-                  &                        + hdiv_161_88(21) * tsn(ji  ,jj+1,21,jp_sal)   &
-                  &                        + hdiv_160_89(16) * tsn(ji-1,jj+2,16,jp_sal)   
-            END DO
-         END DO
-         DO jj = mj0(89), mj1(89)              !** (161,88)   (Red sea side)
-            DO ji = mi0(160), mi1(160)
-               DO jk = 1, 14                            ! surface inflow (from Gulf of Aden)
-                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_160_89_kt(jk) * tsn(ji+1,jj-1,jk,jp_tem)
-                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_160_89_kt(jk) * tsn(ji+1,jj-1,jk,jp_sal)
-               END DO
-               !                                  ! deep    outflow (from Red sea)
-               tsa(ji,jj,16,jp_tem) = tsa(ji,jj,16,jp_tem) - hdiv_160_89(16) * tsn(ji,jj,16,jp_tem)
-               tsa(ji,jj,16,jp_sal) = tsa(ji,jj,16,jp_sal) - hdiv_160_89(16) * tsn(ji,jj,16,jp_sal)
-            END DO
-         END DO
-         !
-         !                  ! ---------------- !
-      CASE( 'spg' )         !  update (ua,va)  ! (call by dynspg module)
-         !                  ! --------=======- !
-         ! at this stage, (ua,va) are the after velocity, not the tendancy
-         ! compute the velocity from the divergence at T-point
-         !
-         DO jj = mj0(88), mj1(88)              !** (160,88)   (Gulf of Aden side, north point)
-            DO ji = mi0(160), mi1(160)                   ! 160, not 161 as it is a U-point) 
-               ua(ji,jj,:) = - hdiv_161_88_kt(:) / ( e1t(ji+1,jj) * e2t(ji+1,jj) * fse3t(ji+1,jj,:) )   &
-                  &                              * e2u(ji,jj) * fse3u(ji,jj,:)
-            END DO
-         END DO
-         DO jj = mj0(87), mj1(87)              !** (160,87)   (Gulf of Aden side, south point)
-            DO ji = mi0(160), mi1(160)                   ! 160, not 161 as it is a U-point) 
-               ua(ji,jj,:) = - hdiv_161_87(:) / ( e1t(ji+1,jj) * e2t(ji+1,jj) * fse3t(ji+1,jj,:) )   &
-                  &                           * e2u(ji,jj) * fse3u(ji,jj,:)
-            END DO
-         END DO
-         DO jj = mj0(88), mj1(88)              !** profile of divergence at (160,89)   (Red sea side)
-            DO ji = mi0(160), mi1(160)                   ! 88, not 89 as it is a V-point)
-               va(ji,jj,:) = - hdiv_160_89_kt(:) / ( e1t(ji,jj+1) * e2t(ji,jj+1) * fse3t(ji,jj+1,:) )   &
-                  &                              * e1v(ji,jj) * fse3v(ji,jj,:)
-            END DO
-         END DO
-      END SELECT
-      !
-   END SUBROUTINE cla_bab_el_mandeb
-   
-
-   SUBROUTINE cla_gibraltar( cd_td )
-      !! -------------------------------------------------------------------
-      !!                 ***  ROUTINE cla_gibraltar  ***
-      !!        
-      !! ** Purpose :   update the now horizontal divergence, the tracer 
-      !!              tendancyand the after velocity in vicinity of Gibraltar 
-      !!              strait ( Persian Gulf - Indian ocean ).
-      !!
-      !! ** Method :
-      !!                     _______________________            
-      !!      deep  zio_flow /====|///////|====> surf. zio_flow
-      !!    + deep  zrecirc  \----|///////|     (+balance of emp)
-      !! 102                      u///////u
-      !!      mid.  recicul    <--|///////|<==== deep  zio_flow
-      !!                     _____|_______|_____  
-      !!      surf. zio_flow ====>|///////|       
-      !!    (+balance of emp)     |///////|
-      !! 101                      u///////|             
-      !!      mid.  recicul    -->|///////|               Caution: zrecirc split into 
-      !!      deep  zrecirc  ---->|///////|                  upper & bottom recirculation
-      !!                   _______|_______|_______ 
-      !!                     139     140     141  
-      !!
-      !!---------------------------------------------------------------------
-      CHARACTER(len=1), INTENT(in) ::   cd_td   ! ='div' update the divergence
-      !                                         ! ='tra' update the tracers
-      !                                         ! ='spg' update after velocity
-      INTEGER  ::   ji, jj, jk   ! dummy loop indices
-      REAL(wp) ::   zemp_med     ! temporary scalar
-      REAL(wp) ::   zio_flow, zrecirc_upp, zrecirc_mid, zrecirc_bot
-      !!---------------------------------------------------------------------
-      !
-      SELECT CASE( cd_td ) 
-      !                     ! ---------------- !
-      CASE( 'ini' )         !  initialisation  ! 
-         !                  ! ---------------- ! 
-         !                                     !** initialization of the velocity
-         hdiv_139_101(:) = 0.e0                     !  139,101 (Atlantic side, south point)
-         hdiv_139_102(:) = 0.e0                     !  139,102 (Atlantic side, north point)
-         hdiv_141_102(:) = 0.e0                     !  141,102 (Med sea  side)
-            
-         !                                     !** imposed transport
-         zio_flow    = 0.8e6                        ! inflow surface  water
-         zrecirc_mid = 0.7e6                        ! middle recirculation water
-         zrecirc_upp = 2.5e6                        ! upper  recirculation water
-         zrecirc_bot = 3.5e6                        ! bottom recirculation water
-         !
-         DO jj = mj0(101), mj1(101)            !** profile of hdiv at 139,101 (Atlantic side, south point)
-            DO ji = mi0(139), mi1(139)         !-----------------------------
-               DO jk = 1, 14                        ! surface in/out flow (Atl -> Med)   (div >0)
-                  hdiv_139_101(jk) = + zio_flow / ( 14. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-               END DO
-               DO jk = 15, 20                       ! middle  reciculation (Atl 101 -> Atl 102)   (div >0)   
-                  hdiv_139_101(jk) = + zrecirc_mid / ( 6. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-               END DO
-               !                                    ! upper reciculation (Atl 101 -> Atl 101)   (div >0)
-               hdiv_139_101(21) =               + zrecirc_upp / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-               !
-               !                                    ! upper & bottom reciculation (Atl 101 -> Atl 101 & 102)   (div >0)
-               hdiv_139_101(22) = ( zrecirc_bot - zrecirc_upp ) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-            END DO
-         END DO
-         DO jj = mj0(102), mj1(102)            !** profile of hdiv at 139,102 (Atlantic side, north point)
-            DO ji = mi0(139), mi1(139)         !-----------------------------
-               DO jk = 15, 20                       ! middle reciculation (Atl 101 -> Atl 102)   (div <0)                
-                  hdiv_139_102(jk) = - zrecirc_mid / ( 6. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-               END DO
-               !                                    ! outflow of Mediterranean sea + deep recirculation   (div <0) 
-               hdiv_139_102(22) = - ( zio_flow + zrecirc_bot ) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-            END DO
-         END DO
-         DO jj = mj0(102), mj1(102)            !** velocity profile at 141,102  (Med sea side)
-            DO ji = mi0(141), mi1(141)         !------------------------------
-               DO  jk = 1, 14                       ! surface inflow in the Med     (div <0)
-                  hdiv_141_102(jk) = - zio_flow / ( 14. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-               END DO
-               !                                    ! deep    outflow toward the Atlantic    (div >0) 
-               hdiv_141_102(21)    = + zio_flow / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-            END DO
-         END DO
-         !                  ! ---------------- !
-      CASE( 'div' )         !   update hdivn   ! (call by divcur module)
-         !                  ! ---------=====-- ! 
-         !                                     !** emp on the Mediterranean Sea  (div >0) 
-         zemp_med = 0.e0                       !-------------------------------
-         DO jj = mj0(96), mj1(110)                  ! sum over the Med sea
-            DO ji = mi0(141),mi1(181)
-               zemp_med = zemp_med + emp(ji,jj) * e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj) 
-            END DO
-         END DO
-         DO jj = mj0(96), mj1(96)                   ! minus 2 points in Red Sea 
-            DO ji = mi0(148),mi1(148)
-               zemp_med = zemp_med - emp(ji,jj) * e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj)
-            END DO
-            DO ji = mi0(149),mi1(149)
-               zemp_med = zemp_med - emp(ji,jj) * e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj)
-            END DO
-         END DO
-         IF( lk_mpp )   CALL mpp_sum( zemp_med )    ! sum with other processors value
-         zemp_med = zemp_med * 1.e-3                ! convert in m3
-         !
-         !                                     !** Correct hdivn (including emp adjustment)
-         !                                     !-------------------------------------------
-         DO jj = mj0(101), mj1(101)                 !* 139,101 (Atlantic side, south point)
-            DO ji = mi0(139), mi1(139) 
-               hdiv_139_101_kt(:) = hdiv_139_101(:)      
-               DO jk = 1, 14                              ! increase the inflow from the Atlantic   (div >0) 
-                  hdiv_139_101_kt(jk) = hdiv_139_101(jk) + zemp_med / ( 14. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-               END DO
-               hdivn(ji, jj,:) = hdivn(ji, jj,:) + hdiv_139_101_kt(:)
-            END DO
-         END DO
-         DO jj = mj0(102), mj1(102)                 !* 139,102 (Atlantic side, north point)
-            DO ji = mi0(139), mi1(139) 
-               hdivn(ji,jj,:) = hdivn(ji,jj,:) + hdiv_139_102(:)
-            END DO
-         END DO
-         DO jj = mj0(102), mj1(102)                 !* 141,102 (Med side)
-            DO ji = mi0(141), mi1(141) 
-               hdiv_141_102(:) = hdiv_141_102(:)
-               DO jk = 1, 14                              ! increase the inflow from the Atlantic   (div <0)
-                  hdiv_141_102_kt(jk) = hdiv_141_102(jk) - zemp_med / ( 14. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-               END DO
-               hdivn(ji, jj,:) = hdivn(ji, jj,:) + hdiv_141_102_kt(:)
-            END DO
-         END DO
-         !                  ! ---------------- !
-      CASE( 'tra' )         !  update (ta,sa)  ! (call by traadv module)
-         !                  ! --------=======- !
-         !
-         DO jj = mj0(101), mj1(101)            !** 139,101 (Atlantic side, south point)   (div >0)
-            DO ji = mi0(139), mi1(139) 
-               DO jk = 1, jpkm1                         ! surf inflow + mid. & bottom reciculation (from Atlantic)	
-                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_139_101_kt(jk) * tsn(ji,jj,jk,jp_tem)
-                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_139_101_kt(jk) * tsn(ji,jj,jk,jp_sal)
-               END DO
-            END DO
-         END DO
-         !
-         DO jj = mj0(102), mj1(102)            !** 139,102 (Atlantic side, north point)   (div <0)
-            DO ji = mi0(139), mi1(139) 
-               DO jk = 15, 20                            ! middle  reciculation (Atl 101 -> Atl 102)   (div <0)
-                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_139_102(jk) * tsn(ji,jj-1,jk,jp_tem)  ! middle Atlantic recirculation
-                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_139_102(jk) * tsn(ji,jj-1,jk,jp_sal)
-               END DO
-               !                                         ! upper & bottom Atl. reciculation (Atl 101 -> Atl 102) - (div <0)
-               !                                         ! deep Med flow                    (Med 102 -> Atl 102) - (div <0)
-               tsa(ji,jj,22,jp_tem) = tsa(ji,jj,22,jp_tem) + hdiv_141_102(21) * tsn(ji+2,jj,21,jp_tem)   &  ! deep Med flow  
-                  &                        + hdiv_139_101(21) * tsn(ji,jj-1,21,jp_tem)   &  ! upper  Atlantic recirculation  
-                  &                        + hdiv_139_101(22) * tsn(ji,jj-1,22,jp_tem)      ! bottom Atlantic recirculation  
-               tsa(ji,jj,22,jp_sal) = tsa(ji,jj,22,jp_sal) + hdiv_141_102(21) * tsn(ji+2,jj,21,jp_sal)   &
-                  &                        + hdiv_139_101(21) * tsn(ji,jj-1,21,jp_sal)   &
-                  &                        + hdiv_139_101(22) * tsn(ji,jj-1,22,jp_sal) 
-            END DO
-         END DO
-         DO jj = mj0(102), mj1(102)                 !* 141,102 (Med side)   (div <0)
-            DO ji = mi0(141), mi1(141) 
-               DO jk = 1, 14                             ! surface flow from Atlantic to Med sea
-                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_141_102_kt(jk) * tsn(ji-2,jj-1,jk,jp_tem)
-                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_141_102_kt(jk) * tsn(ji-2,jj-1,jk,jp_sal)
-               END DO
-               !                                         ! deeper flow from Med sea to Atlantic
-               tsa(ji,jj,21,jp_tem) = tsa(ji,jj,21,jp_tem) - hdiv_141_102(21) * tsn(ji,jj,21,jp_tem)
-               tsa(ji,jj,21,jp_sal) = tsa(ji,jj,21,jp_sal) - hdiv_141_102(21) * tsn(ji,jj,21,jp_sal)
-            END DO
-         END DO
-         !                  ! ---------------- !
-      CASE( 'spg' )         !  update (ua,va)  ! (call by dynspg module)
-         !                  ! --------=======- !
-         ! at this stage, (ua,va) are the after velocity, not the tendancy
-         ! compute the velocity from the divergence at T-point
-         !
-         DO jj = mj0(101), mj1(101)            !** 139,101 (Atlantic side, south point)
-            DO ji = mi0(139), mi1(139)                    ! div >0 => ua >0, same sign
-               ua(ji,jj,:) = hdiv_139_101_kt(:) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,:) )   &
-                  &                             * e2u(ji,jj) * fse3u(ji,jj,:)
-            END DO
-         END DO
-         DO jj = mj0(102), mj1(102)            !** 139,102 (Atlantic side, north point)
-            DO ji = mi0(139), mi1(139)                    ! div <0 => ua <0, same sign
-               ua(ji,jj,:) = hdiv_139_102(:) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,:) )   &
-                  &                          * e2u(ji,jj) * fse3u(ji,jj,:)   
-            END DO
-         END DO
-         DO jj = mj0(102), mj1(102)            !** 140,102 (Med side) (140 not 141 as it is a U-point)
-            DO ji = mi0(140), mi1(140)                    ! div >0 => ua <0, opposite sign
-               ua(ji,jj,:) = - hdiv_141_102(:) / ( e1t(ji+1,jj) * e2t(ji+1,jj) * fse3t(ji+1,jj,:) )   &
-                  &                            * e2u(ji,jj) * fse3u(ji,jj,:)
-            END DO
-         END DO
-         !
-      END SELECT
-      !
-   END SUBROUTINE cla_gibraltar
-
-
-   SUBROUTINE cla_hormuz( cd_td )
-      !! -------------------------------------------------------------------
-      !!                   ***  ROUTINE div_hormuz  ***
-      !!              
-      !! ** Purpose :   update the now horizontal divergence, the tracer 
-      !!              tendancyand the after velocity in vicinity of Hormuz 
-      !!              strait ( Persian Gulf - Indian ocean ).
-      !!
-      !! ** Method  :   Hormuz strait
-      !!            ______________   
-      !!            |/////|<==      surface inflow
-      !!        94  |/////|     
-      !!            |/////|==>      deep    outflow
-      !!            |_____|_______
-      !!              171    172     
-      !!---------------------------------------------------------------------
-      CHARACTER(len=1), INTENT(in) ::   cd_td   ! ='ini' initialisation
-      !!                                        ! ='div' update the divergence
-      !!                                        ! ='tra' update the tracers
-      !!                                        ! ='spg' update after velocity
-      !!
-      INTEGER  ::   ji, jj, jk   ! dummy loop indices
-      REAL(wp) ::   zio_flow     ! temporary scalar
-      !!---------------------------------------------------------------------
-      !
-      SELECT CASE( cd_td ) 
-      !                     ! ---------------- !
-      CASE( 'ini' )         !  initialisation  ! 
-         !                  ! ---------------- ! 
-         !                                     !** profile of horizontal divergence due to cross-land advection
-         zio_flow  = 1.e6                          ! imposed in/out flow
-         !
-         hdiv_172_94(:) = 0.e0         
-         !
-         DO jj = mj0(94), mj1(94)                  ! in/out flow at (i,j) = (172,94)
-            DO ji = mi0(172), mi1(172) 
-               DO jk = 1, 8                            ! surface inflow  (Indian ocean to Persian Gulf) (div<0)
-                  hdiv_172_94(jk) = - ( zio_flow / 8.e0 * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-               END DO
-               DO jk = 16, 18                          ! deep    outflow (Persian Gulf to Indian ocean) (div>0)
-                  hdiv_172_94(jk) = + ( zio_flow / 3.e0 * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
-               END DO
-            END DO
-         END DO
-         !                                     !** T & S profile in the Hormuz strait (use in deep outflow)
-         !      Temperature       and         Salinity
-         t_171_94_hor(:)  = 0.e0   ;   s_171_94_hor(:)  = 0.e0
-         t_171_94_hor(16) = 18.4   ;   s_171_94_hor(16) = 36.27
-         t_171_94_hor(17) = 17.8   ;   s_171_94_hor(17) = 36.4
-         t_171_94_hor(18) = 16.    ;   s_171_94_hor(18) = 36.27
-         !
-         !                  ! ---------------- !
-      CASE( 'div' )         !   update hdivn   ! (call by divcur module)
-         !                  ! ---------=====-- ! 
-         !                                   
-         DO jj = mj0(94), mj1(94)              !** 172,94 (Indian ocean side)
-            DO ji = mi0(172), mi1(172) 
-               hdivn(ji,jj,:) = hdivn(ji,jj,:) + hdiv_172_94(:)
-            END DO
-         END DO
-         !                  ! ---------------- !
-      CASE( 'tra' )         !  update (ta,sa)  ! (call by traadv module)
-         !                  ! --------=======- !
-         !                          
-         DO jj = mj0(94), mj1(94)              !** 172,94 (Indian ocean side)
-            DO ji = mi0(172), mi1(172) 
-               DO jk = 1, 8                          ! surface inflow   (Indian ocean to Persian Gulf) (div<0)
-                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_172_94(jk) * tsn(ji,jj,jk,jp_tem) 
-                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_172_94(jk) * tsn(ji,jj,jk,jp_sal) 
-               END DO
-               DO jk = 16, 18                        ! deep outflow     (Persian Gulf to Indian ocean) (div>0)
-                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - hdiv_172_94(jk) * t_171_94_hor(jk)
-                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - hdiv_172_94(jk) * s_171_94_hor(jk)
-               END DO
-            END DO
-         END DO
-         !                  ! ---------------- !
-      CASE( 'spg' )         !  update (ua,va)  ! (call by dynspg module)
-         !                  ! --------=======- !
-         ! No barotropic flow through Hormuz strait
-         ! at this stage, (ua,va) are the after velocity, not the tendancy
-         ! compute the velocity from the divergence at T-point
-         DO jj = mj0(94), mj1(94)              !** 171,94 (Indian ocean side) (171 not 172 as it is the western U-point)
-            DO ji = mi0(171), mi1(171)                ! div >0 => ua >0, opposite sign
-               ua(ji,jj,:) = - hdiv_172_94(:) / ( e1t(ji+1,jj) * e2t(ji+1,jj) * fse3t(ji+1,jj,:) )   &
-                  &                           * e2u(ji,jj) * fse3u(ji,jj,:)
-            END DO
-         END DO
-         !
-      END SELECT
-      !
-   END SUBROUTINE cla_hormuz
-   
-   !!======================================================================
-END MODULE cla
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 5282)
@@ -297,5 +297,5 @@
 
       IF( mynode == 0 ) THEN
-        CALL ctl_opn( kumond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 )
+        CALL ctl_opn( kumond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -2, 6, .TRUE. , 1 )
         WRITE(kumond, nammpp)      
       ENDIF
@@ -3198,5 +3198,5 @@
       IF( PRESENT( localComm ) .OR. .NOT.PRESENT( localComm ) )   function_value = 0
       IF( .FALSE. )   ldtxt(:) = 'never done'
-      CALL ctl_opn( kumond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 )
+      CALL ctl_opn( kumond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .TRUE. , 1 )
    END FUNCTION mynode
 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90	(revision 5282)
@@ -457,11 +457,4 @@
 #  include "mppini_2.h90"
 
-# if defined key_dimgout
-   !!----------------------------------------------------------------------
-   !!   'key_dimgout'                  NO use of NetCDF files
-   !!----------------------------------------------------------------------
-   SUBROUTINE mpp_init_ioipsl       ! Dummy routine
-   END SUBROUTINE mpp_init_ioipsl  
-# else
    SUBROUTINE mpp_init_ioipsl
       !!----------------------------------------------------------------------
@@ -509,5 +502,4 @@
    END SUBROUTINE mpp_init_ioipsl  
 
-# endif
 #endif
 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 5282)
@@ -69,5 +69,4 @@
          &                 ln_dynldf_level, ln_dynldf_hor  , ln_dynldf_iso,   &
          &                 rn_ahm_0_lap   , rn_ahmb_0      , rn_ahm_0_blp ,   &
-         &                 rn_cmsmag_1    , rn_cmsmag_2    , rn_cmsh,         &
          &                 rn_ahm_m_lap   , rn_ahm_m_blp
 
@@ -155,8 +154,4 @@
       IF(lwp) WRITE(numout,*) '        ahm1 = ahm2 = ahm0 =  ',ahm0
 #endif
-     nkahm_smag = 0
-#if defined key_dynldf_smag
-     nkahm_smag = 1
-#endif
 
       !
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_oce.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_oce.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_oce.F90	(revision 5282)
@@ -23,11 +23,7 @@
    REAL(wp), PUBLIC ::   rn_ahm_0_blp       !: lateral bilaplacian eddy viscosity (m4/s)
    REAL(wp), PUBLIC ::   ahm0, ahmb0, ahm0_blp         !: OLD namelist names
-   REAL(wp), PUBLIC ::   rn_cmsmag_1        !: constant in laplacian Smagorinsky viscosity
-   REAL(wp), PUBLIC ::   rn_cmsmag_2        !: constant in bilaplacian Smagorinsky viscosity
-   REAL(wp), PUBLIC ::   rn_cmsh            !: 1 or 0 , if 0 -use only shear for Smagorinsky viscosity
    REAL(wp), PUBLIC ::   rn_ahm_m_blp       !: upper limit for bilap  abs(ahm) < min( dx^4/128rdt, rn_ahm_m_blp)
    REAL(wp), PUBLIC ::   rn_ahm_m_lap       !: upper limit for lap  ahm < min(dx^2/16rdt, rn_ahm_m_lap)
 
-   INTEGER , PUBLIC ::   nkahm_smag      =  0          !: 
 
    !                                                                                  !!! eddy coeff. at U-,V-,W-pts [m2/s]
Index: anches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_smag.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_smag.F90	(revision 5281)
+++ 	(revision )
@@ -1,301 +1,0 @@
-MODULE ldfdyn_smag
-   !!======================================================================
-   !!                     ***  MODULE  ldftrasmag  ***
-   !! Ocean physics:  variable eddy induced velocity coefficients
-   !!======================================================================
-#if   defined key_dynldf_smag   &&   defined key_dynldf_c3d
-   !!----------------------------------------------------------------------
-   !!   'key_dynldf_smag'      and           smagorinsky  diffusivity
-   !!   'key_dynldf_c3d'                    3D tracer lateral  mixing coef.
-   !!----------------------------------------------------------------------
-   !!   ldf_eiv      : compute the eddy induced velocity coefficients
-   !!----------------------------------------------------------------------
-   !! * Modules used
-   USE oce             ! ocean dynamics and tracers
-   USE dom_oce         ! ocean space and time domain
-   USE sbc_oce         ! surface boundary condition: ocean
-   USE sbcrnf          ! river runoffs
-   USE ldfdyn_oce      ! ocean tracer   lateral physics
-   USE phycst          ! physical constants
-   USE ldfslp          ! iso-neutral slopes
-   USE in_out_manager  ! I/O manager
-   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE prtctl          ! Print control
-   USE iom
-   USE wrk_nemo
-   IMPLICIT NONE
-   PRIVATE
-
-   !! * Routine accessibility
-   PUBLIC ldf_dyn_smag               ! routine called by step.F90
-   !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id: ldf_tra_smag.F90 1482 2010-06-13 15:28:06Z  $
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-#  include "vectopt_loop_substitute.h90"
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-
-
-
-
-   !!----------------------------------------------------------------------
-   !!                        ***  ldfdyn_smag.F90  ***
-   !!----------------------------------------------------------------------
-
-   !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id: ldfdyn_c3d.h90 1581 2009-08-05 14:53:12Z smasson $ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
-
-   !!----------------------------------------------------------------------
-   !!   'key_dynldf_smag'             3D lateral eddy viscosity coefficients
-   !!----------------------------------------------------------------------
-
-   SUBROUTINE ldf_dyn_smag( kt )
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE ldf_dyn_smag  ***
-      !!                   
-      !! ** Purpose :   initializations of the horizontal ocean physics
-      !!
-      !! ** Method  :   3D eddy viscosity coef. 
-      !!    M.Griffies, R.Hallberg AMS, 2000
-      !! for laplacian:
-      !!   Asmag=(C/pi)^2*dx*dy sqrt(D^2), C=3-4
-      !! for bilaplacian:
-      !!   Bsmag=Asmag*dx*dy/8
-      !!   D^2=(du/dx-dv/dy)^2+(dv/dx+du/dy)^2 for Cartesian coordinates
-      !!  in general case du/dx ==> e2 d(u/e2)/dx;  du/dy ==> e1 d(u/e1)/dy; 
-      !!                  dv/dx ==> e2 d(v/e2)/dx;  dv/dy ==> e1 d(v/e1)/dy
-      !!
-      !!       laplacian operator   : ahm1, ahm2 defined at T- and F-points
-      !!                              ahm3, ahm4 never used
-      !!       bilaplacian operator : ahm1, ahm2 never used
-      !!                           :  ahm3, ahm4 defined at U- and V-points
-      !!       explanation of the default is missingi
-      !!  last modified : Maria Luneva, September 2011
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      !! ahm0 here is a background viscosity
-
-      !! * Arguments
-
-      !! * local variables
-
-      INTEGER              :: kt                   ! timestep
-
-      INTEGER  ::   ji, jj, jk                     ! dummy loop indices
-      REAL (wp):: zdeltat,zdeltaf,zdeltau,zdeltav  ! temporary scalars
-      REAL (wp), POINTER, DIMENSION (:,:) ::   zux, zuy , zvx ,zvy, zue1, zue2, zve1, zve2 
-      REAL (wp)::  zcmsmag_1, zcmsmag_2 , zcmsh
-
-
-      !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi,jpj,zux,zuy,zvx,zvy )
-      CALL wrk_alloc( jpi,jpj,zue1,zue2,zve1,zve2 )
-
-
-      IF(  kt == nit000 ) THEN
-
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'ldf_dyn_smag : 3D lateral eddy viscosity coefficient'
-      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
-     
-      ENDIF
-      
-      zcmsmag_1 = rn_cmsmag_1
-      zcmsmag_2 = rn_cmsmag_2
-      zcmsh     = rn_cmsh
-
-   
-
-
-      ! Set ahm1 and ahm2  ( T- and F- points) (used for laplacian operators
-      ! =================                       whatever its orientation is)
-      IF( ln_dynldf_lap ) THEN
-         ! define ahm1 and ahm2 at the right grid point position
-         ! (USER: modify ahm1 and ahm2 following your desiderata)
-         
-         DO jk=1,jpk
-           zue2(:,:)=un(:,:,jk)/e2u(:,:)
-           zve1(:,:)=vn(:,:,jk)/e1v(:,:)
-           zue1(:,:)=un(:,:,jk)/e1u(:,:)
-           zve2(:,:)=vn(:,:,jk)/e2v(:,:)
-
- 
-           DO jj=2,jpj
-            DO ji=2,jpi
-            zux(ji,jj)=(zue2(ji,jj)-zue2(ji-1,jj))/e1t(ji,jj)*e2t(ji,jj)*tmask(ji,jj,jk) * zcmsh
-            zvy(ji,jj)=(zve1(ji,jj)-zve1(ji,jj-1))/e2t(ji,jj)*e1t(ji,jj)*tmask(ji,jj,jk) * zcmsh
-            ENDDO
-           ENDDO
-
-           DO jj=1,jpjm1
-            DO ji=1,jpim1
-            zuy(ji,jj)=(zue1(ji,jj+1)-zue1(ji,jj))/e2f(ji,jj)*e1f(ji,jj)*fmask(ji,jj,jk)
-            zvx(ji,jj)=(zve2(ji+1,jj)-zve2(ji,jj))/e1f(ji,jj)*e2f(ji,jj)*fmask(ji,jj,jk)
-            ENDDO
-           ENDDO
-             
-          DO jj=2,jpjm1
-           DO ji=2,jpim1
-
-            zdeltat=2._wp /(e1t(ji,jj)**(-2)+e2t(ji,jj)**(-2))
-            zdeltaf=2._wp /(e1f(ji,jj)**(-2)+e2f(ji,jj)**(-2))   
-            ahm1(ji,jj,jk)=(zcmsmag_1/rpi)**2*zdeltat*                                         &
-                            sqrt( (zux(ji,jj)-zvy(ji,jj))**2+                                    &
-                     0.0625_wp*(zuy(ji,jj)+zuy(ji,jj-1)+zuy(ji-1,jj)+zuy(ji-1,jj-1)+             &
-                            zvx(ji,jj)+zvx(ji,jj-1)+zvx(ji-1,jj)+zvx(ji-1,jj-1))**2)
-
-            ahm2(ji,jj,jk)=(zcmsmag_1/rpi)**2*zdeltaf*                                         &
-                            sqrt( (zuy(ji,jj)+zvx(ji,jj))**2+                                    &
-                     0.0625_wp*(zux(ji,jj)+zux(ji,jj+1)+zux(ji+1,jj)+zux(ji+1,jj+1)-             &
-                             zvy(ji,jj)-zvy(ji,jj+1)-zvy(ji+1,jj)-zvy(ji+1,jj+1))**2)
-
-            ahm1(ji,jj,jk)=MAX(ahm1(ji,jj,jk),rn_ahm_0_lap)
-            ahm2(ji,jj,jk)=MAX(ahm2(ji,jj,jk),rn_ahm_0_lap)
-
-! stability criteria or upper limit set from namelist
-            ahm1(ji,jj,jk)=MIN(ahm1(ji,jj,jk),zdeltat / (16_wp*rdt),rn_ahm_m_lap)
-            ahm2(ji,jj,jk)=MIN(ahm2(ji,jj,jk),zdeltaf / (16_wp*rdt),rn_ahm_m_lap)
-
-            ENDDO
-           ENDDO
-
-         ENDDO ! jpk
-            ahm1(:,:,jpk) = ahm1(:,:,jpkm1)
-            ahm2(:,:,jpk) = ahm2(:,:,jpkm1)
-            IF(lwp.and.kt==nit000) WRITE(numout,'(36x," ahm ", 7x)')
-            DO jk = 1, jpk
-
-               IF(lwp.and.kt==nit000) WRITE(numout,'(30x,E10.2,8x,i3)') ahm1(jpi/2,jpj/2,jk), jk
-            END DO
-      CALL lbc_lnk( ahm1, 'T', 1. )   ! Lateral boundary conditions on ( ahtt )
-      CALL lbc_lnk( ahm2, 'F', 1. )   ! Lateral boundary conditions on ( ahtt )
-
-      ENDIF    ! ln_dynldf_lap
-      
-
-
-      ! ahm3 and ahm4 at U- and V-points (used for bilaplacian operator
-      ! ================================  whatever its orientation is)
-      ! Here: ahm is proportional to the cube of the maximum of the grid spacing
-      !       in the to horizontal direction
-
-      IF( ln_dynldf_bilap ) THEN
-         DO jk=1,jpk
-           zue2(:,:) = un(:,:,jk)/e2u(:,:)
-           zve1(:,:) = vn(:,:,jk)/e1v(:,:)
-           zue1(:,:) = un(:,:,jk)/e1u(:,:)
-           zve2(:,:) = vn(:,:,jk)/e2v(:,:)
-
-
-           DO jj=2,jpj
-            DO ji=2,jpi
-            zux(ji,jj) = (zue2(ji,jj)-zue2(ji-1,jj))/e1t(ji,jj)*e2t(ji,jj)*tmask(ji,jj,jk)
-            zvy(ji,jj) = (zve1(ji,jj)-zve1(ji,jj-1))/e2t(ji,jj)*e1t(ji,jj)*tmask(ji,jj,jk)
-            ENDDO
-           ENDDO
-
-           DO jj=1,jpjm1
-            DO ji=1,jpim1
-            zuy(ji,jj) = (zue1(ji,jj+1)-zue1(ji,jj))/e2f(ji,jj)*e1f(ji,jj)*fmask(ji,jj,jk)
-            zvx(ji,jj) = (zve2(ji+1,jj)-zve2(ji,jj))/e1f(ji,jj)*e2f(ji,jj)*fmask(ji,jj,jk)
-            ENDDO
-           ENDDO
-
-
-          DO jj=2,jpjm1
-           DO ji=2,jpim1
-            zdeltau = 2._wp/(e1u(ji,jj)**(-2)+e2u(ji,jj)**(-2))
-            zdeltav = 2._wp/(e1v(ji,jj)**(-2)+e2v(ji,jj)**(-2))
-
-            ahm3(ji,jj,jk) = -(zcmsmag_2/rpi)**2/8.0_wp*zdeltau**2*                          &
-
-                         sqrt(0.25_wp*(zux(ji,jj)+zux(ji+1,jj)-zvy(ji,jj)-zvy(ji+1,jj))**2+    &
-                              0.25_wp*(zuy(ji,jj)+zuy(ji,jj-1)+zvx(ji,jj)+zvx(ji,jj-1))**2)
-
-            ahm4(ji,jj,jk) = -(zcmsmag_2/rpi)**2/8.0_wp*zdeltav**2*                           &
-
-                         sqrt(0.25_wp*(zux(ji,jj)+zux(ji,jj+1)-zvy(ji,jj)-zvy(ji,jj+1))**2+    &
-                              0.25_wp*(zuy(ji,jj)+zuy(ji-1,jj)+zvx(ji-1,jj)+zvx(ji,jj))**2)
-
-            ahm3(ji,jj,jk) = MIN (rn_ahm_0_blp , ahm3(ji,jj,jk) )
-            ahm4(ji,jj,jk) = MIN (rn_ahm_0_blp , ahm4(ji,jj,jk) ) 
-
-! stability criteria or upper limit set in namelist
-
-            ahm3(ji,jj,jk) = MAX( ahm3(ji,jj,jk),-zdeltau**2/( 128._wp*rdt ),rn_ahm_m_blp )
-            ahm4(ji,jj,jk) = MAX( ahm4(ji,jj,jk),-zdeltav**2/( 128._wp*rdt ),rn_ahm_m_blp )
-            
-
-            ENDDO
-           ENDDO
-
-         ENDDO
-            ahm3(:,:,jpk) = ahm3(:,:,jpkm1)
-            ahm4(:,:,jpk) = ahm4(:,:,jpkm1)
-
-      DO jk = 1, jpk
-      IF(  kt == nit000 ) THEN
-
-               IF(lwp) WRITE(numout,'(30x,E10.2,8x,i3)') ahm3(jpi/2,jpj/2,jk), jk
-      ENDIF   
-      END DO
-      CALL lbc_lnk( ahm3, 'U', 1. )   ! Lateral boundary conditions
-      CALL lbc_lnk( ahm4, 'V', 1. )
-   ENDIF
-
-      CALL wrk_dealloc( jpi,jpj,zux,zuy,zvx,zvy )
-      CALL wrk_dealloc( jpi,jpj,zue1,zue2,zve1,zve2 )
-   !    zumax = MAXVAL( ABS( ahm3(:,:,:) ) )                ! slower than the following loop on NEC SX5
-      zdeltat = 0._wp
-   If(ln_dynldf_lap)THEN
-      DO jk = 1, jpk
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               zdeltat = MAX(zdeltat,ABS(ahm1(ji,jj,jk)),ABS(ahm2(ji,jj,jk)) )
-          END DO
-        END DO
-      END DO
-      IF( lk_mpp )   CALL mpp_max( zdeltat )                 ! max over the global domain
-      !
-      IF( MOD( kt, nwrite ) == 1 .AND. lwp )   WRITE(numout,*) ' ==>> time-step= ',kt,'dynlap:  abs(ahm) max: ', zdeltat
-    ENDIF
-    If(ln_dynldf_bilap)THEN
-     zdeltat = 0._wp
-      DO jk = 1, jpk
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               zdeltat = MAX(zdeltat,ABS(ahm3(ji,jj,jk)),ABS(ahm3(ji,jj,jk)) )
-          END DO
-        END DO
-      END DO
-      IF( lk_mpp )   CALL mpp_max( zdeltat )                 ! max over the global domain
-      !
-      IF( MOD( kt, nwrite ) == 1 .AND. lwp )   WRITE(numout,*) ' ==>> time-step= ',kt,'dyn_bilap abs(ahm) max: ', zdeltat
-      !
-   ENDIF
-      !
-
-END SUBROUTINE ldf_dyn_smag
-#else
-   !!----------------------------------------------------------------------
-   !!   Default option                                         Dummy module
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE ldf_dyn_smag( kt )       ! Empty routine
-      WRITE(*,*) 'ldf_dyn_smag: You should not have seen this print! error? check keys ldf:c3d+smag', kt
-   END SUBROUTINE ldf_dyn_smag
-#endif
-
-   END MODULE ldfdyn_smag
-
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 5282)
@@ -70,6 +70,5 @@
          &                 ln_triad_iso   , ln_botmix_grif ,                  &
          &                 rn_aht_0       , rn_ahtb_0      , rn_aeiv_0,       &
-         &                 rn_slpmax      , rn_chsmag      ,    rn_smsh,      &
-         &                 rn_aht_m
+         &                 rn_slpmax      , rn_aht_m
       !!----------------------------------------------------------------------
 
@@ -167,13 +166,4 @@
 #endif
 
-#if defined key_traldf_smag && ! defined key_traldf_c3d
-        CALL ctl_stop( 'key_traldf_smag can only be used with key_traldf_c3d' )
-#endif
-#if defined key_traldf_smag
-        IF(lwp) WRITE(numout,*)' SMAGORINSKY DIFFUSION'
-        IF(lwp .AND. rn_smsh < 1)  WRITE(numout,*)' only  shear is used '
-        IF(lwp.and.ln_traldf_bilap) CALL ctl_stop(' SMAGORINSKY + BILAPLACIAN - UNSTABLE OR NON_CONSERVATIVE' )
-#endif
-
       !
    END SUBROUTINE ldf_tra_init
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_oce.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_oce.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_oce.F90	(revision 5282)
@@ -30,6 +30,4 @@
    REAL(wp), PUBLIC ::   rn_aeiv_0        !: eddy induced velocity coefficient (m2/s)
    REAL(wp), PUBLIC ::   rn_slpmax        !: slope limit
-   REAL(wp), PUBLIC ::   rn_chsmag        !:  multiplicative factor in Smagorinsky diffusivity
-   REAL(wp), PUBLIC ::   rn_smsh          !:  Smagorinsky diffusivity: = 0 - use only sheer
    REAL(wp), PUBLIC ::   rn_aht_m         !:  upper limit or stability criteria for lateral eddy diffusivity (m2/s)
 
Index: anches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_smag.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_smag.F90	(revision 5281)
+++ 	(revision )
@@ -1,210 +1,0 @@
-MODULE ldftra_smag
-   !!======================================================================
-   !!                     ***  MODULE  ldftrasmag  ***
-   !! Ocean physics:  variable eddy induced velocity coefficients
-   !!======================================================================
-#if   defined key_traldf_smag   &&   defined key_traldf_c3d
-   !!----------------------------------------------------------------------
-   !!   'key_traldf_smag'      and           smagorinsky  diffusivity
-   !!   'key_traldf_c3d'                    3D tracer lateral  mixing coef.
-   !!----------------------------------------------------------------------
-   !!   ldf_eiv      : compute the eddy induced velocity coefficients
-   !!----------------------------------------------------------------------
-   !! * Modules used
-   USE oce             ! ocean dynamics and tracers
-   USE dom_oce         ! ocean space and time domain
-   USE sbc_oce         ! surface boundary condition: ocean
-   USE sbcrnf          ! river runoffs
-   USE ldftra_oce      ! ocean tracer   lateral physics
-   USE phycst          ! physical constants
-   USE ldfslp          ! iso-neutral slopes
-   USE in_out_manager  ! I/O manager
-   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE prtctl          ! Print control
-   USE iom
-   USE wrk_nemo
-   IMPLICIT NONE
-   PRIVATE
-
-   !! * Routine accessibility
-   PUBLIC ldf_tra_smag               ! routine called by step.F90
-   !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id: ldf_tra_smag.F90 1482 2010-06-13 15:28:06Z  $
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-#  include "vectopt_loop_substitute.h90"
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
- 
-
-
-
-  !!----------------------------------------------------------------------
-  !!                        ***  ldf_tra_smag.F90  ***
-  !!----------------------------------------------------------------------
-
-
-   SUBROUTINE ldf_tra_smag( kt )
-      !!----------------------------------------------------------------------
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE ldf_tra_smag  ***
-      !!                   
-      !! ** Purpose :   initializations of the horizontal ocean physics
-      !!
-      !! ** Method  :   3D eddy viscosity coef. 
-      !!    M.Griffies, R.Hallberg AMS, 2000
-      !!  for laplacian:
-      !!   Asmag=(C/pi)^2*dx*dy sqrt(D^2), C=1 for tracers, C=3-4 for viscosity
-      !!   D^2= rm_smsh*(du/dx-dv/dy)^2+(dv/dx+du/dy)^2 for Cartesian coordinates
-      !!  IF rm_smsh = 0 , only shear is used, recommended for tidal flows
-      !!  in general case du/dx ==> e2 d(u/e2)/dx;  du/dy ==> e1 d(u/e1)/dy; 
-      !!                  dv/dx ==> e2 d(v/e2)/dx;  dv/dy ==> e1 d(v/e1)/dy
-      !!  for bilaplacian: now this option is deleted as unstable or non-conservative
-      !!   - delta{Bsmag (delta(T)} = -Bsmag* delta{delta(T)} - delta(Bsmag)*delta( T )
-      !!  second term is of arbitrary sign on the edge of fronts and can induce instability 
-      !!   Bsmag=Asmag*dx*dy/8
-      !!  
-      !!       laplacian operator   : ahm1, ahm2 defined at T- and F-points
-      !!                              ahm3, ahm4 never used
-      !!       bilaplacian operator : ahm1, ahm2 never used
-      !!                           :  ahm3, ahm4 defined at U- and V-points
-      !!       ??? explanation of the default is missing
-      !!  last modified : Maria Luneva, October 2012
-      !!----------------------------------------------------------------------
-      !!
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      USE ioipsl
-      REAL ( wp), POINTER , DIMENSION (:,:) :: zux, zvx , zuy , zvy 
-      REAL ( wp), POINTER , DIMENSION (:,:) :: zue1, zue2 , zve1 , zve2 
-      INTEGER, INTENT( in )                 ::   kt                             ! ocean time-step inedx
-      !! * Arguments
-      INTEGER                               :: ji,jj,jk
-
-      REAL (wp)                             ::     zdeltau, zdeltav, zhsmag ,zsmsh    ! temporary scalars
-      
-      CALL wrk_alloc (jpi,jpj,zux, zvx , zuy , zvy )
-      CALL wrk_alloc (jpi,jpj,zue1, zue2 , zve1 , zve2 )
-      !!----------------------------------------------------------------------
-      IF(  kt == nit000 ) THEN
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) ' ldf_tra_smag : 3D eddy smagorinsky diffusivity '
-         IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~   --  '
-         IF(lwp) WRITE(numout,*) '               Coefficients are computed'
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*)
-      ENDIF
-
-      zhsmag = rn_chsmag
-      zsmsh  = rn_smsh 
-      zux(:,:)=0._wp ; zuy(:,:)=0._wp ; zvx(:,:)=0._wp ; zvy(:,:)=0._wp
-
-      ! -------------------
-      ahtt(:,:,:) = rn_aht_0
-       IF( ln_traldf_bilap ) THEN
-        IF( lwp .AND. kt == nit000) WRITE(numout,* )'ldf_tra_smag :no bilaplacian Smagorinsky diffusivity'
-        IF( lwp .AND. kt == nit000) WRITE(numout,* )'ldf_tra_smag :bilaplacian diffusivity set to constant'  
-       ENDIF
-
-
-
-      ! harmonic operator   (U-, V-, W-points)
-      ! ----------------- 
-
-      ahtu(:,:,:) = rn_aht_0                  ! set ahtu , ahtv at u- and v-points,
-      ahtv(:,:,:) = rn_aht_0                  ! and ahtw at w-point
-      ahtw(:,:,:) = rn_aht_0                  ! (here example: no space variation)
-      
-      IF( ln_traldf_lap ) THEN
-
-         DO jk=1,jpk
-
-           zue2(:,:)=un(:,:,jk)/e2u(:,:)
-           zve1(:,:)=vn(:,:,jk)/e1v(:,:)
-           zue1(:,:)=un(:,:,jk)/e1u(:,:)
-           zve2(:,:)=vn(:,:,jk)/e2v(:,:)
-
-
-           DO jj=2,jpj
-            DO ji=2,jpi
-            zux(ji,jj)=(zue2(ji,jj)-zue2(ji-1,jj))/e1t(ji,jj)*e2t(ji,jj)*tmask(ji,jj,jk) * zsmsh 
-            zvy(ji,jj)=(zve1(ji,jj)-zve1(ji,jj-1))/e2t(ji,jj)*e1t(ji,jj)*tmask(ji,jj,jk) * zsmsh 
-            ENDDO
-           ENDDO
-
-           DO jj=1,jpjm1
-            DO ji=1,jpim1
-            zuy(ji,jj)=(zue1(ji,jj+1)-zue1(ji,jj))/e2f(ji,jj)*e1f(ji,jj)*fmask(ji,jj,jk)
-            zvx(ji,jj)=(zve2(ji+1,jj)-zve2(ji,jj))/e1f(ji,jj)*e2f(ji,jj)*fmask(ji,jj,jk)
-            ENDDO
-           ENDDO
-
-
-          DO jj=2,jpjm1
-           DO ji=2,jpim1
-           zdeltau=2._wp/( e1u(ji,jj)**(-2)+e2u(ji,jj)**(-2) )
-           zdeltav=2._wp/( e1v(ji,jj)**(-2)+e2v(ji,jj)**(-2) )
-
-           ahtu(ji,jj,jk)=MAX( rn_aht_0 , (zhsmag/rpi)**2*zdeltau*                                &
-                          SQRT(0.25_wp*( zux(ji,jj)+zux(ji+1,jj)-zvy(ji,jj)-zvy(ji+1,jj) )**2+    &
-                               0.25_wp*( zuy(ji,jj)+zuy(ji,jj-1)+zvx(ji,jj)+zvx(ji,jj-1)  )**2) )
-
-           ahtv(ji,jj,jk)=MAX( rn_aht_0 ,  (zhsmag/rpi)**2*zdeltav*                               &
-                          SQRT(0.25_wp*( zux(ji,jj)+zux(ji,jj+1)-zvy(ji,jj)-zvy(ji,jj+1) )**2+    &
-                               0.25_wp*( zuy(ji,jj)+zuy(ji-1,jj)+zvx(ji-1,jj)+zvx(ji,jj)  )**2) )
-
-
-         !!! stability criteria: aht<delta**2/(4*dt)   dt=2*rdt , positiveness require aht<delta**2/(8*dt)
-             ahtu(ji,jj,jk)=MIN(ahtu(ji,jj,jk),zdeltau/(16*rdt) ,rn_aht_m)
-             ahtv(ji,jj,jk)=MIN(ahtv(ji,jj,jk),zdeltav/(16*rdt) ,rn_aht_m)
-         ! so...
-
-
-            ENDDO
-           ENDDO
-         ENDDO
-        ENDIF
-            ahtu(:,:,jpk) = ahtu(:,:,jpkm1)
-            ahtv(:,:,jpk) = ahtv(:,:,jpkm1)
-        CALL lbc_lnk( ahtu, 'U', 1. )   ! Lateral boundary conditions
-        CALL lbc_lnk( ahtv, 'V', 1. )
-
-IF(  kt == nit000 ) THEN
-
-      IF(lwp ) THEN                    ! Control print
-         WRITE(numout,*)
-         WRITE(numout,*) 'inildf: ahtu at k = 1'
-         CALL prihre( ahtu(:,:,1), jpi, jpj, 1, jpi, 1,   &
-            &                                1, jpj, 1, 1.e-1, numout )
-         WRITE(numout,*)
-         WRITE(numout,*) 'inildf: ahtv at k = 1'
-         CALL prihre( ahtv(:,:,1), jpi, jpj, 1, jpi, 1,   &
-            &                                1, jpj, 1, 1.e-1, numout )
-         WRITE(numout,*)
-         WRITE(numout,*) 'inildf: ahtw at k = 1'
-         CALL prihre( ahtw(:,:,1), jpi, jpj, 1, jpi, 1,   &
-            &                                1, jpj, 1, 1.e-1, numout )
-      ENDIF
-ENDIF
-
-      CALL wrk_dealloc ( jpi,jpj,zux, zvx , zuy , zvy     )
-      CALL wrk_dealloc ( jpi,jpj,zue1, zue2 , zve1 , zve2 )
-
-
-END SUBROUTINE ldf_tra_smag
-#else
-   !!----------------------------------------------------------------------
-   !!   Default option                                         Dummy module
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE ldf_tra_smag( kt )       ! Empty routine
-      WRITE(*,*) 'ldf_dyn_smag: You should not have seen this print! error? check keys ldf:c3d+smag', kt
-   END SUBROUTINE ldf_tra_smag
-#endif
-
-END MODULE ldftra_smag
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 5282)
@@ -162,5 +162,5 @@
          isecsbc = nsec_year + nsec1jan000 + (kit+it_offset)*NINT( rdt/REAL(nn_baro,wp) )
       ELSE                      ! middle of sbc time step
-         isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rdttra(1)) + it_offset * NINT(rdttra(1))
+        isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rdt) + it_offset * NINT(rdt)
       ENDIF
       imf = SIZE( sd )
@@ -189,5 +189,5 @@
                CALL fld_rec( kn_fsbc, sd(jf), kt_offset = it_offset, kit = kit )    ! update after record informations
 
-               ! if kn_fsbc*rdttra is larger than nfreqh (which is kind of odd),
+               ! if kn_fsbc*rdt is larger than nfreqh (which is kind of odd),
                ! it is possible that the before value is no more the good one... we have to re-read it
                ! if before is not the last record of the file currently opened and after is the first record to be read
@@ -210,5 +210,5 @@
                IF( sd(jf)%ln_tint ) THEN
                   
-                  ! if kn_fsbc*rdttra is larger than nfreqh (which is kind of odd),
+                  ! if kn_fsbc*rdt is larger than nfreqh (which is kind of odd),
                   ! it is possible that the before value is no more the good one... we have to re-read it
                   ! if before record is not just just before the after record...
@@ -241,5 +241,5 @@
                         ! year/month/week/day file to be not present. If the run continue further than the current
                         ! year/month/week/day, next year/month/week/day file must exist
-                        isecend = nsec_year + nsec1jan000 + (nitend - kt) * NINT(rdttra(1))   ! second at the end of the run 
+                        isecend = nsec_year + nsec1jan000 + (nitend - kt) * NINT(rdt)   ! second at the end of the run
                         llstop = isecend > sd(jf)%nrec_a(2)                                   ! read more than 1 record of next year
                         ! we suppose that the date of next file is next day (should be ok even for weekly files...)
@@ -454,5 +454,5 @@
       IF( PRESENT(kt_offset) )   it_offset = kt_offset
       IF( PRESENT(kit) ) THEN   ;   it_offset = ( kit + it_offset ) * NINT( rdt/REAL(nn_baro,wp) )
-      ELSE                      ;   it_offset =         it_offset   * NINT(       rdttra(1)      )
+      ELSE                      ;   it_offset =         it_offset   * NINT(       rdt      )
       ENDIF
       !
@@ -531,6 +531,6 @@
          ELSE                                           ;   ztmp = REAL(nsec_year ,wp)  ! since 00h on Jan 1 of the current year
          ENDIF
-         ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * rdttra(1) + REAL( it_offset, wp )  ! centrered in the middle of sbc time step
-         ztmp = ztmp + 0.01 * rdttra(1)                                                 ! avoid truncation error 
+         ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * rdt + REAL( it_offset, wp )  ! centrered in the middle of sbc time step
+         ztmp = ztmp + 0.01 * rdt                                                 ! avoid truncation error
          IF( sdjf%ln_tint ) THEN                ! time interpolation, shift by 1/2 record
             !
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 5282)
@@ -645,5 +645,5 @@
       LOGICAL ::    llnewtx, llnewtau      ! update wind stress components and module??
       INTEGER  ::   ji, jj, jn             ! dummy loop indices
-      INTEGER  ::   isec                   ! number of seconds since nit000 (assuming rdttra did not change since nit000)
+      INTEGER  ::   isec                   ! number of seconds since nit000 (assuming rdt did not change since nit000)
       REAL(wp) ::   zcumulneg, zcumulpos   ! temporary scalars     
       REAL(wp) ::   zcoef                  ! temporary scalar
@@ -658,5 +658,5 @@
       CALL wrk_alloc( jpi,jpj, ztx, zty )
       !                                                 ! Receive all the atmos. fields (including ice information)
-      isec = ( kt - nit000 ) * NINT( rdttra(1) )             ! date of exchanges
+      isec = ( kt - nit000 ) * NINT( rdt )             ! date of exchanges
       DO jn = 1, jprcv                                       ! received fields sent by the atmosphere
          IF( srcv(jn)%laction )   CALL cpl_rcv( jn, isec, frcv(jn)%z3, xcplmask, nrcvinfo(jn) )
@@ -1338,5 +1338,5 @@
       CALL wrk_alloc( jpi,jpj,jpl, ztmp3, ztmp4 )
 
-      isec = ( kt - nit000 ) * NINT(rdttra(1))        ! date of exchanges
+      isec = ( kt - nit000 ) * NINT(rdt)        ! date of exchanges
 
       zfr_l(:,:) = 1.- fr_i(:,:)
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90	(revision 5282)
@@ -90,6 +90,6 @@
 
       ! When are we during the day (from 0 to 1)
-      zlo = ( REAL(nsec_day, wp) - 0.5_wp * rdttra(1) ) / rday
-      zup = zlo + ( REAL(nn_fsbc, wp)     * rdttra(1) ) / rday
+      zlo = ( REAL(nsec_day, wp) - 0.5_wp * rdt ) / rday
+      zup = zlo + ( REAL(nn_fsbc, wp)     * rdt ) / rday
       !                                          
       IF( nday_qsr == -1 ) THEN       ! first time step only  
@@ -189,5 +189,5 @@
          END DO  
          !
-         ztmp = rday / ( rdttra(1) * REAL(nn_fsbc, wp) )
+         ztmp = rday / ( rdt * REAL(nn_fsbc, wp) )
          rscal(:,:) = rscal(:,:) * ztmp
          !
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 5282)
@@ -125,5 +125,5 @@
          ENDIF   
          !                                         ! Update fwfold if new year start
-         ikty = 365 * 86400 / rdttra(1)    !!bug  use of 365 days leap year or 360d year !!!!!!!
+         ikty = 365 * 86400 / rdt       !!bug  use of 365 days leap year or 360d year !!!!!!!
          IF( MOD( kt, ikty ) == 0 ) THEN
             a_fwb_b = a_fwb                           ! mean sea level taking into account the ice+snow
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 5282)
@@ -255,10 +255,10 @@
             CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3u_b(:,:,:), 'U' )
             CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3v_b(:,:,:), 'V' )
-            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3u_n(:,:,:), 'U' )
+            CALL dom_vvl_interpol( fse333333333333333333333333333333333t_n(:,:,:), fse3u_n(:,:,:), 'U' )
             CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3v_n(:,:,:), 'V' )
             CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n(:,:,:), 'F' )
             ! Vertical scale factor interpolations
             ! ------------------------------------
-            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W'  )
+            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n(:,:,:), 'W'  )
             CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' )
             CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' )
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 5282)
@@ -461,5 +461,5 @@
       CALL iom_close( inum )                                      ! close file
       !
-      IF( nn_closea == 1 )   CALL clo_rnf( rnfmsk )               ! closed sea inflow set as ruver mouth
+      IF( nn_closea == 1 )   CALL clo_rnf( rnfmsk )               ! closed sea inflow set as river mouth
       !
       rnfmsk_z(:)   = 0._wp                                       ! vertical structure
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 5282)
@@ -49,5 +49,5 @@
       !!----------------------------------------------------------------------
 
-      IF( nsec_day == NINT(0.5_wp * rdttra(1)) ) THEN      ! start a new day
+      IF( nsec_day == NINT(0.5_wp * rdt) ) THEN      ! start a new day
          !
          IF( kt == nit000 ) THEN
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 5282)
@@ -24,5 +24,4 @@
    USE traadv_eiv      ! eddy induced velocity     (tra_adv_eiv    routine)
    USE traadv_mle      ! ML eddy induced velocity  (tra_adv_mle    routine)
-   USE cla             ! cross land advection      (cla_traadv     routine)
    USE ldftra_oce      ! lateral diffusion coefficient on tracers
    USE in_out_manager  ! I/O manager
@@ -84,10 +83,8 @@
       !                                          ! set time step
       IF( neuler == 0 .AND. kt == nit000 ) THEN     ! at nit000
-         r2dtra(:) =  rdttra(:)                          ! = rdtra (restarting with Euler time stepping)
+         r2dt =  rdt                          ! = rdt (restarting with Euler time stepping)
       ELSEIF( kt <= nit000 + 1) THEN                ! at nit000 or nit000+1
-         r2dtra(:) = 2._wp * rdttra(:)                   ! = 2 rdttra (leapfrog)
-      ENDIF
-      !
-      IF( nn_cla == 1 .AND. cp_cfg == 'orca' .AND. jp_cfg == 2 )   CALL cla_traadv( kt )       !==  Cross Land Advection  ==! (hor. advection)
+         r2dt = 2._wp * rdt                   ! = 2 rdt (leapfrog)
+      ENDIF
       !
       !                                               !==  effective transport  ==!
@@ -117,10 +114,10 @@
       SELECT CASE ( nadv )                            !==  compute advection trend and add it to general trend  ==!
       CASE ( 1 )   ;    CALL tra_adv_cen2  ( kt, nit000, 'TRA',         zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  2nd order centered
-      CASE ( 2 )   ;    CALL tra_adv_tvd   ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  TVD 
-      CASE ( 3 )   ;    CALL tra_adv_muscl ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb,      tsa, jpts, ln_traadv_msc_ups )   !  MUSCL 
-      CASE ( 4 )   ;    CALL tra_adv_muscl2( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  MUSCL2 
-      CASE ( 5 )   ;    CALL tra_adv_ubs   ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  UBS 
-      CASE ( 6 )   ;    CALL tra_adv_qck   ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  QUICKEST 
-      CASE ( 7 )   ;   CALL tra_adv_tvd_zts( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  TVD ZTS
+      CASE ( 2 )   ;    CALL tra_adv_tvd   ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  TVD
+      CASE ( 3 )   ;    CALL tra_adv_muscl ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb,      tsa, jpts, ln_traadv_msc_ups )   !  MUSCL
+      CASE ( 4 )   ;    CALL tra_adv_muscl2( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  MUSCL2
+      CASE ( 5 )   ;    CALL tra_adv_ubs   ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  UBS
+      CASE ( 6 )   ;    CALL tra_adv_qck   ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  QUICKEST
+      CASE ( 7 )   ;   CALL tra_adv_tvd_zts( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  TVD ZTS
       !
       CASE (-1 )                                      !==  esopa: test all possibility with control print  ==!
@@ -128,17 +125,17 @@
          CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv0 - Ta: ', mask1=tmask,               &
             &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
-         CALL tra_adv_tvd   ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )          
+         CALL tra_adv_tvd   ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )
          CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv1 - Ta: ', mask1=tmask,               &
             &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
-         CALL tra_adv_muscl ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb,      tsa, jpts, ln_traadv_msc_ups )          
+         CALL tra_adv_muscl ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb,      tsa, jpts, ln_traadv_msc_ups )
          CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv3 - Ta: ', mask1=tmask,               &
             &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
-         CALL tra_adv_muscl2( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )          
+         CALL tra_adv_muscl2( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )
          CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv4 - Ta: ', mask1=tmask,               &
             &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
-         CALL tra_adv_ubs   ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )          
+         CALL tra_adv_ubs   ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )
          CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv5 - Ta: ', mask1=tmask,               &
             &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
-         CALL tra_adv_qck   ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )          
+         CALL tra_adv_qck   ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )
          CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv6 - Ta: ', mask1=tmask,               &
             &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 5282)
@@ -72,5 +72,5 @@
       INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
       LOGICAL                              , INTENT(in   ) ::   ld_msc_ups      ! use upstream scheme within muscl
-      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! tracer time-step
       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb             ! before tracer field
@@ -176,5 +176,5 @@
          !                                             !-- MUSCL horizontal advective fluxes
          DO jk = 1, jpkm1                                     ! interior values
-            zdt  = p2dt(jk)
+            zdt  = p2dt
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -259,5 +259,5 @@
          !
          DO jk = 1, jpkm1                                     ! interior values
-            zdt  = p2dt(jk)
+            zdt  = p2dt
             DO jj = 2, jpjm1      
                DO ji = fs_2, fs_jpim1   ! vector opt.
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 5282)
@@ -63,5 +63,5 @@
       CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator)
       INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
-      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! tracer time-step
       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before & now tracer fields
@@ -133,5 +133,5 @@
         !                                             !-- MUSCL horizontal advective fluxes
          DO jk = 1, jpkm1                                     ! interior values
-            zdt  = p2dt(jk)
+            zdt  = p2dt
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -240,5 +240,5 @@
          !
          DO jk = 1, jpkm1                                     ! interior values
-            zdt  = p2dt(jk)
+            zdt  = p2dt
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 5282)
@@ -88,5 +88,5 @@
       CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator)
       INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
-      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! tracer time-step
       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields
@@ -125,5 +125,5 @@
       CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator)
       INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers
-      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt       ! vertical profile of tracer time-step
+      REAL(wp)                             , INTENT(in   ) ::   p2dt       ! tracer time-step
       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun        ! i-velocity components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn   ! before and now tracer fields
@@ -170,5 +170,5 @@
          !
          DO jk = 1, jpkm1  
-            zdt =  p2dt(jk)
+            zdt =  p2dt
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.   
@@ -246,5 +246,5 @@
       CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator)
       INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers
-      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt       ! vertical profile of tracer time-step
+      REAL(wp)                             , INTENT(in   ) ::   p2dt       ! tracer time-step
       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pvn        ! j-velocity components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn   ! before and now tracer fields
@@ -293,5 +293,5 @@
          !
          DO jk = 1, jpkm1  
-            zdt =  p2dt(jk)
+            zdt =  p2dt
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.   
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 5282)
@@ -74,5 +74,5 @@
       CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator)
       INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
-      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! tracer time-step
       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields
@@ -161,5 +161,5 @@
          ! total advective trend
          DO jk = 1, jpkm1
-            z2dtt = p2dt(jk)
+            z2dtt = p2dt
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -287,11 +287,11 @@
       CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator)
       INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
-      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! tracer time-step
       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta             ! tracer trend 
       !
-      REAL(wp), DIMENSION( jpk )                           ::   zts             ! length of sub-timestep for vertical advection
-      REAL(wp), DIMENSION( jpk )                           ::   zr_p2dt         ! reciprocal of tracer timestep
+      REAL(wp)                                             ::   zts             ! length of sub-timestep for vertical advection
+      REAL(wp)                                             ::   zr_p2dt         ! reciprocal of tracer timestep
       INTEGER  ::   ji, jj, jk, jl, jn       ! dummy loop indices  
       INTEGER  ::   jnzts = 5       ! number of sub-timesteps for vertical advection
@@ -330,5 +330,5 @@
       zwi(:,:,:) = 0._wp
       z_rzts = 1._wp / REAL( jnzts, wp )
-      zr_p2dt(:) = 1._wp / p2dt(:)
+      zr_p2dt = 1._wp / p2dt
       !
       !                                                          ! ===========
@@ -375,5 +375,5 @@
          ! total advective trend
          DO jk = 1, jpkm1
-            z2dtt = p2dt(jk)
+            z2dtt = p2dt
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -446,5 +446,5 @@
             IF( jl == 1 ) THEN              ! Euler forward to kick things off
               jtb = 1   ;   jtn = 1   ;   jta = 2
-              zts(:) = p2dt(:) * z_rzts
+              zts = p2dt * z_rzts
               jtaken = MOD( jnzts + 1 , 2)  ! Toggle to collect every second flux
                                             ! starting at jl =1 if jnzts is odd; 
@@ -452,5 +452,5 @@
             ELSEIF( jl == 2 ) THEN          ! First leapfrog step
               jtb = 1   ;   jtn = 2   ;   jta = 3
-              zts(:) = 2._wp * p2dt(:) * z_rzts
+              zts = 2._wp * p2dt * z_rzts
             ELSE                            ! Shuffle pointers for subsequent leapfrog steps
               jtb = MOD(jtb,3) + 1
@@ -462,5 +462,5 @@
                   DO ji = fs_2, fs_jpim1
                      zwz(ji,jj,jk) = 0.5_wp * pwn(ji,jj,jk) * ( ztrs(ji,jj,jk,jtn) + ztrs(ji,jj,jk-1,jtn) )
-                     IF( jtaken == 0 ) zwzts(ji,jj,jk) = zwzts(ji,jj,jk) + zwz(ji,jj,jk)*zts(jk)           ! Accumulate time-weighted vertcal flux
+                     IF( jtaken == 0 ) zwzts(ji,jj,jk) = zwzts(ji,jj,jk) + zwz(ji,jj,jk)*zts           ! Accumulate time-weighted vertcal flux
                   END DO
                END DO
@@ -475,5 +475,5 @@
                      ! total advective trends
                      ztra = - zbtr * (  zhdiv(ji,jj,jk) + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1) )
-                     ztrs(ji,jj,jk,jta) = ztrs(ji,jj,jk,jtb) + zts(jk) * ztra
+                     ztrs(ji,jj,jk,jta) = ztrs(ji,jj,jk,jtb) + zts * ztra
                   END DO
                END DO
@@ -485,5 +485,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1
-                  zwz(ji,jj,jk) = zwzts(ji,jj,jk) * zr_p2dt(jk) - zwz_sav(ji,jj,jk)
+                  zwz(ji,jj,jk) = zwzts(ji,jj,jk) * zr_p2dt - zwz_sav(ji,jj,jk)
                END DO
             END DO
@@ -553,5 +553,5 @@
       !!       in-space based differencing for fluid
       !!----------------------------------------------------------------------
-      REAL(wp), DIMENSION(jpk)         , INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp)                         , INTENT(in   ) ::   p2dt            ! tracer time-step
       REAL(wp), DIMENSION (jpi,jpj,jpk), INTENT(in   ) ::   pbef, paft      ! before & after field
       REAL(wp), DIMENSION (jpi,jpj,jpk), INTENT(inout) ::   paa, pbb, pcc   ! monotonic fluxes in the 3 directions
@@ -584,5 +584,5 @@
             DO jk = mikt(ji,jj), jpkm1
                ikm1 = MAX(jk-1,mikt(ji,jj))
-               z2dtt = p2dt(jk)
+               z2dtt = p2dt
                
                ! search maximum in neighbourhood
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 5282)
@@ -81,5 +81,5 @@
       CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator)
       INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
-      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! tracer time-step
       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean transport components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields
@@ -207,5 +207,5 @@
          ! update and guess with monotonic sheme
          DO jk = 1, jpkm1
-            z2dtt = p2dt(jk)
+            z2dtt = p2dt
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -281,5 +281,5 @@
       !!       in-space based differencing for fluid
       !!----------------------------------------------------------------------
-      REAL(wp), INTENT(in   ), DIMENSION(jpk)          ::   p2dt   ! vertical profile of tracer time-step
+      REAL(wp), INTENT(in   )                          ::   p2dt   ! tracer time-step
       REAL(wp),                DIMENSION (jpi,jpj,jpk) ::   pbef   ! before field
       REAL(wp), INTENT(inout), DIMENSION (jpi,jpj,jpk) ::   paft   ! after field
@@ -340,5 +340,5 @@
 
       DO jk = 1, jpkm1
-         z2dtt = p2dt(jk)
+         z2dtt = p2dt
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 5282)
@@ -362,10 +362,10 @@
          DO ji = 1, jpi
             ik = mbkt(ji,jj)                             ! bottom T-level index
-            zts (ji,jj,jp_tem) = tsb(ji,jj,ik,jp_tem)    ! bottom before T and S
-            zts (ji,jj,jp_sal) = tsb(ji,jj,ik,jp_sal)
+            zts(ji,jj,jp_tem) = tsb(ji,jj,ik,jp_tem)    ! bottom before T and S
+            zts(ji,jj,jp_sal) = tsb(ji,jj,ik,jp_sal)
             !
             zdep(ji,jj) = fsdept(ji,jj,ik)               ! bottom T-level reference depth
-            zub (ji,jj) = un(ji,jj,mbku(ji,jj))          ! bottom velocity
-            zvb (ji,jj) = vn(ji,jj,mbkv(ji,jj))
+            zub(ji,jj) = un(ji,jj,mbku(ji,jj))          ! bottom velocity
+            zvb(ji,jj) = vn(ji,jj,mbkv(ji,jj))
          END DO
       END DO
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90	(revision 5282)
@@ -326,6 +326,6 @@
       ELSE
          DO jk = 1, jpkm1
-            t0_ldf(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / ( z12 *rdttra(jk) )
-            s0_ldf(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / ( z12 *rdttra(jk) )
+            t0_ldf(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / ( z12 *rdt )
+            s0_ldf(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / ( z12 *rdt )
          END DO
       ENDIF
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 5282)
@@ -120,6 +120,6 @@
  
       ! set time step size (Euler/Leapfrog)
-      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dtra(:) =     rdttra(:)      ! at nit000             (Euler)
-      ELSEIF( kt <= nit000 + 1 )           THEN   ;   r2dtra(:) = 2._wp* rdttra(:)      ! at nit000 or nit000+1 (Leapfrog)
+IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dt =     rdt      ! at nit000             (Euler)
+ELSEIF( kt <= nit000 + 1 )           THEN   ;   r2dt = 2._wp* rdt      ! at nit000 or nit000+1 (Leapfrog)
       ENDIF
 
@@ -155,6 +155,7 @@
       ! trends computation
       IF( l_trdtra ) THEN      ! trend of the Asselin filter (tb filtered - tb)/dt     
-         DO jk = 1, jpkm1
-            zfact = 1._wp / r2dtra(jk)             
+      zfact = 1._wp / r2dt
+        DO jk = 1, jpkm1
+!            zfact = 1._wp / r2dt
             ztrdt(:,:,jk) = ( tsb(:,:,jk,jp_tem) - ztrdt(:,:,jk) ) * zfact
             ztrds(:,:,jk) = ( tsb(:,:,jk,jp_sal) - ztrds(:,:,jk) ) * zfact
@@ -297,5 +298,5 @@
       DO jn = 1, kjpt      
          DO jk = 1, jpkm1
-            zfact1 = atfp * rdttra(jk)
+            zfact1 = atfp * rdt
             zfact2 = zfact1 / rau0
             DO jj = 1, jpj
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 5282)
@@ -28,5 +28,4 @@
    USE sbcrnf          ! River runoff  
    USE sbcisf          ! Ice shelf   
-   USE sbcmod          ! ln_rnf  
    USE iom
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 5282)
@@ -66,7 +66,7 @@
       !
       IF( neuler == 0 .AND. kt == nit000 ) THEN     ! at nit000
-         r2dtra(:) =  rdttra(:)                          ! = rdtra (restarting with Euler time stepping)
+         r2dt =  rdt                          ! = rdt (restarting with Euler time stepping)
       ELSEIF( kt <= nit000 + 1) THEN                ! at nit000 or nit000+1
-         r2dtra(:) = 2. * rdttra(:)                      ! = 2 rdttra (leapfrog)
+         r2dt = 2. * rdt                      ! = 2 rdt (leapfrog)
       ENDIF
 
@@ -78,11 +78,11 @@
 
       SELECT CASE ( nzdf )                       ! compute lateral mixing trend and add it to the general trend
-      CASE ( 0 )    ;    CALL tra_zdf_exp( kt, nit000, 'TRA', r2dtra, nn_zdfexp, tsb, tsa, jpts )  !   explicit scheme 
-      CASE ( 1 )    ;    CALL tra_zdf_imp( kt, nit000, 'TRA', r2dtra,            tsb, tsa, jpts )  !   implicit scheme 
+      CASE ( 0 )    ;    CALL tra_zdf_exp( kt, nit000, 'TRA', r2dt, nn_zdfexp, tsb, tsa, jpts )  !   explicit scheme
+      CASE ( 1 )    ;    CALL tra_zdf_imp( kt, nit000, 'TRA', r2dt,            tsb, tsa, jpts )  !   implicit scheme
       CASE ( -1 )                                       ! esopa: test all possibility with control print
-         CALL tra_zdf_exp( kt, nit000, 'TRA', r2dtra, nn_zdfexp, tsb, tsa, jpts )
+         CALL tra_zdf_exp( kt, nit000, 'TRA', r2dt, nn_zdfexp, tsb, tsa, jpts )
          CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' zdf0 - Ta: ', mask1=tmask,               &
          &             tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
-         CALL tra_zdf_imp( kt, nit000, 'TRA', r2dtra,            tsb, tsa, jpts ) 
+         CALL tra_zdf_imp( kt, nit000, 'TRA', r2dt,            tsb, tsa, jpts )
          CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' zdf1 - Ta: ', mask1=tmask,               &
          &             tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
@@ -91,6 +91,6 @@
       IF( l_trdtra )   THEN                      ! save the vertical diffusive trends for further diagnostics
          DO jk = 1, jpkm1
-            ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / r2dtra(jk) ) - ztrdt(:,:,jk)
-            ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dtra(jk) ) - ztrds(:,:,jk)
+            ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / r2dt ) - ztrdt(:,:,jk)
+            ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dt ) - ztrds(:,:,jk)
          END DO
          CALL lbc_lnk( ztrdt, 'T', 1. )
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90	(revision 5282)
@@ -81,5 +81,5 @@
       INTEGER                              , INTENT(in   ) ::   kjpt        ! number of tracers
       INTEGER                              , INTENT(in   ) ::   kn_zdfexp   ! number of sub-time step
-      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt        ! vertical profile of tracer time-step
+      REAL(wp)                             , INTENT(in   ) ::   p2dt        ! tracer time-step
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb         ! before and now tracer fields
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta         ! tracer trend 
@@ -136,5 +136,5 @@
                   DO ji = fs_2, fs_jpim1   ! vector opt.
                      ze3tr = zlavmr / fse3t_n(ji,jj,jk)
-                     zwx(ji,jj,jk) = zwx(ji,jj,jk) + p2dt(jk) * ( zwy(ji,jj,jk) - zwy(ji,jj,jk+1) ) * ze3tr
+                     zwx(ji,jj,jk) = zwx(ji,jj,jk) + p2dt * ( zwy(ji,jj,jk) - zwy(ji,jj,jk+1) ) * ze3tr
                   END DO
                END DO
@@ -150,5 +150,5 @@
                   DO ji = fs_2, fs_jpim1   ! vector opt.
                      ze3tb = fse3t_b(ji,jj,jk) / fse3t(ji,jj,jk)                          ! before e3t
-                     ztra  = zwx(ji,jj,jk) - ptb(ji,jj,jk,jn) + p2dt(jk) * pta(ji,jj,jk,jn)       ! total trends * 2*rdt 
+                     ztra  = zwx(ji,jj,jk) - ptb(ji,jj,jk,jn) + p2dt * pta(ji,jj,jk,jn)       ! total trends * 2*rdt
                      pta(ji,jj,jk,jn) = ( ze3tb * ptb(ji,jj,jk,jn) + ztra ) * tmask(ji,jj,jk)
                   END DO
@@ -159,5 +159,5 @@
                DO jj = 2, jpjm1 
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     pta(ji,jj,jk,jn) = ( zwx(ji,jj,jk) + p2dt(jk) * pta(ji,jj,jk,jn) ) * tmask(ji,jj,jk)
+                     pta(ji,jj,jk,jn) = ( zwx(ji,jj,jk) + p2dt * pta(ji,jj,jk,jn) ) * tmask(ji,jj,jk)
                   END DO
                END DO
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90	(revision 5282)
@@ -82,5 +82,5 @@
       CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype   ! =TRA or TRC (tracer indicator)
       INTEGER                              , INTENT(in   ) ::   kjpt     ! number of tracers
-      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt     ! vertical profile of tracer time-step
+      REAL(wp)                             , INTENT(in   ) ::   p2dt     ! tracer time-step
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb      ! before and now tracer fields
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta      ! tracer trend 
@@ -154,6 +154,6 @@
                      ze3ta =  ( 1. - r_vvl ) +        r_vvl   * fse3t_a(ji,jj,jk)   ! after scale factor at T-point
                      ze3tn =         r_vvl   + ( 1. - r_vvl ) * fse3t_n(ji,jj,jk)   ! now   scale factor at T-point
-                     zwi(ji,jj,jk) = - p2dt(jk) * zwt(ji,jj,jk  ) / ( ze3tn * fse3w(ji,jj,jk  ) )
-                     zws(ji,jj,jk) = - p2dt(jk) * zwt(ji,jj,jk+1) / ( ze3tn * fse3w(ji,jj,jk+1) )
+                     zwi(ji,jj,jk) = - p2dt * zwt(ji,jj,jk  ) / ( ze3tn * fse3w(ji,jj,jk  ) )
+                     zws(ji,jj,jk) = - p2dt * zwt(ji,jj,jk+1) / ( ze3tn * fse3w(ji,jj,jk+1) )
                      zwd(ji,jj,jk) = ze3ta - zwi(ji,jj,jk) - zws(ji,jj,jk)
                  END DO
@@ -199,9 +199,9 @@
                ze3tn = ( 1. - r_vvl ) + r_vvl * fse3t(ji,jj,mikt(ji,jj))
                pta(ji,jj,mikt(ji,jj),jn) = ze3tb * ptb(ji,jj,mikt(ji,jj),jn)                     &
-                  &                      + p2dt(mikt(ji,jj)) * ze3tn * pta(ji,jj,mikt(ji,jj),jn)
+                  &                      + p2dt * ze3tn * pta(ji,jj,mikt(ji,jj),jn)
                DO jk = mikt(ji,jj)+1, jpkm1
                   ze3tb = ( 1. - r_vvl ) + r_vvl * fse3t_b(ji,jj,jk)
-                  ze3tn = ( 1. - r_vvl ) + r_vvl * fse3t  (ji,jj,jk)
-                  zrhs = ze3tb * ptb(ji,jj,jk,jn) + p2dt(jk) * ze3tn * pta(ji,jj,jk,jn)   ! zrhs=right hand side 
+                  ze3tn = ( 1. - r_vvl ) + r_vvl * fse3t(ji,jj,jk)
+                  zrhs = ze3tb * ptb(ji,jj,jk,jn) + p2dt * ze3tn * pta(ji,jj,jk,jn)   ! zrhs=right hand side
                   pta(ji,jj,jk,jn) = zrhs - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) * pta(ji,jj,jk-1,jn)
                END DO
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90	(revision 5282)
@@ -32,5 +32,4 @@
    USE ioipsl          ! NetCDF library
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE diadimg         ! dimg direct access file format output
    USE trdmxl_rst      ! restart for diagnosing the ML trends
    USE prtctl          ! Print control
@@ -298,5 +297,5 @@
       !! 
       !! ** Purpose :  Compute and cumulate the mixed layer trends over an analysis
-      !!               period, and write NetCDF (or dimg) outputs.
+      !!               period, and write NetCDF outputs.
       !!
       !! ** Method/usage :
@@ -349,8 +348,4 @@
       REAL(wp), POINTER, DIMENSION(:,:  ) ::  ztmltot2, zsmltot2, ztmlres2, zsmlres2, ztmlatf2, zsmlatf2, ztmltrdm2, zsmltrdm2  
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztmltrd2, zsmltrd2   ! only needed for mean diagnostics
-#if defined key_dimgout
-      INTEGER ::  iyear,imon,iday
-      CHARACTER(LEN=80) :: cltext, clmode
-#endif
       !!----------------------------------------------------------------------
   
@@ -801,7 +796,4 @@
       END IF
 
-      IF( nn_cla == 1 )   CALL ctl_warn( '      You set n_cla = 1. Note that the Mixed-Layer diagnostics  ',   &
-         &                               '      are not exact along the corresponding straits.            ')
-
       !                                   ! allocate trdmxl arrays
       IF( trd_mxl_alloc()    /= 0 )   CALL ctl_stop( 'STOP', 'trd_mxl_init : unable to allocate trdmxl     arrays' )
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90	(revision 5282)
@@ -59,5 +59,4 @@
             WRITE(numout,*)
             SELECT CASE ( jprstlib )
-            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ocean restart_mxl binary file: '//clname
             CASE DEFAULT         ;   WRITE(numout,*) '             open ocean restart_mxl NetCDF file: '//clname
             END SELECT
@@ -140,12 +139,4 @@
          WRITE(numout,*) ' ~~~~~~~~~~~~~~~~'
       ENDIF
-      IF ( jprstlib == jprstdimg ) THEN
-         ! eventually read netcdf file (monobloc)  for restarting on different number of processors
-         ! if {cn_trdrst_in}.nc exists, then set jlibalt to jpnf90
-         INQUIRE( FILE = TRIM(cn_trdrst_in)//'.nc', EXIST = llok )
-         IF ( llok ) THEN   ;   jlibalt = jpnf90   
-         ELSE               ;   jlibalt = jprstlib   
-         ENDIF
-      ENDIF
 
       CALL iom_open( cn_trdrst_in, inum, kiolib = jlibalt ) 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90	(revision 5282)
@@ -36,5 +36,5 @@
    PUBLIC   trd_tra   ! called by all tra_... modules
 
-   REAL(wp) ::   r2dt   ! time-step, = 2 rdttra except at nit000 (=rdttra) if neuler=0
+!   REAL(wp) ::   r2dt   ! time-step, = 2 rdt except at nit000 (=rdt) if neuler=0
 
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   trdtx, trdty, trdt   ! use to store the temperature trends
@@ -227,6 +227,6 @@
       !!----------------------------------------------------------------------
 
-      IF( neuler == 0 .AND. kt == nit000    ) THEN   ;   r2dt =      rdt      ! = rdtra (restart with Euler time stepping)
-      ELSEIF(               kt <= nit000 + 1) THEN   ;   r2dt = 2. * rdt      ! = 2 rdttra (leapfrog)
+      IF( neuler == 0 .AND. kt == nit000    ) THEN   ;   r2dt =      rdt      ! = rdt (restart with Euler time stepping)
+      ELSEIF(               kt <= nit000 + 1) THEN   ;   r2dt = 2. * rdt      ! = 2 rdt (leapfrog)
       ENDIF
 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 5282)
@@ -85,5 +85,5 @@
       !! 
       !! ** Purpose :  computation of cumulated trends over analysis period
-      !!               and make outputs (NetCDF or DIMG format)
+      !!               and make outputs (NetCDF format)
       !!----------------------------------------------------------------------
       REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::   putrd, pvtrd   ! U and V trends 
@@ -318,5 +318,5 @@
       !! 
       !! ** Purpose :  computation of cumulated trends over analysis period
-      !!               and make outputs (NetCDF or DIMG format)
+      !!               and make outputs (NetCDF format)
       !!----------------------------------------------------------------------
       INTEGER                   , INTENT(in   ) ::   kt             ! time step
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 5282)
@@ -42,5 +42,4 @@
    !!----------------------------------------------------------------------
    USE step_oce        ! module used in the ocean time stepping module
-   USE cla             ! cross land advection               (tra_cla routine)
    USE domcfg          ! domain configuration               (dom_cfg routine)
    USE mppini          ! shared/distributed memory setting (mpp_init routine)
@@ -388,5 +387,4 @@
          &                  CALL bdytide_init   ! Open boundaries initialisation of tidal harmonic forcing
 
-                            CALL dyn_nept_init  ! simplified form of Neptune effect
 
       !     
@@ -429,5 +427,4 @@
 
       !                                     ! Misc. options
-      IF( nn_cla == 1 .AND. cp_cfg == 'orca' .AND. jp_cfg == 2 )   CALL cla_init       ! Cross Land Advection
                             CALL icb_init( rdt, nit000)   ! initialise icebergs instance
      
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5282)
@@ -158,10 +158,4 @@
       IF( lk_traldf_eiv )   CALL ldf_eiv( kstp )      ! eddy induced velocity coefficient
 #endif
-#if defined key_traldf_c3d && key_traldf_smag
-                          CALL ldf_tra_smag( kstp )      ! eddy induced velocity coefficient
-#  endif
-#if defined key_dynldf_c3d && key_dynldf_smag
-                          CALL ldf_dyn_smag( kstp )      ! eddy induced velocity coefficient
-#  endif
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -185,10 +179,8 @@
           IF(  ln_asmiau .AND. &
              & ln_dyninc       )  CALL dyn_asm_inc  ( kstp )   ! apply dynamics assimilation increment
-          IF( ln_neptsimp )       CALL dyn_nept_cor ( kstp )   ! subtract Neptune velocities (simplified)
           IF( lk_bdy           )  CALL bdy_dyn3d_dmp( kstp )   ! bdy damping trends
                                   CALL dyn_adv      ( kstp )   ! advection (vector or flux form)
                                   CALL dyn_vor      ( kstp )   ! vorticity term including Coriolis
                                   CALL dyn_ldf      ( kstp )   ! lateral mixing
-          IF( ln_neptsimp )       CALL dyn_nept_cor ( kstp )   ! add Neptune velocities (simplified)
 #if defined key_agrif
           IF(.NOT. Agrif_Root())  CALL Agrif_Sponge_dyn        ! momentum sponge
@@ -289,10 +281,8 @@
            & ln_dyninc      )  CALL dyn_asm_inc( kstp )     ! apply dynamics assimilation increment
         IF( ln_bkgwri )        CALL asm_bkg_wri( kstp )     ! output background fields
-        IF( ln_neptsimp )      CALL dyn_nept_cor( kstp )    ! subtract Neptune velocities (simplified)
         IF( lk_bdy          )  CALL bdy_dyn3d_dmp(kstp )    ! bdy damping trends
                                CALL dyn_adv( kstp )         ! advection (vector or flux form)
                                CALL dyn_vor( kstp )         ! vorticity term including Coriolis
                                CALL dyn_ldf( kstp )         ! lateral mixing
-        IF( ln_neptsimp )      CALL dyn_nept_cor( kstp )    ! add Neptune velocities (simplified)
 #if defined key_agrif
         IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_dyn        ! momemtum sponge
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 5282)
@@ -50,5 +50,4 @@
    USE dynspg_oce       ! surface pressure gradient        (dyn_spg routine)
    USE dynspg           ! surface pressure gradient        (dyn_spg routine)
-   USE dynnept          ! simp. form of Neptune effect(dyn_nept_cor routine)
 
    USE dynnxt           ! time-stepping                    (dyn_nxt routine)
@@ -68,6 +67,4 @@
    USE ldfslp           ! iso-neutral slopes               (ldf_slp routine)
    USE ldfeiv           ! eddy induced velocity coef.      (ldf_eiv routine)
-   USE ldftra_smag      ! Smagirinsky diffusion            (ldftra_smag routine)
-   USE ldfdyn_smag      ! Smagorinsky viscosity            (ldfdyn_smag routine) 
 
    USE zdftmx           ! tide-induced vertical mixing     (zdf_tmx routine)
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/SAS_SRC/daymod.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/SAS_SRC/daymod.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/SAS_SRC/daymod.F90	(revision 5282)
@@ -20,5 +20,5 @@
    !!
    !!   we suppose that the time step is deviding the number of second of in a day
-   !!             ---> MOD( rday, rdttra(1) ) == 0
+   !!             ---> MOD( rday, rdt ) == 0
    !!
    !!           ----------- WARNING -----------
@@ -71,16 +71,16 @@
       !!----------------------------------------------------------------------
       !
-      ! all calendar staff is based on the fact that MOD( rday, rdttra(1) ) == 0
-      IF( MOD( rday     , rdttra(1) ) /= 0. )   CALL ctl_stop( 'the time step must devide the number of second of in a day' )
+      ! all calendar staff is based on the fact that MOD( rday, rdt ) == 0
+      IF( MOD( rday     , rdt ) /= 0. )   CALL ctl_stop( 'the time step must devide the number of second of in a day' )
       IF( MOD( rday     , 2.        ) /= 0. )   CALL ctl_stop( 'the number of second of in a day must be an even number'    )
-      IF( MOD( rdttra(1), 2.        ) /= 0. )   CALL ctl_stop( 'the time step (in second) must be an even number'           )
+      IF( MOD( rdt, 2.        ) /= 0. )   CALL ctl_stop( 'the time step (in second) must be an even number'           )
       nsecd   = NINT(rday           )
       nsecd05 = NINT(0.5 * rday     )
-      ndt     = NINT(      rdttra(1))
-      ndt05   = NINT(0.5 * rdttra(1))
+      ndt     = NINT(      rdt)
+      ndt05   = NINT(0.5 * rdt)
 
       ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day)
       ndastp = ndate0 - 1        ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00
-      adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday
+      adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday
       IF( ABS(adatrj  - REAL(NINT(adatrj),wp)) < 0.1 / rday )   adatrj = REAL(NINT(adatrj),wp)   ! avoid truncation error
       !
@@ -226,6 +226,6 @@
       nsec_week  = nsec_week  + ndt
       nsec_day   = nsec_day   + ndt                
-      adatrj  = adatrj  + rdttra(1) / rday
-      fjulday = fjulday + rdttra(1) / rday
+      adatrj  = adatrj  + rdt / rday
+      fjulday = fjulday + rdt / rday
       IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec )   fjulday = REAL(NINT(fjulday),wp)   ! avoid truncation error
       IF( ABS(adatrj  - REAL(NINT(adatrj ),wp)) < zprec )   adatrj  = REAL(NINT(adatrj ),wp)   ! avoid truncation error
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/SAS_SRC/diawri.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 5282)
@@ -40,5 +40,4 @@
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE in_out_manager  ! I/O manager
-   USE diadimg         ! dimg direct access file format output
    USE diaar5, ONLY :   lk_diaar5
    USE iom
@@ -85,15 +84,8 @@
   END FUNCTION dia_wri_alloc
 
-#if defined key_dimgout
-   !!----------------------------------------------------------------------
-   !!   'key_dimgout'                                      DIMG output file
-   !!----------------------------------------------------------------------
-#   include "diawri_dimg.h90"
-
-#else
    !!----------------------------------------------------------------------
    !!   Default option                                   NetCDF output file
    !!----------------------------------------------------------------------
-# if defined key_iomput
+#if defined key_iomput
    !!----------------------------------------------------------------------
    !!   'key_iomput'                                        use IOM library
@@ -164,5 +156,4 @@
       ! Define frequency of output and means
       zdt = rdt
-      IF( nacc == 1 ) zdt = rdtmin
       IF( ln_mskland )   THEN   ;   clop = "only(x)"   ! put 1.e+20 on land (very expensive!!)
       ELSE                      ;   clop = "x"         ! no use of the mask value (require less cpu time)
@@ -338,7 +329,7 @@
       !
    END SUBROUTINE dia_wri
-# endif
-
 #endif
+
+
 
    SUBROUTINE dia_wri_state( cdfile_name, kt )
@@ -435,5 +426,5 @@
       ! -----------------
       CALL histclo( id_i )
-#if ! defined key_iomput && ! defined key_dimgout
+#if ! defined key_iomput
       IF( ninist /= 1  ) THEN
          CALL histclo( nid_T )
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90	(revision 5282)
@@ -42,5 +42,4 @@
    USE step_oce        ! module used in the ocean time stepping module
    USE sbc_oce         ! surface boundary condition: ocean
-   USE cla             ! cross land advection               (tra_cla routine)
    USE domcfg          ! domain configuration               (dom_cfg routine)
    USE daymod          ! calendar
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedrst.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedrst.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedrst.F90	(revision 5282)
@@ -59,11 +59,4 @@
 
       ALLOCATE( zdta(jpi,jpj,jpksed,jptrased), zdta1(jpi,jpj,jpksed,2), zhipor(jpoce,jpksed) ) 
-
-      IF ( jprstlib == jprstdimg ) THEN
-        ! eventually read netcdf file (monobloc)  for restarting on different number of processors
-        ! if restart_sed.nc exists, then set jlibalt to jpnf90
-        INQUIRE( FILE = 'restart_sed.nc', EXIST = llok )
-        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
-      ENDIF
 
       CALL iom_open( 'restart_sed', numrsr, kiolib = jlibalt )     
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90	(revision 5282)
@@ -107,10 +107,10 @@
       CALL p4z_sms_init       !  Maint routine
       !                                            ! Time-step
-      rfact   = rdttrc(1)                          ! ---------
+      rfact   = rdttrc                          ! ---------
       rfactr  = 1. / rfact
       rfact2  = rfact / FLOAT( nrdttrc )
       rfact2r = 1. / rfact2
 
-      IF(lwp) WRITE(numout,*) '    Passive Tracer  time step    rfact  = ', rfact, ' rdt = ', rdttra(1)
+      IF(lwp) WRITE(numout,*) '    Passive Tracer  time step    rfact  = ', rfact, ' rdt = ', rdt
       IF(lwp) write(numout,*) '    PISCES  Biology time step    rfact2 = ', rfact2
 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90	(revision 5282)
@@ -32,9 +32,8 @@
 
    PUBLIC   trc_adv          ! routine called by step module
-   PUBLIC   trc_adv_alloc    ! routine called by nemogcm module
-
-   INTEGER ::   nadv   ! choice of the type of advection scheme
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::   r2dt  ! vertical profile time-step, = 2 rdttra
-   !                                                    ! except at nitrrc000 (=rdttra) if neuler=0
+
+   INTEGER ::   nadv    ! choice of the type of advection scheme
+   REAL(wp)::   r2dtrc  ! time-step, = 2 rdttrc
+!   !                   ! except at nitrrc000 (=rdttrc) if neuler=0
 
    !! * Substitutions
@@ -47,16 +46,4 @@
    !!----------------------------------------------------------------------
 CONTAINS
-
-   INTEGER FUNCTION trc_adv_alloc()
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE trc_adv_alloc  ***
-      !!----------------------------------------------------------------------
-
-      ALLOCATE( r2dt(jpk), STAT=trc_adv_alloc )
-
-      IF( trc_adv_alloc /= 0 ) CALL ctl_warn('trc_adv_alloc : failed to allocate array.')
-
-   END FUNCTION trc_adv_alloc
-
 
    SUBROUTINE trc_adv( kt )
@@ -84,10 +71,10 @@
 
       IF( ln_top_euler) THEN
-         r2dt(:) =  rdttrc(:)              ! = rdttrc (use Euler time stepping)
+         r2dtrc =  rdttrc              ! = rdttrc (use Euler time stepping)
       ELSE
          IF( neuler == 0 .AND. kt == nittrc000 ) THEN     ! at nittrc000
-            r2dt(:) =  rdttrc(:)           ! = rdttrc (restarting with Euler time stepping)
+            r2dtrc =  rdttrc           ! = rdttrc (restarting with Euler time stepping)
          ELSEIF( kt <= nittrc000 + 1 ) THEN          ! at nittrc000 or nittrc000+1
-            r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog)
+            r2dtrc = 2. * rdttrc       ! = 2 rdttrc (leapfrog)
          ENDIF
       ENDIF
@@ -118,9 +105,9 @@
       SELECT CASE ( nadv )                            !==  compute advection trend and add it to general trend  ==!
       CASE ( 1 )   ;    CALL tra_adv_cen2  ( kt, nittrc000, 'TRC',       zun, zvn, zwn, trb, trn, tra, jptra )   !  2nd order centered
-      CASE ( 2 )   ;    CALL tra_adv_tvd   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )   !  TVD 
-      CASE ( 3 )   ;    CALL tra_adv_muscl ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb,      tra, jptra, ln_trcadv_msc_ups )   !  MUSCL 
-      CASE ( 4 )   ;    CALL tra_adv_muscl2( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )   !  MUSCL2 
-      CASE ( 5 )   ;    CALL tra_adv_ubs   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )   !  UBS 
-      CASE ( 6 )   ;    CALL tra_adv_qck   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )   !  QUICKEST 
+      CASE ( 2 )   ;    CALL tra_adv_tvd   ( kt, nittrc000, 'TRC', r2dtrc, zun, zvn, zwn, trb, trn, tra, jptra )   !  TVD
+      CASE ( 3 )   ;    CALL tra_adv_muscl ( kt, nittrc000, 'TRC', r2dtrc, zun, zvn, zwn, trb,      tra, jptra, ln_trcadv_msc_ups )   !  MUSCL
+      CASE ( 4 )   ;    CALL tra_adv_muscl2( kt, nittrc000, 'TRC', r2dtrc, zun, zvn, zwn, trb, trn, tra, jptra )   !  MUSCL2
+      CASE ( 5 )   ;    CALL tra_adv_ubs   ( kt, nittrc000, 'TRC', r2dtrc, zun, zvn, zwn, trb, trn, tra, jptra )   !  UBS
+      CASE ( 6 )   ;    CALL tra_adv_qck   ( kt, nittrc000, 'TRC', r2dtrc, zun, zvn, zwn, trb, trn, tra, jptra )   !  QUICKEST
       !
       CASE (-1 )                                      !==  esopa: test all possibility with control print  ==!
@@ -128,17 +115,17 @@
          WRITE(charout, FMT="('adv1')")  ; CALL prt_ctl_trc_info(charout)
                                            CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd')
-         CALL tra_adv_tvd   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )          
+         CALL tra_adv_tvd   ( kt, nittrc000, 'TRC', r2dtrc, zun, zvn, zwn, trb, trn, tra, jptra )
          WRITE(charout, FMT="('adv2')")  ; CALL prt_ctl_trc_info(charout)
                                            CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd')
-         CALL tra_adv_muscl ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb,      tra, jptra, ln_trcadv_msc_ups  )          
+         CALL tra_adv_muscl ( kt, nittrc000, 'TRC', r2dtrc, zun, zvn, zwn, trb,      tra, jptra, ln_trcadv_msc_ups  )
          WRITE(charout, FMT="('adv3')")  ; CALL prt_ctl_trc_info(charout)
                                            CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd')
-         CALL tra_adv_muscl2( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )          
+         CALL tra_adv_muscl2( kt, nittrc000, 'TRC', r2dtrc, zun, zvn, zwn, trb, trn, tra, jptra )
          WRITE(charout, FMT="('adv4')")  ; CALL prt_ctl_trc_info(charout)
                                            CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd')
-         CALL tra_adv_ubs   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )          
+         CALL tra_adv_ubs   ( kt, nittrc000, 'TRC', r2dtrc, zun, zvn, zwn, trb, trn, tra, jptra )
          WRITE(charout, FMT="('adv5')")  ; CALL prt_ctl_trc_info(charout)
                                            CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd')
-         CALL tra_adv_qck   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )          
+         CALL tra_adv_qck   ( kt, nittrc000, 'TRC', r2dtrc, zun, zvn, zwn, trb, trn, tra, jptra )
          WRITE(charout, FMT="('adv6')")  ; CALL prt_ctl_trc_info(charout)
                                            CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd')
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90	(revision 5282)
@@ -41,7 +41,6 @@
 
    PUBLIC   trc_nxt          ! routine called by step.F90
-   PUBLIC   trc_nxt_alloc    ! routine called by nemogcm.F90
 
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::   r2dt
+   REAL(wp) ::   r2dtrc
 
    !!----------------------------------------------------------------------
@@ -51,15 +50,4 @@
    !!----------------------------------------------------------------------
 CONTAINS
-
-   INTEGER FUNCTION trc_nxt_alloc()
-      !!----------------------------------------------------------------------
-      !!                   ***  ROUTINE trc_nxt_alloc  ***
-      !!----------------------------------------------------------------------
-      ALLOCATE( r2dt(jpk), STAT=trc_nxt_alloc )
-      !
-      IF( trc_nxt_alloc /= 0 )   CALL ctl_warn('trc_nxt_alloc : failed to allocate array')
-      !
-   END FUNCTION trc_nxt_alloc
-
 
    SUBROUTINE trc_nxt( kt )
@@ -117,6 +105,6 @@
 
       ! set time step size (Euler/Leapfrog)
-      IF( neuler == 0 .AND. kt ==  nittrc000 ) THEN  ;  r2dt(:) =     rdttrc(:)   ! at nittrc000             (Euler)
-      ELSEIF( kt <= nittrc000 + 1 )            THEN  ;  r2dt(:) = 2.* rdttrc(:)   ! at nit000 or nit000+1 (Leapfrog)
+      IF( neuler == 0 .AND. kt ==  nittrc000 ) THEN  ;  r2dtrc =     rdttrc   ! at nittrc000             (Euler)
+      ELSEIF( kt <= nittrc000 + 1 )            THEN  ;  r2dtrc = 2.* rdttrc   ! at nit000 or nit000+1 (Leapfrog)
       ENDIF
 
@@ -143,8 +131,8 @@
 
       ! trends computation
-      IF( l_trdtrc ) THEN                                      ! trends
+      IF( l_trdtrc ) THEN! trends
          DO jn = 1, jptra
+			zfact = 1.e0 / r2dtrc
             DO jk = 1, jpkm1
-               zfact = 1.e0 / r2dt(jk)  
                ztrdt(:,:,jk,jn) = ( trb(:,:,jk,jn) - ztrdt(:,:,jk,jn) ) * zfact 
                CALL trd_tra( kt, 'TRC', jn, jptra_atf, ztrdt )
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90	(revision 5282)
@@ -27,10 +27,9 @@
 
    PUBLIC   trc_zdf          ! called by step.F90 
-   PUBLIC   trc_zdf_alloc    ! called by nemogcm.F90 
 
    INTEGER ::   nzdf = 0               ! type vertical diffusion algorithm used
       !                                ! defined from ln_zdf...  namlist logicals)
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::  r2dt   ! vertical profile time-step, = 2 rdttra
-      !                                                 ! except at nittrc000 (=rdttra) if neuler=0
+   REAL(wp) ::  r2dtrc   ! vertical profile time-step, = 2 rdt
+      !                  ! except at nittrc000 (=rdt) if neuler=0
 
    !! * Substitutions
@@ -44,15 +43,4 @@
    !!----------------------------------------------------------------------
 CONTAINS
-   
-   INTEGER FUNCTION trc_zdf_alloc()
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE trc_zdf_alloc  ***
-      !!----------------------------------------------------------------------
-      ALLOCATE( r2dt(jpk) , STAT=trc_zdf_alloc )
-      !
-      IF( trc_zdf_alloc /= 0 )   CALL ctl_warn('trc_zdf_alloc : failed to allocate array.')
-      !
-   END FUNCTION trc_zdf_alloc
-
 
    SUBROUTINE trc_zdf( kt )
@@ -74,10 +62,10 @@
 
       IF( ln_top_euler) THEN
-         r2dt(:) =  rdttrc(:)              ! = rdttrc (use Euler time stepping)
+         r2dtrc =  rdttrc              ! = rdttrc (use Euler time stepping)
       ELSE
          IF( neuler == 0 .AND. kt == nittrc000 ) THEN     ! at nittrc000
-            r2dt(:) =  rdttrc(:)           ! = rdttrc (restarting with Euler time stepping)
+            r2dtrc =  rdttrc           ! = rdttrc (restarting with Euler time stepping)
          ELSEIF( kt <= nittrc000 + 1 ) THEN          ! at nittrc000 or nittrc000+1
-            r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog)
+            r2dtrc = 2. * rdttrc       ! = 2 rdttrc (leapfrog)
          ENDIF
       ENDIF
@@ -90,12 +78,12 @@
       SELECT CASE ( nzdf )                       ! compute lateral mixing trend and add it to the general trend
       CASE ( -1 )                                       ! esopa: test all possibility with control print
-         CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dt, nn_trczdf_exp, trb, tra, jptra ) 
+         CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dtrc, nn_trczdf_exp, trb, tra, jptra )
          WRITE(charout, FMT="('zdf1 ')") ;  CALL prt_ctl_trc_info(charout)
                                             CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' )
-         CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dt,                trb, tra, jptra ) 
+         CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dtrc,                trb, tra, jptra )
          WRITE(charout, FMT="('zdf2 ')") ;  CALL prt_ctl_trc_info(charout)
                                             CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' )
-      CASE ( 0 ) ;  CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dt, nn_trczdf_exp, trb, tra, jptra )    !   explicit scheme 
-      CASE ( 1 ) ;  CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dt,                trb, tra, jptra )    !   implicit scheme          
+      CASE ( 0 ) ;  CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dtrc, nn_trczdf_exp, trb, tra, jptra )    !   explicit scheme
+      CASE ( 1 ) ;  CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dtrc,                trb, tra, jptra )    !   implicit scheme
 
       END SELECT
@@ -104,5 +92,5 @@
          DO jn = 1, jptra
             DO jk = 1, jpkm1
-               ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dt(jk) ) - ztrtrd(:,:,jk,jn)
+               ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dtrc ) - ztrtrd(:,:,jk,jn)
             END DO
             CALL trd_tra( kt, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) )
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 5282)
@@ -331,5 +331,5 @@
       !! 
       !! ** Purpose :  Compute and cumulate the mixed layer trends over an analysis
-      !!               period, and write NetCDF (or dimg) outputs.
+      !!               period, and write NetCDF outputs.
       !!
       !! ** Method/usage :
@@ -391,8 +391,4 @@
       !
       CHARACTER (LEN=10) ::   clvar
-#if defined key_dimgout
-      INTEGER ::   iyear,imon,iday
-      CHARACTER(LEN=80) ::   cltext, clmode
-#endif
       !!----------------------------------------------------------------------
 
@@ -775,12 +771,8 @@
       ! ======================================================================
 
-      ! IV.1 Code for dimg mpp output
-      ! -----------------------------
-
-# if defined key_dimgout
-      STOP 'Not implemented'
-# else
+!# if
+!# else
       
-      ! IV.2 Code for IOIPSL/NetCDF output
+      ! IV.1 Code for IOIPSL/NetCDF output
       ! ----------------------------------
 
@@ -866,5 +858,5 @@
       icount = 1
 
-# endif /* key_dimgout */
+!# endif
 
       IF( MOD( itmod, nn_trd_trc ) == 0 ) THEN
@@ -897,5 +889,5 @@
       !!
       !! ** Purpose :  Compute and cumulate the mixed layer biological trends over an analysis
-      !!               period, and write NetCDF (or dimg) outputs.
+      !!               period, and write NetCDF outputs.
       !!
       !! ** Method/usage :
@@ -944,8 +936,4 @@
       LOGICAL  :: llwarn  = .TRUE., lldebug = .TRUE.
       REAL(wp) :: zfn, zfn2
-#if defined key_dimgout
-      INTEGER ::  iyear,imon,iday
-      CHARACTER(LEN=80) :: cltext, clmode
-#endif
       !!----------------------------------------------------------------------
       ! ... Warnings
@@ -1056,12 +1044,8 @@
       ! ======================================================================
 
-      ! IV.1 Code for dimg mpp output
-      ! -----------------------------
-
-# if defined key_dimgout
-      STOP 'Not implemented'
-# else
-
-      ! IV.2 Code for IOIPSL/NetCDF output
+!# if
+!# else
+
+      ! IV.1 Code for IOIPSL/NetCDF output
       ! ----------------------------------
 
@@ -1108,5 +1092,5 @@
 
 
-# endif /* key_dimgout */
+!# endif
 
       IF( MOD( itmod, nn_trd_trc ) == 0 ) THEN
@@ -1259,7 +1243,6 @@
       ! ======================================================================
 
-#if defined key_dimgout 
-      ???
-#else
+!#if 
+!#else
       ! clmxl = legend root for netCDF output
       IF( nn_ctls_trc == 0 ) THEN                                   ! control surface = mixed-layer with density criterion
@@ -1404,5 +1387,5 @@
 #endif
 
-#endif        /* key_dimgout */
+!#endif
    END SUBROUTINE trd_mxl_trc_init
 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90	(revision 5282)
@@ -141,11 +141,4 @@
       ENDIF
       
-      IF ( jprstlib == jprstdimg ) THEN
-        ! eventually read netcdf file (monobloc)  for restarting on different number of processors
-        ! if {cn_trdrst_trc_in}.nc exists, then set jlibalt to jpnf90
-        INQUIRE( FILE = TRIM(cn_trdrst_trc_in)//'.nc', EXIST = llok )
-        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
-      ENDIF
-
       CALL iom_open( cn_trdrst_trc_in, inum, kiolib = jlibalt ) 
       
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trc.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trc.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trc.F90	(revision 5282)
@@ -55,5 +55,5 @@
    CHARACTER(len = 80) , PUBLIC                                    ::  cn_trcrst_in   !: suffix of pass. tracer restart name (input)
    CHARACTER(len = 80) , PUBLIC                                    ::  cn_trcrst_out  !: suffix of pass. tracer restart name (output)
-   REAL(wp)            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)   ::  rdttrc         !: vertical profile of passive tracer time step
+   REAL(wp)            , PUBLIC                                    ::  rdttrc         !: passive tracer time step
    LOGICAL             , PUBLIC                                    ::  ln_top_euler  !: boolean term for euler integration 
    LOGICAL             , PUBLIC                                    ::  ln_trcdta      !: Read inputs data from files
@@ -187,5 +187,5 @@
          &      gtru (jpi,jpj,jptra)  , gtrv (jpi,jpj,jptra)                          ,       &
          &      gtrui(jpi,jpj,jptra)  , gtrvi(jpi,jpj,jptra)                          ,       &
-         &      cvol(jpi,jpj,jpk)     , rdttrc(jpk)           , trai(jptra)           ,       &
+         &      cvol(jpi,jpj,jpk)     , trai(jptra)           ,       &
          &      ctrcnm(jptra)         , ctrcln(jptra)         , ctrcun(jptra)         ,       & 
          &      ln_trc_ini(jptra)     , ln_trc_wri(jptra)                             ,  STAT = trc_alloc  )  
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 5282)
@@ -76,7 +76,4 @@
 
       IF( ltrcdm2dc )CALL ctl_warn( ' Diurnal cycle on physics but not in PISCES or LOBSTER ' )
-
-      IF( nn_cla == 1 )   &
-         &  CALL ctl_stop( ' Cross Land Advection not yet implemented with passive tracer ; nn_cla must be 0' )
 
       CALL trc_nam      ! read passive tracers namelists
@@ -187,8 +184,5 @@
       !! ** Purpose :   Allocate all the dynamic arrays of the OPA modules
       !!----------------------------------------------------------------------
-      USE trcadv        , ONLY:   trc_adv_alloc          ! TOP-related alloc routines...
       USE trc           , ONLY:   trc_alloc
-      USE trcnxt        , ONLY:   trc_nxt_alloc
-      USE trczdf        , ONLY:   trc_zdf_alloc
       USE trdtrc_oce    , ONLY:   trd_trc_oce_alloc
 #if defined key_trdmxl_trc 
@@ -199,8 +193,5 @@
       !!----------------------------------------------------------------------
       !
-      ierr =        trc_adv_alloc()          ! Start of TOP-related alloc routines...
-      ierr = ierr + trc_alloc    ()
-      ierr = ierr + trc_nxt_alloc()
-      ierr = ierr + trc_zdf_alloc()
+      ierr =        trc_alloc()
       ierr = ierr + trd_trc_oce_alloc()
 #if defined key_trdmxl_trc 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 5282)
@@ -109,10 +109,9 @@
       ENDIF
 
-      
-      rdttrc(:) = rdttra(:) * FLOAT( nn_dttrc )   ! vertical profile of passive tracer time-step
+      rdttrc = rdt * FLOAT( nn_dttrc )   !  passive tracer time-step
   
       IF(lwp) THEN                   ! control print
         WRITE(numout,*) 
-        WRITE(numout,*) '    Passive Tracer  time step    rdttrc  = ', rdttrc(1)
+        WRITE(numout,*) '    Passive Tracer  time step    rdttrc  = ', rdttrc
         WRITE(numout,*) 
       ENDIF
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 5282)
@@ -123,5 +123,5 @@
       !!----------------------------------------------------------------------
       !
-      CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rdttrc(1) )   ! surface passive tracer time step
+      CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rdttrc )   ! passive tracer time step
       ! prognostic variables 
       ! -------------------- 
@@ -186,11 +186,4 @@
          IF(lwp) WRITE(numout,*) 'trc_rst_cal : read the TOP restart file for calendar'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
-
-         IF ( jprstlib == jprstdimg ) THEN
-           ! eventually read netcdf file (monobloc)  for restarting on different number of processors
-           ! if {cn_trcrst_in}.nc exists, then set jlibalt to jpnf90 
-           INQUIRE( FILE = TRIM(cn_trcrst_in)//'.nc', EXIST = llok )
-           IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
-         ENDIF
 
          CALL iom_open( cn_trcrst_in, numrtr, kiolib = jlibalt )
@@ -226,5 +219,5 @@
             ELSE
                ndastp = ndate0 - 1     ! ndate0 read in the namelist in dom_nam
-               adatrj = ( REAL( nittrc000-1, wp ) * rdttra(1) ) / rday
+               adatrj = ( REAL( nittrc000-1, wp ) * rdt ) / rday
                ! note this is wrong if time step has changed during run
             ENDIF
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena	(revision 5282)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena	(revision 5282)
@@ -0,0 +1,80 @@
+#!/bin/bash 
+#!
+#BSUB -q poe_short
+#BSUB -n NPROCS
+#BSUB -a poe
+#BSUB -J MPI_config
+#BSUB -o poe.stdout.%J
+#BSUB -e poe.stderr.%J
+
+ 
+
+###############################################################
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
+#
+
+# export MPIRUN="mpirun -n $OCEANCORES"
+
+export MPIRUN="mpirun.lsf"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+
+
+# Don't remove neither change the following line 
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+
+
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+#
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+#  echo "Running time ${MPIRUN} " $OCEANCORES " ./opa"
+#
+
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./opa
+  else
+     time ./opa
+  fi
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line 
+
+  exit
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena_xios
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena_xios	(revision 5282)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena_xios	(revision 5282)
@@ -0,0 +1,80 @@
+#!/bin/bash 
+#!
+#BSUB -q poe_short
+#BSUB -n NPROCS
+#BSUB -a poe
+#BSUB -J MPI_config
+#BSUB -o poe.stdout.%J
+#BSUB -e poe.stderr.%J
+
+ 
+
+###############################################################
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
+#
+
+# export MPIRUN="mpirun -n $OCEANCORES"
+
+module load  INTEL/intel_xe_2013 NETCDF/netcdf-4.3_parallel_shared NETCDF/parallel-netcdf-1.3.1 HDF5/hdf5-1.8.11_parallel_shared
+export MPIRUN="mpirun.lsf"
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+
+
+# Don't remove neither change the following line 
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+
+
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+#
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+#  echo "Running time ${MPIRUN} " $OCEANCORES " ./opa"
+#
+
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./opa
+  else
+     time ./opa
+  fi
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line 
+
+  exit
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/iodef_sette.xml
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/iodef_sette.xml	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/iodef_sette.xml	(revision 5282)
@@ -30,5 +30,5 @@
       <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
       <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files -->
-      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->
       <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE."/>  <!-- 5d files -->  
       <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
@@ -102,5 +102,5 @@
       <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
       <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files -->
-      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->
       <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE."/>  <!-- 5d files -->  
       <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/sette.sh
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/sette.sh	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/sette.sh	(revision 5282)
@@ -88,10 +88,10 @@
 #
 # Compiler among those in NEMOGCM/ARCH
-COMPILER=X64_ADA
-export BATCH_COMMAND_PAR="llsubmit"
+COMPILER=ifort_athena
+export BATCH_COMMAND_PAR="bsub <"
 export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
 export INTERACT_FLAG="no"
 export MPIRUN_FLAG="yes"
-export USING_XIOS="yes"
+export USING_XIOS="no"
 #
 export DEL_KEYS="key_iomput"
@@ -142,6 +142,5 @@
 # ORCA2_LIM_OBS:   15
 # ORCA2_AGRIF_LIM :16
-for config in  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
-
+for config in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
 do
 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/sette_xios.sh
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/sette_xios.sh	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/SETTE/sette_xios.sh	(revision 5282)
@@ -84,6 +84,6 @@
 #
 # Compiler among those in NEMOGCM/ARCH
-COMPILER=
-export BATCH_COMMAND_PAR="llsubmit"
+COMPILER=ifort_athena_xios
+export BATCH_COMMAND_PAR="bsub <"
 export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
 export INTERACT_FLAG="no"
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/COMPILE/full_key_list.txt
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/COMPILE/full_key_list.txt	(revision 5282)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/COMPILE/full_key_list.txt	(revision 5282)
@@ -0,0 +1,59 @@
+key_agrif
+key_asminc
+key_bdy
+key_c1d
+key_cice
+key_cice4
+key_cpl_carbon_cycle
+key_cyclone
+key_degrad
+key_diaar5
+key_diadct
+key_diaeiv
+key_diaharm
+key_diahth
+key_diainstant
+key_diaobs
+key_dynldf_c1d
+key_dynldf_c2d
+key_dynldf_c3d
+key_dynspg_exp
+key_dynspg_flt
+key_dynspg_ts
+key_esopa
+key_floats
+key_iomput
+key_kppcustom
+key_kpplktb
+key_ldfslp
+key_lim2
+key_lim2_vp
+key_lim3
+key_mpp_mpi
+key_mpp_rep
+key_nemocice_decomp
+key_netcdf4
+key_nosignedzero
+key_noslip_accurate
+key_oasis3
+key_offline
+key_offobsoper
+key_tide
+key_top
+key_trabbl
+key_traldf_ano
+key_traldf_c1d
+key_traldf_c2d
+key_traldf_c3d
+key_traldf_eiv
+key_trdmxl_trc
+key_trdtrc
+key_vectopt_loop
+key_vvl
+key_zdfcst
+key_zdfddm
+key_zdfgls
+key_zdfkpp
+key_zdfric
+key_zdftke
+key_zdftmx
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/COMPILE/tools.txt
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/COMPILE/tools.txt	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/COMPILE/tools.txt	(revision 5282)
@@ -1,1 +1,1 @@
-REBUILD 
+REBUILD_NEMO 
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/NESTING/src/agrif_create_restart.f90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/NESTING/src/agrif_create_restart.f90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/NESTING/src/agrif_create_restart.f90	(revision 5282)
@@ -411,5 +411,5 @@
         ENDIF
         !
-     CASE('nfice','nfbulk','kt','ndastp','adatrj','rdt','rdttra1') 
+     CASE('nfice','nfbulk','kt','ndastp','adatrj','rdt') 
         IF(.NOT. dimg ) THEN
            WRITE(*,*) 'copy ',TRIM(Ncdf_varname(i))
@@ -417,5 +417,5 @@
               CALL Read_Ncdf_var(TRIM(Ncdf_varname(i)),TRIM(restart_file),tabtemp0dreal)  
               SELECT CASE (TRIM(Ncdf_varname(i)))
-              CASE('rdt','rdttra1')
+              CASE('rdt')
                  tabtemp0dreal = tabtemp0dreal/rhot
               CASE('kt')
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/OBSTOOLS/src/in_out_manager.F90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/OBSTOOLS/src/in_out_manager.F90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/OBSTOOLS/src/in_out_manager.F90	(revision 5282)
@@ -37,6 +37,4 @@
    INTEGER       ::   nn_write      =   10        !: model standard output frequency
    INTEGER       ::   nn_stock      =   10        !: restart file frequency
-   LOGICAL       ::   ln_dimgnnn    = .FALSE.     !: type of dimgout. (F): 1 file for all proc
-                                                       !:                  (T): 1 file per proc
    LOGICAL       ::   ln_mskland    = .FALSE.     !: mask land points in NetCDF outputs (costly: + ~15%)
    LOGICAL       ::   ln_clobber    = .FALSE.     !: clobber (overwrite) an existing file
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg	(revision 5282)
@@ -41,5 +41,4 @@
 kt           |                |      |   |                                  |                    |               
 rdt          |                |      |   |                                  |                    |               
-rdttra1      |                |      |   |                                  |                    |               
 utau_b       |                | XYT  | U |surface_downward_eastward_stress  |                    |               
 vtau_b       |                | XYT  | V |surface_downward_northward_stress |                    |               
Index: /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/SIREN/src/vgrid.f90
===================================================================
--- /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/SIREN/src/vgrid.f90	(revision 5281)
+++ /branches/2015/dev_r5056_CMCC4_simplification/NEMOGCM/TOOLS/SIREN/src/vgrid.f90	(revision 5282)
@@ -229,6 +229,6 @@
             dd_gdepw(jk) = ( dl_zw - 1.0 ) * dl_za1
             dd_gdept(jk) = ( dl_zt - 1.0 ) * dl_za1
-            dd_e3w  (jk) =  dl_za1
-            dd_e3t  (jk) =  dl_za1
+            dd_e3w(jk) =  dl_za1
+            dd_e3t(jk) =  dl_za1
          END DO
 
@@ -244,8 +244,8 @@
             &                dl_za1 * dl_zacr * LOG( COSH( (dl_zt-dl_zkth)/dl_zacr ) ) + &
             &                dl_za2 * dl_zacr2* LOG( COSH( (dl_zt-dl_zkth2)/dl_zacr2 ) ) )
-            dd_e3w  (jk) =             dl_za0 + &
+            dd_e3w(jk) =             dl_za0 + &
             &                          dl_za1 * TANH(      (dl_zw-dl_zkth)/dl_zacr   ) + &
             &                          dl_za2 * TANH(      (dl_zw-dl_zkth2)/dl_zacr2 )
-            dd_e3t  (jk) =             dl_za0 + &
+            dd_e3t(jk) =             dl_za0 + &
             &                          dl_za1 * TANH(      (dl_zt-dl_zkth)/dl_zacr   ) + &
             &                          dl_za2 * TANH(      (dl_zt-dl_zkth2)/dl_zacr2 )
