Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 8793)
@@ -33,5 +33,5 @@
    USE wrk_nemo        ! work arrays
    USE iom_def, ONLY : lwxios
-   USE iom_def, ONLY : lxios_read
+   USE iom_def, ONLY : lrxios
 
    IMPLICIT NONE
@@ -257,19 +257,19 @@
            IF(lwp) WRITE(numout,*) ' dia_hsb_rst at it= ', kt,' date= ', ndastp
            IF(lwp) WRITE(numout,*) '~~~~~~~'
-           CALL iom_get( numror, 'frc_v', frc_v, ldxios = lxios_read  )
-           CALL iom_get( numror, 'frc_t', frc_t, ldxios = lxios_read )
-           CALL iom_get( numror, 'frc_s', frc_s, ldxios = lxios_read )
+           CALL iom_get( numror, 'frc_v', frc_v, ldxios = lrxios  )
+           CALL iom_get( numror, 'frc_t', frc_t, ldxios = lrxios )
+           CALL iom_get( numror, 'frc_s', frc_s, ldxios = lrxios )
            IF( ln_linssh ) THEN
-              CALL iom_get( numror, 'frc_wn_t', frc_wn_t, ldxios = lxios_read )
-              CALL iom_get( numror, 'frc_wn_s', frc_wn_s, ldxios = lxios_read )
+              CALL iom_get( numror, 'frc_wn_t', frc_wn_t, ldxios = lrxios )
+              CALL iom_get( numror, 'frc_wn_s', frc_wn_s, ldxios = lrxios )
            ENDIF
-           CALL iom_get( numror, jpdom_autoglo, 'surf_ini', surf_ini, ldxios = lxios_read ) ! ice sheet coupling
-           CALL iom_get( numror, jpdom_autoglo, 'ssh_ini', ssh_ini(:,:), ldxios = lxios_read )
-           CALL iom_get( numror, jpdom_autoglo, 'e3t_ini', e3t_ini(:,:,:), ldxios = lxios_read )
-           CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini(:,:,:), ldxios = lxios_read )
-           CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini(:,:,:), ldxios = lxios_read )
+           CALL iom_get( numror, jpdom_autoglo, 'surf_ini', surf_ini, ldxios = lrxios ) ! ice sheet coupling
+           CALL iom_get( numror, jpdom_autoglo, 'ssh_ini', ssh_ini(:,:), ldxios = lrxios )
+           CALL iom_get( numror, jpdom_autoglo, 'e3t_ini', e3t_ini(:,:,:), ldxios = lrxios )
+           CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini(:,:,:), ldxios = lrxios )
+           CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini(:,:,:), ldxios = lrxios )
            IF( ln_linssh ) THEN
-              CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:), ldxios = lxios_read )
-              CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:), ldxios = lxios_read )
+              CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:), ldxios = lrxios )
+              CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:), ldxios = lrxios )
            ENDIF
        ELSE
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 8793)
@@ -34,5 +34,5 @@
    USE restart        ! restart
    USE iom_def, ONLY : lwxios
-   USE iom_def, ONLY : lxios_read
+   USE iom_def, ONLY : lrxios
 
    IMPLICIT NONE
@@ -328,5 +328,5 @@
          IF( iom_varid( numror, 'kt', ldstop = .FALSE. ) > 0 ) THEN
             ! Get Calendar informations
-            CALL iom_get( numror, 'kt', zkt, ldxios = lxios_read )   ! last time-step of previous run
+            CALL iom_get( numror, 'kt', zkt, ldxios = lrxios )   ! last time-step of previous run
             IF(lwp) THEN
                WRITE(numout,*) ' *** Info read in restart : '
@@ -347,8 +347,8 @@
             IF ( nrstdt == 2 ) THEN
                ! read the parameters corresponding to nit000 - 1 (last time step of previous run)
-               CALL iom_get( numror, 'ndastp', zndastp, ldxios = lxios_read )
+               CALL iom_get( numror, 'ndastp', zndastp, ldxios = lrxios )
                ndastp = NINT( zndastp )
-               CALL iom_get( numror, 'adatrj', adatrj, ldxios = lxios_read )
-	       CALL iom_get( numror, 'ntime', ktime, ldxios = lxios_read )
+               CALL iom_get( numror, 'adatrj', adatrj, ldxios = lrxios )
+	       CALL iom_get( numror, 'ntime', ktime, ldxios = lrxios )
 	       nn_time0=INT(ktime)
                ! calculate start time in hours and minutes
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 8793)
@@ -49,5 +49,5 @@
    USE iom_def, ONLY:lwxios, nxioso, rst_wfields ! write restart flag and output type
    USE iom, ONLY : iom_set_rst_vars, iom_set_rstw_core
-   USE iom_def, ONLY : lxios_read
+   USE iom_def, ONLY : lrxios
 
    IMPLICIT NONE
@@ -365,5 +365,5 @@
       neuler = nn_euler
       IF( TRIM(Agrif_CFixed()) == '0') THEN 
-       lxios_read = ln_xios_read.AND.ln_rstart
+       lrxios = ln_xios_read.AND.ln_rstart
       ENDIF
       IF ( neuler == 1 .AND. .NOT. ln_rstart ) THEN
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 8793)
@@ -33,5 +33,5 @@
    USE wrk_nemo        ! Memory allocation
    USE timing          ! Timing
-   USE iom_def, ONLY : lxios_read, lwxios
+   USE iom_def, ONLY : lrxios, lwxios
 
    IMPLICIT NONE
@@ -818,5 +818,5 @@
          IF( ln_rstart ) THEN                   !* Read the restart file
             CALL rst_read_open                  !  open the restart file if necessary
-            CALL iom_get( numror, jpdom_autoglo, 'sshn'   , sshn, ldxios = lxios_read    )
+            CALL iom_get( numror, jpdom_autoglo, 'sshn'   , sshn, ldxios = lrxios    )
             !
             id1 = iom_varid( numror, 'e3t_b', ldstop = .FALSE. )
@@ -829,6 +829,6 @@
             !                             ! --------- !
             IF( MIN( id1, id2 ) > 0 ) THEN       ! all required arrays exist
-               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lxios_read )
-               CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:), ldxios = lxios_read )
+               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lrxios )
+               CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:), ldxios = lrxios )
                ! needed to restart if land processor not computed 
                IF(lwp) write(numout,*) 'dom_vvl_rst : e3t_b and e3t_n found in restart files'
@@ -844,5 +844,5 @@
                IF(lwp) write(numout,*) 'e3t_n set equal to e3t_b.'
                IF(lwp) write(numout,*) 'neuler is forced to 0'
-               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lxios_read )
+               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lrxios )
                e3t_n(:,:,:) = e3t_b(:,:,:)
                neuler = 0
@@ -851,5 +851,5 @@
                IF(lwp) write(numout,*) 'e3t_b set equal to e3t_n.'
                IF(lwp) write(numout,*) 'neuler is forced to 0'
-               CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:), ldxios = lxios_read )
+               CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:), ldxios = lrxios )
                e3t_b(:,:,:) = e3t_n(:,:,:)
                neuler = 0
@@ -876,6 +876,6 @@
                !                          ! ----------------------- !
                IF( MIN( id3, id4 ) > 0 ) THEN  ! all required arrays exist
-                  CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lxios_read )
-                  CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lxios_read )
+                  CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios )
+                  CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lrxios )
                ELSE                            ! one at least array is missing
                   tilde_e3t_b(:,:,:) = 0.0_wp
@@ -886,5 +886,5 @@
                   !                       ! ------------ !
                   IF( id5 > 0 ) THEN  ! required array exists
-                     CALL iom_get( numror, jpdom_autoglo, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lxios_read )
+                     CALL iom_get( numror, jpdom_autoglo, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lrxios )
                   ELSE                ! array is missing
                      hdiv_lf(:,:,:) = 0.0_wp
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/iscplrst.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/iscplrst.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DOM/iscplrst.F90	(revision 8793)
@@ -25,5 +25,5 @@
    USE iscplini        ! ice sheet coupling: initialisation
    USE iscplhsb        ! ice sheet coupling: conservation
-   USE iom_def, ONLY : lxios_read
+   USE iom_def, ONLY : lrxios
 
    IMPLICIT NONE
@@ -65,12 +65,12 @@
 
       !! get restart variable
-      CALL iom_get( numror, jpdom_autoglo, 'tmask'  , ztmask_b, ldxios = lxios_read   ) ! need to extrapolate T/S
-      CALL iom_get( numror, jpdom_autoglo, 'umask'  , zumask_b, ldxios = lxios_read   ) ! need to correct barotropic velocity
-      CALL iom_get( numror, jpdom_autoglo, 'vmask'  , zvmask_b, ldxios = lxios_read   ) ! need to correct barotropic velocity
-      CALL iom_get( numror, jpdom_autoglo, 'smask'  , zsmask_b, ldxios = lxios_read   ) ! need to correct barotropic velocity
-      CALL iom_get( numror, jpdom_autoglo, 'e3t_n'  , ze3t_b(:,:,:), ldxios = lxios_read )  ! need to compute temperature correction
-      CALL iom_get( numror, jpdom_autoglo, 'e3u_n'  , ze3u_b(:,:,:), ldxios = lxios_read )  ! need to correct barotropic velocity
-      CALL iom_get( numror, jpdom_autoglo, 'e3v_n'  , ze3v_b(:,:,:), ldxios = lxios_read )  ! need to correct barotropic velocity
-      CALL iom_get( numror, jpdom_autoglo, 'gdepw_n', zdepw_b(:,:,:), ldxios = lxios_read ) ! need to interpol vertical profile (vvl)
+      CALL iom_get( numror, jpdom_autoglo, 'tmask'  , ztmask_b, ldxios = lrxios   ) ! need to extrapolate T/S
+      CALL iom_get( numror, jpdom_autoglo, 'umask'  , zumask_b, ldxios = lrxios   ) ! need to correct barotropic velocity
+      CALL iom_get( numror, jpdom_autoglo, 'vmask'  , zvmask_b, ldxios = lrxios   ) ! need to correct barotropic velocity
+      CALL iom_get( numror, jpdom_autoglo, 'smask'  , zsmask_b, ldxios = lrxios   ) ! need to correct barotropic velocity
+      CALL iom_get( numror, jpdom_autoglo, 'e3t_n'  , ze3t_b(:,:,:), ldxios = lrxios )  ! need to compute temperature correction
+      CALL iom_get( numror, jpdom_autoglo, 'e3u_n'  , ze3u_b(:,:,:), ldxios = lrxios )  ! need to correct barotropic velocity
+      CALL iom_get( numror, jpdom_autoglo, 'e3v_n'  , ze3v_b(:,:,:), ldxios = lrxios )  ! need to correct barotropic velocity
+      CALL iom_get( numror, jpdom_autoglo, 'gdepw_n', zdepw_b(:,:,:), ldxios = lrxios ) ! need to interpol vertical profile (vvl)
 
       !! read namelist
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 8793)
@@ -56,5 +56,5 @@
    USE asminc          ! Assimilation increment
 #endif
-   USE iom_def, ONLY : lxios_read, lwxios
+   USE iom_def, ONLY : lrxios, lwxios
 
 
@@ -1199,19 +1199,19 @@
       !
       IF( TRIM(cdrw) == 'READ' ) THEN
-         CALL iom_get( numror, jpdom_autoglo, 'ub2_b'  , ub2_b  (:,:), ldxios = lxios_read )   
-         CALL iom_get( numror, jpdom_autoglo, 'vb2_b'  , vb2_b  (:,:), ldxios = lxios_read ) 
+         CALL iom_get( numror, jpdom_autoglo, 'ub2_b'  , ub2_b  (:,:), ldxios = lrxios )   
+         CALL iom_get( numror, jpdom_autoglo, 'vb2_b'  , vb2_b  (:,:), ldxios = lrxios ) 
          IF( .NOT.ln_bt_av ) THEN
-            CALL iom_get( numror, jpdom_autoglo, 'sshbb_e'  , sshbb_e(:,:), ldxios = lxios_read )   
-            CALL iom_get( numror, jpdom_autoglo, 'ubb_e'    ,   ubb_e(:,:), ldxios = lxios_read )   
-            CALL iom_get( numror, jpdom_autoglo, 'vbb_e'    ,   vbb_e(:,:), ldxios = lxios_read )
-            CALL iom_get( numror, jpdom_autoglo, 'sshb_e'   ,  sshb_e(:,:), ldxios = lxios_read ) 
-            CALL iom_get( numror, jpdom_autoglo, 'ub_e'     ,    ub_e(:,:), ldxios = lxios_read )   
-            CALL iom_get( numror, jpdom_autoglo, 'vb_e'     ,    vb_e(:,:), ldxios = lxios_read )
+            CALL iom_get( numror, jpdom_autoglo, 'sshbb_e'  , sshbb_e(:,:), ldxios = lrxios )   
+            CALL iom_get( numror, jpdom_autoglo, 'ubb_e'    ,   ubb_e(:,:), ldxios = lrxios )   
+            CALL iom_get( numror, jpdom_autoglo, 'vbb_e'    ,   vbb_e(:,:), ldxios = lrxios )
+            CALL iom_get( numror, jpdom_autoglo, 'sshb_e'   ,  sshb_e(:,:), ldxios = lrxios ) 
+            CALL iom_get( numror, jpdom_autoglo, 'ub_e'     ,    ub_e(:,:), ldxios = lrxios )   
+            CALL iom_get( numror, jpdom_autoglo, 'vb_e'     ,    vb_e(:,:), ldxios = lrxios )
          ENDIF
 #if defined key_agrif
          ! Read time integrated fluxes
          IF ( .NOT.Agrif_Root() ) THEN
-            CALL iom_get( numror, jpdom_autoglo, 'ub2_i_b'  , ub2_i_b(:,:), ldxios = lxios_read )   
-            CALL iom_get( numror, jpdom_autoglo, 'vb2_i_b'  , vb2_i_b(:,:), ldxios = lxios_read )
+            CALL iom_get( numror, jpdom_autoglo, 'ub2_i_b'  , ub2_i_b(:,:), ldxios = lrxios )   
+            CALL iom_get( numror, jpdom_autoglo, 'vb2_i_b'  , vb2_i_b(:,:), ldxios = lrxios )
          ENDIF
 #endif
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90	(revision 8793)
@@ -44,11 +44,12 @@
    INTEGER, PARAMETER, PUBLIC ::   jpmax_digits =  5   !: maximum number of digits for the cpu number in the file name
 
+
 !$AGRIF_DO_NOT_TREAT
    INTEGER, PUBLIC            ::   iom_open_init = 0   !: used to initialize iom_file(:)%nfid to 0
 !XIOS write restart   
-   LOGICAL, PUBLIC            ::   lwxios          !: read single file restart using XIOS
+   LOGICAL, PUBLIC            ::   lwxios          !: write single file restart using XIOS
    INTEGER, PUBLIC            ::   nxioso          !: type of restart file when writing using XIOS 1 - single, 2 - multiple
 !XIOS read restart   
-   LOGICAL, PUBLIC            ::   lxios_read          !: read single file restart using XIOS
+   LOGICAL, PUBLIC            ::   lrxios          !: read single file restart using XIOS
    LOGICAL, PUBLIC            ::   lxios_sini = .FALSE. ! is restart in a single file
    LOGICAL, PUBLIC            ::   lxios_set  = .FALSE. 
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 8793)
@@ -218,6 +218,6 @@
 ! can handle checking if variable is in the restart file (there will be no need to open
 ! restart)
-         IF(.NOT.lxios_set) lxios_read = lxios_read.AND.lxios_sini
-         IF( lxios_read) THEN
+         IF(.NOT.lxios_set) lrxios = lrxios.AND.lxios_sini
+         IF( lrxios) THEN
            crxios_context = 'nemo_rst'
          if(.NOT.lxios_set) then
@@ -227,5 +227,5 @@
          endif
          ENDIF
-         IF( TRIM(Agrif_CFixed()) /= '0' .AND. lxios_read) THEN
+         IF( TRIM(Agrif_CFixed()) /= '0' .AND. lrxios) THEN
             CALL iom_init( crxios_context )
             IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for AGRIF'
@@ -256,15 +256,15 @@
       ! Check dynamics and tracer time-step consistency and force Euler restart if changed
       IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 )   THEN
-         CALL iom_get( numror, 'rdt', zrdt, ldxios = lxios_read )
+         CALL iom_get( numror, 'rdt', zrdt, ldxios = lrxios )
          IF( zrdt /= rdt )   neuler = 0
       ENDIF
 
       ! Diurnal DSST 
-      IF( ln_diurnal ) CALL iom_get( numror, jpdom_autoglo, 'Dsst' , x_dsst, ldxios = lxios_read ) 
+      IF( ln_diurnal ) CALL iom_get( numror, jpdom_autoglo, 'Dsst' , x_dsst, ldxios = lrxios ) 
       IF ( ln_diurnal_only ) THEN 
          IF(lwp) WRITE( numout, * ) &
          &   "rst_read:- ln_diurnal_only set, setting rhop=rau0" 
          rhop = rau0
-         CALL iom_get( numror, jpdom_autoglo, 'tn'     , w3d, ldxios = lxios_read ) 
+         CALL iom_get( numror, jpdom_autoglo, 'tn'     , w3d, ldxios = lrxios ) 
          tsn(:,:,1,jp_tem) = w3d(:,:,1)
          RETURN 
@@ -272,20 +272,20 @@
       
       IF( iom_varid( numror, 'ub', ldstop = .FALSE. ) > 0 ) THEN
-         CALL iom_get( numror, jpdom_autoglo, 'ub'     , ub, ldxios = lxios_read                )   ! before fields
-         CALL iom_get( numror, jpdom_autoglo, 'vb'     , vb, ldxios = lxios_read                )
-         CALL iom_get( numror, jpdom_autoglo, 'tb'     , tsb(:,:,:,jp_tem), ldxios = lxios_read )
-         CALL iom_get( numror, jpdom_autoglo, 'sb'     , tsb(:,:,:,jp_sal), ldxios = lxios_read )
-         CALL iom_get( numror, jpdom_autoglo, 'sshb'   , sshb, ldxios = lxios_read              )
+         CALL iom_get( numror, jpdom_autoglo, 'ub'     , ub, ldxios = lrxios                )   ! before fields
+         CALL iom_get( numror, jpdom_autoglo, 'vb'     , vb, ldxios = lrxios                )
+         CALL iom_get( numror, jpdom_autoglo, 'tb'     , tsb(:,:,:,jp_tem), ldxios = lrxios )
+         CALL iom_get( numror, jpdom_autoglo, 'sb'     , tsb(:,:,:,jp_sal), ldxios = lrxios )
+         CALL iom_get( numror, jpdom_autoglo, 'sshb'   , sshb, ldxios = lrxios              )
       ELSE
          neuler = 0
       ENDIF
       !
-      CALL iom_get( numror, jpdom_autoglo, 'un'     , un, ldxios = lxios_read )   ! now    fields
-      CALL iom_get( numror, jpdom_autoglo, 'vn'     , vn, ldxios = lxios_read )
-      CALL iom_get( numror, jpdom_autoglo, 'tn'     , tsn(:,:,:,jp_tem), ldxios = lxios_read )
-      CALL iom_get( numror, jpdom_autoglo, 'sn'     , tsn(:,:,:,jp_sal), ldxios = lxios_read )
-      CALL iom_get( numror, jpdom_autoglo, 'sshn'   , sshn, ldxios = lxios_read )
+      CALL iom_get( numror, jpdom_autoglo, 'un'     , un, ldxios = lrxios )   ! now    fields
+      CALL iom_get( numror, jpdom_autoglo, 'vn'     , vn, ldxios = lrxios )
+      CALL iom_get( numror, jpdom_autoglo, 'tn'     , tsn(:,:,:,jp_tem), ldxios = lrxios )
+      CALL iom_get( numror, jpdom_autoglo, 'sn'     , tsn(:,:,:,jp_sal), ldxios = lrxios )
+      CALL iom_get( numror, jpdom_autoglo, 'sshn'   , sshn, ldxios = lrxios )
       IF( iom_varid( numror, 'rhop', ldstop = .FALSE. ) > 0 ) THEN
-         CALL iom_get( numror, jpdom_autoglo, 'rhop'   , rhop, ldxios = lxios_read )   ! now    potential density
+         CALL iom_get( numror, jpdom_autoglo, 'rhop'   , rhop, ldxios = lrxios )   ! now    potential density
       ELSE
          CALL eos( tsn, rhd, rhop, gdept_n(:,:,:) )   
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 8793)
@@ -66,5 +66,5 @@
       CHARACTER(len=100) ::  cn_dir   ! Root directory for location of ssr files
       TYPE(FLD_N)        ::  sn_apr   ! informations about the fields to be read
-      LOGICAL            ::  lxios_read ! read restart using XIOS?
+      LOGICAL            ::  lrxios ! read restart using XIOS?
       !!
       NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rn_pref, ln_apr_obc
@@ -157,5 +157,5 @@
          IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN 
             IF(lwp) WRITE(numout,*) 'sbc_apr:   ssh_ibb read in the restart file'
-            CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb, ldxios = lxios_read )   ! before inv. barometer ssh
+            CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb, ldxios = lrxios )   ! before inv. barometer ssh
             !
          ELSE                                         !* no restart: set from nit000 values
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90	(revision 8793)
@@ -27,5 +27,5 @@
    USE timing          ! Timing
    USE lib_fortran     ! glob_sum
-   USE iom_def, ONLY : lxios_read, lwxios
+   USE iom_def, ONLY : lrxios, lwxios
 
    IMPLICIT NONE
@@ -219,7 +219,7 @@
                  & iom_varid( numror, 'fwf_isf_b', ldstop = .FALSE. ) > 0 ) THEN
                IF(lwp) WRITE(numout,*) '          nit000-1 isf tracer content forcing fields read in the restart file'
-               CALL iom_get( numror, jpdom_autoglo, 'fwf_isf_b', fwfisf_b(:,:), ldxios = lxios_read )   ! before salt content isf_tsc trend
-               CALL iom_get( numror, jpdom_autoglo, 'isf_sc_b', risf_tsc_b(:,:,jp_sal), ldxios = lxios_read )   ! before salt content isf_tsc trend
-               CALL iom_get( numror, jpdom_autoglo, 'isf_hc_b', risf_tsc_b(:,:,jp_tem), ldxios = lxios_read )   ! before salt content isf_tsc trend
+               CALL iom_get( numror, jpdom_autoglo, 'fwf_isf_b', fwfisf_b(:,:), ldxios = lrxios )   ! before salt content isf_tsc trend
+               CALL iom_get( numror, jpdom_autoglo, 'isf_sc_b', risf_tsc_b(:,:,jp_sal), ldxios = lrxios )   ! before salt content isf_tsc trend
+               CALL iom_get( numror, jpdom_autoglo, 'isf_hc_b', risf_tsc_b(:,:,jp_tem), ldxios = lrxios )   ! before salt content isf_tsc trend
            ELSE
                fwfisf_b(:,:)    = fwfisf(:,:)
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 8793)
@@ -58,5 +58,5 @@
 
    USE diurnal_bulk, ONLY:   ln_diurnal_only   ! diurnal SST diagnostic
-   USE iom_def, ONLY : lxios_read, lwxios
+   USE iom_def, ONLY : lrxios, lwxios
 
    IMPLICIT NONE
@@ -468,13 +468,13 @@
             & iom_varid( numror, 'utau_b', ldstop = .FALSE. ) > 0 ) THEN
             IF(lwp) WRITE(numout,*) '          nit000-1 surface forcing fields red in the restart file'
-            CALL iom_get( numror, jpdom_autoglo, 'utau_b', utau_b, ldxios = lxios_read )   ! before i-stress  (U-point)
-            CALL iom_get( numror, jpdom_autoglo, 'vtau_b', vtau_b, ldxios = lxios_read )   ! before j-stress  (V-point)
-            CALL iom_get( numror, jpdom_autoglo, 'qns_b' , qns_b, ldxios = lxios_read  )   ! before non solar heat flux (T-point)
+            CALL iom_get( numror, jpdom_autoglo, 'utau_b', utau_b, ldxios = lrxios )   ! before i-stress  (U-point)
+            CALL iom_get( numror, jpdom_autoglo, 'vtau_b', vtau_b, ldxios = lrxios )   ! before j-stress  (V-point)
+            CALL iom_get( numror, jpdom_autoglo, 'qns_b' , qns_b, ldxios = lrxios  )   ! before non solar heat flux (T-point)
             ! The 3D heat content due to qsr forcing is treated in traqsr
-            ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b, ldxios = lxios_read  ) ! before     solar heat flux (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'emp_b', emp_b, ldxios = lxios_read  )    ! before     freshwater flux (T-point)
+            ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b, ldxios = lrxios  ) ! before     solar heat flux (T-point)
+            CALL iom_get( numror, jpdom_autoglo, 'emp_b', emp_b, ldxios = lrxios  )    ! before     freshwater flux (T-point)
             ! To ensure restart capability with 3.3x/3.4 restart files    !! to be removed in v3.6
             IF( iom_varid( numror, 'sfx_b', ldstop = .FALSE. ) > 0 ) THEN
-               CALL iom_get( numror, jpdom_autoglo, 'sfx_b', sfx_b, ldxios = lxios_read )  ! before salt flux (T-point)
+               CALL iom_get( numror, jpdom_autoglo, 'sfx_b', sfx_b, ldxios = lrxios )  ! before salt flux (T-point)
             ELSE
                sfx_b (:,:) = sfx(:,:)
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 8793)
@@ -28,5 +28,5 @@
    USE lib_mpp        ! MPP library
    USE wrk_nemo       ! Memory allocation
-   USE iom_def, ONLY : lxios_read, lwxios
+   USE iom_def, ONLY : lrxios, lwxios
 
    IMPLICIT NONE
@@ -148,8 +148,8 @@
          IF( ln_rstart .AND.    &                               !* Restart: read in restart file
             & iom_varid( numror, 'rnf_b', ldstop = .FALSE. ) > 0 ) THEN
-            IF(lwp) WRITE(numout,*) '          nit000-1 runoff forcing fields red in the restart file', lxios_read
-            CALL iom_get( numror, jpdom_autoglo, 'rnf_b', rnf_b, ldxios = lxios_read )     ! before runoff
-            CALL iom_get( numror, jpdom_autoglo, 'rnf_hc_b', rnf_tsc_b(:,:,jp_tem), ldxios = lxios_read )   ! before heat content of runoff
-            CALL iom_get( numror, jpdom_autoglo, 'rnf_sc_b', rnf_tsc_b(:,:,jp_sal), ldxios = lxios_read )   ! before salinity content of runoff
+            IF(lwp) WRITE(numout,*) '          nit000-1 runoff forcing fields red in the restart file', lrxios
+            CALL iom_get( numror, jpdom_autoglo, 'rnf_b', rnf_b, ldxios = lrxios )     ! before runoff
+            CALL iom_get( numror, jpdom_autoglo, 'rnf_hc_b', rnf_tsc_b(:,:,jp_tem), ldxios = lrxios )   ! before heat content of runoff
+            CALL iom_get( numror, jpdom_autoglo, 'rnf_sc_b', rnf_tsc_b(:,:,jp_sal), ldxios = lrxios )   ! before salinity content of runoff
          ELSE                                                   !* no restart: set from nit000 values
             IF(lwp) WRITE(numout,*) '          nit000-1 runoff forcing fields set to nit000'
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 8793)
@@ -22,5 +22,5 @@
    USE prtctl         ! Print control
    USE iom            ! IOM library
-   USE iom_def, ONLY : lxios_read, lwxios
+   USE iom_def, ONLY : lrxios, lwxios
 
    IMPLICIT NONE
@@ -209,15 +209,15 @@
          IF( ln_rstart .AND. iom_varid( numror, 'nn_fsbc', ldstop = .FALSE. ) > 0 ) THEN
             l_ssm_mean = .TRUE.
-            CALL iom_get( numror               , 'nn_fsbc', zf_sbc, ldxios = lxios_read )    ! sbc frequency of previous run
-            CALL iom_get( numror, jpdom_autoglo, 'ssu_m'  , ssu_m, ldxios = lxios_read  )    ! sea surface mean velocity    (U-point)
-            CALL iom_get( numror, jpdom_autoglo, 'ssv_m'  , ssv_m, ldxios = lxios_read  )    !   "         "    velocity    (V-point)
-            CALL iom_get( numror, jpdom_autoglo, 'sst_m'  , sst_m, ldxios = lxios_read  )    !   "         "    temperature (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'sss_m'  , sss_m, ldxios = lxios_read  )    !   "         "    salinity    (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'ssh_m'  , ssh_m, ldxios = lxios_read  )    !   "         "    height      (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'e3t_m'  , e3t_m, ldxios = lxios_read  )    ! 1st level thickness          (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'e3t_m', e3t_m, ldxios = lxios_read )
+            CALL iom_get( numror               , 'nn_fsbc', zf_sbc, ldxios = lrxios )    ! sbc frequency of previous run
+            CALL iom_get( numror, jpdom_autoglo, 'ssu_m'  , ssu_m, ldxios = lrxios  )    ! sea surface mean velocity    (U-point)
+            CALL iom_get( numror, jpdom_autoglo, 'ssv_m'  , ssv_m, ldxios = lrxios  )    !   "         "    velocity    (V-point)
+            CALL iom_get( numror, jpdom_autoglo, 'sst_m'  , sst_m, ldxios = lrxios  )    !   "         "    temperature (T-point)
+            CALL iom_get( numror, jpdom_autoglo, 'sss_m'  , sss_m, ldxios = lrxios  )    !   "         "    salinity    (T-point)
+            CALL iom_get( numror, jpdom_autoglo, 'ssh_m'  , ssh_m, ldxios = lrxios  )    !   "         "    height      (T-point)
+            CALL iom_get( numror, jpdom_autoglo, 'e3t_m'  , e3t_m, ldxios = lrxios  )    ! 1st level thickness          (T-point)
+            CALL iom_get( numror, jpdom_autoglo, 'e3t_m', e3t_m, ldxios = lrxios )
             ! fraction of solar net radiation absorbed in 1st T level
             IF( iom_varid( numror, 'frq_m', ldstop = .FALSE. ) > 0 ) THEN
-               CALL iom_get( numror, jpdom_autoglo, 'frq_m'  , frq_m, ldxios = lxios_read  )
+               CALL iom_get( numror, jpdom_autoglo, 'frq_m'  , frq_m, ldxios = lrxios  )
             ELSE
                frq_m(:,:) = 1._wp   ! default definition
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 8793)
@@ -36,5 +36,5 @@
    USE wrk_nemo       ! Memory Allocation
    USE timing         ! Timing
-   USE iom_def, ONLY : lxios_read, lwxios
+   USE iom_def, ONLY : lrxios, lwxios
    IMPLICIT NONE
    PRIVATE
@@ -139,5 +139,5 @@
             IF(lwp) WRITE(numout,*) '          nit000-1 qsr tracer content forcing field read in the restart file'
             z1_2 = 0.5_wp
-            CALL iom_get( numror, jpdom_autoglo, 'qsr_hc_b', qsr_hc_b, ldxios = lxios_read )   ! before heat content trend due to Qsr flux
+            CALL iom_get( numror, jpdom_autoglo, 'qsr_hc_b', qsr_hc_b, ldxios = lrxios )   ! before heat content trend due to Qsr flux
          ELSE                                           ! No restart or restart not found: Euler forward time stepping
             z1_2 = 1._wp
@@ -432,5 +432,5 @@
       ! 1st ocean level attenuation coefficient (used in sbcssm)
       IF( iom_varid( numror, 'fraqsr_1lev', ldstop = .FALSE. ) > 0 ) THEN
-         CALL iom_get( numror, jpdom_autoglo, 'fraqsr_1lev'  , fraqsr_1lev, ldxios = lxios_read  )
+         CALL iom_get( numror, jpdom_autoglo, 'fraqsr_1lev'  , fraqsr_1lev, ldxios = lrxios  )
       ELSE
          fraqsr_1lev(:,:) = 1._wp   ! default : no penetration
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 8793)
@@ -34,5 +34,5 @@
    USE wrk_nemo       ! Memory Allocation
    USE timing         ! Timing
-   USE iom_def, ONLY : lxios_read, lwxios
+   USE iom_def, ONLY : lrxios, lwxios
 
    IMPLICIT NONE
@@ -109,6 +109,6 @@
             zfact = 0.5_wp
             sbc_tsc(:,:,:) = 0._wp
-            CALL iom_get( numror, jpdom_autoglo, 'sbc_hc_b', sbc_tsc_b(:,:,jp_tem), ldxios = lxios_read )   ! before heat content sbc trend
-            CALL iom_get( numror, jpdom_autoglo, 'sbc_sc_b', sbc_tsc_b(:,:,jp_sal), ldxios = lxios_read )   ! before salt content sbc trend
+            CALL iom_get( numror, jpdom_autoglo, 'sbc_hc_b', sbc_tsc_b(:,:,jp_tem), ldxios = lrxios )   ! before heat content sbc trend
+            CALL iom_get( numror, jpdom_autoglo, 'sbc_sc_b', sbc_tsc_b(:,:,jp_sal), ldxios = lrxios )   ! before salt content sbc trend
          ELSE                                   ! No restart or restart not found: Euler forward time stepping
             zfact = 1._wp
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 8793)
@@ -34,5 +34,5 @@
    USE timing         ! Timing
    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
-   USE iom_def, ONLY : lxios_read, lwxios
+   USE iom_def, ONLY : lrxios, lwxios
 
    IMPLICIT NONE
@@ -1185,10 +1185,10 @@
             !
             IF( MIN( id1, id2, id3, id4, id5, id6 ) > 0 ) THEN        ! all required arrays exist
-               CALL iom_get( numror, jpdom_autoglo, 'en'    , en, ldxios = lxios_read     )
-               CALL iom_get( numror, jpdom_autoglo, 'avt'   , avt, ldxios = lxios_read    )
-               CALL iom_get( numror, jpdom_autoglo, 'avm'   , avm, ldxios = lxios_read    )
-               CALL iom_get( numror, jpdom_autoglo, 'avmu'  , avmu, ldxios = lxios_read   )
-               CALL iom_get( numror, jpdom_autoglo, 'avmv'  , avmv, ldxios = lxios_read   )
-               CALL iom_get( numror, jpdom_autoglo, 'mxln'  , mxln, ldxios = lxios_read   )
+               CALL iom_get( numror, jpdom_autoglo, 'en'    , en, ldxios = lrxios     )
+               CALL iom_get( numror, jpdom_autoglo, 'avt'   , avt, ldxios = lrxios    )
+               CALL iom_get( numror, jpdom_autoglo, 'avm'   , avm, ldxios = lrxios    )
+               CALL iom_get( numror, jpdom_autoglo, 'avmu'  , avmu, ldxios = lrxios   )
+               CALL iom_get( numror, jpdom_autoglo, 'avmv'  , avmv, ldxios = lrxios   )
+               CALL iom_get( numror, jpdom_autoglo, 'mxln'  , mxln, ldxios = lrxios   )
             ELSE                        
                IF(lwp) WRITE(numout,*) ' ===>>>> : previous run without gls scheme, en and mxln computed by iterative loop'
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 8793)
@@ -28,5 +28,5 @@
    USE iom             ! IOM library
    USE lib_mpp         ! distribued memory computing
-   USE iom_def, ONLY : lxios_read
+   USE iom_def, ONLY : lrxios
 
    IMPLICIT NONE
@@ -160,6 +160,6 @@
          ! file in traadv_cen2 end read here. 
          IF( iom_varid( numror, 'avmb', ldstop = .FALSE. ) > 0 ) THEN
-            CALL iom_get( numror, jpdom_unknown, 'avmb', avmb, ldxios = lxios_read )
-            CALL iom_get( numror, jpdom_unknown, 'avtb', avtb, ldxios = lxios_read )
+            CALL iom_get( numror, jpdom_unknown, 'avmb', avmb, ldxios = lrxios )
+            CALL iom_get( numror, jpdom_unknown, 'avtb', avtb, ldxios = lrxios )
          ENDIF
       ENDIF
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 8793)
@@ -58,5 +58,5 @@
    USE agrif_opa_update
 #endif
-   USE iom_def, ONLY : lxios_read
+   USE iom_def, ONLY : lrxios
 
    IMPLICIT NONE
@@ -856,11 +856,11 @@
            !
            IF( id1 > 0 ) THEN                       ! 'en' exists
-              CALL iom_get( numror, jpdom_autoglo, 'en', en, ldxios = lxios_read )
+              CALL iom_get( numror, jpdom_autoglo, 'en', en, ldxios = lrxios )
               IF( MIN( id2, id3, id4, id5, id6 ) > 0 ) THEN        ! all required arrays exist
-                 CALL iom_get( numror, jpdom_autoglo, 'avt'  , avt, ldxios = lxios_read   )
-                 CALL iom_get( numror, jpdom_autoglo, 'avm'  , avm, ldxios = lxios_read   )
-                 CALL iom_get( numror, jpdom_autoglo, 'avmu' , avmu, ldxios = lxios_read  )
-                 CALL iom_get( numror, jpdom_autoglo, 'avmv' , avmv, ldxios = lxios_read  )
-                 CALL iom_get( numror, jpdom_autoglo, 'dissl', dissl, ldxios = lxios_read )
+                 CALL iom_get( numror, jpdom_autoglo, 'avt'  , avt, ldxios = lrxios   )
+                 CALL iom_get( numror, jpdom_autoglo, 'avm'  , avm, ldxios = lrxios   )
+                 CALL iom_get( numror, jpdom_autoglo, 'avmu' , avmu, ldxios = lrxios  )
+                 CALL iom_get( numror, jpdom_autoglo, 'avmv' , avmv, ldxios = lrxios  )
+                 CALL iom_get( numror, jpdom_autoglo, 'dissl', dissl, ldxios = lrxios )
               ELSE                                                 ! one at least array is missing
                  CALL tke_avn                                          ! compute avt, avm, avmu, avmv and dissl (approximation)
Index: /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 8792)
+++ /branches/2017/dev_r8600_xios_read_write/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 8793)
@@ -345,5 +345,5 @@
       IF( kstp == nitend .OR. indic < 0 ) THEN 
                       CALL iom_context_finalize(      cxios_context          ) ! needed for XIOS+AGRIF
-                      IF(lxios_read) CALL iom_context_finalize(      crxios_context          )
+                      IF(lrxios) CALL iom_context_finalize(      crxios_context          )
          IF( ln_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) ! 
       ENDIF
