Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 8668)
@@ -256,19 +256,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, lrxios = lxios_read  )
-           CALL iom_get( numror, 'frc_t', frc_t, lrxios = lxios_read )
-           CALL iom_get( numror, 'frc_s', frc_s, lrxios = lxios_read )
+           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 )
            IF( ln_linssh ) THEN
-              CALL iom_get( numror, 'frc_wn_t', frc_wn_t, lrxios = lxios_read )
-              CALL iom_get( numror, 'frc_wn_s', frc_wn_s, lrxios = lxios_read )
+              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 )
            ENDIF
-           CALL iom_get( numror, jpdom_autoglo, 'surf_ini', surf_ini, lrxios = lxios_read ) ! ice sheet coupling
-           CALL iom_get( numror, jpdom_autoglo, 'ssh_ini', ssh_ini(:,:), lrxios = lxios_read )
-           CALL iom_get( numror, jpdom_autoglo, 'e3t_ini', e3t_ini(:,:,:), lrxios = lxios_read )
-           CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini(:,:,:), lrxios = lxios_read )
-           CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini(:,:,:), lrxios = lxios_read )
+           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 )
            IF( ln_linssh ) THEN
-              CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:), lrxios = lxios_read )
-              CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:), lrxios = lxios_read )
+              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 )
            ENDIF
        ELSE
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 8668)
@@ -319,5 +319,5 @@
          IF( iom_varid( numror, 'kt', ldstop = .FALSE. ) > 0 ) THEN
             ! Get Calendar informations
-            CALL iom_get( numror, 'kt', zkt, lrxios = lxios_read )   ! last time-step of previous run
+            CALL iom_get( numror, 'kt', zkt, ldxios = lxios_read )   ! last time-step of previous run
             IF(lwp) THEN
                WRITE(numout,*) ' *** Info read in restart : '
@@ -338,8 +338,8 @@
             IF ( nrstdt == 2 ) THEN
                ! read the parameters corresponding to nit000 - 1 (last time step of previous run)
-               CALL iom_get( numror, 'ndastp', zndastp, lrxios = lxios_read )
+               CALL iom_get( numror, 'ndastp', zndastp, ldxios = lxios_read )
                ndastp = NINT( zndastp )
-               CALL iom_get( numror, 'adatrj', adatrj, lrxios = lxios_read )
-	       CALL iom_get( numror, 'ntime', ktime, lrxios = lxios_read )
+               CALL iom_get( numror, 'adatrj', adatrj, ldxios = lxios_read )
+	       CALL iom_get( numror, 'ntime', ktime, ldxios = lxios_read )
 	       nn_time0=INT(ktime)
                ! calculate start time in hours and minutes
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 8668)
@@ -800,5 +800,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, lrxios = lxios_read    )
+            CALL iom_get( numror, jpdom_autoglo, 'sshn'   , sshn, ldxios = lxios_read    )
             !
             id1 = iom_varid( numror, 'e3t_b', ldstop = .FALSE. )
@@ -811,6 +811,6 @@
             !                             ! --------- !
             IF( MIN( id1, id2 ) > 0 ) THEN       ! all required arrays exist
-               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), lrxios = lxios_read )
-               CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:), lrxios = lxios_read )
+               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 )
                ! needed to restart if land processor not computed 
                IF(lwp) write(numout,*) 'dom_vvl_rst : e3t_b and e3t_n found in restart files'
@@ -826,5 +826,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(:,:,:), lrxios = lxios_read )
+               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lxios_read )
                e3t_n(:,:,:) = e3t_b(:,:,:)
                neuler = 0
@@ -833,5 +833,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(:,:,:), lrxios = lxios_read )
+               CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:), ldxios = lxios_read )
                e3t_b(:,:,:) = e3t_n(:,:,:)
                neuler = 0
@@ -858,6 +858,6 @@
                !                          ! ----------------------- !
                IF( MIN( id3, id4 ) > 0 ) THEN  ! all required arrays exist
-                  CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_b', tilde_e3t_b(:,:,:), lrxios = lxios_read )
-                  CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_n', tilde_e3t_n(:,:,:), lrxios = lxios_read )
+                  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 )
                ELSE                            ! one at least array is missing
                   tilde_e3t_b(:,:,:) = 0.0_wp
@@ -868,5 +868,5 @@
                   !                       ! ------------ !
                   IF( id5 > 0 ) THEN  ! required array exists
-                     CALL iom_get( numror, jpdom_autoglo, 'hdiv_lf', hdiv_lf(:,:,:), lrxios = lxios_read )
+                     CALL iom_get( numror, jpdom_autoglo, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lxios_read )
                   ELSE                ! array is missing
                      hdiv_lf(:,:,:) = 0.0_wp
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DOM/iscplrst.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DOM/iscplrst.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DOM/iscplrst.F90	(revision 8668)
@@ -65,12 +65,12 @@
 
       !! get restart variable
-      CALL iom_get( numror, jpdom_autoglo, 'tmask'  , ztmask_b, lrxios = lxios_read   ) ! need to extrapolate T/S
-      CALL iom_get( numror, jpdom_autoglo, 'umask'  , zumask_b, lrxios = lxios_read   ) ! need to correct barotropic velocity
-      CALL iom_get( numror, jpdom_autoglo, 'vmask'  , zvmask_b, lrxios = lxios_read   ) ! need to correct barotropic velocity
-      CALL iom_get( numror, jpdom_autoglo, 'smask'  , zsmask_b, lrxios = lxios_read   ) ! need to correct barotropic velocity
-      CALL iom_get( numror, jpdom_autoglo, 'e3t_n'  , ze3t_b(:,:,:), lrxios = lxios_read )  ! need to compute temperature correction
-      CALL iom_get( numror, jpdom_autoglo, 'e3u_n'  , ze3u_b(:,:,:), lrxios = lxios_read )  ! need to correct barotropic velocity
-      CALL iom_get( numror, jpdom_autoglo, 'e3v_n'  , ze3v_b(:,:,:), lrxios = lxios_read )  ! need to correct barotropic velocity
-      CALL iom_get( numror, jpdom_autoglo, 'gdepw_n', zdepw_b(:,:,:), lrxios = lxios_read ) ! need to interpol vertical profile (vvl)
+      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)
 
       !! read namelist
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 8668)
@@ -1199,19 +1199,19 @@
       !
       IF( TRIM(cdrw) == 'READ' ) THEN
-         CALL iom_get( numror, jpdom_autoglo, 'ub2_b'  , ub2_b  (:,:), lrxios = lxios_read )   
-         CALL iom_get( numror, jpdom_autoglo, 'vb2_b'  , vb2_b  (:,:), lrxios = lxios_read ) 
+         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 ) 
          IF( .NOT.ln_bt_av ) THEN
-            CALL iom_get( numror, jpdom_autoglo, 'sshbb_e'  , sshbb_e(:,:), lrxios = lxios_read )   
-            CALL iom_get( numror, jpdom_autoglo, 'ubb_e'    ,   ubb_e(:,:), lrxios = lxios_read )   
-            CALL iom_get( numror, jpdom_autoglo, 'vbb_e'    ,   vbb_e(:,:), lrxios = lxios_read )
-            CALL iom_get( numror, jpdom_autoglo, 'sshb_e'   ,  sshb_e(:,:), lrxios = lxios_read ) 
-            CALL iom_get( numror, jpdom_autoglo, 'ub_e'     ,    ub_e(:,:), lrxios = lxios_read )   
-            CALL iom_get( numror, jpdom_autoglo, 'vb_e'     ,    vb_e(:,:), lrxios = lxios_read )
+            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 )
          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(:,:), lrxios = lxios_read )   
-            CALL iom_get( numror, jpdom_autoglo, 'vb2_i_b'  , vb2_i_b(:,:), lrxios = lxios_read )
+            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 )
          ENDIF
 #endif
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 8668)
@@ -151,5 +151,5 @@
    LOGICAL       ::   lsp_area = .TRUE.     !: to make a control print over a specific area
    CHARACTER(lc) ::   cxios_context         !: context name used in xios
-   CHARACTER(lc) ::   rxios_context         !: context name used in xios to read restart
+   CHARACTER(lc) ::   crxios_context         !: context name used in xios to read restart
 
    !!----------------------------------------------------------------------
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 8668)
@@ -106,5 +106,5 @@
       CHARACTER(len=10) :: clname
       INTEGER           :: ji, jkmin
-      LOGICAL :: lrst_context              ! is context related to restart
+      LOGICAL :: llrst_context              ! is context related to restart
       !
       REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zt_bnds, zw_bnds
@@ -117,5 +117,5 @@
       CALL xios_context_initialize(TRIM(clname), mpi_comm_opa)
       CALL iom_swap( cdname )
-      lrst_context =  (TRIM(cdname) == TRIM(rxios_context))
+      llrst_context =  (TRIM(cdname) == TRIM(crxios_context))
 
       ! Calendar type is now defined in xml file 
@@ -130,5 +130,5 @@
 
       ! horizontal grid definition
-      IF(.NOT.lrst_context) CALL set_scalar
+      IF(.NOT.llrst_context) CALL set_scalar
 
       IF( TRIM(cdname) == TRIM(cxios_context) ) THEN  
@@ -162,5 +162,5 @@
          CALL dom_grid_glo   ! Return to parent grid domain
          !
-         IF( ln_cfmeta .AND. TRIM(cdname) .NE. TRIM(rxios_context)) THEN   ! Add additional grid metadata
+         IF( ln_cfmeta .AND. TRIM(cdname) .NE. TRIM(crxios_context)) THEN   ! Add additional grid metadata
             CALL iom_set_domain_attr("grid_T", area = e1e2t_crs(nldi:nlei, nldj:nlej))
             CALL iom_set_domain_attr("grid_U", area = e1u_crs(nldi:nlei, nldj:nlej) * e2u_crs(nldi:nlei, nldj:nlej))
@@ -175,5 +175,5 @@
 
       ! vertical grid definition
-      IF(.NOT.lrst_context) THEN
+      IF(.NOT.llrst_context) THEN
           CALL iom_set_axis_attr( "deptht", paxis = gdept_1d )
           CALL iom_set_axis_attr( "depthu", paxis = gdept_1d )
@@ -206,5 +206,5 @@
       ENDIF   
       ! automatic definitions of some of the xml attributs
-      IF( lrst_context ) THEN
+      IF( llrst_context ) THEN
 !set names of the fields in restart file IF using XIOS to read/write data
        CALL set_rst_context()
@@ -724,10 +724,10 @@
    !!                   INTERFACE iom_get
    !!----------------------------------------------------------------------
-   SUBROUTINE iom_g0d( kiomid, cdvar, pvar, ktime, lrxios )
+   SUBROUTINE iom_g0d( kiomid, cdvar, pvar, ktime, ldxios )
       INTEGER         , INTENT(in   )                 ::   kiomid    ! Identifier of the file
       CHARACTER(len=*), INTENT(in   )                 ::   cdvar     ! Name of the variable
       REAL(wp)        , INTENT(  out)                 ::   pvar      ! read field
       INTEGER         , INTENT(in   ),     OPTIONAL   ::   ktime     ! record number
-      LOGICAL         , INTENT(in   ),     OPTIONAL   ::   lrxios    ! use xios to read restart
+      LOGICAL         , INTENT(in   ),     OPTIONAL   ::   ldxios    ! use xios to read restart
       !
       INTEGER                                         ::   idvar     ! variable id
@@ -737,10 +737,10 @@
       CHARACTER(LEN=100)                              ::   clname    ! file name
       CHARACTER(LEN=1)                                ::   cldmspc   !
-      LOGICAL                                         ::   lxios
-      !
-      lxios = .FALSE.
-      IF( PRESENT(lrxios) ) lxios = lrxios
-
-      IF(.NOT.lxios) THEN  ! read data using default library
+      LOGICAL                                         ::   llxios
+      !
+      llxios = .FALSE.
+      IF( PRESENT(ldxios) ) llxios = ldxios
+
+      IF(.NOT.llxios) THEN  ! read data using default library
          itime = 1
          IF( PRESENT(ktime) ) itime = ktime
@@ -767,5 +767,5 @@
       ELSE
          IF(lwp) WRITE(numout,*) 'XIOS RST READ (0D): ', trim(cdvar)
-         CALL iom_swap( TRIM(rxios_context) )
+         CALL iom_swap( TRIM(crxios_context) )
          CALL xios_recv_field( trim(cdvar), pvar)
          CALL iom_swap( TRIM(cxios_context) )
@@ -773,5 +773,5 @@
    END SUBROUTINE iom_g0d
 
-   SUBROUTINE iom_g1d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, lrxios )
+   SUBROUTINE iom_g1d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, ldxios )
       INTEGER         , INTENT(in   )                         ::   kiomid    ! Identifier of the file
       INTEGER         , INTENT(in   )                         ::   kdom      ! Type of domain to be read
@@ -781,14 +781,14 @@
       INTEGER         , INTENT(in   ), DIMENSION(1), OPTIONAL ::   kstart    ! start axis position of the reading 
       INTEGER         , INTENT(in   ), DIMENSION(1), OPTIONAL ::   kcount    ! number of points in each axis
-      LOGICAL         , INTENT(in   ),               OPTIONAL ::   lrxios    ! read data using XIOS
+      LOGICAL         , INTENT(in   ),               OPTIONAL ::   ldxios    ! read data using XIOS
       !
       IF( kiomid > 0 ) THEN
          IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom       , cdvar        , pv_r1d=pvar,   &
               &                                                     ktime=ktime, kstart=kstart, kcount=kcount, &
-              &                                                     lrxios=lrxios )
+              &                                                     ldxios=ldxios )
       ENDIF
    END SUBROUTINE iom_g1d
 
-   SUBROUTINE iom_g2d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, lrowattr, lrxios)
+   SUBROUTINE iom_g2d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, lrowattr, ldxios)
       INTEGER         , INTENT(in   )                           ::   kiomid    ! Identifier of the file
       INTEGER         , INTENT(in   )                           ::   kdom      ! Type of domain to be read
@@ -802,14 +802,14 @@
                                                                                ! called open_ocean_jstart to set the start
                                                                                ! value for the 2nd dimension (netcdf only)
-      LOGICAL         , INTENT(in   ),                 OPTIONAL ::   lrxios    ! read data using XIOS
+      LOGICAL         , INTENT(in   ),                 OPTIONAL ::   ldxios    ! read data using XIOS
       !
       IF( kiomid > 0 ) THEN
          IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom       , cdvar        , pv_r2d=pvar,   &
               &                                                     ktime=ktime, kstart=kstart, kcount=kcount, &
-              &                                                     lrowattr=lrowattr,  lrxios=lrxios)
+              &                                                     lrowattr=lrowattr,  ldxios=ldxios)
       ENDIF
    END SUBROUTINE iom_g2d
 
-   SUBROUTINE iom_g3d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, lrowattr, lrxios )
+   SUBROUTINE iom_g3d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, lrowattr, ldxios )
       INTEGER         , INTENT(in   )                             ::   kiomid    ! Identifier of the file
       INTEGER         , INTENT(in   )                             ::   kdom      ! Type of domain to be read
@@ -823,10 +823,10 @@
                                                                                  ! called open_ocean_jstart to set the start
                                                                                  ! value for the 2nd dimension (netcdf only)
-      LOGICAL         , INTENT(in   ),                   OPTIONAL ::   lrxios    ! read data using XIOS
+      LOGICAL         , INTENT(in   ),                   OPTIONAL ::   ldxios    ! read data using XIOS
       !
       IF( kiomid > 0 ) THEN
          IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom       , cdvar        , pv_r3d=pvar,   &
               &                                                     ktime=ktime, kstart=kstart, kcount=kcount, &
-              &                                                     lrowattr=lrowattr, lrxios=lrxios )
+              &                                                     lrowattr=lrowattr, ldxios=ldxios )
       ENDIF
    END SUBROUTINE iom_g3d
@@ -836,5 +836,5 @@
          &                  pv_r1d, pv_r2d, pv_r3d,   &
          &                  ktime , kstart, kcount,   &
-         &                  lrowattr, lrxios        )
+         &                  lrowattr, ldxios        )
       !!-----------------------------------------------------------------------
       !!                  ***  ROUTINE  iom_get_123d  ***
@@ -857,7 +857,7 @@
                                                                            ! called open_ocean_jstart to set the start
                                                                            ! value for the 2nd dimension (netcdf only)
-      LOGICAL                    , INTENT(in   ), OPTIONAL ::   lrxios     ! use XIOS to read restart
-      !
-      LOGICAL                        ::   lxios       ! local definition for XIOS read
+      LOGICAL                    , INTENT(in   ), OPTIONAL ::   ldxios     ! use XIOS to read restart
+      !
+      LOGICAL                        ::   llxios       ! local definition for XIOS read
       LOGICAL                        ::   llnoov      ! local definition to read overlap
       LOGICAL                        ::   luse_jattr  ! local definition to read open_ocean_jstart file attribute
@@ -887,10 +887,10 @@
       !
       REAL(wp)                       :: gma, gmi
-      lxios = .FALSE.
-      if(PRESENT(lrxios)) lxios = lrxios
+      llxios = .FALSE.
+      if(PRESENT(ldxios)) llxios = ldxios
       idvar = iom_varid( kiomid, cdvar ) 
       idom = kdom
 
-      IF(.NOT.lxios) THEN
+      IF(.NOT.llxios) THEN
           clname = iom_file(kiomid)%name   !   esier to read
           clinfo = '          iom_get_123d, file: '//trim(clname)//', var: '//trim(cdvar)
@@ -1123,5 +1123,5 @@
 #if defined key_iomput
 !would be good to be able to check which context is active and swap only if current is not restart
-          CALL iom_swap( TRIM(rxios_context) ) 
+          CALL iom_swap( TRIM(crxios_context) ) 
           IF( PRESENT(pv_r3d) ) THEN
              if(lwp) write(numout,*) 'XIOS RST READ (3D): ',trim(cdvar)
@@ -1626,5 +1626,5 @@
 
 
-   SUBROUTINE set_grid( cdgrd, plon, plat, lxios )
+   SUBROUTINE set_grid( cdgrd, plon, plat, ldxios )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE set_grid  ***
@@ -1639,5 +1639,5 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zmask
       INTEGER  :: ni,nj
-      LOGICAL, INTENT(IN) :: lxios
+      LOGICAL, INTENT(IN) :: ldxios
       
       ni=nlei-nldi+1 ; nj=nlej-nldj+1
@@ -1648,5 +1648,5 @@
          &                                     latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /)))  
 
-      IF ( ln_mskland.AND.(.NOT.lxios) ) THEN
+      IF ( ln_mskland.AND.(.NOT.ldxios) ) THEN
          ! mask land points, keep values on coast line -> specific mask for U, V and W points
          SELECT CASE ( cdgrd )
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 8668)
@@ -202,13 +202,13 @@
          IF(.NOT.lxios_set) lxios_read = lxios_read.AND.lxios_sini
          IF( lxios_read) THEN
-           rxios_context = 'nemo_rst'
+           crxios_context = 'nemo_rst'
          if(.NOT.lxios_set) then
              IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS'
-             CALL iom_init( rxios_context )
+             CALL iom_init( crxios_context )
              lxios_set = .TRUE.
          endif
          ENDIF
          IF( TRIM(Agrif_CFixed()) /= '0' .AND. lxios_read) THEN
-            CALL iom_init( rxios_context )
+            CALL iom_init( crxios_context )
             IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for AGRIF'
             lxios_set = .TRUE.
@@ -237,35 +237,35 @@
       ! 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, lrxios = lxios_read )
+         CALL iom_get( numror, 'rdt', zrdt, ldxios = lxios_read )
          IF( zrdt /= rdt )   neuler = 0
       ENDIF
 
       ! Diurnal DSST 
-      IF( ln_diurnal ) CALL iom_get( numror, jpdom_autoglo, 'Dsst' , x_dsst, lrxios = lxios_read ) 
+      IF( ln_diurnal ) CALL iom_get( numror, jpdom_autoglo, 'Dsst' , x_dsst, ldxios = lxios_read ) 
       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'     , tsn(:,:,1,jp_tem), lrxios = lxios_read ) 
+         CALL iom_get( numror, jpdom_autoglo, 'tn'     , tsn(:,:,1,jp_tem), ldxios = lxios_read ) 
          RETURN 
       ENDIF  
       
       IF( iom_varid( numror, 'ub', ldstop = .FALSE. ) > 0 ) THEN
-         CALL iom_get( numror, jpdom_autoglo, 'ub'     , ub, lrxios = lxios_read                )   ! before fields
-         CALL iom_get( numror, jpdom_autoglo, 'vb'     , vb, lrxios = lxios_read                )
-         CALL iom_get( numror, jpdom_autoglo, 'tb'     , tsb(:,:,:,jp_tem), lrxios = lxios_read )
-         CALL iom_get( numror, jpdom_autoglo, 'sb'     , tsb(:,:,:,jp_sal), lrxios = lxios_read )
-         CALL iom_get( numror, jpdom_autoglo, 'sshb'   , sshb, lrxios = lxios_read              )
+         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              )
       ELSE
          neuler = 0
       ENDIF
       !
-      CALL iom_get( numror, jpdom_autoglo, 'un'     , un, lrxios = lxios_read )   ! now    fields
-      CALL iom_get( numror, jpdom_autoglo, 'vn'     , vn, lrxios = lxios_read )
-      CALL iom_get( numror, jpdom_autoglo, 'tn'     , tsn(:,:,:,jp_tem), lrxios = lxios_read )
-      CALL iom_get( numror, jpdom_autoglo, 'sn'     , tsn(:,:,:,jp_sal), lrxios = lxios_read )
-      CALL iom_get( numror, jpdom_autoglo, 'sshn'   , sshn, lrxios = lxios_read )
+      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 )
       IF( iom_varid( numror, 'rhop', ldstop = .FALSE. ) > 0 ) THEN
-         CALL iom_get( numror, jpdom_autoglo, 'rhop'   , rhop, lrxios = lxios_read )   ! now    potential density
+         CALL iom_get( numror, jpdom_autoglo, 'rhop'   , rhop, ldxios = lxios_read )   ! now    potential density
       ELSE
          CALL eos( tsn, rhd, rhop, gdept_n(:,:,:) )   
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 8668)
@@ -153,5 +153,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, lrxios = lxios_read )   ! before inv. barometer ssh
+            CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb, ldxios = lxios_read )   ! before inv. barometer ssh
             !
          ELSE                                         !* no restart: set from nit000 values
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90	(revision 8668)
@@ -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(:,:), lrxios = lxios_read )   ! before salt content isf_tsc trend
-               CALL iom_get( numror, jpdom_autoglo, 'isf_sc_b', risf_tsc_b(:,:,jp_sal), lrxios = lxios_read )   ! before salt content isf_tsc trend
-               CALL iom_get( numror, jpdom_autoglo, 'isf_hc_b', risf_tsc_b(:,:,jp_tem), lrxios = lxios_read )   ! before salt content isf_tsc trend
+               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
            ELSE
                fwfisf_b(:,:)    = fwfisf(:,:)
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 8668)
@@ -458,13 +458,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, lrxios = lxios_read )   ! before i-stress  (U-point)
-            CALL iom_get( numror, jpdom_autoglo, 'vtau_b', vtau_b, lrxios = lxios_read )   ! before j-stress  (V-point)
-            CALL iom_get( numror, jpdom_autoglo, 'qns_b' , qns_b, lrxios = lxios_read  )   ! before non solar heat flux (T-point)
+            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)
             ! The 3D heat content due to qsr forcing is treated in traqsr
-            ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b, lrxios = lxios_read  ) ! before     solar heat flux (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'emp_b', emp_b, lrxios = lxios_read  )    ! before     freshwater flux (T-point)
+            ! 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)
             ! 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, lrxios = lxios_read )  ! before salt flux (T-point)
+               CALL iom_get( numror, jpdom_autoglo, 'sfx_b', sfx_b, ldxios = lxios_read )  ! before salt flux (T-point)
             ELSE
                sfx_b (:,:) = sfx(:,:)
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 8668)
@@ -149,7 +149,7 @@
             & 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, lrxios = lxios_read )     ! before runoff
-            CALL iom_get( numror, jpdom_autoglo, 'rnf_hc_b', rnf_tsc_b(:,:,jp_tem), lrxios = lxios_read )   ! before heat content of runoff
-            CALL iom_get( numror, jpdom_autoglo, 'rnf_sc_b', rnf_tsc_b(:,:,jp_sal), lrxios = lxios_read )   ! before salinity content of runoff
+            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
          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/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 8668)
@@ -207,15 +207,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, lrxios = lxios_read )    ! sbc frequency of previous run
-            CALL iom_get( numror, jpdom_autoglo, 'ssu_m'  , ssu_m, lrxios = lxios_read  )    ! sea surface mean velocity    (U-point)
-            CALL iom_get( numror, jpdom_autoglo, 'ssv_m'  , ssv_m, lrxios = lxios_read  )    !   "         "    velocity    (V-point)
-            CALL iom_get( numror, jpdom_autoglo, 'sst_m'  , sst_m, lrxios = lxios_read  )    !   "         "    temperature (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'sss_m'  , sss_m, lrxios = lxios_read  )    !   "         "    salinity    (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'ssh_m'  , ssh_m, lrxios = lxios_read  )    !   "         "    height      (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'e3t_m'  , e3t_m, lrxios = lxios_read  )    ! 1st level thickness          (T-point)
-            CALL iom_get( numror, jpdom_autoglo, 'e3t_m', e3t_m, lrxios = lxios_read )
+            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 )
             ! 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, lrxios = lxios_read  )
+               CALL iom_get( numror, jpdom_autoglo, 'frq_m'  , frq_m, ldxios = lxios_read  )
             ELSE
                frq_m(:,:) = 1._wp   ! default definition
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 8668)
@@ -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, lrxios = lxios_read )   ! before heat content trend due to Qsr flux
+            CALL iom_get( numror, jpdom_autoglo, 'qsr_hc_b', qsr_hc_b, ldxios = lxios_read )   ! before heat content trend due to Qsr flux
          ELSE                                           ! No restart or restart not found: Euler forward time stepping
             z1_2 = 1._wp
@@ -430,5 +430,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, lrxios = lxios_read  )
+         CALL iom_get( numror, jpdom_autoglo, 'fraqsr_1lev'  , fraqsr_1lev, ldxios = lxios_read  )
       ELSE
          fraqsr_1lev(:,:) = 1._wp   ! default : no penetration
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 8668)
@@ -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), lrxios = lxios_read )   ! before heat content sbc trend
-            CALL iom_get( numror, jpdom_autoglo, 'sbc_sc_b', sbc_tsc_b(:,:,jp_sal), lrxios = lxios_read )   ! before salt content sbc trend
+            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
          ELSE                                   ! No restart or restart not found: Euler forward time stepping
             zfact = 1._wp
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 8668)
@@ -1176,10 +1176,10 @@
             !
             IF( MIN( id1, id2, id3, id4, id5, id6 ) > 0 ) THEN        ! all required arrays exist
-               CALL iom_get( numror, jpdom_autoglo, 'en'    , en, lrxios = lxios_read     )
-               CALL iom_get( numror, jpdom_autoglo, 'avt'   , avt, lrxios = lxios_read    )
-               CALL iom_get( numror, jpdom_autoglo, 'avm'   , avm, lrxios = lxios_read    )
-               CALL iom_get( numror, jpdom_autoglo, 'avmu'  , avmu, lrxios = lxios_read   )
-               CALL iom_get( numror, jpdom_autoglo, 'avmv'  , avmv, lrxios = lxios_read   )
-               CALL iom_get( numror, jpdom_autoglo, 'mxln'  , mxln, lrxios = lxios_read   )
+               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   )
             ELSE                        
                IF(lwp) WRITE(numout,*) ' ===>>>> : previous run without gls scheme, en and mxln computed by iterative loop'
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 8668)
@@ -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, lrxios = lxios_read )
-            CALL iom_get( numror, jpdom_unknown, 'avtb', avtb, lrxios = lxios_read )
+            CALL iom_get( numror, jpdom_unknown, 'avmb', avmb, ldxios = lxios_read )
+            CALL iom_get( numror, jpdom_unknown, 'avtb', avtb, ldxios = lxios_read )
          ENDIF
       ENDIF
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 8668)
@@ -846,11 +846,11 @@
            !
            IF( id1 > 0 ) THEN                       ! 'en' exists
-              CALL iom_get( numror, jpdom_autoglo, 'en', en, lrxios = lxios_read )
+              CALL iom_get( numror, jpdom_autoglo, 'en', en, ldxios = lxios_read )
               IF( MIN( id2, id3, id4, id5, id6 ) > 0 ) THEN        ! all required arrays exist
-                 CALL iom_get( numror, jpdom_autoglo, 'avt'  , avt, lrxios = lxios_read   )
-                 CALL iom_get( numror, jpdom_autoglo, 'avm'  , avm, lrxios = lxios_read   )
-                 CALL iom_get( numror, jpdom_autoglo, 'avmu' , avmu, lrxios = lxios_read  )
-                 CALL iom_get( numror, jpdom_autoglo, 'avmv' , avmv, lrxios = lxios_read  )
-                 CALL iom_get( numror, jpdom_autoglo, 'dissl', dissl, lrxios = 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, 'dissl', dissl, ldxios = lxios_read )
               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/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 8668)
@@ -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(      rxios_context          )
+                      IF(lxios_read) CALL iom_context_finalize(      crxios_context          )
          IF( ln_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) ! 
       ENDIF
Index: /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/SAS_SRC/daymod.F90
===================================================================
--- /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/SAS_SRC/daymod.F90	(revision 8667)
+++ /branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/SAS_SRC/daymod.F90	(revision 8668)
@@ -318,5 +318,5 @@
          IF( iom_varid( numror, 'kt', ldstop = .FALSE. ) > 0 ) THEN
             ! Get Calendar informations
-            CALL iom_get( numror, 'kt', zk, lrxios = lxios_read )   ! last time-step of previous run
+            CALL iom_get( numror, 'kt', zk, ldxios = lxios_read )   ! last time-step of previous run
             IF(lwp) THEN
                WRITE(numout,*) ' *** Info read in restart : '
@@ -337,8 +337,8 @@
             IF ( nrstdt == 2 ) THEN
                ! read the parameters corresponding to nit000 - 1 (last time step of previous run)
-               CALL iom_get( numror, 'ndastp', zndastp, lrxios = lxios_read )
+               CALL iom_get( numror, 'ndastp', zndastp, ldxios = lxios_read )
                ndastp = NINT( zndastp )
-               CALL iom_get( numror, 'adatrj', adatrj, lrxios = lxios_read )
-	       CALL iom_get( numror, 'ntime', ktime, lrxios = lxios_read )
+               CALL iom_get( numror, 'adatrj', adatrj, ldxios = lxios_read )
+	       CALL iom_get( numror, 'ntime', ktime, ldxios = lxios_read )
 	       nn_time0=INT(ktime)
                ! calculate start time in hours and minutes
