Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/iom.F90
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/iom.F90	(revision 10377)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/iom.F90	(revision 10380)
@@ -75,8 +75,8 @@
    END INTERFACE
    INTERFACE iom_getatt
-      MODULE PROCEDURE iom_g0d_iatt, iom_g0d_ratt, iom_g0d_catt
+      MODULE PROCEDURE iom_g0d_iatt, iom_g1d_iatt, iom_g0d_ratt, iom_g1d_ratt, iom_g0d_catt
    END INTERFACE
    INTERFACE iom_putatt
-      MODULE PROCEDURE iom_p0d_iatt, iom_p0d_ratt, iom_p0d_catt
+      MODULE PROCEDURE iom_p0d_iatt, iom_p1d_iatt, iom_p0d_ratt, iom_p1d_ratt, iom_p0d_catt
    END INTERFACE
    INTERFACE iom_rstput
@@ -634,5 +634,5 @@
 
 
-   SUBROUTINE iom_open( cdname, kiomid, ldwrt, kdom, kiolib, ldstop, ldiof, kdlev )
+   SUBROUTINE iom_open( cdname, kiomid, ldwrt, kdom, ldstop, ldiof, kdlev )
       !!---------------------------------------------------------------------
       !!                   ***  SUBROUTINE  iom_open  ***
@@ -644,5 +644,4 @@
       LOGICAL         , INTENT(in   ), OPTIONAL ::   ldwrt    ! open in write modeb          (default = .FALSE.)
       INTEGER         , INTENT(in   ), OPTIONAL ::   kdom     ! Type of domain to be written (default = jpdom_local_noovlap)
-      INTEGER         , INTENT(in   ), OPTIONAL ::   kiolib   ! library used to open the file (default = jpnf90) 
       LOGICAL         , INTENT(in   ), OPTIONAL ::   ldstop   ! stop if open to read a non-existing file (default = .TRUE.)
       LOGICAL         , INTENT(in   ), OPTIONAL ::   ldiof    ! Interp On the Fly, needed for AGRIF (default = .FALSE.)
@@ -659,5 +658,4 @@
       LOGICAL               ::   llstop    ! local definition of ldstop
       LOGICAL               ::   lliof     ! local definition of ldiof
-      INTEGER               ::   iolib     ! library do we use to open the file
       INTEGER               ::   icnt      ! counter for digits in clcpu (max = jpmax_digits)
       INTEGER               ::   iln, ils  ! lengths of character
@@ -692,8 +690,4 @@
       ELSE                         ;   llstop = .TRUE.
       ENDIF
-      ! what library do we use to open the file?
-      IF( PRESENT(kiolib) ) THEN   ;   iolib = kiolib
-      ELSE                         ;   iolib = jpnf90
-      ENDIF
       ! are we using interpolation on the fly?
       IF( PRESENT(ldiof) ) THEN   ;   lliof = ldiof
@@ -713,9 +707,5 @@
       ENDIF
       ! which suffix should we use?
-      SELECT CASE (iolib)
-      CASE (jpnf90   ) ;   clsuffix = '.nc'
-      CASE DEFAULT     ;   clsuffix = ''
-         CALL ctl_stop( TRIM(clinfo), 'accepted IO library is only jpnf90 (jpioipsl option has been removed) ' )
-      END SELECT
+      clsuffix = '.nc'
       ! Add the suffix if needed
       iln = LEN_TRIM(clname)
@@ -802,9 +792,5 @@
       ENDIF
       IF( istop == nstop ) THEN   ! no error within this routine
-         SELECT CASE (iolib)
-         CASE (jpnf90   )   ;   CALL iom_nf90_open(    clname, kiomid, llwrt, llok, idompar, kdlev = kdlev )
-         CASE DEFAULT
-            CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed) ' )
-         END SELECT
+         CALL iom_nf90_open( clname, kiomid, llwrt, llok, idompar, kdlev = kdlev )
       ENDIF
       !
@@ -839,9 +825,5 @@
          DO jf = i_s, i_e
             IF( iom_file(jf)%nfid > 0 ) THEN
-               SELECT CASE (iom_file(jf)%iolib)
-               CASE (jpnf90   )   ;   CALL iom_nf90_close(    jf )
-               CASE DEFAULT
-                  CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
-               END SELECT
+               CALL iom_nf90_close( jf )
                iom_file(jf)%nfid       = 0          ! free the id 
                IF( PRESENT(kiomid) )   kiomid = 0   ! return 0 as id to specify that the file was closed
@@ -896,12 +878,8 @@
                iiv = iiv + 1
                IF( iiv <= jpmax_vars ) THEN
-                  SELECT CASE (iom_file(kiomid)%iolib)
-                  CASE (jpnf90   )   ;   iom_varid = iom_nf90_varid  ( kiomid, cdvar, iiv, kdimsz, kndims )
-                  CASE DEFAULT
-                     CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
-                  END SELECT
+                  iom_varid = iom_nf90_varid( kiomid, cdvar, iiv, kdimsz, kndims )
                ELSE
                   CALL ctl_stop( trim(clinfo), 'Too many variables in the file '//iom_file(kiomid)%name,   &
-                        &                         'increase the parameter jpmax_vars')
+                        &                      'increase the parameter jpmax_vars')
                ENDIF
                IF( llstop .AND. iom_varid == -1 )   CALL ctl_stop( TRIM(clinfo)//' not found' ) 
@@ -962,9 +940,5 @@
                                     &                         'with 1 or more spatial dimensions: '//cldmspc//' were found.' , &
                                     &                         'Use ncwa -a to suppress the unnecessary dimensions' )
-               SELECT CASE (iom_file(kiomid)%iolib)
-               CASE (jpnf90   )   ;   CALL iom_nf90_get(    kiomid, idvar, pvar, itime )
-               CASE DEFAULT
-                  CALL ctl_stop( 'iom_g0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
-               END SELECT
+               CALL iom_nf90_get( kiomid, idvar, pvar, itime )
             ENDIF
          ENDIF
@@ -1122,12 +1096,4 @@
             IF( lrowattr .AND. idom /= jpdom_data   ) CALL ctl_stop(trim(clinfo), 'lrowattr present and true needs kdom = jpdom_data')
             IF( lrowattr .AND. idom == jpdom_data   ) luse_jattr = .true.
-         ENDIF
-         IF( luse_jattr ) THEN
-            SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpnf90   )   
-                ! Ok
-            CASE DEFAULT    
-               CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
-            END SELECT
          ENDIF
 
@@ -1301,10 +1267,5 @@
             ENDIF
       
-            SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpnf90   )   ;   CALL iom_nf90_get(    kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2,   &
-               &                                         pv_r1d, pv_r2d, pv_r3d )
-            CASE DEFAULT
-               CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
-            END SELECT
+            CALL iom_nf90_get( kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2, pv_r1d, pv_r2d, pv_r3d )
 
             IF( istop == nstop ) THEN   ! no additional errors until this point...
@@ -1422,9 +1383,5 @@
                IF( iom_file(kiomid)%luld(idvar) ) THEN
                   IF( iom_file(kiomid)%dimsz(1,idvar) <= size(ptime) ) THEN
-                     SELECT CASE (iom_file(kiomid)%iolib)
-                     CASE (jpnf90   )   ;   CALL iom_nf90_gettime(   kiomid, idvar, ptime, cdunits, cdcalendar )
-                     CASE DEFAULT
-                        CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
-                     END SELECT
+                     CALL iom_nf90_gettime(   kiomid, idvar, ptime, cdunits, cdcalendar )
                   ELSE
                      WRITE(ctmp1,*) 'error with the size of ptime ',size(ptime),iom_file(kiomid)%dimsz(1,idvar)
@@ -1448,132 +1405,118 @@
    !!                   INTERFACE iom_getatt
    !!----------------------------------------------------------------------
-   SUBROUTINE iom_g0d_iatt( kiomid, cdatt, pvar, cdvar )
-      INTEGER         , INTENT(in   )                 ::   kiomid    ! Identifier of the file
-      CHARACTER(len=*), INTENT(in   )                 ::   cdatt     ! Name of the attribute
-      INTEGER         , INTENT(  out)                 ::   pvar      ! read field
-      CHARACTER(len=*), INTENT(in   ), OPTIONAL       ::   cdvar     ! Name of the variable
+   SUBROUTINE iom_g0d_iatt( kiomid, cdatt, katt0d, cdvar )
+      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt     ! Name of the attribute
+      INTEGER               , INTENT(  out)           ::   katt0d    ! read field
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar     ! Name of the variable
       !
       IF( kiomid > 0 ) THEN
-         IF( iom_file(kiomid)%nfid > 0 ) THEN
-            SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpnf90   )   ;   IF( PRESENT(cdvar) ) THEN
-                                      CALL iom_nf90_getatt( kiomid, cdatt, pvar, cdvar=cdvar )
-                                   ELSE
-                                      CALL iom_nf90_getatt( kiomid, cdatt, pvar )
-                                   ENDIF
-            CASE DEFAULT
-               CALL ctl_stop( 'iom_g0d_iatt: accepted IO library is only jpnf90' )
-            END SELECT
-         ENDIF
+         IF( iom_file(kiomid)%nfid > 0 )   CALL iom_nf90_getatt( kiomid, cdatt,  katt0d =  katt0d, cdvar=cdvar )
       ENDIF
    END SUBROUTINE iom_g0d_iatt
 
-   SUBROUTINE iom_g0d_ratt( kiomid, cdatt, pvar, cdvar )
-      INTEGER         , INTENT(in   )                 ::   kiomid    ! Identifier of the file
-      CHARACTER(len=*), INTENT(in   )                 ::   cdatt     ! Name of the attribute
-      REAL(wp)        , INTENT(  out)                 ::   pvar      ! written field
-      CHARACTER(len=*), INTENT(in   ), OPTIONAL       ::   cdvar     ! Name of the variable
+   SUBROUTINE iom_g1d_iatt( kiomid, cdatt, katt1d, cdvar )
+      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt     ! Name of the attribute
+      INTEGER, DIMENSION(:) , INTENT(  out)           ::   katt1d    ! read field
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar     ! Name of the variable
       !
       IF( kiomid > 0 ) THEN
-         IF( iom_file(kiomid)%nfid > 0 ) THEN
-            SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpnf90   )   ;   IF( PRESENT(cdvar) ) THEN
-                                      CALL iom_nf90_getatt( kiomid, cdatt, pvar, cdvar=cdvar )
-                                   ELSE
-                                      CALL iom_nf90_getatt( kiomid, cdatt, pvar )
-                                   ENDIF
-            CASE DEFAULT    
-               CALL ctl_stop( 'iom_g0d_ratt: accepted IO library is only jpnf90' )
-            END SELECT
-         ENDIF
+         IF( iom_file(kiomid)%nfid > 0 )   CALL iom_nf90_getatt( kiomid, cdatt,  katt1d =  katt1d, cdvar=cdvar )
+      ENDIF
+   END SUBROUTINE iom_g1d_iatt
+
+   SUBROUTINE iom_g0d_ratt( kiomid, cdatt, patt0d, cdvar )
+      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt     ! Name of the attribute
+      REAL(wp)              , INTENT(  out)           ::   patt0d    ! read field
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar     ! Name of the variable
+      !
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 )   CALL iom_nf90_getatt( kiomid, cdatt,  patt0d =  patt0d, cdvar=cdvar )
       ENDIF
    END SUBROUTINE iom_g0d_ratt
 
-   SUBROUTINE iom_g0d_catt( kiomid, cdatt, pvar, cdvar )
-      INTEGER         , INTENT(in   )                 ::   kiomid    ! Identifier of the file
-      CHARACTER(len=*), INTENT(in   )                 ::   cdatt     ! Name of the attribute
-      CHARACTER(len=*), INTENT(  out)                 ::   pvar      ! written field
-      CHARACTER(len=*), INTENT(in   ), OPTIONAL       ::   cdvar     ! Name of the variable
+   SUBROUTINE iom_g1d_ratt( kiomid, cdatt, patt1d, cdvar )
+      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt     ! Name of the attribute
+      REAL(wp), DIMENSION(:), INTENT(  out)           ::   patt1d    ! read field
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar     ! Name of the variable
       !
       IF( kiomid > 0 ) THEN
-         IF( iom_file(kiomid)%nfid > 0 ) THEN
-            SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpnf90   )   ;   IF( PRESENT(cdvar) ) THEN
-                                      CALL iom_nf90_getatt( kiomid, cdatt, pvar, cdvar=cdvar )
-                                   ELSE
-                                      CALL iom_nf90_getatt( kiomid, cdatt, pvar )
-                                   ENDIF
-            CASE DEFAULT
-               CALL ctl_stop( 'iom_g0d_ratt: accepted IO library is only jpnf90' )
-            END SELECT
-         ENDIF
+         IF( iom_file(kiomid)%nfid > 0 )   CALL iom_nf90_getatt( kiomid, cdatt,  patt1d =  patt1d, cdvar=cdvar )
+      ENDIF
+   END SUBROUTINE iom_g1d_ratt
+   
+   SUBROUTINE iom_g0d_catt( kiomid, cdatt, cdatt0d, cdvar )
+      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt     ! Name of the attribute
+      CHARACTER(len=*)      , INTENT(  out)           ::   cdatt0d   ! read field
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar     ! Name of the variable
+      !
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 )   CALL iom_nf90_getatt( kiomid, cdatt, cdatt0d = cdatt0d, cdvar=cdvar )
       ENDIF
    END SUBROUTINE iom_g0d_catt
+
 
    !!----------------------------------------------------------------------
    !!                   INTERFACE iom_putatt
    !!----------------------------------------------------------------------
-   SUBROUTINE iom_p0d_iatt( kiomid, cdatt, pvar, cdvar )
-      INTEGER         , INTENT(in   )                 ::   kiomid    ! Identifier of the file
-      CHARACTER(len=*), INTENT(in   )                 ::   cdatt     ! Name of the attribute
-      INTEGER         , INTENT(in   )                 ::   pvar      ! write field
-      CHARACTER(len=*), INTENT(in   ), OPTIONAL       ::   cdvar     ! Name of the variable
+   SUBROUTINE iom_p0d_iatt( kiomid, cdatt, katt0d, cdvar )
+      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt     ! Name of the attribute
+      INTEGER               , INTENT(in   )           ::   katt0d    ! written field
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar     ! Name of the variable
       !
       IF( kiomid > 0 ) THEN
-         IF( iom_file(kiomid)%nfid > 0 ) THEN
-            SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpnf90   )   ;   IF( PRESENT(cdvar) ) THEN
-                                      CALL iom_nf90_putatt( kiomid, cdatt, pvar, cdvar=cdvar )
-                                   ELSE
-                                      CALL iom_nf90_putatt( kiomid, cdatt, pvar )
-                                   ENDIF
-            CASE DEFAULT
-               CALL ctl_stop( 'iom_p0d_iatt: accepted IO library is only jpnf90' )
-            END SELECT
-         ENDIF
+         IF( iom_file(kiomid)%nfid > 0 )   CALL iom_nf90_putatt( kiomid, cdatt,  katt0d =  katt0d, cdvar=cdvar )
       ENDIF
    END SUBROUTINE iom_p0d_iatt
 
-   SUBROUTINE iom_p0d_ratt( kiomid, cdatt, pvar, cdvar )
-      INTEGER         , INTENT(in   )                 ::   kiomid    ! Identifier of the file
-      CHARACTER(len=*), INTENT(in   )                 ::   cdatt     ! Name of the attribute
-      REAL(wp)        , INTENT(in   )                 ::   pvar      ! write field
-      CHARACTER(len=*), INTENT(in   ), OPTIONAL       ::   cdvar     ! Name of the variable
+   SUBROUTINE iom_p1d_iatt( kiomid, cdatt, katt1d, cdvar )
+      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt     ! Name of the attribute
+      INTEGER, DIMENSION(:) , INTENT(in   )           ::   katt1d    ! written field
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar     ! Name of the variable
       !
       IF( kiomid > 0 ) THEN
-         IF( iom_file(kiomid)%nfid > 0 ) THEN
-            SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpnf90   )   ;   IF( PRESENT(cdvar) ) THEN
-                                      CALL iom_nf90_putatt( kiomid, cdatt, pvar, cdvar=cdvar )
-                                   ELSE
-                                      CALL iom_nf90_putatt( kiomid, cdatt, pvar )
-                                   ENDIF
-            CASE DEFAULT    
-               CALL ctl_stop( 'iom_p0d_ratt: accepted IO library is only jpnf90' )
-            END SELECT
-         ENDIF
+         IF( iom_file(kiomid)%nfid > 0 )   CALL iom_nf90_putatt( kiomid, cdatt,  katt1d =  katt1d, cdvar=cdvar )
+      ENDIF
+   END SUBROUTINE iom_p1d_iatt
+
+   SUBROUTINE iom_p0d_ratt( kiomid, cdatt, patt0d, cdvar )
+      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt     ! Name of the attribute
+      REAL(wp)              , INTENT(in   )           ::   patt0d    ! written field
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar     ! Name of the variable
+      !
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 )   CALL iom_nf90_putatt( kiomid, cdatt,  patt0d =  patt0d, cdvar=cdvar )
       ENDIF
    END SUBROUTINE iom_p0d_ratt
 
-   SUBROUTINE iom_p0d_catt( kiomid, cdatt, pvar, cdvar )
-      INTEGER         , INTENT(in   )                 ::   kiomid    ! Identifier of the file
-      CHARACTER(len=*), INTENT(in   )                 ::   cdatt     ! Name of the attribute
-      CHARACTER(len=*), INTENT(in   )                 ::   pvar      ! write field
-      CHARACTER(len=*), INTENT(in   ), OPTIONAL       ::   cdvar     ! Name of the variable
+   SUBROUTINE iom_p1d_ratt( kiomid, cdatt, patt1d, cdvar )
+      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt     ! Name of the attribute
+      REAL(wp), DIMENSION(:), INTENT(in   )           ::   patt1d    ! written field
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar     ! Name of the variable
       !
       IF( kiomid > 0 ) THEN
-         IF( iom_file(kiomid)%nfid > 0 ) THEN
-            SELECT CASE (iom_file(kiomid)%iolib)
-            CASE (jpnf90   )   ;   IF( PRESENT(cdvar) ) THEN
-                                      CALL iom_nf90_putatt( kiomid, cdatt, pvar, cdvar=cdvar )
-                                   ELSE
-                                      CALL iom_nf90_putatt( kiomid, cdatt, pvar )
-                                   ENDIF
-            CASE DEFAULT
-               CALL ctl_stop( 'iom_p0d_ratt: accepted IO library is only jpnf90' )
-            END SELECT
-         ENDIF
+         IF( iom_file(kiomid)%nfid > 0 )   CALL iom_nf90_putatt( kiomid, cdatt,  patt1d =  patt1d, cdvar=cdvar )
+      ENDIF
+   END SUBROUTINE iom_p1d_ratt
+   
+   SUBROUTINE iom_p0d_catt( kiomid, cdatt, cdatt0d, cdvar )
+      INTEGER               , INTENT(in   )           ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt     ! Name of the attribute
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt0d   ! written field
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar     ! Name of the variable
+      !
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 )   CALL iom_nf90_putatt( kiomid, cdatt, cdatt0d = cdatt0d, cdvar=cdvar )
       ENDIF
    END SUBROUTINE iom_p0d_catt
+
 
    !!----------------------------------------------------------------------
@@ -1604,9 +1547,5 @@
             IF( iom_file(kiomid)%nfid > 0 ) THEN
                ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
-               SELECT CASE (iom_file(kiomid)%iolib)
-               CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar )
-               CASE DEFAULT     
-                  CALL ctl_stop( 'iom_rp0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
-               END SELECT
+               CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar )
             ENDIF
          ENDIF
@@ -1638,9 +1577,5 @@
             IF( iom_file(kiomid)%nfid > 0 ) THEN
                ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
-               SELECT CASE (iom_file(kiomid)%iolib)
-               CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar )
-               CASE DEFAULT     
-                  CALL ctl_stop( 'iom_rp1d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
-               END SELECT
+               CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar )
             ENDIF
          ENDIF
@@ -1672,9 +1607,5 @@
             IF( iom_file(kiomid)%nfid > 0 ) THEN
                ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
-               SELECT CASE (iom_file(kiomid)%iolib)
-               CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar )
-               CASE DEFAULT     
-                  CALL ctl_stop( 'iom_rp2d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
-               END SELECT
+               CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar )
             ENDIF
          ENDIF
@@ -1706,9 +1637,5 @@
             IF( iom_file(kiomid)%nfid > 0 ) THEN
                ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
-               SELECT CASE (iom_file(kiomid)%iolib)
-               CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar )
-               CASE DEFAULT     
-                  CALL ctl_stop( 'iom_rp3d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' )
-               END SELECT
+               CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar )
             ENDIF
          ENDIF
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/iom_def.F90
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/iom_def.F90	(revision 10377)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/iom_def.F90	(revision 10380)
@@ -23,8 +23,4 @@
    INTEGER, PARAMETER, PUBLIC ::   jpdom_autoglo_xy    = 9   !: Automatically set horizontal dimensions only
    INTEGER, PARAMETER, PUBLIC ::   jpdom_autodta       = 10  !: 
-
-   INTEGER, PARAMETER, PUBLIC ::   jpnf90      = 101      !: Use nf90 library
-
-   INTEGER, PARAMETER, PUBLIC ::   jprstlib  = jpnf90     !: restarts io library
 
    INTEGER, PARAMETER, PUBLIC ::   jp_r8    = 200      !: write REAL(8)
@@ -55,5 +51,4 @@
       CHARACTER(LEN=240)                        ::   name     !: name of the file
       INTEGER                                   ::   nfid     !: identifier of the file (0 if closed)
-      INTEGER                                   ::   iolib    !: library used to read the file (jpnf90 or new formats,
                                                               !: jpioipsl option has been removed)
       INTEGER                                   ::   nvars    !: number of identified varibles in the file
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/iom_nf90.F90
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/iom_nf90.F90	(revision 10377)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/iom_nf90.F90	(revision 10380)
@@ -34,10 +34,4 @@
    INTERFACE iom_nf90_get
       MODULE PROCEDURE iom_nf90_g0d, iom_nf90_g123d
-   END INTERFACE
-   INTERFACE iom_nf90_getatt
-      MODULE PROCEDURE iom_nf90_giatt, iom_nf90_gratt, iom_nf90_gcatt
-   END INTERFACE
-   INTERFACE iom_nf90_putatt
-      MODULE PROCEDURE iom_nf90_piatt, iom_nf90_pratt, iom_nf90_pcatt
    END INTERFACE
    INTERFACE iom_nf90_rstput
@@ -163,5 +157,4 @@
          iom_file(kiomid)%name   = TRIM(cdname)
          iom_file(kiomid)%nfid   = if90id
-         iom_file(kiomid)%iolib  = jpnf90
          iom_file(kiomid)%nvars  = 0
          iom_file(kiomid)%irec   = -1   ! useless for NetCDF files, used to know if the file is in define mode 
@@ -327,21 +320,21 @@
    END SUBROUTINE iom_nf90_g123d
 
-   !!----------------------------------------------------------------------
-   !!                   INTERFACE iom_nf90_getatt
-   !!----------------------------------------------------------------------
-
-   SUBROUTINE iom_nf90_giatt( kiomid, cdatt, pv_i0d, cdvar)
-      !!-----------------------------------------------------------------------
-      !!                  ***  ROUTINE  iom_nf90_giatt  ***
-      !!
-      !! ** Purpose : read an integer attribute with NF90
+
+   SUBROUTINE iom_nf90_getatt( kiomid, cdatt, katt0d, katt1d, patt0d, patt1d, cdatt0d, cdvar)
+      !!-----------------------------------------------------------------------
+      !!                  ***  ROUTINE  iom_nf90_getatt  ***
+      !!
+      !! ** Purpose : read an attribute with NF90
       !!              (either a global attribute (default) or a variable
       !!               attribute if optional variable name is supplied (cdvar))
       !!-----------------------------------------------------------------------
-      INTEGER         , INTENT(in   ) ::   kiomid   ! Identifier of the file
-      CHARACTER(len=*), INTENT(in   ) ::   cdatt    ! attribute name
-      INTEGER         , INTENT(  out) ::   pv_i0d   ! read field
-      CHARACTER(len=*), INTENT(in   ), OPTIONAL     &
-                      &               ::   cdvar    ! name of the variable
+      INTEGER               , INTENT(in   )           ::   kiomid   ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt    ! attribute name
+      INTEGER               , INTENT(  out), OPTIONAL ::   katt0d   ! read scalar integer
+      INTEGER, DIMENSION(:) , INTENT(  out), OPTIONAL ::   katt1d   ! read 1d array integer
+      REAL(wp)              , INTENT(  out), OPTIONAL ::   patt0d   ! read scalar  real
+      REAL(wp), DIMENSION(:), INTENT(  out), OPTIONAL ::   patt1d   ! read 1d array real
+      CHARACTER(len=*)      , INTENT(  out), OPTIONAL ::   cdatt0d  ! read character
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar    ! name of the variable
       !
       INTEGER                         ::   if90id   ! temporary integer
@@ -359,5 +352,5 @@
             llok = NF90_Inquire_attribute(if90id, ivarid, cdatt) == nf90_noerr
          ELSE
-            CALL ctl_warn('iom_nf90_getatt: no variable '//cdvar//' found')
+            CALL ctl_warn('iom_nf90_getatt: no variable '//TRIM(cdvar)//' found')
          ENDIF
       ELSE
@@ -367,121 +360,38 @@
       !
       IF( llok) THEN
-         clinfo = 'iom_nf90_getatt, file: '//TRIM(iom_file(kiomid)%name)//', giatt: '//TRIM(cdatt)
-         CALL iom_nf90_check(NF90_GET_ATT(if90id, ivarid, cdatt, values=pv_i0d), clinfo)
+         clinfo = 'iom_nf90_getatt, file: '//TRIM(iom_file(kiomid)%name)//', att: '//TRIM(cdatt)
+         IF(PRESENT( katt0d))   CALL iom_nf90_check(NF90_GET_ATT(if90id, ivarid, cdatt, values =  katt0d), clinfo)
+         IF(PRESENT( katt1d))   CALL iom_nf90_check(NF90_GET_ATT(if90id, ivarid, cdatt, values =  katt1d), clinfo)
+         IF(PRESENT( patt0d))   CALL iom_nf90_check(NF90_GET_ATT(if90id, ivarid, cdatt, values =  patt0d), clinfo)
+         IF(PRESENT( patt1d))   CALL iom_nf90_check(NF90_GET_ATT(if90id, ivarid, cdatt, values =  patt1d), clinfo)
+         IF(PRESENT(cdatt0d))   CALL iom_nf90_check(NF90_GET_ATT(if90id, ivarid, cdatt, values = cdatt0d), clinfo)
       ELSE
-         CALL ctl_warn('iom_nf90_getatt: no attribute '//cdatt//' found')
-         pv_i0d = -999
-      ENDIF
-      !
-   END SUBROUTINE iom_nf90_giatt
-
-
-   SUBROUTINE iom_nf90_gratt( kiomid, cdatt, pv_r0d, cdvar )
-      !!-----------------------------------------------------------------------
-      !!                  ***  ROUTINE  iom_nf90_gratt  ***
-      !!
-      !! ** Purpose : read a real attribute with NF90
+         CALL ctl_warn('iom_nf90_getatt: no attribute '//TRIM(cdatt)//' found')
+         IF(PRESENT( katt0d))    katt0d    = -999
+         IF(PRESENT( katt1d))    katt1d(:) = -999
+         IF(PRESENT( patt0d))    patt0d    = -999._wp
+         IF(PRESENT( patt1d))    patt1d(:) = -999._wp
+         IF(PRESENT(cdatt0d))   cdatt0d    = '!'
+      ENDIF
+      !
+   END SUBROUTINE iom_nf90_getatt
+
+
+   SUBROUTINE iom_nf90_putatt( kiomid, cdatt, katt0d, katt1d, patt0d, patt1d, cdatt0d, cdvar)
+      !!-----------------------------------------------------------------------
+      !!                  ***  ROUTINE  iom_nf90_putatt  ***
+      !!
+      !! ** Purpose : write an attribute with NF90
       !!              (either a global attribute (default) or a variable
       !!               attribute if optional variable name is supplied (cdvar))
       !!-----------------------------------------------------------------------
-      INTEGER                   , INTENT(in   ) ::   kiomid   ! Identifier of the file
-      CHARACTER(len=*)          , INTENT(in   ) ::   cdatt    ! attribute name
-      REAL(wp)                  , INTENT(  out) ::   pv_r0d   ! read field
-      CHARACTER(len=*), OPTIONAL, INTENT(in   ) ::   cdvar    ! name of the variable
-      !
-      INTEGER            ::   if90id   ! temporary integer
-      INTEGER            ::   ivarid   ! NetCDF variable Id
-      LOGICAL            ::   llok     ! temporary logical
-      CHARACTER(LEN=100) ::   clinfo   ! info character
-      !---------------------------------------------------------------------
-      !
-      if90id = iom_file(kiomid)%nfid
-      IF( PRESENT(cdvar) ) THEN
-         ! check the variable exists in the file
-         llok = NF90_INQ_VARID( if90id, TRIM(cdvar), ivarid ) == nf90_noerr
-         IF( llok ) THEN
-            ! check the variable has the attribute required
-            llok = NF90_Inquire_attribute(if90id, ivarid, cdatt) == nf90_noerr
-         ELSE
-            CALL ctl_warn('iom_nf90_getatt: no variable '//cdvar//' found')
-         ENDIF
-      ELSE
-         llok = NF90_Inquire_attribute(if90id, NF90_GLOBAL, cdatt) == nf90_noerr
-         ivarid = NF90_GLOBAL
-      ENDIF
-      !
-      IF( llok) THEN
-         clinfo = 'iom_nf90_getatt, file: '//TRIM(iom_file(kiomid)%name)//', gratt: '//TRIM(cdatt)
-         CALL iom_nf90_check(NF90_GET_ATT(if90id, ivarid, cdatt, values=pv_r0d), clinfo)
-      ELSE
-         CALL ctl_warn('iom_nf90_getatt: no attribute '//cdatt//' found')
-         pv_r0d = -999._wp
-      ENDIF
-      !
-   END SUBROUTINE iom_nf90_gratt
-
-
-   SUBROUTINE iom_nf90_gcatt( kiomid, cdatt, pv_c0d, cdvar )
-      !!-----------------------------------------------------------------------
-      !!                  ***  ROUTINE  iom_nf90_gcatt  ***
-      !!
-      !! ** Purpose : read a character attribute with NF90
-      !!              (either a global attribute (default) or a variable
-      !!               attribute if optional variable name is supplied (cdvar))
-      !!-----------------------------------------------------------------------
-      INTEGER                   , INTENT(in   ) ::   kiomid   ! Identifier of the file
-      CHARACTER(len=*)          , INTENT(in   ) ::   cdatt    ! attribute name
-      CHARACTER(len=*)          , INTENT(  out) ::   pv_c0d   ! read field
-      CHARACTER(len=*), OPTIONAL, INTENT(in   ) ::   cdvar    ! name of the variable
-      !
-      INTEGER            ::   if90id   ! temporary integer
-      INTEGER            ::   ivarid   ! NetCDF variable Id
-      LOGICAL            ::   llok     ! temporary logical
-      CHARACTER(LEN=100) ::   clinfo   ! info character
-      !---------------------------------------------------------------------
-      !
-      if90id = iom_file(kiomid)%nfid
-      IF( PRESENT(cdvar) ) THEN
-         ! check the variable exists in the file
-         llok = NF90_INQ_VARID( if90id, TRIM(cdvar), ivarid ) == nf90_noerr
-         IF( llok ) THEN
-            ! check the variable has the attribute required
-            llok = NF90_Inquire_attribute(if90id, ivarid, cdatt) == nf90_noerr
-         ELSE
-            CALL ctl_warn('iom_nf90_getatt: no variable '//cdvar//' found')
-         ENDIF
-      ELSE
-         llok = NF90_Inquire_attribute(if90id, NF90_GLOBAL, cdatt) == nf90_noerr
-         ivarid = NF90_GLOBAL
-      ENDIF
-!
-      IF( llok) THEN
-         clinfo = 'iom_nf90_getatt, file: '//TRIM(iom_file(kiomid)%name)//', gcatt: '//TRIM(cdatt)
-         CALL iom_nf90_check(NF90_GET_ATT(if90id, ivarid, cdatt, values=pv_c0d), clinfo)
-      ELSE
-         CALL ctl_warn('iom_nf90_getatt: no attribute '//cdatt//' found')
-         pv_c0d = '!'
-      ENDIF
-      !
-   END SUBROUTINE iom_nf90_gcatt
-
-
-   !!----------------------------------------------------------------------
-   !!                   INTERFACE iom_nf90_putatt
-   !!----------------------------------------------------------------------
-
-   SUBROUTINE iom_nf90_piatt( kiomid, cdatt, pv_i0d, cdvar)
-      !!-----------------------------------------------------------------------
-      !!                  ***  ROUTINE  iom_nf90_piatt  ***
-      !!
-      !! ** Purpose : write an integer attribute with NF90
-      !!              (either a global attribute (default) or a variable
-      !!               attribute if optional variable name is supplied (cdvar))
-      !!-----------------------------------------------------------------------
-      INTEGER         , INTENT(in   ) ::   kiomid   ! Identifier of the file
-      CHARACTER(len=*), INTENT(in   ) ::   cdatt    ! attribute name
-      INTEGER         , INTENT(in   ) ::   pv_i0d   ! write field
-      CHARACTER(len=*), INTENT(in   ), OPTIONAL     &
-                      &               ::   cdvar    ! name of the variable
+      INTEGER               , INTENT(in   )           ::   kiomid   ! Identifier of the file
+      CHARACTER(len=*)      , INTENT(in   )           ::   cdatt    ! attribute name
+      INTEGER               , INTENT(in   ), OPTIONAL ::   katt0d   ! read scalar integer
+      INTEGER, DIMENSION(:) , INTENT(in   ), OPTIONAL ::   katt1d   ! read 1d array integer
+      REAL(wp)              , INTENT(in   ), OPTIONAL ::   patt0d   ! read scalar  real
+      REAL(wp), DIMENSION(:), INTENT(in   ), OPTIONAL ::   patt1d   ! read 1d array real
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdatt0d  ! read character
+      CHARACTER(len=*)      , INTENT(in   ), OPTIONAL ::   cdvar    ! name of the variable
       !
       INTEGER                         ::   if90id   ! temporary integer
@@ -498,5 +408,5 @@
          llok = NF90_INQ_VARID( if90id, TRIM(cdvar), ivarid ) == nf90_noerr
          IF( .NOT. llok ) THEN
-            CALL ctl_warn('iom_nf90_putatt: no variable '//cdvar//' found')
+            CALL ctl_warn('iom_nf90_putatt: no variable '//TRIM(cdvar)//' found')
          ENDIF
       ELSE
@@ -506,5 +416,5 @@
       !
       IF( llok) THEN
-         clinfo = 'iom_nf90_putatt, file: '//TRIM(iom_file(kiomid)%name)//', piatt: '//TRIM(cdatt)
+         clinfo = 'iom_nf90_putatt, file: '//TRIM(iom_file(kiomid)%name)//', att: '//TRIM(cdatt)
          IF( iom_file(kiomid)%irec /= -1 ) THEN   
             ! trick: irec used to know if the file is in define mode or not
@@ -514,125 +424,18 @@
          ENDIF
          !
-         CALL iom_nf90_check(NF90_PUT_ATT(if90id, ivarid, cdatt, values=pv_i0d), clinfo)
+         IF(PRESENT( katt0d))   CALL iom_nf90_check(NF90_PUT_ATT(if90id, ivarid, cdatt, values =  katt0d), clinfo)
+         IF(PRESENT( katt1d))   CALL iom_nf90_check(NF90_PUT_ATT(if90id, ivarid, cdatt, values =  katt1d), clinfo)
+         IF(PRESENT( patt0d))   CALL iom_nf90_check(NF90_PUT_ATT(if90id, ivarid, cdatt, values =  patt0d), clinfo)
+         IF(PRESENT( patt1d))   CALL iom_nf90_check(NF90_PUT_ATT(if90id, ivarid, cdatt, values =  patt1d), clinfo)
+         IF(PRESENT(cdatt0d))   CALL iom_nf90_check(NF90_PUT_ATT(if90id, ivarid, cdatt, values = cdatt0d), clinfo)
          !
-         IF( lenddef ) THEN   
-            ! file was in data mode on entry; put it back in that mode
+         IF( lenddef ) THEN   ! file was in data mode on entry; put it back in that mode
             CALL iom_nf90_check(NF90_ENDDEF( if90id ), clinfo)
          ENDIF
       ELSE
-         CALL ctl_warn('iom_nf90_putatt: no attribute '//cdatt//' written')
-      ENDIF
-      !
-   END SUBROUTINE iom_nf90_piatt
-
-
-   SUBROUTINE iom_nf90_pratt( kiomid, cdatt, pv_r0d, cdvar )
-      !!-----------------------------------------------------------------------
-      !!                  ***  ROUTINE  iom_nf90_pratt  ***
-      !!
-      !! ** Purpose : write a real attribute with NF90
-      !!              (either a global attribute (default) or a variable
-      !!               attribute if optional variable name is supplied (cdvar))
-      !!-----------------------------------------------------------------------
-      INTEGER                   , INTENT(in   ) ::   kiomid   ! Identifier of the file
-      CHARACTER(len=*)          , INTENT(in   ) ::   cdatt    ! attribute name
-      REAL(wp)                  , INTENT(in   ) ::   pv_r0d   ! write field
-      CHARACTER(len=*), OPTIONAL, INTENT(in   ) ::   cdvar    ! name of the variable
-      !
-      INTEGER            ::   if90id   ! temporary integer
-      INTEGER            ::   ivarid   ! NetCDF variable Id
-      LOGICAL            ::   llok     ! temporary logical
-      LOGICAL            ::   lenddef  ! temporary logical
-      CHARACTER(LEN=100) ::   clinfo   ! info character
-      !---------------------------------------------------------------------
-      !
-      if90id = iom_file(kiomid)%nfid
-      lenddef = .false.
-      IF( PRESENT(cdvar) ) THEN
-         ! check the variable exists in the file
-         llok = NF90_INQ_VARID( if90id, TRIM(cdvar), ivarid ) == nf90_noerr
-         IF( .NOT. llok ) THEN
-            CALL ctl_warn('iom_nf90_putatt: no variable '//cdvar//' found')
-         ENDIF
-      ELSE
-         llok = .true.
-         ivarid = NF90_GLOBAL
-      ENDIF
-      !
-      IF( llok) THEN
-         clinfo = 'iom_nf90_putatt, file: '//TRIM(iom_file(kiomid)%name)//', pratt: '//TRIM(cdatt)
-         IF( iom_file(kiomid)%irec /= -1 ) THEN   
-            ! trick: irec used to know if the file is in define mode or not
-            ! if it is not then temporarily put it into define mode
-            CALL iom_nf90_check(NF90_REDEF( if90id ), clinfo)
-            lenddef = .true.
-         ENDIF
-         !
-         CALL iom_nf90_check(NF90_PUT_ATT(if90id, ivarid, cdatt, values=pv_r0d), clinfo)
-         !
-         IF( lenddef ) THEN   
-            ! file was in data mode on entry; put it back in that mode
-            CALL iom_nf90_check(NF90_ENDDEF( if90id ), clinfo)
-         ENDIF
-      ELSE
-         CALL ctl_warn('iom_nf90_putatt: no attribute '//cdatt//' written')
-      ENDIF
-      !
-   END SUBROUTINE iom_nf90_pratt
-
-
-   SUBROUTINE iom_nf90_pcatt( kiomid, cdatt, pv_c0d, cdvar )
-      !!-----------------------------------------------------------------------
-      !!                  ***  ROUTINE  iom_nf90_pcatt  ***
-      !!
-      !! ** Purpose : write a character attribute with NF90
-      !!              (either a global attribute (default) or a variable
-      !!               attribute if optional variable name is supplied (cdvar))
-      !!-----------------------------------------------------------------------
-      INTEGER                   , INTENT(in   ) ::   kiomid   ! Identifier of the file
-      CHARACTER(len=*)          , INTENT(in   ) ::   cdatt    ! attribute name
-      CHARACTER(len=*)          , INTENT(in   ) ::   pv_c0d   ! write field
-      CHARACTER(len=*), OPTIONAL, INTENT(in   ) ::   cdvar    ! name of the variable
-      !
-      INTEGER            ::   if90id   ! temporary integer
-      INTEGER            ::   ivarid   ! NetCDF variable Id
-      LOGICAL            ::   llok     ! temporary logical
-      LOGICAL            ::   lenddef  ! temporary logical
-      CHARACTER(LEN=100) ::   clinfo   ! info character
-      !---------------------------------------------------------------------
-      !
-      if90id = iom_file(kiomid)%nfid
-      lenddef = .false.
-      IF( PRESENT(cdvar) ) THEN
-         ! check the variable exists in the file
-         llok = NF90_INQ_VARID( if90id, TRIM(cdvar), ivarid ) == nf90_noerr
-         IF( .NOT. llok ) THEN
-            CALL ctl_warn('iom_nf90_putatt: no variable '//cdvar//' found')
-         ENDIF
-      ELSE
-         llok = .true.
-         ivarid = NF90_GLOBAL
-      ENDIF
-      !
-      IF( llok) THEN
-         clinfo = 'iom_nf90_putatt, file: '//TRIM(iom_file(kiomid)%name)//', pcatt: '//TRIM(cdatt)
-         IF( iom_file(kiomid)%irec /= -1 ) THEN   
-            ! trick: irec used to know if the file is in define mode or not
-            ! if it is not then temporarily put it into define mode
-            CALL iom_nf90_check(NF90_REDEF( if90id ), clinfo)
-            lenddef = .true.
-         ENDIF
-         !
-         CALL iom_nf90_check(NF90_PUT_ATT(if90id, ivarid, cdatt, values=pv_c0d), clinfo)
-         !
-         IF( lenddef ) THEN   
-            ! file was in data mode on entry; put it back in that mode
-            CALL iom_nf90_check(NF90_ENDDEF( if90id ), clinfo)
-         ENDIF
-      ELSE
-         CALL ctl_warn('iom_nf90_putatt: no attribute '//cdatt//' written')
-      ENDIF
-      !
-   END SUBROUTINE iom_nf90_pcatt
+         CALL ctl_warn('iom_nf90_putatt: no attribute '//TRIM(cdatt)//' written')
+      ENDIF
+      !
+   END SUBROUTINE iom_nf90_putatt
 
 
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/restart.F90
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/restart.F90	(revision 10377)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/IOM/restart.F90	(revision 10380)
@@ -97,8 +97,5 @@
                WRITE(numout,*)
                IF(.NOT.lwxios) THEN
-                  SELECT CASE ( jprstlib )
-                  CASE DEFAULT         ;   WRITE(numout,*)                            &
-                      '             open ocean restart NetCDF file: ',TRIM(clpath)//TRIM(clname)
-                  END SELECT
+                  WRITE(numout,*) '             open ocean restart NetCDF file: ',TRIM(clpath)//TRIM(clname)
                   IF ( snc4set%luse )      WRITE(numout,*) '             opened for NetCDF4 chunking and compression'
                   IF( kt == nitrst - 1 ) THEN   ;   WRITE(numout,*) '             kt = nitrst - 1 = ', kt
@@ -109,5 +106,5 @@
             !
             IF(.NOT.lwxios) THEN
-               CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib )
+               CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE. )
             ELSE
 #if defined key_iomput
@@ -137,5 +134,5 @@
       !!                   ***  ROUTINE rstwrite  ***
       !!                     
-      !! ** Purpose :   Write restart fields in the format corresponding to jprstlib
+      !! ** Purpose :   Write restart fields in NetCDF format
       !!
       !! ** Method  :   Write in numrow when kt == nitrst in NetCDF
@@ -201,10 +198,9 @@
       !!                   ***  ROUTINE rst_read_open  ***
       !! 
-      !! ** Purpose :   Open read files for restart (format fixed by jprstlib )
+      !! ** Purpose :   Open read files for NetCDF restart
       !! 
       !! ** Method  :   Use a non-zero, positive value of numror to assess whether or not
       !!                the file has already been opened
       !!----------------------------------------------------------------------
-      INTEGER        ::   jlibalt = jprstlib
       LOGICAL        ::   llok
       CHARACTER(lc)  ::   clpath   ! full path to ocean output restart file
@@ -214,7 +210,5 @@
          IF(lwp) THEN                                             ! Contol prints
             WRITE(numout,*)
-            SELECT CASE ( jprstlib )
-            CASE ( jpnf90    )   ;   WRITE(numout,*) 'rst_read : read oce NetCDF restart file'
-            END SELECT
+            WRITE(numout,*) 'rst_read : read oce NetCDF restart file'
             IF ( snc4set%luse )      WRITE(numout,*) 'rst_read : configured with NetCDF4 support'
             WRITE(numout,*) '~~~~~~~~'
@@ -223,5 +217,5 @@
          clpath = TRIM(cn_ocerst_indir)
          IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/'
-         CALL iom_open( TRIM(clpath)//cn_ocerst_in, numror, kiolib = jlibalt )
+         CALL iom_open( TRIM(clpath)//cn_ocerst_in, numror )
 ! are we using XIOS to read the data? Part above will have to modified once XIOS
 ! can handle checking if variable is in the restart file (there will be no need to open
@@ -250,5 +244,5 @@
       !!                   ***  ROUTINE rst_read  ***
       !! 
-      !! ** Purpose :   Read files for restart (format fixed by jprstlib )
+      !! ** Purpose :   Read files for NetCDF restart
       !! 
       !! ** Method  :   Read in restart.nc file fields which are necessary for restart
