Index: trunk/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- trunk/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 550)
+++ trunk/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 556)
@@ -16,5 +16,4 @@
    USE par_oce
    USE lib_print         ! formated print library
-   USE iom_def           ! iom variables definitions
 
    IMPLICIT NONE
@@ -26,5 +25,4 @@
    CHARACTER (len=16) ::   cexper     = "exp0"    !: experiment name used for output filename
    LOGICAL            ::   ln_rstart  = .FALSE.   !: start from (F) rest or (T) a restart file
-   LOGICAL            ::   ln_ctl     = .FALSE.   !: run control for debugging
    INTEGER            ::   no         = 0         !: job number
    INTEGER            ::   nrstdt     = 0         !: control of the time step (0, 1 or 2)
@@ -34,9 +32,8 @@
    INTEGER            ::   nleapy     = 0         !: Leap year calendar flag (0/1 or 30)
    INTEGER            ::   ninist     = 0         !: initial state output flag (0/1)
-   INTEGER            ::   nbench     = 0         !: benchmark parameter (0/1)
-   
    !!----------------------------------------------------------------------
    !!                    output monitoring
    !!----------------------------------------------------------------------
+   LOGICAL            ::   ln_ctl     = .FALSE.   !: run control for debugging
    INTEGER            ::   nstock     =   10      !: restart file frequency
    INTEGER            ::   nprint     =    0      !: level of print (0 no print)
@@ -49,5 +46,6 @@
    INTEGER            ::   jsplt      =    1      !: number of processors following j
    INTEGER            ::   ijsplt     =    1      !: nb of local domain = nb of processors
-
+   INTEGER            ::   nbench     =    0      !: benchmark parameter (0/1)
+   INTEGER            ::   nbit_cmp   =    0      !: bit reproducibility  (0/1)
    !!----------------------------------------------------------------------
    !!                        logical units
Index: trunk/NEMO/OPA_SRC/IOM/iom.F90
===================================================================
--- trunk/NEMO/OPA_SRC/IOM/iom.F90	(revision 550)
+++ trunk/NEMO/OPA_SRC/IOM/iom.F90	(revision 556)
@@ -25,5 +25,5 @@
 
    IMPLICIT NONE
-   PRIVATE
+   PUBLIC   !   must be public to be able to access iom_def through iom
    
    PUBLIC iom_open, iom_close, iom_varid, iom_get, iom_gettime, iom_rstput
@@ -36,5 +36,4 @@
    END INTERFACE
 
-   INTEGER ::   iom_init = 0 ! 
    !!----------------------------------------------------------------------
    !!  OPA 9.0 , LOCEAN-IPSL (2006)
@@ -675,5 +674,5 @@
       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
       CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name
-      REAL(wp)        , INTENT(in)                         ::   pvar     ! read field
+      REAL(wp)        , INTENT(in)                         ::   pvar     ! written field
       INTEGER         , INTENT(in), OPTIONAL               ::   ktype    ! variable external type
       INTEGER :: ivid   ! variable id
@@ -695,5 +694,5 @@
       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
       CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name
-      REAL(wp)        , INTENT(in), DIMENSION(        jpk) ::   pvar     ! read field
+      REAL(wp)        , INTENT(in), DIMENSION(        jpk) ::   pvar     ! written field
       INTEGER         , INTENT(in), OPTIONAL               ::   ktype    ! variable external type
       INTEGER :: ivid   ! variable id
@@ -715,5 +714,5 @@
       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
       CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name
-      REAL(wp)        , INTENT(in), DIMENSION(jpi,jpj    ) ::   pvar     ! read field
+      REAL(wp)        , INTENT(in), DIMENSION(jpi,jpj    ) ::   pvar     ! written field
       INTEGER         , INTENT(in), OPTIONAL               ::   ktype    ! variable external type
       INTEGER :: ivid   ! variable id
@@ -735,5 +734,5 @@
       INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
       CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name
-      REAL(wp)        , INTENT(in), DIMENSION(jpi,jpj,jpk) ::   pvar     ! read field
+      REAL(wp)        , INTENT(in), DIMENSION(jpi,jpj,jpk) ::   pvar     ! written field
       INTEGER         , INTENT(in), OPTIONAL               ::   ktype    ! variable external type
       INTEGER :: ivid   ! variable id
Index: trunk/NEMO/OPA_SRC/IOM/iom_def.F90
===================================================================
--- trunk/NEMO/OPA_SRC/IOM/iom_def.F90	(revision 550)
+++ trunk/NEMO/OPA_SRC/IOM/iom_def.F90	(revision 556)
@@ -6,4 +6,10 @@
    !! History :  9.0  ! 06 09  (S. Masson) Original code
    !!--------------------------------------------------------------------
+   !!---------------------------------------------------------------------------------
+   !! OPA 9.0 , LOCEAN-IPSL (2006) 
+   !! $Header$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!---------------------------------------------------------------------------------
+
    USE par_kind
 
@@ -19,7 +25,7 @@
    INTEGER, PARAMETER, PUBLIC ::   jpdom_unknown       = 7   !: No dimension checking
 
-   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
+   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
@@ -28,9 +34,9 @@
 #endif
 
-   INTEGER, PARAMETER, PUBLIC ::   jp_r8    = 200     !: 
-   INTEGER, PARAMETER, PUBLIC ::   jp_r4    = 201     !: 
-   INTEGER, PARAMETER, PUBLIC ::   jp_i4    = 202     !: 
-   INTEGER, PARAMETER, PUBLIC ::   jp_i2    = 203     !: 
-   INTEGER, PARAMETER, PUBLIC ::   jp_i1    = 204     !: 
+   INTEGER, PARAMETER, PUBLIC ::   jp_r8    = 200      !: write REAL(8)
+   INTEGER, PARAMETER, PUBLIC ::   jp_r4    = 201      !: write REAL(4)
+   INTEGER, PARAMETER, PUBLIC ::   jp_i4    = 202      !: write INTEGER(4)
+   INTEGER, PARAMETER, PUBLIC ::   jp_i2    = 203      !: write INTEGER(2)
+   INTEGER, PARAMETER, PUBLIC ::   jp_i1    = 204      !: write INTEGER(1)
 
    INTEGER, PARAMETER, PUBLIC ::   jpmax_files  = 20   !: maximum number of simultaneously opened file
@@ -39,6 +45,7 @@
    INTEGER, PARAMETER, PUBLIC ::   jpmax_digits =  5   !: maximum number of digits for the cpu number in the file name
 
+   INTEGER, PUBLIC            ::   iom_init = 0        !: used to initialize iom_file(:)%nfid to 0
 !$AGRIF_DO_NOT_TREAT
-   TYPE, PUBLIC ::   flio_file
+   TYPE, PUBLIC ::   file_descriptor
       CHARACTER(LEN=240)                        ::   name     !: name of the file
       INTEGER                                   ::   nfid     !: identifier of the file (0 if closed)
@@ -54,6 +61,6 @@
       REAL(kind=wp), DIMENSION(jpmax_vars)      ::   scf      !: scale_factor of the variables
       REAL(kind=wp), DIMENSION(jpmax_vars)      ::   ofs      !: add_offset of the variables
-   END TYPE flio_file
-   TYPE(flio_file), DIMENSION(jpmax_files), PUBLIC ::   iom_file !: array containing the info for all opened files
+   END TYPE file_descriptor
+   TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC ::   iom_file !: array containing the info for all opened files
 !$AGRIF_END_DO_NOT_TREAT
 
Index: trunk/NEMO/OPA_SRC/IOM/iom_ioipsl.F90
===================================================================
--- trunk/NEMO/OPA_SRC/IOM/iom_ioipsl.F90	(revision 550)
+++ trunk/NEMO/OPA_SRC/IOM/iom_ioipsl.F90	(revision 556)
@@ -20,4 +20,5 @@
    USE dom_oce         ! ocean space and time domain
    USE lbclnk          ! lateal boundary condition / mpp exchanges
+   USE iom_def         ! iom variables definitions
    USE ioipsl          ! IOIPSL library
 
@@ -298,8 +299,8 @@
       INTEGER                         , INTENT(in)           ::   kvid     ! variable id
       INTEGER                         , INTENT(in), OPTIONAL ::   ktype    ! variable type (default R8)
-      REAL(wp)                        , INTENT(in), OPTIONAL ::   pv_r0d   ! read field
-      REAL(wp), DIMENSION(        jpk), INTENT(in), OPTIONAL ::   pv_r1d   ! read field
-      REAL(wp), DIMENSION(jpi,jpj    ), INTENT(in), OPTIONAL ::   pv_r2d   ! read field
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   pv_r3d   ! read field
+      REAL(wp)                        , INTENT(in), OPTIONAL ::   pv_r0d   ! written Od field
+      REAL(wp), DIMENSION(        jpk), INTENT(in), OPTIONAL ::   pv_r1d   ! written 1d field
+      REAL(wp), DIMENSION(jpi,jpj    ), INTENT(in), OPTIONAL ::   pv_r2d   ! written 2d field
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   pv_r3d   ! written 3d field
       !
       INTEGER               :: idims                ! number of dimension
Index: trunk/NEMO/OPA_SRC/IOM/iom_nf90.F90
===================================================================
--- trunk/NEMO/OPA_SRC/IOM/iom_nf90.F90	(revision 550)
+++ trunk/NEMO/OPA_SRC/IOM/iom_nf90.F90	(revision 556)
@@ -20,4 +20,5 @@
    USE dom_oce         ! ocean space and time domain
    USE lbclnk          ! lateal boundary condition / mpp exchanges
+   USE iom_def         ! iom variables definitions
    USE netcdf          ! NetCDF library
 
@@ -315,8 +316,8 @@
       INTEGER                         , INTENT(in)           ::   kvid     ! variable id
       INTEGER                         , INTENT(in), OPTIONAL ::   ktype    ! variable type (default R8)
-      REAL(wp)                        , INTENT(in), OPTIONAL ::   pv_r0d   ! read field
-      REAL(wp), DIMENSION(        jpk), INTENT(in), OPTIONAL ::   pv_r1d   ! read field
-      REAL(wp), DIMENSION(jpi,jpj    ), INTENT(in), OPTIONAL ::   pv_r2d   ! read field
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   pv_r3d   ! read field
+      REAL(wp)                        , INTENT(in), OPTIONAL ::   pv_r0d   ! written Od field
+      REAL(wp), DIMENSION(        jpk), INTENT(in), OPTIONAL ::   pv_r1d   ! written 1d field
+      REAL(wp), DIMENSION(jpi,jpj    ), INTENT(in), OPTIONAL ::   pv_r2d   ! written 2d field
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   pv_r3d   ! written 3d field
       !
       INTEGER               :: idims                ! number of dimension
Index: trunk/NEMO/OPA_SRC/IOM/iom_rstdimg.F90
===================================================================
--- trunk/NEMO/OPA_SRC/IOM/iom_rstdimg.F90	(revision 550)
+++ trunk/NEMO/OPA_SRC/IOM/iom_rstdimg.F90	(revision 556)
@@ -18,4 +18,5 @@
    USE dom_oce         ! ocean space and time domain
    USE lbclnk          ! lateal boundary condition / mpp exchanges
+   USE iom_def         ! iom variables definitions
 
    IMPLICIT NONE
@@ -297,5 +298,5 @@
       INTEGER                   , INTENT(in) ::   kiomid   ! Identifier of the file 
       CHARACTER(len=*)          , INTENT(in) ::   cdvar    ! time axis name
-      REAL(wp)                  , INTENT(in) ::   pv_r0d   ! read field
+      REAL(wp)                  , INTENT(in) ::   pv_r0d   ! written 0d field
       !
       CHARACTER(LEN=100) ::   clinfo     ! info character
@@ -410,7 +411,7 @@
       INTEGER                         , INTENT(in)           ::   kiomid   ! Identifier of the file 
       CHARACTER(len=*)                , INTENT(in)           ::   cdvar    ! time axis name
-      REAL(wp), DIMENSION(        jpk), INTENT(in), OPTIONAL ::   pv_r1d   ! read field
-      REAL(wp), DIMENSION(jpi,jpj    ), INTENT(in), OPTIONAL ::   pv_r2d   ! read field
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   pv_r3d   ! read field
+      REAL(wp), DIMENSION(        jpk), INTENT(in), OPTIONAL ::   pv_r1d   ! written 1d field
+      REAL(wp), DIMENSION(jpi,jpj    ), INTENT(in), OPTIONAL ::   pv_r2d   ! written 2d field
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   pv_r3d   ! written 3d field
       !
       CHARACTER(LEN=100)    ::   clinfo               ! info character
