Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/ARCH/CMCC/arch-ifort_athena.fcm
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/ARCH/CMCC/arch-ifort_athena.fcm	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/ARCH/CMCC/arch-ifort_athena.fcm	(revision 6051)
@@ -17,6 +17,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_CMCC_merge_2015/NEMOGCM/ARCH/CMCC/arch-ifort_athena_xios.fcm
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/ARCH/CMCC/arch-ifort_athena_xios.fcm	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/ARCH/CMCC/arch-ifort_athena_xios.fcm	(revision 6051)
@@ -34,22 +34,24 @@
 
 # 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
-%XIOS_INC            -I$XIOS/inc
-%XIOS_LIB            -L$XIOS/lib -lxios
+%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
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 6051)
@@ -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)
@@ -448,6 +445,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg	(revision 6051)
@@ -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)
@@ -342,7 +340,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_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg	(revision 6051)
@@ -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)
@@ -401,7 +399,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_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg	(revision 6051)
@@ -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)
@@ -390,7 +388,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_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 6051)
@@ -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)
@@ -260,7 +258,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_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg	(revision 6051)
@@ -40,7 +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_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 
+!   nn_baro     =   60      !  number of barotropic time step            ("key_dynspg_ts")
    jphgr_msh   =       5                 !  type of horizontal mesh
    ppglam0     =       0.0               !  longitude of first raw and column T-point (jphgr_msh = 1)
@@ -348,7 +347,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_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 6051)
@@ -52,6 +52,4 @@
    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)
 /
 !-----------------------------------------------------------------------
@@ -266,8 +264,4 @@
 /
 !-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobs       !  observation usage                                      ('key_diaobs')
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 6051)
@@ -245,8 +245,4 @@
 /
 !-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobs       !  observation usage                                      ('key_diaobs')
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg	(revision 6051)
@@ -51,6 +51,4 @@
    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)
 /
 !-----------------------------------------------------------------------
@@ -266,8 +264,4 @@
 /
 !-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobs       !  observation usage                                      ('key_diaobs')
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 6051)
@@ -251,8 +251,4 @@
 /
 !-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobs       !  observation usage                                      ('key_diaobs')
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg	(revision 6051)
@@ -87,9 +87,4 @@
    rn_rdt      = 2880.     !  time step for the dynamics (and tracer if nn_acc=0)
    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)
 /
 !-----------------------------------------------------------------------
@@ -889,17 +884,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_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg	(revision 6051)
@@ -345,6 +345,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 6051)
@@ -244,6 +244,2 @@
 !-----------------------------------------------------------------------
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg	(revision 6051)
@@ -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)
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 6051)
@@ -132,9 +132,4 @@
    rn_rdt      = 5760.     !  time step for the dynamics (and tracer if nn_acc=0)
    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
@@ -1244,17 +1239,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_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 6051)
@@ -83,5 +83,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_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90	(revision 6051)
@@ -71,6 +71,4 @@
                WRITE(numout,*)
                SELECT CASE ( jprstlib )
-               CASE ( jprstdimg )
-                  WRITE(numout,*) '             open ice restart binary file: ',TRIM(clpath)//clname
                CASE DEFAULT
                   WRITE(numout,*) '             open ice restart NetCDF file: ',TRIM(clpath)//clname
@@ -192,11 +190,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_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok )
-        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
-      ENDIF
-
       CALL iom_open ( TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in), numrir, kiolib = jlibalt )
 
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/limwri_dimg_2.h90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_2/limwri_dimg_2.h90	(revision 6050)
+++ 	(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_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 6051)
@@ -77,6 +77,4 @@
                WRITE(numout,*)
                SELECT CASE ( jprstlib )
-               CASE ( jprstdimg )
-                  WRITE(numout,*) '             open ice restart binary file: ',TRIM(clpath)//clname
                CASE DEFAULT
                   WRITE(numout,*) '             open ice restart NetCDF file: ',TRIM(clpath)//clname
@@ -331,11 +329,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_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok )
-        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
-      ENDIF
-
       CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir, kiolib = jprstlib )
 
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 6051)
@@ -41,7 +41,4 @@
 CONTAINS
 
-#if defined key_dimgout
-# include "limwri_dimg.h90"
-#else
 
    SUBROUTINE lim_wri( kindic )
@@ -298,5 +295,4 @@
       
    END SUBROUTINE lim_wri
-#endif
 
  
Index: anches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_3/limwri_dimg.h90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/LIM_SRC_3/limwri_dimg.h90	(revision 6050)
+++ 	(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 , ( umask(ji,jj,1) + umask(ji+1,jj,1) + umask(ji,jj+1,1) + umask(ji+1,jj+1,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  ) * umask(ji,jj,1) + u_ice(ji+1,jj  ) * umask(ji+1,jj,1)   &
-            + u_ice(ji,jj+1) * umask(ji,jj+1,1) + u_ice(ji+1,jj+1) * umask(ji+1,jj+1,1) ) &
-            / ztmu 
-
-         zcmo(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * umask(ji,jj,1) + v_ice(ji+1,jj  ) * umask(ji+1,jj,1)   &
-            + v_ice(ji,jj+1) * umask(ji,jj+1,1) + v_ice(ji+1,jj+1) * umask(ji+1,jj+1,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 , ( umask(ji,jj,1) + umask(ji+1,jj,1) + umask(ji,jj+1,1) + umask(ji+1,jj+1,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  ) * umask(ji,jj,1) + u_ice(ji+1,jj  ) * umask(ji+1,jj,1)   &
-                  + u_ice(ji,jj+1) * umask(ji,jj+1,1) + u_ice(ji+1,jj+1) * umask(ji+1,jj+1,1) ) &
-                  / ztmu
-
-               rcmoy(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * umask(ji,jj,1) + v_ice(ji+1,jj  ) * umask(ji+1,jj,1)   &
-                  + v_ice(ji,jj+1) * umask(ji,jj+1,1) + v_ice(ji+1,jj+1) * umask(ji+1,jj+1,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_CMCC_merge_2015/NEMOGCM/NEMO/OFF_SRC/domrea.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OFF_SRC/domrea.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OFF_SRC/domrea.F90	(revision 6051)
@@ -116,9 +116,7 @@
          &             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_cfmeta    , ln_clobber, nn_chunksz, nn_euler
+         &             nn_write, ln_mskland  , ln_cfmeta    , 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, &
@@ -154,5 +152,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,*) '      additional CF standard metadata ln_cfmeta  = ', ln_cfmeta
@@ -186,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
@@ -231,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
@@ -260,11 +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
-
 #if defined key_netcdf4
       !                             ! NetCDF 4 case   ("key_netcdf4" defined)
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 6051)
@@ -205,8 +205,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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 6051)
@@ -323,5 +323,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
@@ -438,5 +438,5 @@
             ! 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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90	(revision 6051)
@@ -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: anches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diadimg.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diadimg.F90	(revision 6050)
+++ 	(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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90	(revision 6051)
@@ -116,5 +116,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
@@ -404,5 +404,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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 6051)
@@ -21,5 +21,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
@@ -384,17 +383,6 @@
       !!----------------------------------------------------------------------
 
-#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(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(lwp) WRITE(numout,*) '  '
 
@@ -402,39 +390,24 @@
       !/////////////
       !
-#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
       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
 
       ! 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
       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
 
       ! 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
       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
       !
    END SUBROUTINE dia_wri_harm
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/dianam.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/dianam.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/dianam.F90	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 6051)
@@ -42,5 +42,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
@@ -410,5 +402,5 @@
       INTEGER  ::   iimi, iima, ipk, it, itmod, ijmi, ijma   ! local integers
       INTEGER  ::   jn, ierror                               ! local integers
-      REAL(wp) ::   zsto, zout, zmax, zjulian, zdt           ! local scalars
+      REAL(wp) ::   zsto, zout, zmax, zjulian                ! local scalars
       !
       REAL(wp), POINTER, DIMENSION(:,:)   :: zw2d       ! 2D workspace
@@ -435,16 +427,14 @@
 
       ! Define frequency of output and means
-      zdt = rdt
-      IF( nacc == 1 ) zdt = rdtmin
       clop = "x"         ! no use of the mask value (require less cpu time and otherwise the model crashes)
 #if defined key_diainstant
-      zsto = nwrite * zdt
+      zsto = nwrite * rdt
       clop = "inst("//TRIM(clop)//")"
 #else
-      zsto=zdt
+      zsto=rdt
       clop = "ave("//TRIM(clop)//")"
 #endif
-      zout = nwrite * zdt
-      zmax = ( nitend - nit000 + 1 ) * zdt
+      zout = nwrite * rdt
+      zmax = ( nitend - nit000 + 1 ) * rdt
 
       ! Define indices of the horizontal output zoom and vertical limit storage
@@ -488,5 +478,5 @@
          CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit
             &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       &
-            &          nit000-1, zjulian, zdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set )
+            &          nit000-1, zjulian, rdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set )
          CALL histvert( nid_T, "deptht", "Vertical T levels",      &  ! Vertical grid: gdept
             &           "m", ipk, gdept_1d, nz_T, "down" )
@@ -524,5 +514,5 @@
          CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu,           &  ! Horizontal grid: glamu and gphiu
             &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       &
-            &          nit000-1, zjulian, zdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set )
+            &          nit000-1, zjulian, rdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set )
          CALL histvert( nid_U, "depthu", "Vertical U levels",      &  ! Vertical grid: gdept
             &           "m", ipk, gdept_1d, nz_U, "down" )
@@ -537,5 +527,5 @@
          CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv,           &  ! Horizontal grid: glamv and gphiv
             &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       &
-            &          nit000-1, zjulian, zdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set )
+            &          nit000-1, zjulian, rdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set )
          CALL histvert( nid_V, "depthv", "Vertical V levels",      &  ! Vertical grid : gdept
             &          "m", ipk, gdept_1d, nz_V, "down" )
@@ -550,5 +540,5 @@
          CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit
             &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       &
-            &          nit000-1, zjulian, zdt, nh_W, nid_W, domain_id=nidom, snc4chunks=snc4set )
+            &          nit000-1, zjulian, rdt, nh_W, nid_W, domain_id=nidom, snc4chunks=snc4set )
          CALL histvert( nid_W, "depthw", "Vertical W levels",      &  ! Vertical grid: gdepw
             &          "m", ipk, gdepw_1d, nz_W, "down" )
@@ -843,6 +833,4 @@
       !
    END SUBROUTINE dia_wri
-# endif
-
 #endif
 
@@ -867,5 +855,5 @@
       INTEGER  ::   id_i , nz_i, nh_i       
       INTEGER, DIMENSION(1) ::   idex             ! local workspace
-      REAL(wp) ::   zsto, zout, zmax, zjulian, zdt
+      REAL(wp) ::   zsto, zout, zmax, zjulian
       !!----------------------------------------------------------------------
       ! 
@@ -876,9 +864,8 @@
       clname = cdfile_name
       IF( .NOT. Agrif_Root() ) clname = TRIM(Agrif_CFixed())//'_'//TRIM(clname)
-      zdt  = rdt
       zsto = rdt
       clop = "inst(x)"           ! no use of the mask value (require less cpu time)
       zout = rdt
-      zmax = ( nitend - nit000 + 1 ) * zdt
+      zmax = ( nitend - nit000 + 1 ) * rdt
 
       IF(lwp) WRITE(numout,*)
@@ -895,5 +882,5 @@
       zjulian = zjulian - adatrj   !   set calendar origin to the beginning of the experiment
       CALL histbeg( clname, jpi, glamt, jpj, gphit,   &
-          1, jpi, 1, jpj, nit000-1, zjulian, zdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit
+          1, jpi, 1, jpj, nit000-1, zjulian, rdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit
       CALL histvert( id_i, "deptht", "Vertical T levels",   &    ! Vertical grid : gdept
           "m", jpk, gdept_1d, nz_i, "down")
@@ -962,5 +949,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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diawri_dimg.h90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diawri_dimg.h90	(revision 6050)
+++ 	(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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 6051)
@@ -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 -----------
@@ -78,12 +78,12 @@
             &           'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' )
       ENDIF
-      ! 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' )
@@ -223,6 +223,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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 6051)
@@ -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)
@@ -99,16 +95,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
+   REAL(wp), PUBLIC                 ::   r2dt          !: = 2*rdt except at nit000 (=rdt) if neuler=0
 
    !!----------------------------------------------------------------------
@@ -331,5 +322,5 @@
       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) )
          !
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 6051)
@@ -138,9 +138,7 @@
          &             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_cfmeta    , ln_clobber, nn_chunksz, nn_euler
+         &             nn_write, ln_mskland  , ln_cfmeta , 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, &
@@ -186,5 +184,4 @@
          ENDIF
          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,*) '      additional CF standard metadata ln_cfmeta  = ', ln_cfmeta
@@ -267,8 +264,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
@@ -297,10 +290,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
 
 #if defined key_netcdf4
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 6051)
@@ -34,5 +34,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
@@ -63,6 +62,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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 6051)
@@ -42,6 +42,4 @@
    INTEGER       ::   nn_stock         !: restart file frequency
    INTEGER, DIMENSION(10) :: nn_stocklist  !: restart dump times
-   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_cfmeta        !: output additional data to netCDF files required for compliance with the CF metadata standard
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 6051)
@@ -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
@@ -246,5 +245,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
@@ -309,9 +308,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
@@ -326,7 +323,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.)
@@ -375,5 +371,5 @@
          END SELECT
       ENDIF
-      ! Open the NetCDF or RSTDIMG file
+      ! Open the NetCDF file
       ! =============
       ! do we have some free file identifier?
@@ -399,9 +395,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
@@ -438,9 +432,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 
@@ -497,9 +489,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
@@ -559,9 +549,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
@@ -694,11 +682,8 @@
       IF( luse_jattr ) THEN
          SELECT CASE (iom_file(kiomid)%iolib)
-         CASE (jpioipsl, jprstdimg )
-             CALL ctl_warn(trim(clinfo), 'lrowattr present and true but this only works with netcdf (jpnf90)')
-             luse_jattr = .false.
          CASE (jpnf90   )   
              ! Ok
          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
@@ -866,12 +851,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
 
@@ -956,9 +937,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
@@ -991,9 +970,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
@@ -1017,9 +994,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
@@ -1039,9 +1014,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
@@ -1061,9 +1034,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
@@ -1083,9 +1054,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
@@ -1645,5 +1614,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@')
@@ -1652,5 +1621,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@')
@@ -1659,5 +1628,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@')
@@ -1666,5 +1635,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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom_ioipsl.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom_ioipsl.F90	(revision 6050)
+++ 	(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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom_rstdimg.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom_rstdimg.F90	(revision 6050)
+++ 	(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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 6051)
@@ -95,6 +95,4 @@
                WRITE(numout,*)
                SELECT CASE ( jprstlib )
-               CASE ( jprstdimg )   ;   WRITE(numout,*)                            &
-                   '             open ocean restart binary file: ',TRIM(clpath)//clname
                CASE DEFAULT         ;   WRITE(numout,*)                            &
                    '             open ocean restart NetCDF file: ',TRIM(clpath)//clname
@@ -126,6 +124,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
@@ -175,5 +172,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'
@@ -183,10 +179,4 @@
          clpath = TRIM(cn_ocerst_indir)
          IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/'
-         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_indir)//'/'//TRIM(cn_ocerst_in)//'.nc', EXIST = llok )
-           IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
-         ENDIF
          CALL iom_open( TRIM(clpath)//cn_ocerst_in, numror, kiolib = jlibalt )
       ENDIF
@@ -202,5 +192,5 @@
       !! ** Method  :   Read in restart.nc file fields which are necessary for restart
       !!----------------------------------------------------------------------
-      REAL(wp) ::   zrdt, zrdttra1
+      REAL(wp) ::   zrdt
       INTEGER  ::   jk
       LOGICAL  ::   llok
@@ -213,8 +203,4 @@
          CALL iom_get( numror, 'rdt', zrdt )
          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
       ! 
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 6051)
@@ -166,5 +166,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 )
@@ -193,5 +193,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
@@ -214,5 +214,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...
@@ -245,5 +245,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...)
@@ -459,5 +459,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
       !
@@ -536,6 +536,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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 6051)
@@ -844,5 +844,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
@@ -862,5 +862,5 @@
       !                                                      ! 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(:,:,1:nn_cplmodel), nrcvinfo(jn) )
@@ -1713,5 +1713,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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 6051)
@@ -129,5 +129,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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 6051)
@@ -373,5 +373,5 @@
       !
       ! sea-ice timestep and inverse
-      rdt_ice   = nn_fsbc * rdttra(1)  
+      rdt_ice   = nn_fsbc * rdt  
       r1_rdtice = 1._wp / rdt_ice 
 
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 6051)
@@ -48,5 +48,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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 6051)
@@ -96,7 +96,7 @@
       !                                          ! 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)
+         r2dt = 2._wp * rdt                         ! = 2 rdt (leapfrog)
       ENDIF
       !
@@ -135,13 +135,13 @@
          CALL tra_adv_cen    ( kt, nit000, 'TRA',         zun, zvn, zwn     , tsn, tsa, jpts, nn_cen_h, nn_cen_v )
       CASE ( np_FCT )                                    ! FCT scheme      : 2nd / 4th order
-         CALL tra_adv_fct    ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts, nn_fct_h, nn_fct_v )
+         CALL tra_adv_fct    ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts, nn_fct_h, nn_fct_v )
       CASE ( np_FCT_zts )                                ! 2nd order FCT with vertical time-splitting
-         CALL tra_adv_fct_zts( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts        , nn_fct_zts )
+         CALL tra_adv_fct_zts( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts        , nn_fct_zts )
       CASE ( np_MUS )                                    ! MUSCL
-         CALL tra_adv_mus    ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb,      tsa, jpts        , ln_mus_ups ) 
+         CALL tra_adv_mus    ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb,      tsa, jpts        , ln_mus_ups ) 
       CASE ( np_UBS )                                    ! UBS
-         CALL tra_adv_ubs    ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts        , nn_ubs_v   )
+         CALL tra_adv_ubs    ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts        , nn_ubs_v   )
       CASE ( np_QCK )                                    ! QUICKEST
-         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                     )
       !
       END SELECT
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90	(revision 6051)
@@ -70,5 +70,5 @@
       INTEGER                              , INTENT(in   ) ::   kn_fct_h        ! order of the FCT scheme (=2 or 4)
       INTEGER                              , INTENT(in   ) ::   kn_fct_v        ! order of the FCT scheme (=2 or 4)
-      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
@@ -76,5 +76,5 @@
       !
       INTEGER  ::   ji, jj, jk, jn                           ! dummy loop indices  
-      REAL(wp) ::   z2dtt, ztra                              ! local scalar
+      REAL(wp) ::   ztra                              ! local scalar
       REAL(wp) ::   zfp_ui, zfp_vj, zfp_wk, zC2t_u, zC4t_u   !   -      -
       REAL(wp) ::   zfm_ui, zfm_vj, zfm_wk, zC2t_v, zC4t_v   !   -      -
@@ -149,5 +149,4 @@
          !               
          DO jk = 1, jpkm1     !* trend and after field with monotonic scheme
-            z2dtt = p2dt(jk)
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -159,5 +158,5 @@
 !!gm why tmask added in the two following lines ???    the mask is done in tranxt !
                   pta(ji,jj,jk,jn) =   pta(ji,jj,jk,jn)         + ztra   * tmask(ji,jj,jk)
-                  zwi(ji,jj,jk)    = ( ptb(ji,jj,jk,jn) + z2dtt * ztra ) * tmask(ji,jj,jk)
+                  zwi(ji,jj,jk)    = ( ptb(ji,jj,jk,jn) + p2dt * ztra ) * tmask(ji,jj,jk)
                END DO
             END DO
@@ -348,5 +347,5 @@
       INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
       INTEGER                              , INTENT(in   ) ::   kn_fct_zts      ! number of number of vertical sub-timesteps
-      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
@@ -354,10 +353,10 @@
       !
       REAL(wp), DIMENSION( jpk )                           ::   zts             ! length of sub-timestep for vertical advection
-      REAL(wp), DIMENSION( jpk )                           ::   zr_p2dt         ! reciprocal of tracer timestep
+      REAL(wp)                                             ::   zr_p2dt         ! reciprocal of tracer timestep
       INTEGER  ::   ji, jj, jk, jl, jn       ! dummy loop indices  
       INTEGER  ::   jtb, jtn, jta   ! sub timestep pointers for leap-frog/euler forward steps
       INTEGER  ::   jtaken          ! toggle for collecting appropriate fluxes from sub timesteps
       REAL(wp) ::   z_rzts          ! Fractional length of Euler forward sub-timestep for vertical advection
-      REAL(wp) ::   z2dtt, ztra              ! local scalar
+      REAL(wp) ::   ztra              ! local scalar
       REAL(wp) ::   zfp_ui, zfp_vj, zfp_wk   !   -      -
       REAL(wp) ::   zfm_ui, zfm_vj, zfm_wk   !   -      -
@@ -390,5 +389,5 @@
       zwi(:,:,:) = 0._wp
       z_rzts = 1._wp / REAL( kn_fct_zts, wp )
-      zr_p2dt(:) = 1._wp / p2dt(:)
+      zr_p2dt = 1._wp / p2dt
       !
       !                                                          ! ===========
@@ -443,5 +442,4 @@
          !
          DO jk = 1, jpkm1         ! total advective trend
-            z2dtt = p2dt(jk)
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -452,5 +450,5 @@
                   ! update and guess with monotonic sheme
                   pta(ji,jj,jk,jn) =   pta(ji,jj,jk,jn)         + ztra
-                  zwi(ji,jj,jk)    = ( ptb(ji,jj,jk,jn) + z2dtt * ztra ) * tmask(ji,jj,jk)
+                  zwi(ji,jj,jk)    = ( ptb(ji,jj,jk,jn) + p2dt * ztra ) * tmask(ji,jj,jk)
                END DO
             END DO
@@ -508,5 +506,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( kn_fct_zts + 1 , 2)            ! Toggle to collect every second flux
                !                                            ! starting at jl =1 if kn_fct_zts is odd; 
@@ -514,5 +512,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
@@ -557,5 +555,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) ) * wmask(ji,jj,jk)
+                  zwz(ji,jj,jk) = ( zwzts(ji,jj,jk) * zr_p2dt - zwz_sav(ji,jj,jk) ) * wmask(ji,jj,jk)
                END DO
             END DO
@@ -623,5 +621,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
@@ -629,5 +627,5 @@
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
       INTEGER  ::   ikm1         ! local integer
-      REAL(wp) ::   zpos, zneg, zbt, za, zb, zc, zbig, zrtrn, z2dtt   ! local scalars
+      REAL(wp) ::   zpos, zneg, zbt, za, zb, zc, zbig, zrtrn    ! local scalars
       REAL(wp) ::   zau, zbu, zcu, zav, zbv, zcv, zup, zdo            !   -      -
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zbetup, zbetdo, zbup, zbdo
@@ -652,5 +650,4 @@
       DO jk = 1, jpkm1
          ikm1 = MAX(jk-1,1)
-         z2dtt = p2dt(jk)
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -679,5 +676,5 @@
 
                ! up & down beta terms
-               zbt = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) / z2dtt
+               zbt = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) / p2dt
                zbetup(ji,jj,jk) = ( zup            - paft(ji,jj,jk) ) / ( zpos + zrtrn ) * zbt
                zbetdo(ji,jj,jk) = ( paft(ji,jj,jk) - zdo            ) / ( zneg + zrtrn ) * zbt
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90	(revision 6051)
@@ -73,5 +73,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
@@ -82,5 +82,5 @@
       REAL(wp) ::   zu, z0u, zzwx, zw    ! local scalars
       REAL(wp) ::   zv, z0v, zzwy, z0w   !   -      -
-      REAL(wp) ::   zdt, zalpha          !   -      -
+      REAL(wp) ::   zalpha          !   -      -
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zslpx, zslpy   ! 3D workspace
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zwx  , zwy     ! -      - 
@@ -163,5 +163,4 @@
          !                                             !-- MUSCL horizontal advective fluxes
          DO jk = 1, jpkm1                                     ! interior values
-            zdt  = p2dt(jk)
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -169,5 +168,5 @@
                   z0u = SIGN( 0.5, pun(ji,jj,jk) )
                   zalpha = 0.5 - z0u
-                  zu  = z0u - 0.5 * pun(ji,jj,jk) * zdt / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
+                  zu  = z0u - 0.5 * pun(ji,jj,jk) * p2dt / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
                   zzwx = ptb(ji+1,jj,jk,jn) + xind(ji,jj,jk) * zu * zslpx(ji+1,jj,jk)
                   zzwy = ptb(ji  ,jj,jk,jn) + xind(ji,jj,jk) * zu * zslpx(ji  ,jj,jk)
@@ -176,5 +175,5 @@
                   z0v = SIGN( 0.5, pvn(ji,jj,jk) )
                   zalpha = 0.5 - z0v
-                  zv  = z0v - 0.5 * pvn(ji,jj,jk) * zdt / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  zv  = z0v - 0.5 * pvn(ji,jj,jk) * p2dt / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
                   zzwx = ptb(ji,jj+1,jk,jn) + xind(ji,jj,jk) * zv * zslpy(ji,jj+1,jk)
                   zzwy = ptb(ji,jj  ,jk,jn) + xind(ji,jj,jk) * zv * zslpy(ji,jj  ,jk)
@@ -237,10 +236,9 @@
          !                                !-- vertical advective flux
          DO jk = 1, jpkm1                       ! interior values
-            zdt  = p2dt(jk)
             DO jj = 2, jpjm1      
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   z0w = SIGN( 0.5, pwn(ji,jj,jk+1) )
                   zalpha = 0.5 + z0w
-                  zw  = z0w - 0.5 * pwn(ji,jj,jk+1) * zdt  / ( e1e2t(ji,jj) * fse3w(ji,jj,jk+1) )
+                  zw  = z0w - 0.5 * pwn(ji,jj,jk+1) * p2dt  / ( e1e2t(ji,jj) * fse3w(ji,jj,jk+1) )
                   zzwx = ptb(ji,jj,jk+1,jn) + xind(ji,jj,jk) * zw * zslpx(ji,jj,jk+1)
                   zzwy = ptb(ji,jj,jk  ,jn) + xind(ji,jj,jk) * zw * zslpx(ji,jj,jk  )
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 6051)
@@ -87,5 +87,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
@@ -131,5 +131,5 @@
       !!
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
-      REAL(wp) ::   ztra, zbtr, zdir, zdx, zdt, zmsk   ! local scalars
+      REAL(wp) ::   ztra, zbtr, zdir, zdx, zmsk   ! local scalars
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zwx, zfu, zfc, zfd
       !----------------------------------------------------------------------
@@ -166,10 +166,9 @@
          !
          DO jk = 1, jpkm1  
-            zdt =  p2dt(jk)
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.   
                   zdir = 0.5 + SIGN( 0.5, pun(ji,jj,jk) )   ! if pun > 0 : zdir = 1 otherwise zdir = 0 
                   zdx = ( zdir * e1t(ji,jj) + ( 1. - zdir ) * e1t(ji+1,jj) ) * e2u(ji,jj) * fse3u(ji,jj,jk)
-                  zwx(ji,jj,jk)  = ABS( pun(ji,jj,jk) ) * zdt / zdx    ! (0<zc_cfl<1 : Courant number on x-direction)
+                  zwx(ji,jj,jk)  = ABS( pun(ji,jj,jk) ) * p2dt / zdx    ! (0<zc_cfl<1 : Courant number on x-direction)
                   zfc(ji,jj,jk)  = zdir * ptb(ji  ,jj,jk,jn) + ( 1. - zdir ) * ptb(ji+1,jj,jk,jn)  ! FC in the x-direction for T
                   zfd(ji,jj,jk)  = zdir * ptb(ji+1,jj,jk,jn) + ( 1. - zdir ) * ptb(ji  ,jj,jk,jn)  ! FD in the x-direction for T
@@ -242,5 +241,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
@@ -248,5 +247,5 @@
       !!
       INTEGER  :: ji, jj, jk, jn   ! dummy loop indices
-      REAL(wp) :: ztra, zbtr, zdir, zdx, zdt, zmsk   ! local scalars
+      REAL(wp) :: ztra, zbtr, zdir, zdx, zmsk   ! local scalars
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zwy, zfu, zfc, zfd
       !----------------------------------------------------------------------
@@ -289,10 +288,9 @@
          !
          DO jk = 1, jpkm1  
-            zdt =  p2dt(jk)
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.   
                   zdir = 0.5 + SIGN( 0.5, pvn(ji,jj,jk) )   ! if pun > 0 : zdir = 1 otherwise zdir = 0 
                   zdx = ( zdir * e2t(ji,jj) + ( 1. - zdir ) * e2t(ji,jj+1) ) * e1v(ji,jj) * fse3v(ji,jj,jk)
-                  zwy(ji,jj,jk)  = ABS( pvn(ji,jj,jk) ) * zdt / zdx    ! (0<zc_cfl<1 : Courant number on x-direction)
+                  zwy(ji,jj,jk)  = ABS( pvn(ji,jj,jk) ) * p2dt / zdx    ! (0<zc_cfl<1 : Courant number on x-direction)
                   zfc(ji,jj,jk)  = zdir * ptb(ji,jj  ,jk,jn) + ( 1. - zdir ) * ptb(ji,jj+1,jk,jn)  ! FC in the x-direction for T
                   zfd(ji,jj,jk)  = zdir * ptb(ji,jj+1,jk,jn) + ( 1. - zdir ) * ptb(ji,jj  ,jk,jn)  ! FD in the x-direction for T
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 6051)
@@ -85,5 +85,5 @@
       INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
       INTEGER                              , INTENT(in   ) ::   kn_ubs_v        ! 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
@@ -91,5 +91,5 @@
       !
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
-      REAL(wp) ::   ztra, zbtr, zcoef, z2dtt                       ! local scalars
+      REAL(wp) ::   ztra, zbtr, zcoef                       ! local scalars
       REAL(wp) ::   zfp_ui, zfm_ui, zcenut, ztak, zfp_wk, zfm_wk   !   -      -
       REAL(wp) ::   zfp_vj, zfm_vj, zcenvt, zeeu, zeev, z_hdivn    !   -      -
@@ -212,10 +212,9 @@
             !
             DO jk = 1, jpkm1           !* trend and after field with monotonic scheme
-               z2dtt = p2dt(jk)
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
                      ztak = - ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) ) / ( e1e2t(ji,jj) * fse3t_n(ji,jj,jk) )
                      pta(ji,jj,jk,jn) =   pta(ji,jj,jk,jn) +  ztak 
-                     zti(ji,jj,jk)    = ( ptb(ji,jj,jk,jn) + z2dtt * ( ztak + zltu(ji,jj,jk) ) ) * tmask(ji,jj,jk)
+                     zti(ji,jj,jk)    = ( ptb(ji,jj,jk,jn) + p2dt * ( ztak + zltu(ji,jj,jk) ) ) * tmask(ji,jj,jk)
                   END DO
                END DO
@@ -293,5 +292,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
@@ -300,5 +299,5 @@
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
       INTEGER  ::   ikm1         ! local integer
-      REAL(wp) ::   zpos, zneg, zbt, za, zb, zc, zbig, zrtrn, z2dtt   ! local scalars
+      REAL(wp) ::   zpos, zneg, zbt, za, zb, zc, zbig, zrtrn   ! local scalars
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zbetup, zbetdo
       !!----------------------------------------------------------------------
@@ -349,5 +348,4 @@
       ! ---------------------------------------------------
       DO jk = 1, jpkm1
-         z2dtt = p2dt(jk)
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -356,5 +354,5 @@
                zneg = MAX( 0., pcc(ji  ,jj  ,jk  ) ) - MIN( 0., pcc(ji  ,jj  ,jk+1) )
                ! up & down beta terms
-               zbt = e1e2t(ji,jj) * fse3t(ji,jj,jk) / z2dtt
+               zbt = e1e2t(ji,jj) * fse3t(ji,jj,jk) / p2dt
                zbetup(ji,jj,jk) = ( zbetup(ji,jj,jk) - paft(ji,jj,jk) ) / (zpos+zrtrn) * zbt
                zbetdo(ji,jj,jk) = ( paft(ji,jj,jk) - zbetdo(ji,jj,jk) ) / (zneg+zrtrn) * zbt
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 6051)
@@ -129,6 +129,6 @@
       !
       !                                               ! set time step size (Euler/Leapfrog)
-      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   z2dt =     rdttra(1)      ! at nit000   (Euler)
-      ELSE                                        ;   z2dt = 2.* rdttra(1)      !             (Leapfrog)
+      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   z2dt =     rdt      ! at nit000   (Euler)
+      ELSE                                        ;   z2dt = 2.* rdt      !             (Leapfrog)
       ENDIF
       z1_2dt = 1._wp / z2dt
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_triad.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_triad.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_triad.F90	(revision 6051)
@@ -115,6 +115,6 @@
       !
       !                                               ! set time step size (Euler/Leapfrog)
-      IF( neuler == 0 .AND. kt == kit000 ) THEN   ;   z2dt =     rdttra(1)      ! at nit000   (Euler)
-      ELSE                                        ;   z2dt = 2.* rdttra(1)      !             (Leapfrog)
+      IF( neuler == 0 .AND. kt == kit000 ) THEN   ;   z2dt =     rdt      ! at nit000   (Euler)
+      ELSE                                        ;   z2dt = 2.* rdt      !             (Leapfrog)
       ENDIF
       z1_2dt = 1._wp / z2dt
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 6051)
@@ -119,6 +119,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
 
@@ -142,7 +142,7 @@
       ELSE                                            ! Leap-Frog + Asselin filter time stepping
          !
-         IF( lk_vvl )  THEN   ;   CALL tra_nxt_vvl( kt, nit000, rdttra, 'TRA', tsb, tsn, tsa,   &
+         IF( lk_vvl )  THEN   ;   CALL tra_nxt_vvl( kt, nit000, rdt, 'TRA', tsb, tsn, tsa,   &
            &                                                              sbc_tsc, sbc_tsc_b, jpts )  ! variable volume level (vvl) 
-         ELSE                 ;   CALL tra_nxt_fix( kt, nit000,         'TRA', tsb, tsn, tsa, jpts )  ! fixed    volume level 
+         ELSE                 ;   CALL tra_nxt_fix( kt, nit000,      'TRA', tsb, tsn, tsa, jpts )  ! fixed    volume level 
          ENDIF
       ENDIF     
@@ -151,5 +151,5 @@
       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             
             ztrdt(:,:,jk) = ( tsb(:,:,jk,jp_tem) - ztrdt(:,:,jk) ) * zfact
             ztrds(:,:,jk) = ( tsb(:,:,jk,jp_sal) - ztrds(:,:,jk) ) * zfact
@@ -237,5 +237,5 @@
       INTEGER         , INTENT(in   )                               ::  kt       ! ocean time-step index
       INTEGER         , INTENT(in   )                               ::  kit000   ! first time step index
-      REAL(wp)        , INTENT(in   ), DIMENSION(jpk)               ::  p2dt     ! time-step
+      REAL(wp)        , INTENT(in   )                               ::  p2dt     ! time-step
       CHARACTER(len=3), INTENT(in   )                               ::  cdtype   ! =TRA or TRC (tracer indicator)
       INTEGER         , INTENT(in   )                               ::  kjpt     ! number of tracers
@@ -275,5 +275,5 @@
       DO jn = 1, kjpt      
          DO jk = 1, jpkm1
-            zfact1 = atfp * p2dt(jk)
+            zfact1 = atfp * p2dt
             zfact2 = zfact1 / rau0
             DO jj = 1, jpj
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 6051)
@@ -68,7 +68,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
 
@@ -80,6 +80,6 @@
 
       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 
       END SELECT
 !!gm WHY here !   and I don't like that !
@@ -92,6 +92,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
 !!gm this should be moved in trdtra.F90 and done on all trends
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90	(revision 6051)
@@ -78,5 +78,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 
@@ -144,6 +144,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
@@ -192,5 +192,5 @@
                ze3tb = ( 1. - r_vvl ) + r_vvl * fse3t_b(ji,jj,1)
                ze3tn = ( 1. - r_vvl ) + r_vvl * fse3t(ji,jj,1)
-               pta(ji,jj,1,jn) = ze3tb * ptb(ji,jj,1,jn) + p2dt(1) * ze3tn * pta(ji,jj,1,jn)
+               pta(ji,jj,1,jn) = ze3tb * ptb(ji,jj,1,jn) + p2dt * ze3tn * pta(ji,jj,1,jn)
             END DO
          END DO
@@ -200,5 +200,5 @@
                   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 
+                  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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90	(revision 6051)
@@ -30,5 +30,4 @@
    USE zdfddm          ! ocean vertical physics: double diffusion
    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
    !
@@ -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
       !!----------------------------------------------------------------------
   
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90	(revision 6051)
@@ -62,5 +62,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
@@ -147,14 +146,4 @@
       clpath = TRIM(cn_ocerst_indir)
       IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/'
-
-      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(clpath)//TRIM(cn_trdrst_in)//'.nc', EXIST = llok )
-         IF ( llok ) THEN   ;   jlibalt = jpnf90   
-         ELSE               ;   jlibalt = jprstlib   
-         ENDIF
-      ENDIF
-
       CALL iom_open( TRIM(clpath)//TRIM(cn_trdrst_in), inum, kiolib = jlibalt ) 
 
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90	(revision 6051)
@@ -37,6 +37,4 @@
 
    PUBLIC   trd_tra   ! called by all tra_... modules
-
-   REAL(wp) ::   r2dt   ! time-step, = 2 rdttra except at nit000 (=rdttra) if neuler=0
 
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   trdtx, trdty, trdt   ! use to store the temperature trends
@@ -229,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_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/NEMO/SAS_SRC/daymod.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/SAS_SRC/daymod.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/SAS_SRC/daymod.F90	(revision 6051)
@@ -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 -----------
@@ -76,12 +76,12 @@
             &           'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' )
       ENDIF
-      ! 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' )
-      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'           )
-      nsecd   = NINT(rday           )
-      nsecd05 = NINT(0.5 * rday     )
-      ndt     = NINT(      rdttra(1))
-      ndt05   = NINT(0.5 * rdttra(1))
+      ! 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( 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(      rdt    )
+      ndt05   = NINT(0.5 * rdt    )
 
       ! ==> clem: here we read the ocean restart for the date (only if it exists)
@@ -224,6 +224,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
@@ -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
                ! note this is wrong if time step has changed during run
             ENDIF
@@ -346,5 +346,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_CMCC_merge_2015/NEMOGCM/NEMO/SAS_SRC/diawri.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 6051)
@@ -36,5 +36,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
@@ -81,15 +80,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
@@ -140,5 +132,5 @@
       INTEGER  ::   ierr                                     ! error code return from allocation
       INTEGER  ::   iimi, iima, ipk, it, itmod, ijmi, ijma   ! local integers
-      REAL(wp) ::   zsto, zout, zmax, zjulian, zdt           ! local scalars
+      REAL(wp) ::   zsto, zout, zmax, zjulian                ! local scalars
       !!----------------------------------------------------------------------
       ! 
@@ -159,18 +151,16 @@
 
       ! 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)
       ENDIF
 #if defined key_diainstant
-      zsto = nwrite * zdt
+      zsto = nwrite * rdt
       clop = "inst("//TRIM(clop)//")"
 #else
-      zsto=zdt
+      zsto=rdt
       clop = "ave("//TRIM(clop)//")"
 #endif
-      zout = nwrite * zdt
-      zmax = ( nitend - nit000 + 1 ) * zdt
+      zout = nwrite * rdt
+      zmax = ( nitend - nit000 + 1 ) * rdt
 
       ! Define indices of the horizontal output zoom and vertical limit storage
@@ -214,5 +204,5 @@
          CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit
             &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       &
-            &          nit000-1, zjulian, zdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set )
+            &          nit000-1, zjulian, rdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set )
          CALL histvert( nid_T, "deptht", "Vertical T levels",      &  ! Vertical grid: gdept
             &           "m", ipk, gdept_1d, nz_T, "down" )
@@ -226,5 +216,5 @@
          CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu,           &  ! Horizontal grid: glamu and gphiu
             &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       &
-            &          nit000-1, zjulian, zdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set )
+            &          nit000-1, zjulian, rdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set )
          CALL histvert( nid_U, "depthu", "Vertical U levels",      &  ! Vertical grid: gdept
             &           "m", ipk, gdept_1d, nz_U, "down" )
@@ -238,5 +228,5 @@
          CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv,           &  ! Horizontal grid: glamv and gphiv
             &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       &
-            &          nit000-1, zjulian, zdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set )
+            &          nit000-1, zjulian, rdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set )
          CALL histvert( nid_V, "depthv", "Vertical V levels",      &  ! Vertical grid : gdept
             &          "m", ipk, gdept_1d, nz_V, "down" )
@@ -334,6 +324,4 @@
       !
    END SUBROUTINE dia_wri
-# endif
-
 #endif
 
@@ -358,5 +346,5 @@
       INTEGER  ::   id_i , nz_i, nh_i       
       INTEGER, DIMENSION(1) ::   idex             ! local workspace
-      REAL(wp) ::   zsto, zout, zmax, zjulian, zdt
+      REAL(wp) ::   zsto, zout, zmax, zjulian
       !!----------------------------------------------------------------------
       ! 
@@ -369,9 +357,8 @@
       clname = cdfile_name
       IF( .NOT. Agrif_Root() ) clname = TRIM(Agrif_CFixed())//'_'//TRIM(clname)
-      zdt  = rdt
       zsto = rdt
       clop = "inst(x)"           ! no use of the mask value (require less cpu time)
       zout = rdt
-      zmax = ( nitend - nit000 + 1 ) * zdt
+      zmax = ( nitend - nit000 + 1 ) * rdt
 
       IF(lwp) WRITE(numout,*)
@@ -388,5 +375,5 @@
       zjulian = zjulian - adatrj   !   set calendar origin to the beginning of the experiment
       CALL histbeg( clname, jpi, glamt, jpj, gphit,   &
-          1, jpi, 1, jpj, nit000-1, zjulian, zdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit
+          1, jpi, 1, jpj, nit000-1, zjulian, rdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit
       CALL histvert( id_i, "deptht", "Vertical T levels",   &    ! Vertical grid : gdept
           "m", jpk, gdept_1d, nz_i, "down")
@@ -431,5 +418,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_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 6051)
@@ -92,6 +92,6 @@
       !
       !                                                                    !   set time step size (Euler/Leapfrog)
-      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN   ;    rfact = rdttrc(1)     !  at nittrc000
-      ELSEIF( kt <= nittrc000 + nn_dttrc )                          THEN   ;    rfact = 2. * rdttrc(1)   ! at nittrc000 or nittrc000+nn_dttrc (Leapfrog)
+      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN   ;    rfact = rdttrc     !  at nittrc000
+      ELSEIF( kt <= nittrc000 + nn_dttrc )                          THEN   ;    rfact = 2. * rdttrc   ! at nittrc000 or nittrc000+nn_dttrc (Leapfrog)
       ENDIF
       !
@@ -102,5 +102,5 @@
          xstep = rfact2 / rday         ! Time step duration for biology
          IF(lwp) WRITE(numout,*) 
-         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
          IF(lwp) WRITE(numout,*)
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedrst.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedrst.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedrst.F90	(revision 6051)
@@ -60,11 +60,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_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90	(revision 6051)
@@ -32,5 +32,4 @@
 
    PUBLIC   trc_adv       
-   PUBLIC   trc_adv_alloc 
    PUBLIC   trc_adv_ini  
 
@@ -58,6 +57,6 @@
    INTEGER ::              nadv             ! chosen advection scheme
    !
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::   r2dt  ! vertical profile time-step, = 2 rdttra
-   !                                                    ! except at nitrrc000 (=rdttra) if neuler=0
+   REAL(wp) ::   r2dttrc  ! vertical profile time-step, = 2 rdt
+   !                                                    ! except at nitrrc000 (=rdt) if neuler=0
 
    !! * Substitutions
@@ -70,16 +69,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 )
@@ -103,7 +90,7 @@
       !
       IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000
-         r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping)
+         r2dttrc =  rdttrc           ! = rdttrc (use or restarting with Euler time stepping)
       ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN          ! at nittrc000 or nittrc000+1
-         r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog)
+         r2dttrc = 2. * rdttrc       ! = 2 rdttrc (leapfrog)
       ENDIF
       !                                               !==  effective transport  ==!
@@ -134,13 +121,13 @@
          CALL tra_adv_cen    ( kt, nittrc000,'TRC',       zun, zvn, zwn     , trn, tra, jptra, nn_cen_h, nn_cen_v )
       CASE ( np_FCT )                                    ! FCT      : 2nd / 4th order
-         CALL tra_adv_fct    ( kt, nittrc000,'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra, nn_fct_h, nn_fct_v )
+         CALL tra_adv_fct    ( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra, nn_fct_h, nn_fct_v )
       CASE ( np_FCT_zts )                                ! 2nd order FCT with vertical time-splitting
-         CALL tra_adv_fct_zts( kt, nittrc000,'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra        , nn_fct_zts )
+         CALL tra_adv_fct_zts( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra        , nn_fct_zts )
       CASE ( np_MUS )                                    ! MUSCL
-         CALL tra_adv_mus    ( kt, nittrc000,'TRC', r2dt, zun, zvn, zwn, trb,      tra, jptra        , ln_mus_ups ) 
+         CALL tra_adv_mus    ( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb,      tra, jptra        , ln_mus_ups ) 
       CASE ( np_UBS )                                    ! UBS
-         CALL tra_adv_ubs    ( kt, nittrc000,'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra        , nn_ubs_v   )
+         CALL tra_adv_ubs    ( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra        , nn_ubs_v   )
       CASE ( np_QCK )                                    ! QUICKEST
-         CALL tra_adv_qck    ( kt, nittrc000,'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra                     )
+         CALL tra_adv_qck    ( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra                     )
       !
       END SELECT
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90	(revision 6051)
@@ -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) ::   r2dttrc
 
    !!----------------------------------------------------------------------
@@ -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 + nn_dttrc )     THEN  ;  r2dt(:) = 2.* rdttrc(:)   ! at nit000 or nit000+1 (Leapfrog)
+      IF( neuler == 0 .AND. kt ==  nittrc000 ) THEN  ;  r2dttrc =     rdttrc   ! at nittrc000             (Euler)
+      ELSEIF( kt <= nittrc000 + nn_dttrc )     THEN  ;  r2dttrc = 2.* rdttrc   ! at nit000 or nit000+1 (Leapfrog)
       ENDIF
 
@@ -147,5 +135,5 @@
          DO jn = 1, jptra
             DO jk = 1, jpkm1
-               zfact = 1.e0 / r2dt(jk)  
+               zfact = 1.e0 / r2dttrc  
                ztrdt(:,:,jk,jn) = ( trb(:,:,jk,jn) - ztrdt(:,:,jk,jn) ) * zfact 
                CALL trd_tra( kt, 'TRC', jn, jptra_atf, ztrdt )
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 6051)
@@ -27,6 +27,4 @@
 
    PUBLIC   trc_sbc   ! routine called by step.F90
-
-   REAL(wp) ::   r2dt  !  time-step at surface
 
    !! * Substitutions
@@ -88,10 +86,10 @@
 
       IF( ln_top_euler) THEN
-         r2dt =  rdttrc(1)              ! = rdttrc (use Euler time stepping)
+         r2dt =  rdttrc              ! = rdttrc (use Euler time stepping)
       ELSE
          IF( neuler == 0 .AND. kt == nittrc000 ) THEN     ! at nittrc000
-            r2dt = rdttrc(1)           ! = rdttrc (restarting with Euler time stepping)
+            r2dt = rdttrc            ! = rdttrc (restarting with Euler time stepping)
          ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN          ! at nittrc000 or nittrc000+1
-            r2dt = 2. * rdttrc(1)       ! = 2 rdttrc (leapfrog)
+            r2dt = 2. * rdttrc       ! = 2 rdttrc (leapfrog)
          ENDIF
       ENDIF
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90	(revision 6051)
@@ -28,5 +28,4 @@
    PUBLIC   trc_zdf         ! called by step.F90 
    PUBLIC   trc_zdf_ini     ! called by nemogcm.F90 
-   PUBLIC   trc_zdf_alloc   ! called by nemogcm.F90 
    
    !                                        !!** Vertical diffusion (nam_trczdf) **
@@ -36,6 +35,6 @@
    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) ::  r2dttrc   ! vertical profile time-step, = 2 rdt
+      !                   ! except at nittrc000 (=rdt) if neuler=0
 
    !! * Substitutions
@@ -49,15 +48,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 )
@@ -77,7 +65,7 @@
       !
       IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000
-         r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping)
+         r2dttrc =  rdttrc           ! = rdttrc (use or restarting with Euler time stepping)
       ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN          ! at nittrc000 or nittrc000+1
-         r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog)
+         r2dttrc = 2. * rdttrc       ! = 2 rdttrc (leapfrog)
       ENDIF
 
@@ -88,6 +76,6 @@
 
       SELECT CASE ( nzdf )                       ! compute lateral mixing trend and add it to the general trend
-      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', r2dttrc, nn_trczdf_exp, trb, tra, jptra )    !   explicit scheme 
+      CASE ( 1 ) ;  CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc,                trb, tra, jptra )    !   implicit scheme          
       END SELECT
 
@@ -95,5 +83,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) ) / r2dttrc ) - ztrtrd(:,:,jk,jn)
             END DO
             CALL trd_tra( kt, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) )
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 6051)
@@ -330,5 +330,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 :
@@ -390,8 +390,4 @@
       !
       CHARACTER (LEN=10) ::   clvar
-#if defined key_dimgout
-      INTEGER ::   iyear,imon,iday
-      CHARACTER(LEN=80) ::   cltext, clmode
-#endif
       !!----------------------------------------------------------------------
 
@@ -774,12 +770,5 @@
       ! ======================================================================
 
-      ! IV.1 Code for dimg mpp output
-      ! -----------------------------
-
-# if defined key_dimgout
-      STOP 'Not implemented'
-# else
-      
-      ! IV.2 Code for IOIPSL/NetCDF output
+      ! IV.1 Code for IOIPSL/NetCDF output
       ! ----------------------------------
 
@@ -865,6 +854,4 @@
       icount = 1
 
-# endif /* key_dimgout */
-
       IF( MOD( itmod, nn_trd_trc ) == 0 ) THEN
          !
@@ -896,5 +883,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 :
@@ -943,8 +930,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
@@ -1055,12 +1038,5 @@
       ! ======================================================================
 
-      ! IV.1 Code for dimg mpp output
-      ! -----------------------------
-
-# if defined key_dimgout
-      STOP 'Not implemented'
-# else
-
-      ! IV.2 Code for IOIPSL/NetCDF output
+      ! IV.1 Code for IOIPSL/NetCDF output
       ! ----------------------------------
 
@@ -1107,5 +1083,4 @@
 
 
-# endif /* key_dimgout */
 
       IF( MOD( itmod, nn_trd_trc ) == 0 ) THEN
@@ -1258,7 +1233,4 @@
       ! ======================================================================
 
-#if defined key_dimgout 
-      ???
-#else
       ! clmxl = legend root for netCDF output
       IF( nn_ctls_trc == 0 ) THEN                                   ! control surface = mixed-layer with density criterion
@@ -1403,5 +1375,4 @@
 #endif
 
-#endif        /* key_dimgout */
    END SUBROUTINE trd_mxl_trc_init
 
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90	(revision 6051)
@@ -147,12 +147,4 @@
       clpath = TRIM(cn_trcrst_indir)
       IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/'
-
-      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(clpath)//TRIM(cn_trdrst_trc_in)//'.nc', EXIST = llok )
-        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
-      ENDIF
-
       CALL iom_open( TRIM(clpath)//TRIM(cn_trdrst_trc_in), inum, kiolib = jlibalt ) 
       
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trc.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trc.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trc.F90	(revision 6051)
@@ -64,5 +64,5 @@
    CHARACTER(len = 80) , PUBLIC                                    ::  cn_trcrst_out  !: suffix of pass. tracer restart name (output)
    CHARACTER(len = 256), PUBLIC                                    ::  cn_trcrst_outdir  !: restart output directory
-   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
@@ -201,5 +201,5 @@
          &      gtrui(jpi,jpj,jptra)  , gtrvi(jpi,jpj,jptra)                          ,       &
          &      sbc_trc_b(jpi,jpj,jptra), sbc_trc(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)     , qsr_mean(jpi,jpj)     ,  STAT = trc_alloc  )  
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcdia.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcdia.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcdia.F90	(revision 6051)
@@ -106,5 +106,5 @@
       CHARACTER (len=20) :: cltra, cltrau
       CHARACTER (len=80) :: cltral
-      REAL(wp) :: zsto, zout, zdt
+      REAL(wp) :: zsto, zout
       INTEGER  :: iimi, iima, ijmi, ijma, ipk, it, itmod, iiter
       !!----------------------------------------------------------------------
@@ -118,5 +118,4 @@
 
       ! Define frequency of output and means
-      zdt = rdt
       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)
@@ -126,8 +125,8 @@
       clop = "inst("//TRIM(clop)//")"
 # else
-      zsto = zdt
+      zsto = rdt
       clop = "ave("//TRIM(clop)//")"
 # endif
-      zout = nn_writetrc * zdt
+      zout = nn_writetrc * rdt
 
       ! Define indices of the horizontal output zoom and vertical limit storage
@@ -182,5 +181,5 @@
          CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,     &
             &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,         & 
-            &          iiter, zjulian, zdt, nhorit5, nit5 , domain_id=nidom, snc4chunks=snc4set)
+            &          iiter, zjulian, rdt, nhorit5, nit5 , domain_id=nidom, snc4chunks=snc4set)
 
          ! Vertical grid for tracer : gdept
@@ -250,5 +249,5 @@
       INTEGER  ::   jl
       INTEGER  ::   iimi, iima, ijmi, ijma, ipk, it, itmod, iiter
-      REAL(wp) ::   zsto, zout, zdt
+      REAL(wp) ::   zsto, zout
       !!----------------------------------------------------------------------
 
@@ -261,16 +260,15 @@
       !
       ! Define frequency of output and means
-      zdt = rdt
       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)
       ENDIF
 #  if defined key_diainstant
-      zsto = nn_writedia * zdt
+      zsto = nn_writedia * rdt
       clop = "inst("//TRIM(clop)//")"
 #  else
-      zsto = zdt
+      zsto = rdt
       clop = "ave("//TRIM(clop)//")"
 #  endif
-      zout = nn_writedia * zdt
+      zout = nn_writedia * rdt
 
       ! Define indices of the horizontal output zoom and vertical limit storage
@@ -302,5 +300,5 @@
          CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,             &
             &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,         &
-            &          iiter, zjulian, zdt, nhoritd, nitd , domain_id=nidom, snc4chunks=snc4set )
+            &          iiter, zjulian, rdt, nhoritd, nitd , domain_id=nidom, snc4chunks=snc4set )
 
          ! Vertical grid for 2d and 3d arrays
@@ -387,5 +385,5 @@
       INTEGER  ::   ji, jj, jk, jl
       INTEGER  ::   iimi, iima, ijmi, ijma, ipk, it, itmod, iiter
-      REAL(wp) ::   zsto, zout, zdt
+      REAL(wp) ::   zsto, zout
       !!----------------------------------------------------------------------
 
@@ -398,16 +396,15 @@
 
       ! Define frequency of output and means
-      zdt = rdt
       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)
       ENDIF
 #        if defined key_diainstant
-      zsto = nn_writebio * zdt
+      zsto = nn_writebio * rdt
       clop = "inst("//TRIM(clop)//")"
 #        else
-      zsto = zdt
+      zsto = rdt
       clop = "ave("//TRIM(clop)//")"
 #        endif
-      zout = nn_writebio * zdt
+      zout = nn_writebio * rdt
 
       ! Define indices of the horizontal output zoom and vertical limit storage
@@ -435,5 +432,5 @@
          CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,      &
             &    iimi, iima-iimi+1, ijmi, ijma-ijmi+1,          &
-            &    iiter, zjulian, zdt, nhoritb, nitb , domain_id=nidom, snc4chunks=snc4set )
+            &    iiter, zjulian, rdt, nhoritb, nitb , domain_id=nidom, snc4chunks=snc4set )
          ! Vertical grid for biological trends
          CALL histvert(nitb, 'deptht', 'Vertical T levels', 'm', ipk, gdept_1d, ndepitb)
Index: /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 6051)
@@ -253,8 +253,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 
@@ -265,8 +262,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_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 6051)
@@ -98,9 +98,9 @@
 
       
-      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_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 6051)
@@ -131,5 +131,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 
       ! -------------------- 
@@ -199,11 +199,4 @@
          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_indir)//'/'//TRIM(cn_trcrst_in)//'.nc', EXIST = llok )
-           IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
-         ENDIF
-
          IF( ln_rsttr ) THEN
             CALL iom_open( TRIM(cn_trcrst_indir)//'/'//cn_trcrst_in, numrtr, kiolib = jlibalt )
@@ -235,5 +228,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_CMCC_merge_2015/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena	(revision 6051)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena_xios
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena_xios	(revision 6051)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_athena_xios	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/TOOLS/NESTING/src/agrif_create_restart.f90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/TOOLS/NESTING/src/agrif_create_restart.f90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/TOOLS/NESTING/src/agrif_create_restart.f90	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/TOOLS/OBSTOOLS/src/in_out_manager.F90
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/TOOLS/OBSTOOLS/src/in_out_manager.F90	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/TOOLS/OBSTOOLS/src/in_out_manager.F90	(revision 6051)
@@ -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_CMCC_merge_2015/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg
===================================================================
--- /branches/2015/dev_CMCC_merge_2015/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg	(revision 6050)
+++ /branches/2015/dev_CMCC_merge_2015/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg	(revision 6051)
@@ -43,5 +43,4 @@
 kt           |                |      |   |                 |                                       |                                  
 rdt          |                |      |   |                 |                                       |                                  
-rdttra1      |                |      |   |                 |                                       |                                  
 utau_b       |                | XY   | U |                 |                                       |surface_downward_eastward_stress  
 vtau_b       |                | XY   | V |                 |                                       |surface_downward_northward_stress 
