Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 2364)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 2368)
@@ -19,4 +19,5 @@
    USE par_oce         ! ocean parameter
    USE lib_print       ! formated print library
+   USE nc4interface
 
    IMPLICIT NONE
@@ -62,15 +63,5 @@
 #endif
 
-!$AGRIF_DO_NOT_TREAT
-   TYPE, PUBLIC :: snc4_ctl                            !: netcdf4 chunking control structure (always needed for decision making)
-      SEQUENCE
-      INTEGER :: ni
-      INTEGER :: nj
-      INTEGER :: nk
-      LOGICAL :: luse
-   END TYPE snc4_ctl
-
-   TYPE(snc4_ctl) :: snc4set                          !: netcdf4 chunking control structure (always needed for decision making)
-!$AGRIF_END_DO_NOT_TREAT
+   TYPE(snc4_ctl)     :: snc4set                       !: netcdf4 chunking control structure (always needed for decision making)
 
 
Index: branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90
===================================================================
--- branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90	(revision 2364)
+++ branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90	(revision 2368)
@@ -40,12 +40,4 @@
    END INTERFACE
 
-#if ! defined key_netcdf4
-   !!--------------------------------------------------------------------
-   !! NOT 'key_netcdf4' Defines dummy routines for netcdf4
-   !!                   calls when compiling without netcdf4 libraries
-   !!--------------------------------------------------------------------
-   PUBLIC NF90_DEF_VAR_CHUNKING, NF90_DEF_VAR_DEFLATE ! contained below
-   INTEGER :: NF90_HDF5
-#endif
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -77,4 +69,5 @@
       INTEGER            ::   ichunk           ! temporary storage of nn_chunksz
       INTEGER            ::   imode            ! creation mode flag: NF90_CLOBBER or NF90_NOCLOBBER or NF90_HDF5
+      INTEGER            ::   ihdf5            ! local variable for retrieval of value for NF90_HDF5
       LOGICAL            ::   llclobber        ! local definition of ln_clobber
       !---------------------------------------------------------------------
@@ -116,6 +109,7 @@
             IF( snc4set%luse ) THEN
                IF(lwp) WRITE(numout,*) TRIM(clinfo)//' creating file: '//TRIM(cdname)//' in hdf5 (netcdf4) mode'
-               IF( llclobber ) THEN   ;   imode = IOR(NF90_HDF5, NF90_CLOBBER)
-               ELSE                   ;   imode = IOR(NF90_HDF5, NF90_NOCLOBBER)
+               CALL GET_NF90_SYMBOL("NF90_HDF5", ihdf5)
+               IF( llclobber ) THEN   ;   imode = IOR(ihdf5, NF90_CLOBBER)
+               ELSE                   ;   imode = IOR(ihdf5, NF90_NOCLOBBER)
                ENDIF
                CALL iom_nf90_check(NF90_CREATE( TRIM(cdname), imode, if90id ), clinfo)
@@ -496,6 +490,6 @@
             ichunksz(4) = 1                                                            ! Do not allow chunks to span the
                                                                                        ! unlimited dimension
-            CALL iom_nf90_check(NF90_DEF_VAR_CHUNKING(if90id, idvar, ichunkalg, ichunksz), clinfo)
-            CALL iom_nf90_check(NF90_DEF_VAR_DEFLATE(if90id, idvar, ishuffle, ideflate, ideflate_level), clinfo)
+            CALL iom_nf90_check(SET_NF90_DEF_VAR_CHUNKING(if90id, idvar, ichunkalg, ichunksz), clinfo)
+            CALL iom_nf90_check(SET_NF90_DEF_VAR_DEFLATE(if90id, idvar, ishuffle, ideflate, ideflate_level), clinfo)
             IF(lwp) WRITE(numout,*) TRIM(clinfo)//' chunked ok. Chunks sizes: ', ichunksz
          ENDIF
@@ -579,35 +573,4 @@
    END SUBROUTINE iom_nf90_check
 
-#if ! defined key_netcdf4
-
-      !!--------------------------------------------------------------------
-      !! NOT 'key_netcdf4' Defines dummy routines for netcdf4
-      !!                   calls when compiling without netcdf4 libraries
-      !!--------------------------------------------------------------------
-
-   INTEGER FUNCTION NF90_DEF_VAR_CHUNKING(idum1, idum2, idum3, iarr1)
-      !!--------------------------------------------------------------------
-      !!                   ***  SUBROUTINE NF90_DEF_VAR_CHUNKING  ***
-      !!
-      !! ** Purpose :   Dummy NetCDF4 routine to enable compiling with NetCDF3 libraries
-      !!--------------------------------------------------------------------
-      INTEGER,               INTENT(in) :: idum1, idum2, idum3
-      INTEGER, DIMENSION(4), INTENT(in) :: iarr1
-      IF(lwp) WRITE(numout,*) 'Warning: Attempt to chunk output variable without NetCDF4 support'
-      NF90_DEF_VAR_CHUNKING = -1
-   END FUNCTION NF90_DEF_VAR_CHUNKING
-
-   INTEGER FUNCTION NF90_DEF_VAR_DEFLATE(idum1, idum2, idum3, idum4, idum5)
-      !!--------------------------------------------------------------------
-      !!                   ***  SUBROUTINE NF90_DEF_VAR_DEFLATE  ***
-      !!
-      !! ** Purpose :   Dummy NetCDF4 routine to enable compiling with NetCDF3 libraries
-      !!--------------------------------------------------------------------
-      INTEGER,               INTENT(in) :: idum1, idum2, idum3, idum4, idum5
-      IF(lwp) WRITE(numout,*) 'Warning: Attempt to compress output variable without NetCDF4 support'
-      NF90_DEF_VAR_DEFLATE = -1
-   END FUNCTION NF90_DEF_VAR_DEFLATE
-#endif
-
    !!======================================================================
 END MODULE iom_nf90
