Index: XMLIO_V2/dev/dev_rv/Makefile.wk
===================================================================
--- XMLIO_V2/dev/dev_rv/Makefile.wk	(revision 248)
+++ XMLIO_V2/dev/dev_rv/Makefile.wk	(revision 249)
@@ -15,5 +15,5 @@
 VTK       = yes
 GUI       = no
-NPROC     = 1
+NPROC     = 5
 #VERSION   = 4
 CSUITE    = gnu
@@ -394,9 +394,11 @@
 
 ifeq ($(VERSION), 4)
-	ELEMS_FOR = domain_interface domaingroup_interface \
-	            field_interface  fieldgroup_interface  \
-	            file_interface   filegroup_interface   \
-	            axis_interface   axisgroup_interface   axis  \
-	            context_interface xml_tree
+	ELEMS_FOR = idate \
+               domain_interface domaingroup_interface idomain \
+               field_interface  fieldgroup_interface  ifield  \
+               file_interface   filegroup_interface   ifile   \
+               axis_interface   axisgroup_interface   iaxis   \
+               grid_interface   gridgroup_interface   igrid   \
+               context_interface icontext ixml_tree idata    
 endif
             
@@ -406,5 +408,5 @@
 
 ifeq ($(VERSION), 4)
-	ELEMS_CPP = object exception xml_node xml_parser inetcdf4 inetcdf4_adv lscereader mpi_interface
+	ELEMS_CPP = object exception xml_node xml_parser inetcdf4 inetcdf4_adv onetcdf4 lscereader mpi_interface
 endif
 
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/axis.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/axis.f90	(revision 248)
+++ 	(revision )
@@ -1,132 +1,0 @@
-MODULE AXIS
-   USE, INTRINSIC :: ISO_C_BINDING
-   USE AXIS_INTERFACE
-   USE AXISGROUP_INTERFACE
-   
-   TYPE XAxisHandle
-      INTEGER(kind = C_INTPTR_T) :: daddr
-   END TYPE XAxisHandle
-   
-   TYPE XAxisGroupHandle
-      INTEGER(kind = C_INTPTR_T) :: daddr
-   END TYPE XAxisGroupHandle
-   
-   !----------------------------------------------------------------------------
-   INTERFACE set_axis_attributes
-      MODULE PROCEDURE set_axis_attributes_id,set_axis_attributes_hdl
-   END INTERFACE  
-   
-   INTERFACE set_axis_group_attributes
-      MODULE PROCEDURE set_axisgroup_attributes_id,set_axisgroup_attributes_hdl
-   END INTERFACE  
-   !----------------------------------------------------------------------------
-     
-   CONTAINS ! Fonctions disponibles pour les utilisateurs.
-
-   SUBROUTINE set_axis_attributes_id(axis_id, name_, standard_name_, long_name_, unit_, size_, zvalue_)
-      IMPLICIT NONE
-      TYPE(XAxisHandle)                                      :: axis_hdl
-      CHARACTER(len = *)                        , INTENT(IN) :: axis_id
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: standard_name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: long_name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: unit_
-      INTEGER                         , OPTIONAL, INTENT(IN) :: size_
-      REAL    (kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: zvalue_(:)
-      
-      CALL axis_handle_create(axis_hdl, axis_id)
-      CALL set_axis_attributes_hdl(axis_hdl, name_, standard_name_, long_name_, unit_, size_, zvalue_)
-
-   END SUBROUTINE set_axis_attributes_id
-
-   SUBROUTINE set_axis_attributes_hdl(axis_hdl, name_, standard_name_, long_name_, unit_, size_, zvalue_)
-      IMPLICIT NONE
-      TYPE(XAxisHandle)                         , INTENT(IN) :: axis_hdl
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: standard_name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: long_name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: unit_
-      INTEGER                         , OPTIONAL, INTENT(IN) :: size_
-      REAL    (kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: zvalue_(:)
-      
-      IF (PRESENT(name_))           THEN
-         CALL xios_set_axis_name(axis_hdl%daddr, name_, len(name_))
-      END IF
-      IF (PRESENT(standard_name_))  THEN
-         CALL xios_set_axis_standard_name(axis_hdl%daddr, standard_name_, len(standard_name_))
-      END IF
-      IF (PRESENT(long_name_))      THEN
-         CALL xios_set_axis_long_name(axis_hdl%daddr, long_name_, len(long_name_))
-      END IF
-      IF (PRESENT(unit_))           THEN
-         CALL xios_set_axis_unit(axis_hdl%daddr, unit_, len(unit_))
-      END IF
-      IF (PRESENT(size_))           THEN
-         CALL xios_set_axis_size(axis_hdl%daddr, size_)
-      END IF
-      IF (PRESENT(zvalue_))         THEN
-         CALL xios_set_axis_zvalue(axis_hdl%daddr, zvalue_, size(zvalue_, 1))
-      END IF
-   END SUBROUTINE set_axis_attributes_hdl
-   
-   SUBROUTINE set_axisgroup_attributes_id(axisgroup_id, name_, standard_name_, long_name_, unit_, size_, zvalue_)
-      IMPLICIT NONE
-      TYPE(XAxisGroupHandle)                                 :: axisgroup_hdl
-      CHARACTER(len = *)                        , INTENT(IN) :: axisgroup_id
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: standard_name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: long_name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: unit_
-      INTEGER                         , OPTIONAL, INTENT(IN) :: size_
-      REAL    (kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: zvalue_(:)
-      
-      CALL axisgroup_handle_create(axisgroup_hdl, axisgroup_id)
-      CALL set_axisgroup_attributes_hdl(axisgroup_hdl, name_, standard_name_, long_name_, unit_, size_, zvalue_)
-
-   END SUBROUTINE set_axisgroup_attributes_id
-   
-   SUBROUTINE set_axisgroup_attributes_hdl(axisgroup_hdl, name_, standard_name_, long_name_, unit_, size_, zvalue_)
-      IMPLICIT NONE
-      TYPE(XAxisGroupHandle)                    , INTENT(IN) :: axisgroup_hdl
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: standard_name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: long_name_
-      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: unit_
-      INTEGER                         , OPTIONAL, INTENT(IN) :: size_
-      REAL    (kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: zvalue_(:)
-      
-      IF (PRESENT(name_))           THEN
-         CALL xios_set_axisgroup_name(axisgroup_hdl%daddr, name_, len(name_))
-      END IF
-      IF (PRESENT(standard_name_))  THEN
-         CALL xios_set_axisgroup_standard_name(axisgroup_hdl%daddr, standard_name_, len(standard_name_))
-      END IF
-      IF (PRESENT(long_name_))      THEN
-         CALL xios_set_axisgroup_long_name(axisgroup_hdl%daddr, long_name_, len(long_name_))
-      END IF
-      IF (PRESENT(unit_))           THEN
-         CALL xios_set_axisgroup_unit(axisgroup_hdl%daddr, unit_, len(unit_))
-      END IF
-      IF (PRESENT(size_))           THEN
-         CALL xios_set_axisgroup_size(axisgroup_hdl%daddr, size_)
-      END IF
-      IF (PRESENT(zvalue_))         THEN
-         CALL xios_set_axisgroup_zvalue(axisgroup_hdl%daddr, zvalue_, size(zvalue_, 1))
-      END IF
-   END SUBROUTINE set_axisgroup_attributes_hdl
-
-   SUBROUTINE axis_handle_create(ret, idt)
-      IMPLICIT NONE
-      TYPE(XAxisHandle) , INTENT(OUT):: ret
-      CHARACTER(len = *), INTENT(IN) :: idt      
-      CALL xios_axis_handle_create(ret%daddr, idt, len(idt))            
-   END SUBROUTINE axis_handle_create
-   
-   SUBROUTINE axisgroup_handle_create(ret, idt)
-      IMPLICIT NONE
-      TYPE(XAxisGroupHandle), INTENT(OUT):: ret
-      CHARACTER(len = *)    , INTENT(IN) :: idt      
-      CALL xios_axis_handle_create(ret%daddr, idt, len(idt))            
-   END SUBROUTINE axisgroup_handle_create
-
-END MODULE AXIS
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/axis_interface.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/axis_interface.f90	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/axis_interface.f90	(revision 249)
@@ -6,14 +6,14 @@
       SUBROUTINE xios_set_axis_name(axis_hdl, name, name_size) BIND(C)
          USE ISO_C_BINDING
-         INTEGER  (kind = C_INTPTR_T), VALUE       :: axis_hdl
-         CHARACTER(kind = C_CHAR)   , DIMENSION(*) :: name
-         INTEGER  (kind = C_INT)                   :: name_size
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: axis_hdl
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+         INTEGER  (kind = C_INT)     , VALUE        :: name_size
       END SUBROUTINE xios_set_axis_name
 
       SUBROUTINE xios_set_axis_standard_name(axis_hdl, standard_name, standard_name_size) BIND(C)
          USE ISO_C_BINDING
-         INTEGER  (kind = C_INTPTR_T), VALUE       :: axis_hdl
-         CHARACTER(kind = C_CHAR)   , DIMENSION(*) :: standard_name
-         INTEGER  (kind = C_INT)                   :: standard_name_size
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: axis_hdl
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+         INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
       END SUBROUTINE xios_set_axis_standard_name
 
@@ -21,6 +21,6 @@
          USE ISO_C_BINDING
          INTEGER  (kind = C_INTPTR_T), VALUE       :: axis_hdl
-         CHARACTER(kind = C_CHAR)   , DIMENSION(*) :: long_name
-         INTEGER  (kind = C_INT)                   :: long_name_size
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+         INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
       END SUBROUTINE xios_set_axis_long_name
 
@@ -28,6 +28,6 @@
          USE ISO_C_BINDING
          INTEGER  (kind = C_INTPTR_T), VALUE       :: axis_hdl
-         CHARACTER(kind = C_CHAR)   , DIMENSION(*) :: unit
-         INTEGER  (kind = C_INT)                   :: unit_size
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+         INTEGER  (kind = C_INT)     , VALUE        :: unit_size
       END SUBROUTINE xios_set_axis_unit
 
@@ -35,5 +35,5 @@
          USE ISO_C_BINDING
          INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl
-         INTEGER (kind = C_INT)             :: size
+         INTEGER (kind = C_INT)     , VALUE :: size
       END SUBROUTINE xios_set_axis_size
 
@@ -42,5 +42,5 @@
          INTEGER (kind = C_INTPTR_T), VALUE        :: axis_hdl
          REAL    (kind = C_DOUBLE)  , DIMENSION(*) :: zvalue
-         INTEGER (kind = C_INT)                    :: zvalue_extent1
+         INTEGER (kind = C_INT)     , VALUE        :: zvalue_extent1
       END SUBROUTINE xios_set_axis_zvalue
       
@@ -51,5 +51,5 @@
          INTEGER  (kind = C_INT)     , VALUE        :: idt_size
       END SUBROUTINE xios_axis_handle_create
-     
+       
    END INTERFACE
      
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/axisgroup_interface.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/axisgroup_interface.f90	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/axisgroup_interface.f90	(revision 249)
@@ -7,27 +7,27 @@
          USE ISO_C_BINDING
          INTEGER  (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
-         CHARACTER(kind = C_CHAR)   , DIMENSION(*) :: name
-         INTEGER  (kind = C_INT)                   :: name_size
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: name
+         INTEGER  (kind = C_INT)     , VALUE       :: name_size
       END SUBROUTINE xios_set_axisgroup_name
 
       SUBROUTINE xios_set_axisgroup_standard_name(axisgroup_hdl, standard_name, standard_name_size) BIND(C)
          USE ISO_C_BINDING
-         INTEGER  (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
-         CHARACTER(kind = C_CHAR)   , DIMENSION(*) :: standard_name
-         INTEGER  (kind = C_INT)                   :: standard_name_size
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: axisgroup_hdl
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: standard_name
+         INTEGER  (kind = C_INT)     , VALUE        :: standard_name_size
       END SUBROUTINE xios_set_axisgroup_standard_name
 
       SUBROUTINE xios_set_axisgroup_long_name(axisgroup_hdl, long_name, long_name_size) BIND(C)
          USE ISO_C_BINDING
-         INTEGER  (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
-         CHARACTER(kind = C_CHAR)   , DIMENSION(*) :: long_name
-         INTEGER  (kind = C_INT)                   :: long_name_size
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: axisgroup_hdl
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: long_name
+         INTEGER  (kind = C_INT)     , VALUE        :: long_name_size
       END SUBROUTINE xios_set_axisgroup_long_name
 
       SUBROUTINE xios_set_axisgroup_unit(axisgroup_hdl, unit, unit_size) BIND(C)
          USE ISO_C_BINDING
-         INTEGER  (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl
-         CHARACTER(kind = C_CHAR)   , DIMENSION(*) :: unit
-         INTEGER  (kind = C_INT)                   :: unit_size
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: axisgroup_hdl
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: unit
+         INTEGER  (kind = C_INT)     , VALUE        :: unit_size
       END SUBROUTINE xios_set_axisgroup_unit
 
@@ -35,5 +35,5 @@
          USE ISO_C_BINDING
          INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl
-         INTEGER (kind = C_INT)             :: size
+         INTEGER (kind = C_INT)     , VALUE :: size
       END SUBROUTINE xios_set_axisgroup_size
 
@@ -42,5 +42,5 @@
          INTEGER (kind = C_INTPTR_T), VALUE        :: axisgroup_hdl
          REAL    (kind = C_DOUBLE)  , DIMENSION(*) :: zvalue
-         INTEGER (kind = C_INT)                    :: zvalue_extent1
+         INTEGER (kind = C_INT)     , VALUE        :: zvalue_extent1
       END SUBROUTINE xios_set_axisgroup_zvalue
   
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/context_interface.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/context_interface.f90	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/context_interface.f90	(revision 249)
@@ -24,4 +24,26 @@
          INTEGER  (kind = C_INT)                    :: output_dir_size
       END SUBROUTINE xios_set_context_output_dir
+      
+      SUBROUTINE xios_context_handle_create(ret, idt, idt_size) BIND(C)
+         import C_CHAR, C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE xios_context_handle_create
+      
+      SUBROUTINE xios_context_set_current(context, withswap) BIND(C)
+         import C_BOOL, C_INT, C_INTPTR_T
+         INTEGER (kind = C_INTPTR_T), VALUE :: context
+         LOGICAL (kind = C_BOOL)    , VALUE :: withswap
+      END SUBROUTINE xios_context_set_current
+
+      SUBROUTINE xios_context_create(context, context_id, context_id_size, calendar_type, &
+                                     year, month, day, hour, minute, second) BIND(C)
+         import C_CHAR, C_INT, C_INTPTR_T
+         INTEGER  (kind = C_INTPTR_T)               :: context
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: context_id
+         INTEGER  (kind = C_INT)     , VALUE        :: context_id_size
+         INTEGER  (kind = C_INT)     , VALUE        :: calendar_type, year, month, day, hour, minute, second
+      END SUBROUTINE xios_context_create
      
    END INTERFACE
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/domain_interface.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/domain_interface.f90	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/domain_interface.f90	(revision 249)
@@ -200,4 +200,11 @@
       END SUBROUTINE xios_set_domain_latvalue
        
+      SUBROUTINE xios_domain_handle_create(ret, idt, idt_size) BIND(C)
+         import C_CHAR, C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE xios_domain_handle_create
+       
    END INTERFACE
        
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/domaingroup_interface.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/domaingroup_interface.f90	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/domaingroup_interface.f90	(revision 249)
@@ -199,4 +199,11 @@
          INTEGER (kind = C_INT)                    :: latvalue_extent1
       END SUBROUTINE xios_set_domaingroup_latvalue
+      
+      SUBROUTINE xios_domaingroup_handle_create(ret, idt, idt_size) BIND(C)
+         import C_CHAR, C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE xios_domaingroup_handle_create
        
    END INTERFACE
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/field_interface.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/field_interface.f90	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/field_interface.f90	(revision 249)
@@ -98,4 +98,11 @@
       END SUBROUTINE xios_set_field_default_value
    
+      SUBROUTINE xios_field_handle_create(ret, idt, idt_size) BIND(C)
+         import C_CHAR, C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE xios_field_handle_create
+   
    END INTERFACE
    
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/fieldgroup_interface.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/fieldgroup_interface.f90	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/fieldgroup_interface.f90	(revision 249)
@@ -97,4 +97,11 @@
          REAL    (kind = C_DOUBLE)          :: default_value
       END SUBROUTINE xios_set_fieldgroup_default_value
+      
+      SUBROUTINE xios_domaingroup_handle_create(ret, idt, idt_size) BIND(C)
+         import C_CHAR, C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE xios_domaingroup_handle_create
    
    END INTERFACE
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/file_interface.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/file_interface.f90	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/file_interface.f90	(revision 249)
@@ -37,4 +37,11 @@
       END SUBROUTINE xios_set_file_enabled
    
+      SUBROUTINE xios_file_handle_create(ret, idt, idt_size) BIND(C)
+         import C_CHAR, C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE xios_file_handle_create
+    
    END INTERFACE
    
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/filegroup_interface.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/filegroup_interface.f90	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/filegroup_interface.f90	(revision 249)
@@ -36,5 +36,12 @@
          LOGICAL (kind = C_BOOL)            :: enabled
       END SUBROUTINE xios_set_filegroup_enabled
-   
+      
+      SUBROUTINE xios_filegroup_handle_create(ret, idt, idt_size) BIND(C)
+         import C_CHAR, C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE xios_filegroup_handle_create
+
    END INTERFACE
    
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/grid_interface.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/grid_interface.f90	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/grid_interface.f90	(revision 249)
@@ -31,4 +31,11 @@
          INTEGER  (kind = C_INT)                    :: axis_ref_size
       END SUBROUTINE xios_set_grid_axis_ref
+      
+      SUBROUTINE xios_grid_handle_create(ret, idt, idt_size) BIND(C)
+         import C_CHAR, C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE xios_grid_handle_create
      
    END INTERFACE
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/gridgroup_interface.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/gridgroup_interface.f90	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/gridgroup_interface.f90	(revision 249)
@@ -31,5 +31,12 @@
          INTEGER  (kind = C_INT)                    :: axis_ref_size
       END SUBROUTINE xios_set_gridgroup_axis_ref
-     
+      
+      SUBROUTINE xios_domaingroup_handle_create(ret, idt, idt_size) BIND(C)
+         import C_CHAR, C_INTPTR_T, C_INT
+         INTEGER  (kind = C_INTPTR_T)               :: ret
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: idt
+         INTEGER  (kind = C_INT)     , VALUE        :: idt_size
+      END SUBROUTINE xios_domaingroup_handle_create
+      
    END INTERFACE
      
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/iaxis.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/iaxis.cpp	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/iaxis.cpp	(revision 249)
@@ -0,0 +1,96 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+extern "C"
+{
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+   // ----------------------- RedÃ©finition de types ----------------------------
+   
+   typedef void * XAxisPtr, XAxisGroupPtr;
+
+   // ------------------------- Attributs des axes -----------------------------
+   void xios_set_axis_name 
+      (XAxisPtr axis_hdl, const char * name , long int name_size)
+   {
+
+   }
+
+   void xios_set_axis_standard_name
+      (XAxisPtr axis_hdl, const char * standard_name , long int standard_name_size)
+   {
+
+   }
+    
+   void xios_set_axis_long_name 
+      (XAxisPtr axis_hdl, const char * long_name , long int long_name_size)
+   {
+
+   }
+
+   void xios_set_axis_unit 
+      (XAxisPtr axis_hdl, const char * unit , long int unit_size)
+   {
+
+   }
+    
+   void xios_set_axis_size(void * axis_hdl, long int size)
+   {
+
+   }
+
+   void xios_set_axis_zvalue 
+      (XAxisPtr axis_hdl, const double * zvalue , long intzvalue_extent1)
+   {
+
+   }
+   
+   // -------------------- Attributs des groupe d'axes -------------------------
+   void xios_set_axisgroup_name 
+      (XAxisGroupPtr axisgroup_hdl, const char * name , long int name_size)
+   {
+
+   }
+
+   void xios_set_axisgroup_standard_name
+      (XAxisGroupPtr axisgroup_hdl, const char * standard_name , long int standard_name_size)
+   {
+
+   }
+    
+   void xios_set_axisgroup_long_name 
+      (XAxisGroupPtr axisgroup_hdl, const char * long_name , long int long_name_size)
+   {
+
+   }
+
+   void xios_set_axisgroup_unit 
+      (XAxisGroupPtr axisgroup_hdl, const char * unit , long int unit_size)
+   {
+
+   }
+    
+   void xios_set_axisgroup_size(XAxisGroupPtr axisgroup_hdl, long int size)
+   {
+
+   }
+
+   void xios_set_axisgroup_zvalue 
+      (XAxisGroupPtr axisgroup_hdl, const double * zvalue , long int zvalue_extent1)
+   {
+
+   }
+   
+   // ------------------------ CrÃ©ation des handle -----------------------------
+   void xios_axis_handle_create (XAxisPtr * _ret, const char * _id, long int _id_len)
+   {
+      
+   }
+   
+   void xios_axisgroup_handle_create (XAxisGroupPtr * _ret, const char * _id, long int _id_len)
+   {
+      
+   }
+   
+} // extern "C"
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/iaxis.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/iaxis.f90	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/iaxis.f90	(revision 249)
@@ -0,0 +1,132 @@
+MODULE IAXIS
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE AXIS_INTERFACE
+   USE AXISGROUP_INTERFACE
+   
+   TYPE XAxisHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XAxisHandle
+   
+   TYPE XAxisGroupHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XAxisGroupHandle
+   
+   !----------------------------------------------------------------------------
+   INTERFACE set_axis_attributes
+      MODULE PROCEDURE set_axis_attributes_id,set_axis_attributes_hdl
+   END INTERFACE  
+   
+   INTERFACE set_axis_group_attributes
+      MODULE PROCEDURE set_axisgroup_attributes_id,set_axisgroup_attributes_hdl
+   END INTERFACE  
+   !----------------------------------------------------------------------------
+     
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE set_axis_attributes_id(axis_id, name_, standard_name_, long_name_, unit_, size_, zvalue_)
+      IMPLICIT NONE
+      TYPE(XAxisHandle)                                      :: axis_hdl
+      CHARACTER(len = *)                        , INTENT(IN) :: axis_id
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: unit_
+      INTEGER                         , OPTIONAL, INTENT(IN) :: size_
+      REAL    (kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: zvalue_(:)
+      
+      CALL axis_handle_create(axis_hdl, axis_id)
+      CALL set_axis_attributes_hdl(axis_hdl, name_, standard_name_, long_name_, unit_, size_, zvalue_)
+
+   END SUBROUTINE set_axis_attributes_id
+
+   SUBROUTINE set_axis_attributes_hdl(axis_hdl, name_, standard_name_, long_name_, unit_, size_, zvalue_)
+      IMPLICIT NONE
+      TYPE(XAxisHandle)                         , INTENT(IN) :: axis_hdl
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: unit_
+      INTEGER                         , OPTIONAL, INTENT(IN) :: size_
+      REAL    (kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: zvalue_(:)
+      
+      IF (PRESENT(name_))           THEN
+         CALL xios_set_axis_name(axis_hdl%daddr, name_, len(name_))
+      END IF
+      IF (PRESENT(standard_name_))  THEN
+         CALL xios_set_axis_standard_name(axis_hdl%daddr, standard_name_, len(standard_name_))
+      END IF
+      IF (PRESENT(long_name_))      THEN
+         CALL xios_set_axis_long_name(axis_hdl%daddr, long_name_, len(long_name_))
+      END IF
+      IF (PRESENT(unit_))           THEN
+         CALL xios_set_axis_unit(axis_hdl%daddr, unit_, len(unit_))
+      END IF
+      IF (PRESENT(size_))           THEN
+         CALL xios_set_axis_size(axis_hdl%daddr, size_)
+      END IF
+      IF (PRESENT(zvalue_))         THEN
+         CALL xios_set_axis_zvalue(axis_hdl%daddr, zvalue_, size(zvalue_, 1))
+      END IF
+   END SUBROUTINE set_axis_attributes_hdl
+   
+   SUBROUTINE set_axisgroup_attributes_id(axisgroup_id, name_, standard_name_, long_name_, unit_, size_, zvalue_)
+      IMPLICIT NONE
+      TYPE(XAxisGroupHandle)                                 :: axisgroup_hdl
+      CHARACTER(len = *)                        , INTENT(IN) :: axisgroup_id
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: unit_
+      INTEGER                         , OPTIONAL, INTENT(IN) :: size_
+      REAL    (kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: zvalue_(:)
+      
+      CALL axisgroup_handle_create(axisgroup_hdl, axisgroup_id)
+      CALL set_axisgroup_attributes_hdl(axisgroup_hdl, name_, standard_name_, long_name_, unit_, size_, zvalue_)
+
+   END SUBROUTINE set_axisgroup_attributes_id
+   
+   SUBROUTINE set_axisgroup_attributes_hdl(axisgroup_hdl, name_, standard_name_, long_name_, unit_, size_, zvalue_)
+      IMPLICIT NONE
+      TYPE(XAxisGroupHandle)                    , INTENT(IN) :: axisgroup_hdl
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)              , OPTIONAL, INTENT(IN) :: unit_
+      INTEGER                         , OPTIONAL, INTENT(IN) :: size_
+      REAL    (kind = 8), dimension(*), OPTIONAL, INTENT(IN) :: zvalue_(:)
+      
+      IF (PRESENT(name_))           THEN
+         CALL xios_set_axisgroup_name(axisgroup_hdl%daddr, name_, len(name_))
+      END IF
+      IF (PRESENT(standard_name_))  THEN
+         CALL xios_set_axisgroup_standard_name(axisgroup_hdl%daddr, standard_name_, len(standard_name_))
+      END IF
+      IF (PRESENT(long_name_))      THEN
+         CALL xios_set_axisgroup_long_name(axisgroup_hdl%daddr, long_name_, len(long_name_))
+      END IF
+      IF (PRESENT(unit_))           THEN
+         CALL xios_set_axisgroup_unit(axisgroup_hdl%daddr, unit_, len(unit_))
+      END IF
+      IF (PRESENT(size_))           THEN
+         CALL xios_set_axisgroup_size(axisgroup_hdl%daddr, size_)
+      END IF
+      IF (PRESENT(zvalue_))         THEN
+         CALL xios_set_axisgroup_zvalue(axisgroup_hdl%daddr, zvalue_, size(zvalue_, 1))
+      END IF
+   END SUBROUTINE set_axisgroup_attributes_hdl
+
+   SUBROUTINE axis_handle_create(ret, idt)
+      IMPLICIT NONE
+      TYPE(XAxisHandle) , INTENT(OUT):: ret
+      CHARACTER(len = *), INTENT(IN) :: idt      
+      CALL xios_axis_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE axis_handle_create
+   
+   SUBROUTINE axisgroup_handle_create(ret, idt)
+      IMPLICIT NONE
+      TYPE(XAxisGroupHandle), INTENT(OUT):: ret
+      CHARACTER(len = *)    , INTENT(IN) :: idt      
+      CALL xios_axisgroup_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE axisgroup_handle_create
+
+END MODULE IAXIS
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/icontext.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/icontext.f90	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/icontext.f90	(revision 249)
@@ -0,0 +1,82 @@
+MODULE ICONTEXT
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE CONTEXT_INTERFACE
+   USE IDATE
+   
+   TYPE XContextHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XContextHandle
+      
+   !----------------------------------------------------------------------------
+   INTERFACE set_context_attributes
+      MODULE PROCEDURE set_context_attributes_id,set_context_attributes_hdl
+   END INTERFACE  
+   !----------------------------------------------------------------------------
+   
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+   
+   SUBROUTINE set_context_attributes_id( context_id, calendar_type_, start_date_, output_dir_)
+      IMPLICIT NONE
+      TYPE(XContextHandle)                       :: context_hdl
+      CHARACTER(len = *)            , INTENT(IN) :: context_id
+      CHARACTER(len = *)  , OPTIONAL, INTENT(IN) :: calendar_type_
+      CHARACTER(len = *)  , OPTIONAL, INTENT(IN) :: start_date_
+      CHARACTER(len = *)  , OPTIONAL, INTENT(IN) :: output_dir_
+         
+      CALL context_handle_create(context_hdl, context_id)
+      CALL set_context_attributes_hdl( context_hdl, calendar_type_, start_date_, output_dir_)
+   END SUBROUTINE set_context_attributes_id
+
+   SUBROUTINE set_context_attributes_hdl( context_hdl, calendar_type_, start_date_, output_dir_)
+      IMPLICIT NONE
+      TYPE(XContextHandle)          , INTENT(IN) :: context_hdl
+      CHARACTER(len = *)  , OPTIONAL, INTENT(IN) :: calendar_type_
+      CHARACTER(len = *)  , OPTIONAL, INTENT(IN) :: start_date_
+      CHARACTER(len = *)  , OPTIONAL, INTENT(IN) :: output_dir_   
+         
+      IF (PRESENT(calendar_type_)) THEN
+         CALL xios_set_context_calendar_type(context_hdl%daddr, calendar_type_, len(calendar_type_))
+      END IF
+      IF (PRESENT(start_date_))    THEN
+         CALL xios_set_context_start_date(context_hdl%daddr, start_date_, len(start_date_))
+      END IF
+      IF (PRESENT(output_dir_))    THEN
+         CALL xios_set_context_output_dir(context_hdl%daddr, output_dir_, len(output_dir_))
+      END IF
+   END SUBROUTINE set_context_attributes_hdl
+
+   SUBROUTINE context_handle_create(ret, idt)
+      IMPLICIT NONE
+      TYPE(XContextHandle), INTENT(OUT):: ret
+      CHARACTER(len = *)  , INTENT(IN) :: idt      
+      CALL xios_context_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE context_handle_create
+   
+   SUBROUTINE context_set_current(context, withswap)
+      TYPE(XContextHandle)          , INTENT(IN) :: context
+      LOGICAL             , OPTIONAL, INTENT(IN) :: withswap
+      LOGICAL (kind = 1)                       :: wswap
+      IF (PRESENT(withswap)) THEN
+         wswap = withswap
+      ELSE
+         wswap = .FALSE.
+      END IF
+      CALL xios_context_set_current(context%daddr, wswap)
+   END SUBROUTINE context_set_current
+   
+   SUBROUTINE context_create(context_hdl, context_id, calendar_type, init_date)
+      TYPE(XContextHandle)          , INTENT(OUT) :: context_hdl
+      CHARACTER(len = *)            , INTENT(IN)  :: context_id
+      INTEGER                       , INTENT(IN)  :: calendar_type
+      TYPE(XDate)         , OPTIONAL, INTENT(IN)  :: init_date
+      IF (PRESENT(init_date)) THEN
+         CALL xios_context_create(context_hdl%daddr, context_id, len(context_id), calendar_type, &
+                                  init_date%year, init_date%month, init_date%day, &
+                                  init_date%hour, init_date%minute, init_date%second)
+      ELSE
+         CALL xios_context_create(context_hdl%daddr, context_id, len(context_id), calendar_type, &
+                                 0, 1, 1, 0, 0, 0)
+      END IF
+   END SUBROUTINE context_create
+   
+END MODULE ICONTEXT
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/idata.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/idata.f90	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/idata.f90	(revision 249)
@@ -0,0 +1,134 @@
+MODULE IDATA
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE ICONTEXT
+   
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+   
+      SUBROUTINE xios_dtreatment_start(context_hdl, filetype, comm_client_server, comm_server) BIND(C)
+         IMPORT C_INTPTR_T, C_INT
+         INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl
+         INTEGER (kind = C_INT)     , VALUE :: filetype, comm_client_server, comm_server
+      END SUBROUTINE xios_dtreatment_start
+
+      SUBROUTINE xios_dtreatment_end() BIND(C)
+         ! Sans argument
+      END SUBROUTINE xios_dtreatment_end
+
+      SUBROUTINE xios_write_data_k81(fieldid, fieldid_size, data_k8, data_Xsize) BIND(C)
+         IMPORT C_INT, C_CHAR, C_DOUBLE
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize
+      END SUBROUTINE xios_write_data_k81
+      
+      SUBROUTINE xios_write_data_k82(fieldid, fieldid_size, data_k8, data_Xsize, data_Ysize) BIND(C)
+         IMPORT C_INT, C_CHAR, C_DOUBLE
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize
+      END SUBROUTINE xios_write_data_k82
+      
+      SUBROUTINE xios_write_data_k83(fieldid, fieldid_size, data_k8, data_Xsize, data_Ysize, data_Zsize) BIND(C)
+         IMPORT C_INT, C_CHAR, C_DOUBLE
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_DOUBLE), DIMENSION(*) :: data_k8
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize, data_Zsize
+      END SUBROUTINE xios_write_data_k83
+      
+      SUBROUTINE xios_write_data_k41(fieldid, fieldid_size, data_k4, data_Xsize) BIND(C)
+         IMPORT C_INT, C_CHAR, C_FLOAT
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize
+      END SUBROUTINE xios_write_data_k41
+      
+      SUBROUTINE xios_write_data_k42(fieldid, fieldid_size, data_k4, data_Xsize, data_Ysize) BIND(C)
+         IMPORT C_INT, C_CHAR, C_FLOAT
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize
+      END SUBROUTINE xios_write_data_k42
+      
+      SUBROUTINE xios_write_data_k43(fieldid, fieldid_size, data_k4, data_Xsize, data_Ysize, data_Zsize) BIND(C)
+         IMPORT C_INT, C_CHAR, C_FLOAT
+         CHARACTER(kind = C_CHAR)  , DIMENSION(*) :: fieldid
+         REAL     (kind = C_FLOAT) , DIMENSION(*) :: data_k4
+         INTEGER  (kind = C_INT)   , VALUE        :: fieldid_size
+         INTEGER  (kind = C_INT)   , VALUE        :: data_Xsize, data_Ysize, data_Zsize
+      END SUBROUTINE xios_write_data_k43
+      
+   END INTERFACE
+   
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+   
+   SUBROUTINE dtreatment_start(context_hdl, filetype, comm_client_server, comm_server)
+      TYPE(XContextHandle), INTENT(IN), VALUE    :: context_hdl
+      INTEGER             , INTENT(IN), OPTIONAL :: filetype , comm_client_server , comm_server
+      INTEGER                                    :: filetype_, comm_client_server_, comm_server_
+      IF (PRESENT(filetype)) THEN
+         filetype_ = filetype
+      ELSE
+         filetype_ = NETCDF4
+      END IF
+      IF (PRESENT(comm_client_server)) THEN
+         comm_client_server_ = comm_client_server
+      ELSE
+         comm_client_server_ = -1
+      END IF
+      IF (PRESENT(comm_server)) THEN
+         comm_server_ = comm_server
+      ELSE
+         comm_server_ = -1
+      END IF
+      CALL context_set_current(context_hdl)
+      CALL xios_dtreatment_start(context_hdl%daddr, filetype_, comm_client_server_, comm_server_)
+   END SUBROUTINE dtreatment_start
+   
+   SUBROUTINE dtreatment_end(context_hdl)
+      TYPE(XContextHandle), INTENT(IN), VALUE :: context_hdl
+      CALL context_set_current(context_hdl)
+      CALL xios_dtreatment_end()
+   END SUBROUTINE dtreatment_end
+   
+   SUBROUTINE write_data_k81(fieldid, data1d_k8)
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(IN) :: data1d_k8(:)
+      CALL xios_write_data_k81(fieldid, len(fieldid), data1d_k8, size(data1d_k8, 1))
+   END SUBROUTINE write_data_k81
+   
+   SUBROUTINE write_data_k82(fieldid, data2d_k8)
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(IN) :: data2d_k8(:,:)
+      CALL xios_write_data_k82(fieldid, len(fieldid), data2d_k8, size(data2d_k8, 1), size(data2d_k8, 2))
+   END SUBROUTINE write_data_k82
+   
+   SUBROUTINE write_data_k83(fieldid, data3d_k8)
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 8), DIMENSION(*), INTENT(IN) :: data3d_k8(:,:,:)
+      CALL xios_write_data_k83(fieldid, len(fieldid), data3d_k8, size(data3d_k8, 1), size(data3d_k8, 2), size(data3d_k8, 3))
+   END SUBROUTINE write_data_k83
+   
+   SUBROUTINE write_data_k41(fieldid, data1d_k4)
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(IN) :: data1d_k4(:)
+      CALL xios_write_data_k41(fieldid, len(fieldid), data1d_k4, size(data1d_k4, 1))
+   END SUBROUTINE write_data_k41
+   
+   SUBROUTINE write_data_k42(fieldid, data2d_k4)
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(IN) :: data2d_k4(:,:)
+      CALL xios_write_data_k42(fieldid, len(fieldid), data2d_k4, size(data2d_k4, 1), size(data2d_k4, 2))
+   END SUBROUTINE write_data_k42
+   
+   SUBROUTINE write_data_k43(fieldid, data3d_k4)
+      CHARACTER(len = *)               , INTENT(IN) :: fieldid
+      REAL     (kind = 4), DIMENSION(*), INTENT(IN) :: data3d_k4(:,:,:)
+      CALL xios_write_data_k43(fieldid, len(fieldid), data3d_k4, size(data3d_k4, 1), size(data3d_k4, 2), size(data3d_k4, 3))
+   END SUBROUTINE write_data_k43
+   
+END MODULE IDATA
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/idate.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/idate.f90	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/idate.f90	(revision 249)
@@ -0,0 +1,47 @@
+MODULE IDATE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   ! enum XCalendarType
+   INTEGER(kind = C_INT), PARAMETER :: D360 = 0 , ALLLEAP = 1 , NOLEAP = 2 , JULIAN = 3 , GREGORIAN = 4
+
+   TYPE XDate
+      INTEGER :: year, month, day, hour, minute, second
+   END TYPE XDate
+
+   TYPE XDuration
+      REAL(kind = 8) :: year, month, day, hour, minute, second
+   END TYPE XDuration
+   
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+   
+      SUBROUTINE xios_set_timestep(ts_year, ts_month, ts_day, ts_hour, ts_minute, ts_second) BIND(C)
+         IMPORT C_DOUBLE
+         REAL (kind = C_DOUBLE), VALUE :: ts_year, ts_month, ts_day, &
+                                          ts_hour, ts_minute, ts_second
+      END SUBROUTINE xios_set_timestep
+
+      SUBROUTINE xios_update_calendar(step) BIND(C)
+         IMPORT C_INT
+         INTEGER (kind = C_INT), VALUE :: step
+      END SUBROUTINE xios_update_calendar
+      
+   END INTERFACE
+   
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+   
+   SUBROUTINE set_timestep(timestep)
+      TYPE(XDuration), INTENT(IN):: timestep
+      CALL xios_set_timestep(timestep%year, timestep%month , timestep%day, &
+                             timestep%hour, timestep%minute, timestep%second)
+   END SUBROUTINE set_timestep
+   
+   SUBROUTINE update_calendar(step)
+      INTEGER, INTENT(IN):: step
+      IF (step < 1) THEN
+         PRINT *, "L'argument 'step' ne peut Ãªtre nÃ©gatif ou nul"
+         STOP
+      END IF
+      CALL xios_update_calendar(step)
+   END SUBROUTINE update_calendar
+   
+END MODULE IDATE
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/idomain.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/idomain.f90	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/idomain.f90	(revision 249)
@@ -0,0 +1,415 @@
+MODULE IDOMAIN
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE DOMAIN_INTERFACE
+   USE DOMAINGROUP_INTERFACE
+   
+   TYPE XDomainHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XDomainHandle
+   
+   TYPE XDomainGroupHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XDomainGroupHandle
+   
+   !----------------------------------------------------------------------------
+   INTERFACE set_domain_attributes
+      MODULE PROCEDURE set_domain_attributes_id,set_domain_attributes_hdl
+   END INTERFACE  
+   
+   INTERFACE set_domain_group_attributes
+      MODULE PROCEDURE set_domaingroup_attributes_id,set_domaingroup_attributes_hdl
+   END INTERFACE  
+   !----------------------------------------------------------------------------
+   
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+   
+   SUBROUTINE set_domaingroup_attributes_id                                                                        &
+   ( domaingroup_id, name_, standard_name_, long_name_, domaingroup_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_,  &
+     ni_, jbegin_, jend_, nj_, mask_, data_dim_, data_ni_, data_nj_, data_ibegin_, data_jbegin_,                   &
+     zoom_ni_, zoom_nj_, zoom_ibegin_, zoom_jbegin_, zoom_ni_loc_, zoom_nj_loc_, zoom_ibegin_loc_,                 &
+     zoom_jbegin_loc_, data_n_index_, data_i_index_, data_j_index_, lonvalue_, latvalue_)
+      IMPLICIT NONE
+      TYPE(XDomainGroupHandle)                                   :: domaingroup_hdl
+      CHARACTER(len = *)                       , INTENT(IN) :: domaingroup_id
+      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: domaingroup_group_ref_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: ni_glo_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: nj_glo_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: ibegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: iend_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: ni_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: jbegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: jend_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: nj_
+      LOGICAL                        , dimension(*), OPTIONAL, INTENT(IN) :: mask_(:,:)
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_dim_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_ni_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_nj_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_ibegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_jbegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_ni_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_nj_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_ibegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_jbegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_ni_loc_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_nj_loc_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_ibegin_loc_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_jbegin_loc_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_n_index_
+      INTEGER       , dimension(*)   , OPTIONAL, INTENT(IN) :: data_i_index_(:)
+      INTEGER       , dimension(*)   , OPTIONAL, INTENT(IN) :: data_j_index_(:)
+      REAL(kind = 8), dimension(*)   , OPTIONAL, INTENT(IN) :: lonvalue_(:)
+      REAL(kind = 8), dimension(*)   , OPTIONAL, INTENT(IN) :: latvalue_(:)
+ 
+      CALL domaingroup_handle_create(domaingroup_hdl, domaingroup_id)
+      CALL set_domaingroup_attributes_hdl                                                                          &
+   ( domaingroup_hdl, name_, standard_name_, long_name_, domaingroup_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_, &
+     ni_, jbegin_, jend_, nj_, mask_, data_dim_, data_ni_, data_nj_, data_ibegin_, data_jbegin_,                   &
+     zoom_ni_, zoom_nj_, zoom_ibegin_, zoom_jbegin_, zoom_ni_loc_, zoom_nj_loc_, zoom_ibegin_loc_,                 &
+     zoom_jbegin_loc_, data_n_index_, data_i_index_, data_j_index_, lonvalue_, latvalue_)
+
+   END SUBROUTINE set_domaingroup_attributes_id
+   
+   SUBROUTINE set_domaingroup_attributes_hdl                                                                       &
+   ( domaingroup_hdl,name_, standard_name_, long_name_, domaingroup_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_,  &
+     ni_, jbegin_, jend_, nj_, mask_, data_dim_, data_ni_, data_nj_, data_ibegin_, data_jbegin_,                   &
+     zoom_ni_, zoom_nj_, zoom_ibegin_, zoom_jbegin_, zoom_ni_loc_, zoom_nj_loc_, zoom_ibegin_loc_,                 &
+     zoom_jbegin_loc_, data_n_index_, data_i_index_, data_j_index_, lonvalue_, latvalue_)
+      IMPLICIT NONE
+      TYPE(XDomainGroupHandle)                   , INTENT(IN) :: domaingroup_hdl
+      CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: domaingroup_group_ref_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: ni_glo_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: nj_glo_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: ibegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: iend_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: ni_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: jbegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: jend_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: nj_
+      LOGICAL          , dimension(*)  , OPTIONAL, INTENT(IN) :: mask_(:,:)
+      LOGICAL(kind = 1), dimension(:,:), ALLOCATABLE          :: mask__
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_dim_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_ni_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_nj_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_ibegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_jbegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_ni_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_nj_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_ibegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_jbegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_ni_loc_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_nj_loc_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_ibegin_loc_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_jbegin_loc_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_n_index_
+      INTEGER       , dimension(*)     , OPTIONAL, INTENT(IN) :: data_i_index_(:)
+      INTEGER       , dimension(*)     , OPTIONAL, INTENT(IN) :: data_j_index_(:)
+      REAL(kind = 8), dimension(*)     , OPTIONAL, INTENT(IN) :: lonvalue_(:)
+      REAL(kind = 8), dimension(*)     , OPTIONAL, INTENT(IN) :: latvalue_(:)
+      
+      IF (PRESENT(name_))             THEN
+         CALL xios_set_domaingroup_name(domaingroup_hdl%daddr, name_, len(name_))
+      END IF
+      IF (PRESENT(standard_name_))    THEN
+         CALL xios_set_domaingroup_standard_name(domaingroup_hdl%daddr, standard_name_, len(standard_name_))
+      END IF
+      IF (PRESENT(long_name_))        THEN
+         CALL xios_set_domaingroup_long_name(domaingroup_hdl%daddr, long_name_, len(long_name_))
+       END IF
+      IF (PRESENT(domaingroup_group_ref_)) THEN
+         CALL xios_set_domaingroup_domaingroup_group_ref(domaingroup_hdl%daddr, domaingroup_group_ref_, len(domaingroup_group_ref_))
+      END IF
+      IF (PRESENT(ni_glo_))           THEN
+         CALL xios_set_domaingroup_ni_glo(domaingroup_hdl%daddr, ni_glo_)
+      END IF
+      IF (PRESENT(nj_glo_))           THEN
+         CALL xios_set_domaingroup_nj_glo(domaingroup_hdl%daddr, nj_glo_)
+      END IF
+      IF (PRESENT(ibegin_))           THEN
+         CALL xios_set_domaingroup_ibegin(domaingroup_hdl%daddr, ibegin_)
+       END IF
+      IF (PRESENT(iend_))             THEN
+         CALL xios_set_domaingroup_iend(domaingroup_hdl%daddr, iend_)
+      END IF
+      IF (PRESENT(ni_))               THEN
+         CALL xios_set_domaingroup_ni(domaingroup_hdl%daddr, ni_)
+      END IF
+      IF (PRESENT(jbegin_))           THEN
+         CALL xios_set_domaingroup_jbegin(domaingroup_hdl%daddr, jbegin_)
+      END IF
+      IF (PRESENT(jend_))             THEN
+         CALL xios_set_domaingroup_jend(domaingroup_hdl%daddr, jend_)
+      END IF
+      IF (PRESENT(nj_))               THEN
+         CALL xios_set_domaingroup_nj(domaingroup_hdl%daddr, nj_)
+      END IF
+      IF (PRESENT(mask_))             THEN
+         ALLOCATE(mask__(size(mask_, 1), size(mask_, 2)))
+         mask__(:,:) = mask_(:,:)
+         CALL xios_set_domaingroup_mask(domaingroup_hdl%daddr, mask__, size(mask_, 1), size(mask_, 2))         
+         DEALLOCATE(mask__)
+      END IF
+      IF (PRESENT(data_dim_))         THEN
+         CALL xios_set_domaingroup_data_dim(domaingroup_hdl%daddr, data_dim_)
+      END IF
+      IF (PRESENT(data_ni_))          THEN
+         CALL xios_set_domaingroup_data_ni(domaingroup_hdl%daddr, data_ni_)
+      END IF 
+      IF (PRESENT(data_nj_))          THEN
+         CALL xios_set_domaingroup_data_nj(domaingroup_hdl%daddr, data_nj_)
+      END IF
+      IF (PRESENT(data_ibegin_))      THEN
+         CALL xios_set_domaingroup_data_ibegin(domaingroup_hdl%daddr, data_ibegin_)
+      END IF
+      IF (PRESENT(data_jbegin_))      THEN
+         CALL xios_set_domaingroup_data_jbegin(domaingroup_hdl%daddr, data_jbegin_)
+      END IF
+      IF (PRESENT(zoom_ni_))          THEN
+         CALL xios_set_domaingroup_zoom_ni(domaingroup_hdl%daddr, zoom_ni_)
+      END IF
+      IF (PRESENT(zoom_nj_))          THEN
+       CALL xios_set_domaingroup_zoom_nj(domaingroup_hdl%daddr, zoom_nj_)
+      END IF
+      IF (PRESENT(zoom_ibegin_))      THEN
+         CALL xios_set_domaingroup_zoom_ibegin(domaingroup_hdl%daddr, zoom_ibegin_)
+      END IF
+      IF (PRESENT(zoom_jbegin_))      THEN
+         CALL xios_set_domaingroup_zoom_jbegin(domaingroup_hdl%daddr, zoom_jbegin_)
+      END IF
+      IF (PRESENT(zoom_ni_loc_))      THEN
+         CALL xios_set_domaingroup_zoom_ni_loc(domaingroup_hdl%daddr, zoom_ni_loc_)
+      END IF   
+      IF (PRESENT(zoom_nj_loc_))      THEN
+         CALL xios_set_domaingroup_zoom_nj_loc(domaingroup_hdl%daddr, zoom_nj_loc_)
+      END IF
+      IF (PRESENT(zoom_ibegin_loc_))  THEN
+         CALL xios_set_domaingroup_zoom_ibegin_loc(domaingroup_hdl%daddr, zoom_ibegin_loc_)
+      END IF
+      IF (PRESENT(zoom_jbegin_loc_))  THEN
+         CALL xios_set_domaingroup_zoom_jbegin_loc(domaingroup_hdl%daddr, zoom_jbegin_loc_)
+      END IF
+      IF (PRESENT(data_n_index_))     THEN
+         CALL xios_set_domaingroup_data_n_index(domaingroup_hdl%daddr, data_n_index_)
+      END IF
+      IF (PRESENT(data_i_index_))     THEN
+         CALL xios_set_domaingroup_data_i_index(domaingroup_hdl%daddr, data_i_index_, size(data_i_index_, 1))
+      END IF
+      IF (PRESENT(data_j_index_))     THEN
+         CALL xios_set_domaingroup_data_j_index(domaingroup_hdl%daddr, data_j_index_, size(data_j_index_, 1))
+      END IF
+      IF (PRESENT(lonvalue_))         THEN
+         CALL xios_set_domaingroup_lonvalue(domaingroup_hdl%daddr, lonvalue_, size(lonvalue_, 1))
+      END IF
+      IF (PRESENT(latvalue_))         THEN
+         CALL xios_set_domaingroup_latvalue(domaingroup_hdl%daddr, latvalue_, size(latvalue_, 1))
+      END IF
+
+   END SUBROUTINE set_domaingroup_attributes_hdl
+   
+   SUBROUTINE set_domain_attributes_id                                                                   &
+   ( domain_id, name_, standard_name_, long_name_, domain_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_,  &
+     ni_, jbegin_, jend_, nj_, mask_, data_dim_, data_ni_, data_nj_, data_ibegin_, data_jbegin_,         &
+     zoom_ni_, zoom_nj_, zoom_ibegin_, zoom_jbegin_, zoom_ni_loc_, zoom_nj_loc_, zoom_ibegin_loc_,       &
+     zoom_jbegin_loc_, data_n_index_, data_i_index_, data_j_index_, lonvalue_, latvalue_)
+      IMPLICIT NONE
+      TYPE(XDomainHandle)                                   :: domain_hdl
+      CHARACTER(len = *)                       , INTENT(IN) :: domain_id
+      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)             , OPTIONAL, INTENT(IN) :: domain_group_ref_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: ni_glo_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: nj_glo_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: ibegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: iend_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: ni_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: jbegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: jend_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: nj_
+      LOGICAL          , dimension(*), OPTIONAL, INTENT(IN) :: mask_(:,:)
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_dim_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_ni_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_nj_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_ibegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_jbegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_ni_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_nj_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_ibegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_jbegin_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_ni_loc_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_nj_loc_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_ibegin_loc_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: zoom_jbegin_loc_
+      INTEGER                        , OPTIONAL, INTENT(IN) :: data_n_index_
+      INTEGER       , dimension(*)   , OPTIONAL, INTENT(IN) :: data_i_index_(:)
+      INTEGER       , dimension(*)   , OPTIONAL, INTENT(IN) :: data_j_index_(:)
+      REAL(kind = 8), dimension(*)   , OPTIONAL, INTENT(IN) :: lonvalue_(:)
+      REAL(kind = 8), dimension(*)   , OPTIONAL, INTENT(IN) :: latvalue_(:)
+ 
+      CALL domain_handle_create(domain_hdl, domain_id)
+      CALL set_domain_attributes_hdl                                                                     &
+   ( domain_hdl, name_, standard_name_, long_name_, domain_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_, &
+     ni_, jbegin_, jend_, nj_, mask_, data_dim_, data_ni_, data_nj_, data_ibegin_, data_jbegin_,         &
+     zoom_ni_, zoom_nj_, zoom_ibegin_, zoom_jbegin_, zoom_ni_loc_, zoom_nj_loc_, zoom_ibegin_loc_,       &
+     zoom_jbegin_loc_, data_n_index_, data_i_index_, data_j_index_, lonvalue_, latvalue_)
+
+   END SUBROUTINE set_domain_attributes_id
+   
+   SUBROUTINE set_domain_attributes_hdl                                                                  &
+   ( domain_hdl,name_, standard_name_, long_name_, domain_group_ref_, ni_glo_, nj_glo_, ibegin_, iend_,  &
+     ni_, jbegin_, jend_, nj_, mask_, data_dim_, data_ni_, data_nj_, data_ibegin_, data_jbegin_,         &
+     zoom_ni_, zoom_nj_, zoom_ibegin_, zoom_jbegin_, zoom_ni_loc_, zoom_nj_loc_, zoom_ibegin_loc_,       &
+     zoom_jbegin_loc_, data_n_index_, data_i_index_, data_j_index_, lonvalue_, latvalue_)
+      IMPLICIT NONE
+      TYPE(XDomainHandle)                        , INTENT(IN) :: domain_hdl
+      CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)               , OPTIONAL, INTENT(IN) :: domain_group_ref_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: ni_glo_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: nj_glo_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: ibegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: iend_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: ni_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: jbegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: jend_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: nj_
+      LOGICAL          , dimension(*)  , OPTIONAL, INTENT(IN) :: mask_(:,:)
+      LOGICAL(kind = 1), dimension(:,:), ALLOCATABLE          :: mask__
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_dim_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_ni_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_nj_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_ibegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_jbegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_ni_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_nj_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_ibegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_jbegin_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_ni_loc_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_nj_loc_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_ibegin_loc_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: zoom_jbegin_loc_
+      INTEGER                          , OPTIONAL, INTENT(IN) :: data_n_index_
+      INTEGER       , dimension(*)     , OPTIONAL, INTENT(IN) :: data_i_index_(:)
+      INTEGER       , dimension(*)     , OPTIONAL, INTENT(IN) :: data_j_index_(:)
+      REAL(kind = 8), dimension(*)     , OPTIONAL, INTENT(IN) :: lonvalue_(:)
+      REAL(kind = 8), dimension(*)     , OPTIONAL, INTENT(IN) :: latvalue_(:)
+      IF (PRESENT(name_))             THEN
+         CALL xios_set_domain_name(domain_hdl%daddr, name_, len(name_))
+      END IF
+      IF (PRESENT(standard_name_))    THEN
+         CALL xios_set_domain_standard_name(domain_hdl%daddr, standard_name_, len(standard_name_))
+      END IF
+      IF (PRESENT(long_name_))        THEN
+         CALL xios_set_domain_long_name(domain_hdl%daddr, long_name_, len(long_name_))
+       END IF
+      IF (PRESENT(domain_group_ref_)) THEN
+         CALL xios_set_domain_domain_group_ref(domain_hdl%daddr, domain_group_ref_, len(domain_group_ref_))
+      END IF
+      IF (PRESENT(ni_glo_))           THEN
+         CALL xios_set_domain_ni_glo(domain_hdl%daddr, ni_glo_)
+      END IF
+      IF (PRESENT(nj_glo_))           THEN
+         CALL xios_set_domain_nj_glo(domain_hdl%daddr, nj_glo_)
+      END IF
+      IF (PRESENT(ibegin_))           THEN
+         CALL xios_set_domain_ibegin(domain_hdl%daddr, ibegin_)
+       END IF
+      IF (PRESENT(iend_))             THEN
+         CALL xios_set_domain_iend(domain_hdl%daddr, iend_)
+      END IF
+      IF (PRESENT(ni_))               THEN
+         CALL xios_set_domain_ni(domain_hdl%daddr, ni_)
+      END IF
+      IF (PRESENT(jbegin_))           THEN
+         CALL xios_set_domain_jbegin(domain_hdl%daddr, jbegin_)
+      END IF
+      IF (PRESENT(jend_))             THEN
+         CALL xios_set_domain_jend(domain_hdl%daddr, jend_)
+      END IF
+      IF (PRESENT(nj_))               THEN
+         CALL xios_set_domain_nj(domain_hdl%daddr, nj_)
+      END IF
+      IF (PRESENT(mask_))             THEN
+         ALLOCATE(mask__(size(mask_, 1), size(mask_, 2)))
+         mask__(:,:) = mask_(:,:)
+         CALL xios_set_domain_mask(domain_hdl%daddr, mask__, size(mask_, 1), size(mask_, 2))         
+         DEALLOCATE(mask__)
+      END IF
+      IF (PRESENT(data_dim_))         THEN
+         CALL xios_set_domain_data_dim(domain_hdl%daddr, data_dim_)
+      END IF
+      IF (PRESENT(data_ni_))          THEN
+         CALL xios_set_domain_data_ni(domain_hdl%daddr, data_ni_)
+      END IF 
+      IF (PRESENT(data_nj_))          THEN
+         CALL xios_set_domain_data_nj(domain_hdl%daddr, data_nj_)
+      END IF
+      IF (PRESENT(data_ibegin_))      THEN
+         CALL xios_set_domain_data_ibegin(domain_hdl%daddr, data_ibegin_)
+      END IF
+      IF (PRESENT(data_jbegin_))      THEN
+         CALL xios_set_domain_data_jbegin(domain_hdl%daddr, data_jbegin_)
+      END IF
+      IF (PRESENT(zoom_ni_))          THEN
+         CALL xios_set_domain_zoom_ni(domain_hdl%daddr, zoom_ni_)
+      END IF
+      IF (PRESENT(zoom_nj_))          THEN
+       CALL xios_set_domain_zoom_nj(domain_hdl%daddr, zoom_nj_)
+      END IF
+      IF (PRESENT(zoom_ibegin_))      THEN
+         CALL xios_set_domain_zoom_ibegin(domain_hdl%daddr, zoom_ibegin_)
+      END IF
+      IF (PRESENT(zoom_jbegin_))      THEN
+         CALL xios_set_domain_zoom_jbegin(domain_hdl%daddr, zoom_jbegin_)
+      END IF
+      IF (PRESENT(zoom_ni_loc_))      THEN
+         CALL xios_set_domain_zoom_ni_loc(domain_hdl%daddr, zoom_ni_loc_)
+      END IF   
+      IF (PRESENT(zoom_nj_loc_))      THEN
+         CALL xios_set_domain_zoom_nj_loc(domain_hdl%daddr, zoom_nj_loc_)
+      END IF
+      IF (PRESENT(zoom_ibegin_loc_))  THEN
+         CALL xios_set_domain_zoom_ibegin_loc(domain_hdl%daddr, zoom_ibegin_loc_)
+      END IF
+      IF (PRESENT(zoom_jbegin_loc_))  THEN
+         CALL xios_set_domain_zoom_jbegin_loc(domain_hdl%daddr, zoom_jbegin_loc_)
+      END IF
+      IF (PRESENT(data_n_index_))     THEN
+         CALL xios_set_domain_data_n_index(domain_hdl%daddr, data_n_index_)
+      END IF
+      IF (PRESENT(data_i_index_))     THEN
+         CALL xios_set_domain_data_i_index(domain_hdl%daddr, data_i_index_, size(data_i_index_, 1))
+      END IF
+      IF (PRESENT(data_j_index_))     THEN
+         CALL xios_set_domain_data_j_index(domain_hdl%daddr, data_j_index_, size(data_j_index_, 1))
+      END IF
+      IF (PRESENT(lonvalue_))         THEN
+         CALL xios_set_domain_lonvalue(domain_hdl%daddr, lonvalue_, size(lonvalue_, 1))
+      END IF
+      IF (PRESENT(latvalue_))         THEN
+         CALL xios_set_domain_latvalue(domain_hdl%daddr, latvalue_, size(latvalue_, 1))
+      END IF
+
+   END SUBROUTINE set_domain_attributes_hdl
+   
+   SUBROUTINE domain_handle_create(ret, idt)
+      IMPLICIT NONE
+      TYPE(XDomainHandle), INTENT(OUT):: ret
+      CHARACTER(len = *) , INTENT(IN) :: idt      
+      CALL xios_domain_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE domain_handle_create
+   
+   SUBROUTINE domaingroup_handle_create(ret, idt)
+      IMPLICIT NONE
+      TYPE(XDomainGroupHandle), INTENT(OUT):: ret
+      CHARACTER(len = *)      , INTENT(IN) :: idt      
+      CALL xios_domaingroup_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE domaingroup_handle_create
+   
+END MODULE IDOMAIN
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/ifield.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/ifield.f90	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/ifield.f90	(revision 249)
@@ -0,0 +1,232 @@
+MODULE IFIELD
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE FIELD_INTERFACE
+   USE FIELDGROUP_INTERFACE
+   
+   TYPE XFieldHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XFieldHandle
+   
+   TYPE XFieldGroupHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XFieldGroupHandle
+   
+   !----------------------------------------------------------------------------
+   INTERFACE set_field_attributes
+      MODULE PROCEDURE set_field_attributes_id,set_field_attributes_hdl
+   END INTERFACE  
+   
+   INTERFACE set_field_group_attributes
+      MODULE PROCEDURE set_fieldgroup_attributes_id,set_fieldgroup_attributes_hdl
+   END INTERFACE  
+   !----------------------------------------------------------------------------
+   
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+    
+   SUBROUTINE set_fieldgroup_attributes_id                                                 &
+   (fieldgroup_id, name_, standard_name_, long_name_, unit_, operation_, freq_op_, level_, &
+    prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, fieldgroup_ref_, default_value_)
+    
+      IMPLICIT NONE
+      TYPE(XFieldGroupHandle)                       :: fieldgroup_hdl
+      CHARACTER(len = *)               , INTENT(IN) :: fieldgroup_id
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: unit_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: operation_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: freq_op_
+      INTEGER                , OPTIONAL, INTENT(IN) :: level_
+      INTEGER                , OPTIONAL, INTENT(IN) :: prec_
+      LOGICAL                , OPTIONAL, INTENT(IN) :: enabled_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: domain_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: axis_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: grid_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: fieldgroup_ref_
+      REAL(kind=8)           , OPTIONAL, INTENT(IN) :: default_value_
+        
+      CALL fieldgroup_handle_create(fieldgroup_hdl, fieldgroup_id)
+      CALL set_fieldgroup_attributes_hdl                                                          &
+         (fieldgroup_hdl, name_, standard_name_, long_name_, unit_, operation_, freq_op_, level_, &
+          prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, fieldgroup_ref_, default_value_)
+
+   END SUBROUTINE set_fieldgroup_attributes_id
+
+   SUBROUTINE set_fieldgroup_attributes_hdl                                                 &
+   (fieldgroup_hdl, name_, standard_name_, long_name_, unit_, operation_, freq_op_, level_, &
+    prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, fieldgroup_ref_, default_value_)
+      IMPLICIT NONE
+      TYPE(XFieldgroupHandle)          , INTENT(IN) :: fieldgroup_hdl
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: unit_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: operation_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: freq_op_
+      INTEGER                , OPTIONAL, INTENT(IN) :: level_
+      INTEGER                , OPTIONAL, INTENT(IN) :: prec_
+      LOGICAL(kind = 1)                             :: enabled__
+      LOGICAL                , OPTIONAL, INTENT(IN) :: enabled_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: domain_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: axis_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: grid_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: fieldgroup_ref_
+      REAL(kind=8)           , OPTIONAL, INTENT(IN) :: default_value_
+      
+      enabled__ = enabled_  
+      IF (PRESENT(name_))           THEN
+         CALL xios_set_fieldgroup_name(fieldgroup_hdl%daddr, name_, len(name_))
+      END IF
+      IF (PRESENT(standard_name_))  THEN
+         CALL xios_set_fieldgroup_standard_name(fieldgroup_hdl%daddr, standard_name_, len(standard_name_))
+      END IF
+      IF (PRESENT(long_name_))      THEN
+         CALL xios_set_fieldgroup_long_name(fieldgroup_hdl%daddr, long_name_, len(long_name_))
+      END IF
+      IF (PRESENT(unit_))           THEN
+         CALL xios_set_fieldgroup_unit(fieldgroup_hdl%daddr, unit_, len(unit_))
+      END IF
+      IF (PRESENT(operation_))      THEN
+         CALL xios_set_fieldgroup_operation(fieldgroup_hdl%daddr, operation_, len(operation_))
+      END IF
+      IF (PRESENT(freq_op_))        THEN
+         CALL xios_set_fieldgroup_freq_op(fieldgroup_hdl%daddr, freq_op_, len(freq_op_))
+      END IF
+      IF (PRESENT(level_))          THEN
+         CALL xios_set_fieldgroup_level(fieldgroup_hdl%daddr, level_)
+      END IF
+      IF (PRESENT(prec_))           THEN
+         CALL xios_set_fieldgroup_prec(fieldgroup_hdl%daddr, prec_)
+      END IF
+      IF (PRESENT(enabled_))        THEN
+         CALL xios_set_fieldgroup_enabled(fieldgroup_hdl%daddr, enabled__)
+      END IF
+      IF (PRESENT(domain_ref_))     THEN
+         CALL xios_set_fieldgroup_domain_ref(fieldgroup_hdl%daddr, domain_ref_, len(domain_ref_))
+      END IF
+      IF (PRESENT(axis_ref_))       THEN
+         CALL xios_set_fieldgroup_axis_ref(fieldgroup_hdl%daddr, axis_ref_, len(axis_ref_))
+      END IF
+      IF (PRESENT(grid_ref_))       THEN
+         CALL xios_set_fieldgroup_grid_ref(fieldgroup_hdl%daddr, grid_ref_, len(grid_ref_))
+      END IF
+      IF (PRESENT(fieldgroup_ref_))      THEN
+         CALL xios_set_fieldgroup_fieldgroup_ref(fieldgroup_hdl%daddr, fieldgroup_ref_, len(fieldgroup_ref_))
+      END IF
+      IF (PRESENT(default_value_))  THEN
+         CALL xios_set_fieldgroup_default_value(fieldgroup_hdl%daddr, default_value_)
+      END IF
+
+   END SUBROUTINE set_fieldgroup_attributes_hdl
+   
+   SUBROUTINE set_field_attributes_id                                                 &
+   (field_id, name_, standard_name_, long_name_, unit_, operation_, freq_op_, level_, &
+    prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, field_ref_, default_value_)
+    
+      IMPLICIT NONE
+      TYPE(XFieldHandle)                            :: field_hdl
+      CHARACTER(len = *)               , INTENT(IN) :: field_id
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: unit_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: operation_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: freq_op_
+      INTEGER                , OPTIONAL, INTENT(IN) :: level_
+      INTEGER                , OPTIONAL, INTENT(IN) :: prec_
+      LOGICAL                , OPTIONAL, INTENT(IN) :: enabled_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: domain_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: axis_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: grid_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: field_ref_
+      REAL(kind=8)           , OPTIONAL, INTENT(IN) :: default_value_
+      
+      CALL field_handle_create(field_hdl, field_id)
+      CALL set_field_attributes_hdl                                                          &
+         (field_hdl, name_, standard_name_, long_name_, unit_, operation_, freq_op_, level_, &
+          prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, field_ref_, default_value_)
+
+   END SUBROUTINE set_field_attributes_id
+
+   SUBROUTINE set_field_attributes_hdl                                                 &
+   (field_hdl, name_, standard_name_, long_name_, unit_, operation_, freq_op_, level_, &
+    prec_, enabled_, domain_ref_, axis_ref_, grid_ref_, field_ref_, default_value_)
+      IMPLICIT NONE
+      TYPE(XFieldHandle)               , INTENT(IN) :: field_hdl
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: standard_name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: long_name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: unit_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: operation_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: freq_op_
+      INTEGER                , OPTIONAL, INTENT(IN) :: level_
+      INTEGER                , OPTIONAL, INTENT(IN) :: prec_
+      LOGICAL(kind = 1)                             :: enabled__
+      LOGICAL                , OPTIONAL, INTENT(IN) :: enabled_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: domain_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: axis_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: grid_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: field_ref_
+      REAL(kind=8)           , OPTIONAL, INTENT(IN) :: default_value_
+      
+      enabled__ = enabled_  
+      IF (PRESENT(name_))           THEN
+         CALL xios_set_field_name(field_hdl%daddr, name_, len(name_))
+      END IF
+      IF (PRESENT(standard_name_))  THEN
+         CALL xios_set_field_standard_name(field_hdl%daddr, standard_name_, len(standard_name_))
+      END IF
+      IF (PRESENT(long_name_))      THEN
+         CALL xios_set_field_long_name(field_hdl%daddr, long_name_, len(long_name_))
+      END IF
+      IF (PRESENT(unit_))           THEN
+         CALL xios_set_field_unit(field_hdl%daddr, unit_, len(unit_))
+      END IF
+      IF (PRESENT(operation_))      THEN
+         CALL xios_set_field_operation(field_hdl%daddr, operation_, len(operation_))
+      END IF
+      IF (PRESENT(freq_op_))        THEN
+         CALL xios_set_field_freq_op(field_hdl%daddr, freq_op_, len(freq_op_))
+      END IF
+      IF (PRESENT(level_))          THEN
+         CALL xios_set_field_level(field_hdl%daddr, level_)
+      END IF
+      IF (PRESENT(prec_))           THEN
+         CALL xios_set_field_prec(field_hdl%daddr, prec_)
+      END IF
+      IF (PRESENT(enabled_))        THEN
+         CALL xios_set_field_enabled(field_hdl%daddr, enabled__)
+      END IF
+      IF (PRESENT(domain_ref_))     THEN
+         CALL xios_set_field_domain_ref(field_hdl%daddr, domain_ref_, len(domain_ref_))
+      END IF
+      IF (PRESENT(axis_ref_))       THEN
+         CALL xios_set_field_axis_ref(field_hdl%daddr, axis_ref_, len(axis_ref_))
+      END IF
+      IF (PRESENT(grid_ref_))       THEN
+         CALL xios_set_field_grid_ref(field_hdl%daddr, grid_ref_, len(grid_ref_))
+      END IF
+      IF (PRESENT(field_ref_))      THEN
+         CALL xios_set_field_field_ref(field_hdl%daddr, field_ref_, len(field_ref_))
+      END IF
+      IF (PRESENT(default_value_))  THEN
+         CALL xios_set_field_default_value(field_hdl%daddr, default_value_)
+      END IF
+
+   END SUBROUTINE set_field_attributes_hdl
+
+   SUBROUTINE field_handle_create(ret, idt)
+      IMPLICIT NONE
+      TYPE(XFieldHandle), INTENT(OUT):: ret
+      CHARACTER(len = *), INTENT(IN) :: idt      
+      CALL xios_field_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE field_handle_create
+   
+   SUBROUTINE fieldgroup_handle_create(ret, idt)
+      IMPLICIT NONE
+      TYPE(XFieldGroupHandle), INTENT(OUT):: ret
+      CHARACTER(len = *)     , INTENT(IN) :: idt      
+      CALL xios_fieldgroup_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE fieldgroup_handle_create
+   
+END MODULE IFIELD
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/ifile.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/ifile.f90	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/ifile.f90	(revision 249)
@@ -0,0 +1,127 @@
+MODULE IFILE
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE FILE_INTERFACE
+   USE FILEGROUP_INTERFACE
+   
+   TYPE XFileHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XFileHandle
+   
+   TYPE XFileGroupHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XFileGroupHandle
+   
+   !----------------------------------------------------------------------------
+   INTERFACE set_file_attributes
+      MODULE PROCEDURE set_file_attributes_id,set_file_attributes_hdl
+   END INTERFACE  
+   
+   INTERFACE set_file_group_attributes
+      MODULE PROCEDURE set_filegroup_attributes_id,set_filegroup_attributes_hdl
+   END INTERFACE  
+   !----------------------------------------------------------------------------
+  
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+   
+   SUBROUTINE set_file_attributes_id(file_id, name_ , description_, output_freq_, output_level_, enabled_)
+      IMPLICIT NONE
+      TYPE(XFileHandle)                        :: file_hdl
+      CHARACTER(len = *)          , INTENT(IN) :: file_id
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_
+      INTEGER           , OPTIONAL, INTENT(IN) :: output_level_
+      LOGICAL           , OPTIONAL, INTENT(IN) :: enabled_
+      
+      CALL file_handle_create(file_hdl, file_id)
+      CALL set_file_attributes_hdl(file_hdl, name_ , description_, output_freq_, output_level_, enabled_)
+      
+   END SUBROUTINE set_file_attributes_id
+   
+   SUBROUTINE set_file_attributes_hdl(file_hdl, name_ , description_, output_freq_, output_level_, enabled_)
+      TYPE(XFileHandle)           , INTENT(IN) :: file_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_
+      INTEGER           , OPTIONAL, INTENT(IN) :: output_level_
+      LOGICAL(kind = 1)                        :: enabled__
+      LOGICAL           , OPTIONAL, INTENT(IN) :: enabled_
+      
+      enabled__ = enabled_        
+      IF (PRESENT(name_))         THEN
+         CALL xios_set_file_name(file_hdl%daddr, name_, len(name_))
+      END IF
+      IF (PRESENT(description_))  THEN
+         CALL xios_set_file_description(file_hdl%daddr, description_, len(description_))
+      END IF
+      IF (PRESENT(output_freq_))  THEN
+         CALL xios_set_file_output_freq(file_hdl%daddr, output_freq_, len(output_freq_))
+      END IF
+      IF (PRESENT(output_level_)) THEN
+         CALL xios_set_file_output_level(file_hdl%daddr, output_level_)
+      END IF
+      IF (PRESENT(enabled_))      THEN
+         CALL xios_set_file_enabled(file_hdl%daddr, enabled__)
+      END IF
+
+   END SUBROUTINE set_file_attributes_hdl
+   
+   SUBROUTINE set_filegroup_attributes_id(filegroup_id, name_ , description_, output_freq_, output_level_, enabled_)
+      IMPLICIT NONE
+      TYPE(XFileGroupHandle)                   :: filegroup_hdl
+      CHARACTER(len = *)          , INTENT(IN) :: filegroup_id
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_
+      INTEGER           , OPTIONAL, INTENT(IN) :: output_level_
+      LOGICAL           , OPTIONAL, INTENT(IN) :: enabled_
+      
+      CALL filegroup_handle_create(filegroup_hdl, filegroup_id)
+      CALL set_filegroup_attributes_hdl(filegroup_hdl, name_ , description_, output_freq_, output_level_, enabled_)
+      
+   END SUBROUTINE set_filegroup_attributes_id
+   
+   SUBROUTINE set_filegroup_attributes_hdl(filegroup_hdl, name_ , description_, output_freq_, output_level_, enabled_)
+      IMPLICIT NONE
+      TYPE(XFileGroupHandle)      , INTENT(IN) :: filegroup_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_
+      INTEGER           , OPTIONAL, INTENT(IN) :: output_level_
+      LOGICAL(kind = 1)                        :: enabled__
+      LOGICAL           , OPTIONAL, INTENT(IN) :: enabled_
+      
+      enabled__ = enabled_         
+      IF (PRESENT(name_))         THEN
+         CALL xios_set_filegroup_name(filegroup_hdl%daddr, name_, len(name_))
+      END IF
+      IF (PRESENT(description_))  THEN
+         CALL xios_set_filegroup_description(filegroup_hdl%daddr, description_, len(description_))
+      END IF
+      IF (PRESENT(output_freq_))  THEN
+         CALL xios_set_filegroup_output_freq(filegroup_hdl%daddr, output_freq_, len(output_freq_))
+      END IF
+      IF (PRESENT(output_level_)) THEN
+         CALL xios_set_filegroup_output_level(filegroup_hdl%daddr, output_level_)
+      END IF
+      IF (PRESENT(enabled_))      THEN
+         CALL xios_set_filegroup_enabled(filegroup_hdl%daddr, enabled__)
+      END IF
+
+   END SUBROUTINE set_filegroup_attributes_hdl
+   
+   SUBROUTINE file_handle_create(ret, idt)
+      IMPLICIT NONE
+      TYPE(XFileHandle) , INTENT(OUT):: ret
+      CHARACTER(len = *), INTENT(IN) :: idt      
+      CALL xios_file_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE file_handle_create
+   
+   SUBROUTINE filegroup_handle_create(ret, idt)
+      IMPLICIT NONE
+      TYPE(XFileGroupHandle), INTENT(OUT):: ret
+      CHARACTER(len = *)    , INTENT(IN) :: idt      
+      CALL xios_filegroup_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE filegroup_handle_create
+   
+END MODULE IFILE
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/igrid.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/igrid.f90	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/igrid.f90	(revision 249)
@@ -0,0 +1,112 @@
+MODULE IGRID
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE GRID_INTERFACE
+   USE GRIDGROUP_INTERFACE
+   
+   TYPE XGridHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XGridHandle
+   
+   TYPE XGridGroupHandle
+      INTEGER(kind = C_INTPTR_T) :: daddr
+   END TYPE XGridGroupHandle
+   
+   !----------------------------------------------------------------------------
+   INTERFACE set_grid_attributes
+      MODULE PROCEDURE set_grid_attributes_id,set_grid_attributes_hdl
+   END INTERFACE  
+   
+   INTERFACE set_grid_group_attributes
+      MODULE PROCEDURE set_gridgroup_attributes_id,set_gridgroup_attributes_hdl
+   END INTERFACE  
+   !----------------------------------------------------------------------------
+   
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+   
+   SUBROUTINE set_grid_attributes_id(grid_id, name_, description_, domain_ref_, axis_ref_)
+      IMPLICIT NONE
+      TYPE(XGridHandle)                             :: grid_hdl
+      CHARACTER(len = *)               , INTENT(IN) :: grid_id
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: description_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: domain_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: axis_ref_
+      
+      CALL grid_handle_create(grid_hdl, grid_id)
+      CALL set_grid_attributes_hdl(grid_hdl, name_, description_, domain_ref_, axis_ref_)
+
+   END SUBROUTINE set_grid_attributes_id
+
+   SUBROUTINE set_grid_attributes_hdl(grid_hdl, name_, description_, domain_ref_, axis_ref_)
+      IMPLICIT NONE
+      TYPE      (XGridHandle)                       :: grid_hdl
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: description_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: domain_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: axis_ref_
+      
+      IF (PRESENT(name_))        THEN
+       CALL xios_set_grid_name(grid_hdl%daddr, name_, len(name_))
+      END IF
+      IF (PRESENT(description_)) THEN
+       CALL xios_set_grid_description(grid_hdl%daddr, description_, len(description_))
+      END IF
+      IF (PRESENT(domain_ref_))  THEN
+       CALL xios_set_grid_domain_ref(grid_hdl%daddr, domain_ref_, len(domain_ref_))
+      END IF
+      IF (PRESENT(axis_ref_))    THEN
+       CALL xios_set_grid_axis_ref(grid_hdl%daddr, axis_ref_, len(axis_ref_))
+      END IF
+   END SUBROUTINE set_grid_attributes_hdl
+   
+   SUBROUTINE set_gridgroup_attributes_id(gridgroup_id, name_, description_, domain_ref_, axis_ref_)
+      IMPLICIT NONE
+      TYPE(XGridGroupHandle)                        :: gridgroup_hdl
+      CHARACTER(len = *)               , INTENT(IN) :: gridgroup_id
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: description_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: domain_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: axis_ref_
+      
+      CALL gridgroup_handle_create(gridgroup_hdl, gridgroup_id)
+      CALL set_gridgroup_attributes_hdl(gridgroup_hdl, name_, description_, domain_ref_, axis_ref_)
+
+   END SUBROUTINE set_gridgroup_attributes_id
+
+   SUBROUTINE set_gridgroup_attributes_hdl(gridgroup_hdl, name_, description_, domain_ref_, axis_ref_)
+      IMPLICIT NONE
+      TYPE      (XGridGroupHandle)                  :: gridgroup_hdl
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: name_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: description_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: domain_ref_
+      CHARACTER(len = *)     , OPTIONAL, INTENT(IN) :: axis_ref_
+      
+      IF (PRESENT(name_))        THEN
+       CALL xios_set_gridgroup_name(gridgroup_hdl%daddr, name_, len(name_))
+      END IF
+      IF (PRESENT(description_)) THEN
+       CALL xios_set_gridgroup_description(gridgroup_hdl%daddr, description_, len(description_))
+      END IF
+      IF (PRESENT(domain_ref_))  THEN
+       CALL xios_set_gridgroup_domain_ref(gridgroup_hdl%daddr, domain_ref_, len(domain_ref_))
+      END IF
+      IF (PRESENT(axis_ref_))    THEN
+       CALL xios_set_gridgroup_axis_ref(gridgroup_hdl%daddr, axis_ref_, len(axis_ref_))
+      END IF
+   END SUBROUTINE set_gridgroup_attributes_hdl
+
+   SUBROUTINE grid_handle_create(ret, idt)
+      IMPLICIT NONE
+      TYPE(XGridHandle), INTENT(OUT):: ret
+      CHARACTER(len = *), INTENT(IN) :: idt      
+      CALL xios_grid_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE grid_handle_create
+   
+   SUBROUTINE gridgroup_handle_create(ret, idt)
+      IMPLICIT NONE
+      TYPE(XGridGroupHandle), INTENT(OUT):: ret
+      CHARACTER(len = *)     , INTENT(IN) :: idt      
+      CALL xios_gridgroup_handle_create(ret%daddr, idt, len(idt))            
+   END SUBROUTINE gridgroup_handle_create
+   
+END MODULE IGRID
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/ixml_tree.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/ixml_tree.f90	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/ixml_tree.f90	(revision 249)
@@ -0,0 +1,193 @@
+MODULE IXML_TREE
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE IAXIS
+   USE IFILE
+   USE IFIELD
+   USE IGRID
+   USE IDOMAIN
+     
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+     
+      SUBROUTINE xios_xml_tree_add_field(parent_, child_, child_id, child_id_size) BIND(C)
+         import C_CHAR, C_INT, C_INTPTR_T
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE xios_xml_tree_add_field
+      
+      SUBROUTINE xios_xml_tree_add_grid(parent_, child_, child_id, child_id_size) BIND(C)
+         import C_CHAR, C_INT, C_INTPTR_T
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE xios_xml_tree_add_grid
+      
+      SUBROUTINE xios_xml_tree_add_file(parent_, child_, child_id, child_id_size) BIND(C)
+         import C_CHAR, C_INT, C_INTPTR_T
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE xios_xml_tree_add_file
+      
+      SUBROUTINE xios_xml_tree_add_axis(parent_, child_, child_id, child_id_size) BIND(C)
+         import C_CHAR, C_INT, C_INTPTR_T
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE xios_xml_tree_add_axis
+      
+      SUBROUTINE xios_xml_tree_add_domain(parent_, child_, child_id, child_id_size) BIND(C)
+         import C_CHAR, C_INT, C_INTPTR_T
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE xios_xml_tree_add_domain
+      
+      SUBROUTINE xios_xml_tree_add_fieldtofile(parent_, child_, child_id, child_id_size) BIND(C)
+         import C_CHAR, C_INT, C_INTPTR_T
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE xios_xml_tree_add_fieldtofile    
+      
+      SUBROUTINE xios_xml_tree_add_fieldgrouptofile(parent_, child_, child_id, child_id_size) BIND(C)
+         import C_CHAR, C_INT, C_INTPTR_T
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE xios_xml_tree_add_fieldgrouptofile    
+
+      SUBROUTINE xios_xml_tree_show(filename, filename_size) BIND(C)
+         import C_CHAR, C_INT
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
+         INTEGER  (kind = C_INT) , VALUE        :: filename_size
+      END SUBROUTINE xios_xml_tree_show
+
+      SUBROUTINE xios_xml_parse_file(filename, filename_size) BIND(C)
+         import C_CHAR, C_INT
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
+         INTEGER  (kind = C_INT) , VALUE        :: filename_size
+      END SUBROUTINE xios_xml_parse_file
+
+      SUBROUTINE xios_xml_parse_string(xmlcontent, xmlcontent_size) BIND(C)
+         import C_CHAR, C_INT
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: xmlcontent
+         INTEGER  (kind = C_INT) , VALUE        :: xmlcontent_size
+      END SUBROUTINE xios_xml_parse_string
+     
+   END INTERFACE
+   
+   !----------------------------------------------------------------------------
+   INTERFACE xml_tree_add
+      MODULE PROCEDURE xml_tree_add_axis, xml_tree_add_file, xml_tree_add_grid,  &
+                       xml_tree_add_field, xml_tree_add_domain,                  &
+                       xml_tree_add_fieldgrouptofile, xml_tree_add_fieldtofile
+   END INTERFACE  
+   !----------------------------------------------------------------------------
+   
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xml_tree_add_axis(parent_hdl, child_hdl, child_id)
+      TYPE(XAxisGroupHandle)      , INTENT(IN) :: parent_hdl
+      TYPE(XAxisHandle)           , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+      IF (PRESENT(child_id)) THEN
+         CALL xios_xml_tree_add_axis(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL xios_xml_tree_add_axis(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+   END SUBROUTINE xml_tree_add_axis
+   
+   SUBROUTINE xml_tree_add_file(parent_hdl, child_hdl, child_id)
+      TYPE(XFileGroupHandle)      , INTENT(IN) :: parent_hdl
+      TYPE(XFileHandle)           , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+      IF (PRESENT(child_id)) THEN
+         CALL xios_xml_tree_add_file(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL xios_xml_tree_add_file(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+   END SUBROUTINE xml_tree_add_file
+   
+   SUBROUTINE xml_tree_add_grid(parent_hdl, child_hdl, child_id)
+      TYPE(XGridGroupHandle)      , INTENT(IN) :: parent_hdl
+      TYPE(XGridHandle)           , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+      IF (PRESENT(child_id)) THEN
+         CALL xios_xml_tree_add_grid(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL xios_xml_tree_add_grid(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+   END SUBROUTINE xml_tree_add_grid
+   
+   SUBROUTINE xml_tree_add_field(parent_hdl, child_hdl, child_id)
+      TYPE(XFieldGroupHandle)     , INTENT(IN) :: parent_hdl
+      TYPE(XFieldHandle)          , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: child_id
+      IF (PRESENT(child_id)) THEN
+         CALL xios_xml_tree_add_field(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL xios_xml_tree_add_field(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+   END SUBROUTINE xml_tree_add_field
+   
+   SUBROUTINE xml_tree_add_domain(parent_hdl, child_hdl, child_id)
+      TYPE(XDomainGroupHandle)     , INTENT(IN) :: parent_hdl
+      TYPE(XDomainHandle)          , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL , INTENT(IN) :: child_id
+      IF (PRESENT(child_id)) THEN
+         CALL xios_xml_tree_add_domain(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL xios_xml_tree_add_domain(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+   END SUBROUTINE xml_tree_add_domain
+   
+   SUBROUTINE xml_tree_add_fieldtofile(parent_hdl, child_hdl, child_id)
+      TYPE(XFileHandle)            , INTENT(IN) :: parent_hdl
+      TYPE(XFieldHandle)           , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL , INTENT(IN) :: child_id
+      IF (PRESENT(child_id)) THEN
+         CALL xios_xml_tree_add_fieldtofile(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL xios_xml_tree_add_fieldtofile(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+   END SUBROUTINE xml_tree_add_fieldtofile
+
+   SUBROUTINE xml_tree_add_fieldgrouptofile(parent_hdl, child_hdl, child_id)
+      TYPE(XFileHandle)            , INTENT(IN) :: parent_hdl
+      TYPE(XFieldGroupHandle)      , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL , INTENT(IN) :: child_id
+      IF (PRESENT(child_id)) THEN
+         CALL xios_xml_tree_add_fieldgrouptofile(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL xios_xml_tree_add_fieldgrouptofile(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+   END SUBROUTINE xml_tree_add_fieldgrouptofile
+
+   SUBROUTINE xml_tree_show(filename)
+      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: filename
+      IF (PRESENT(filename)) THEN
+         CALL xios_xml_tree_show(filename, len(filename))
+      ELSE
+         CALL xios_xml_tree_show("NONE", -1)
+      END IF
+   END SUBROUTINE xml_tree_show
+   
+   SUBROUTINE xml_parse_file(filename)
+      CHARACTER(len = *), INTENT(IN) :: filename
+      CALL xios_xml_parse_file(filename, len(filename))
+   END SUBROUTINE xml_Parse_File
+   
+   SUBROUTINE xml_parse_string(xmlcontent)
+      CHARACTER(len = *), INTENT(IN) :: xmlcontent
+      CALL xios_xml_parse_string(xmlcontent, len(xmlcontent))
+   END SUBROUTINE xml_Parse_String
+      
+END MODULE IXML_TREE
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/xml_tree.f90
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/xml_tree.f90	(revision 248)
+++ 	(revision )
@@ -1,95 +1,0 @@
-MODULE XML_TREE
-   USE, INTRINSIC :: ISO_C_BINDING
-     
-   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
-     
-      SUBROUTINE xios_xml_tree_add_field(parent_, child_, child_id, child_id_size) BIND(C)
-         import C_CHAR, C_INT, C_INTPTR_T
-         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
-         INTEGER  (kind = C_INTPTR_T)               :: child_
-         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
-         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
-      END SUBROUTINE xios_xml_tree_add_field
-      
-      SUBROUTINE xios_xml_tree_add_grid(parent_, child_, child_id, child_id_size) BIND(C)
-         import C_CHAR, C_INT, C_INTPTR_T
-         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
-         INTEGER  (kind = C_INTPTR_T)               :: child_
-         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
-         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
-      END SUBROUTINE xios_xml_tree_add_grid
-      
-      SUBROUTINE xios_xml_tree_add_file(parent_, child_, child_id, child_id_size) BIND(C)
-         import C_CHAR, C_INT, C_INTPTR_T
-         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
-         INTEGER  (kind = C_INTPTR_T)               :: child_
-         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
-         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
-      END SUBROUTINE xios_xml_tree_add_file
-      
-      SUBROUTINE xios_xml_tree_add_axis(parent_, child_, child_id, child_id_size) BIND(C)
-         import C_CHAR, C_INT, C_INTPTR_T
-         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
-         INTEGER  (kind = C_INTPTR_T)               :: child_
-         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
-         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
-      END SUBROUTINE xios_xml_tree_add_axis
-      
-      SUBROUTINE xios_xml_tree_add_domain(parent_, child_, child_id, child_id_size) BIND(C)
-         import C_CHAR, C_INT, C_INTPTR_T
-         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
-         INTEGER  (kind = C_INTPTR_T)               :: child_
-         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
-         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
-      END SUBROUTINE xios_xml_tree_add_domain
-      
-      SUBROUTINE xios_xml_tree_add_fieldtofile(parent_, child_, child_id, child_id_size) BIND(C)
-         import C_CHAR, C_INT, C_INTPTR_T
-         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
-         INTEGER  (kind = C_INTPTR_T)               :: child_
-         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
-         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
-      END SUBROUTINE xios_xml_tree_add_fieldtofile    
-
-      SUBROUTINE xios_xml_tree_show(filename, filename_size) BIND(C)
-         import C_CHAR, C_INT
-         CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
-         INTEGER  (kind = C_INT) , VALUE        :: filename_size
-      END SUBROUTINE xios_xml_tree_show
-
-      SUBROUTINE xios_xml_parse_file(filename, filename_size) BIND(C)
-         import C_CHAR, C_INT
-         CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
-         INTEGER  (kind = C_INT) , VALUE        :: filename_size
-      END SUBROUTINE xios_xml_parse_file
-
-      SUBROUTINE xios_xml_parse_string(xmlcontent, xmlcontent_size) BIND(C)
-         import C_CHAR, C_INT
-         CHARACTER(kind = C_CHAR), DIMENSION(*) :: xmlcontent
-         INTEGER  (kind = C_INT) , VALUE        :: xmlcontent_size
-      END SUBROUTINE xios_xml_parse_string
-     
-   END INTERFACE
-   
-   CONTAINS ! Fonctions disponibles pour les utilisateurs.
-     
-   SUBROUTINE xml_tree_show(filename)
-      CHARACTER(len = *), OPTIONAL, INTENT(IN) :: filename
-      IF (PRESENT(filename)) THEN
-         CALL xios_xml_tree_show(filename, len(filename))
-      ELSE
-         CALL xios_xml_tree_show("NONE", -1)
-      END IF
-   END SUBROUTINE xml_tree_show
-   
-   SUBROUTINE xml_parse_file(filename)
-      CHARACTER(len = *), INTENT(IN) :: filename
-      CALL xios_xml_parse_file(filename, len(filename))
-   END SUBROUTINE xml_Parse_File
-   
-   SUBROUTINE xml_parse_string(xmlcontent)
-      CHARACTER(len = *), INTENT(IN) :: xmlcontent
-      CALL xios_xml_parse_string(xmlcontent, len(xmlcontent))
-   END SUBROUTINE xml_Parse_String
-      
-END MODULE XML_TREE
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/main_server.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/main_server.cpp	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/main_server.cpp	(revision 249)
@@ -16,9 +16,7 @@
 #include "xmlioserver_spl.hpp"
 
-#include "inetcdf4.hpp"
-#include "inetcdf4_impl.hpp"
-#include "inetcdf4_adv.hpp"
-#include "inetcdf4_adv_impl.hpp"
-#include "lscereader.hpp"
+#include "mpi_interface.hpp"
+#include "onetcdf4.hpp"
+#include "onetcdf4_impl.hpp"
 
 namespace xios = xmlioserver;
@@ -27,20 +25,66 @@
 //~ using namespace xios::tree;
 //~ using namespace xios::xml;
-//~ using namespace xios::comm;
+using namespace xios::comm;
 //~ using namespace xios::func;
-using namespace xios::vtk;
 
 // Point d'entrÃ©e du programme serveur principal.
-int main (int XIOS_UNUSED (argc), char ** XIOS_UNUSED (argv), char ** XIOS_UNUSED (env))
+int main (int argc, char ** argv, char ** XIOS_UNUSED (env))
 {
    try
    {
+      CMPIManager::Initialise(&argc, &argv);
+      {
+         MPI_Comm cworld = CMPIManager::GetCommWorld();
+         int rank = CMPIManager::GetCommRank();
+         int size = CMPIManager::GetCommSize();
+         
+         CONetCDF4 output("wk/data/herve.nc", false, &cworld);
+         
+         CONetCDF4::CNetCDF4Path path;
+         path.push_back("ozdoba");
+         
+         output.addGroup("ozdoba");
+         output.setCurrentPath(path);
+         output.addDimension("time");
+         output.addDimension("x", 10);
+         output.addDimension("y", 10);
+         
+         std::vector<std::string> dims;
+         dims.push_back("time");
+         dims.push_back("x");
+         dims.push_back("y");
+         
+         std::string toto("toto");
+         output.addVariable(toto, NC_INT, dims);
 
+         output.writeAttribute("att1", "llo");
+         
+         std::vector<int> vvv;
+         vvv.push_back(1);
+         output.writeAttribute("att1", vvv, &toto);
+         vvv.push_back(5);
+         output.writeAttribute("att5", vvv, &toto);
+         
+         boost::multi_array<int, 2> data(boost::extents[2][10]);
+         boost::multi_array<int, 2>::iterator it = data.begin(), end = data.end();
+         
+         for (std::size_t i = 0; i < data.num_elements(); i++) data.data()[i] = rank;
 
+         std::vector<std::size_t> _start;
+         std::vector<std::size_t> _count;
+         _start.push_back(10*rank/size);
+         _count.push_back(2);
+         _start.push_back(0);
+         _count.push_back(10);
+         
+         output.writeData( data, toto, 0, false, &_start, &_count);
+      }
 
+      CMPIManager::Finalize();
    }
    catch (xios::CException & _exception)
    {
       std::cerr << _exception.getMessage() << std::endl;
+      CMPIManager::Finalize();
       return (-1);
    }
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.cpp	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.cpp	(revision 249)
@@ -20,4 +20,7 @@
 namespace io {
     
+    
+   // ------------------------------ Constructeurs -----------------------------
+   
    CINetCDF4::CINetCDF4(const std::string & filename)
    {
@@ -25,8 +28,12 @@
    }
 
+   // ------------------------------- Destructeur ------------------------------
+   
    CINetCDF4::~CINetCDF4(void)
    {
        CheckError(nc_close(this->ncidp));
    }
+   
+   // --------------------- VÃ©rification des erreurs NetCDF --------------------
    
    void CINetCDF4::CheckError(int _status) throw (CException)
@@ -39,4 +46,6 @@
       }
    }
+   
+   // --------------------------- Accesseurs protÃ©gÃ©s --------------------------
    
    int CINetCDF4::getCurrentGroup(void)
@@ -107,4 +116,13 @@
    }
    
+   bool CINetCDF4::varExist(const std::string & _varname)
+   {
+      int varid = 0;
+      int grpid = this->getCurrentGroup();
+      return (nc_inq_varid (grpid, _varname.c_str(), &varid) == NC_NOERR);
+   }
+   
+   // ------------------------------- Accesseurs -------------------------------
+   
    const CINetCDF4::CNetCDF4Path & CINetCDF4::getCurrentPath(void) const
    { 
@@ -112,8 +130,12 @@
    }
 
+   // ------------------------------- Mutateurs --------------------------------
+
    void CINetCDF4::setCurrentPath(const CNetCDF4Path & path)
    { 
        this->path = path; 
    }
+   
+   // ----------------- Obtention des informations de lecture ------------------
    
    void CINetCDF4::getReadDataInfos(const std::string & _varname,
@@ -159,4 +181,34 @@
    }
    
+   // ------------------------- Lecture des donnÃ©es --------------------------
+   
+   template <>
+      void CINetCDF4::readData_(int _grpid, int _varid,
+                                const std::vector<std::size_t> & _sstart,
+                                const std::vector<std::size_t> & _scount,
+                                float * _data)
+   {
+      CheckError(nc_get_vara_float(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
+   }
+   
+   template <>
+      void CINetCDF4::readData_(int _grpid, int _varid,
+                                const std::vector<std::size_t> & _sstart,
+                                const std::vector<std::size_t> & _scount,
+                                int * _data)
+   {
+      CheckError(nc_get_vara_int(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
+   }
+   
+   template <>
+      void CINetCDF4::readData_(int _grpid, int _varid,
+                                const std::vector<std::size_t> & _sstart,
+                                const std::vector<std::size_t> & _scount,
+                                double * _data)
+   {
+      CheckError(nc_get_vara_double(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
+   }
+
+   // ------------------------- Lecture des attributs --------------------------
    void CINetCDF4::readAttribute
       (const std::string & _attname, std::string & _value, const std::string * _varname)
@@ -166,4 +218,34 @@
         _value.assign(&(chart[0]), chart.size());
    }
+   
+   template <>
+      void CINetCDF4::readAttribute_
+         (const std::string & _attname, double * _value, int _grpid, int _varid)
+   {       
+        CheckError(nc_get_att_double(_grpid, _varid, _attname.c_str(), _value));
+   }
+   
+   template <>
+      void CINetCDF4::readAttribute_
+         (const std::string & _attname, float * _value, int _grpid, int _varid)
+   {
+       CheckError(nc_get_att_float(_grpid, _varid, _attname.c_str(), _value));
+   }
+   
+   template <>
+      void CINetCDF4::readAttribute_
+         (const std::string & _attname, int * _value, int _grpid, int _varid)
+   {
+       CheckError(nc_get_att_int(_grpid, _varid, _attname.c_str(), _value));
+   }
+   
+   template <>
+      void CINetCDF4::readAttribute_
+         (const std::string & _attname, char * _value, int _grpid, int _varid)
+   {
+       CheckError(nc_get_att_text(_grpid, _varid, _attname.c_str(), _value));
+   }
+   
+   // ----------------- Accesseur de parcours (d'exploration) ------------------
 
    std::vector<std::string> CINetCDF4::getAttributes(const std::string * const _varname)
@@ -187,6 +269,5 @@
       }
       return (retvalue);
-   }
-   
+   }   
    
    std::map<std::string, std::size_t> CINetCDF4::getDimensions(const std::string * const _varname)
@@ -322,66 +403,4 @@
    }
    
-   template <>
-      void CINetCDF4::readData_(int _grpid, int _varid,
-                                const std::vector<std::size_t> & _sstart,
-                                const std::vector<std::size_t> & _scount,
-                                float * _data)
-   {
-      CheckError(nc_get_vara_float(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
-   }
-   
-   template <>
-      void CINetCDF4::readData_(int _grpid, int _varid,
-                                const std::vector<std::size_t> & _sstart,
-                                const std::vector<std::size_t> & _scount,
-                                int * _data)
-   {
-      CheckError(nc_get_vara_int(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
-   }
-   
-   template <>
-      void CINetCDF4::readData_(int _grpid, int _varid,
-                                const std::vector<std::size_t> & _sstart,
-                                const std::vector<std::size_t> & _scount,
-                                double * _data)
-   {
-      CheckError(nc_get_vara_double(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
-   }
-   
-   template <>
-      void CINetCDF4::readAttribute_
-         (const std::string & _attname, double * _value, int _grpid, int _varid)
-   {       
-        CheckError(nc_get_att_double(_grpid, _varid, _attname.c_str(), _value));
-   }
-   
-   template <>
-      void CINetCDF4::readAttribute_
-         (const std::string & _attname, float * _value, int _grpid, int _varid)
-   {
-       CheckError(nc_get_att_float(_grpid, _varid, _attname.c_str(), _value));
-   }
-   
-   template <>
-      void CINetCDF4::readAttribute_
-         (const std::string & _attname, int * _value, int _grpid, int _varid)
-   {
-       CheckError(nc_get_att_int(_grpid, _varid, _attname.c_str(), _value));
-   }
-   
-   template <>
-      void CINetCDF4::readAttribute_
-         (const std::string & _attname, char * _value, int _grpid, int _varid)
-   {
-       CheckError(nc_get_att_text(_grpid, _varid, _attname.c_str(), _value));
-   }
-   
-   bool CINetCDF4::varExist(const std::string & _varname)
-   {
-      int varid = 0;
-      int grpid = this->getCurrentGroup();
-      return (nc_inq_varid (grpid, _varname.c_str(), &varid) == NC_NOERR);
-   }
-   
 } // namespace io
 } // namespace xmlioserver
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.hpp	(revision 248)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.hpp	(revision 249)
@@ -125,5 +125,5 @@
                void readData( boost::multi_array<DataType, ndim> & _data,
                               const std::string                  & _varname,
-                              std::size_t                          _record = 1,
+                              std::size_t                          _record = 0,
                               const std::vector<std::size_t>     * _start  = NULL,
                               const std::vector<std::size_t>     * _count  = NULL);
@@ -199,5 +199,5 @@
                                   const std::vector<std::size_t> * _count);
             
-         private : // Lecture
+         private : // Lecture privÃ©e
              
              template <class DataType>
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/onetcdf4.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/onetcdf4.cpp	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/onetcdf4.cpp	(revision 249)
@@ -0,0 +1,354 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+ 
+// XMLIOServer headers
+#include "onetcdf4.hpp"
+#include "onetcdf4_impl.hpp"
+
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+namespace xmlioserver {
+namespace io {
+
+   // ------------------------------ Constructeurs -----------------------------
+   
+   CONetCDF4::CONetCDF4(const std::string & filename, bool exist,
+                        const MPI_Comm * _comm_server)
+   {
+      if (_comm_server != NULL) this->comm_server = *_comm_server;
+      if (this->comm_server)
+      {  
+         if (exist)
+            CheckError(nc_open_par(filename.c_str(), NC_NETCDF4|NC_MPIIO,
+                        this->comm_server.get(), MPI_INFO_NULL, &this->ncidp));
+         else
+            CheckError(nc_create_par(filename.c_str(), NC_NETCDF4|NC_MPIIO,
+                        this->comm_server.get(), MPI_INFO_NULL, &this->ncidp));
+      }
+      else
+      {  
+         if (exist)
+            CheckError(nc_open(filename.c_str(), NC_NETCDF4, &this->ncidp));
+         else
+            CheckError(nc_create(filename.c_str(), NC_NETCDF4, &this->ncidp));
+      }
+   }
+
+   // ------------------------------- Destructeur ------------------------------
+   
+   CONetCDF4::~CONetCDF4(void)
+   {
+       CheckError(nc_close(this->ncidp));
+   }
+   
+   // --------------------- VÃ©rification des erreurs NetCDF --------------------
+   
+   void CONetCDF4::CheckError(int _status) throw (CException)
+   {
+      if (_status != NC_NOERR)
+      {
+         std::string errormsg (nc_strerror(_status)); // fuite mÃ©moire ici ?
+         XIOS_ERROR("CONetCDF4::CheckError(int status)",
+              << "[ status = " << _status << " ] " << errormsg);
+      }
+   }
+   
+   // ------------------------- DÃ©but/Fin de dÃ©finition ------------------------
+   
+   void CONetCDF4::definition_start(void)
+   { 
+      CheckError(nc_redef(this->ncidp));
+   }
+      
+   void CONetCDF4::definition_end(void)
+   { 
+      CheckError(nc_enddef(this->ncidp));
+   }
+   
+   // ------------------------------- Accesseurs -------------------------------
+   
+   const CONetCDF4::CNetCDF4Path & CONetCDF4::getCurrentPath(void) const
+   { 
+       return (this->path); 
+   }
+   
+   std::string CONetCDF4::getUnlimitedDimensionName(void)
+   {
+      char full_name_in[NC_MAX_NAME +1];
+      int grpid = this->getGroup(path);
+      int dimid = this->getUnlimitedDimension();
+      
+      if (dimid == -1) return (std::string());
+      CheckError(nc_inq_dimname(grpid, dimid, full_name_in));
+
+      std::string dimname(full_name_in);
+      return (dimname);
+   }
+ 
+   std::vector<std::string> CONetCDF4::getDimensionsIdList (const std::string * _varname)
+   {
+      char full_name_in[NC_MAX_NAME +1];
+      int nbdim = 0, *dimid = NULL;
+      int grpid = this->getCurrentGroup();
+      int varid = (_varname != NULL) ? this->getVariable(*_varname) : NC_GLOBAL;
+      std::vector<std::string> retvalue;
+
+      if (_varname != NULL)
+      {
+         CheckError(nc_inq_varndims(grpid, varid, &nbdim));
+         dimid = new int[nbdim]();
+         CheckError(nc_inq_vardimid(grpid, varid, dimid));
+      }
+      else
+      {
+         CheckError(nc_inq_dimids(grpid, &nbdim, NULL, 1));
+         dimid = new int[nbdim]();
+         CheckError(nc_inq_dimids(grpid, NULL, dimid, 1));
+      }
+
+      for (int i = 0; i < nbdim; i++)
+      {
+         CheckError(nc_inq_dimname(grpid, dimid[i], full_name_in));
+         std::string dimname(full_name_in);
+         retvalue.push_back(dimname);
+      }
+      delete [] dimid;
+
+      return (retvalue);
+   }
+
+   // ------------------------------- Mutateurs --------------------------------
+
+   void CONetCDF4::setCurrentPath(const CONetCDF4::CNetCDF4Path & path)
+   { 
+       this->path = path; 
+   }
+   
+   int CONetCDF4::addDimension(const std::string & _name, std::size_t _size)
+   {
+      int retvalue = 0;
+      int grpid = this->getCurrentGroup();
+      if (_size != UNLIMITED_DIM)
+         CheckError(nc_def_dim (grpid, _name.c_str(), _size, &retvalue));
+      else
+         CheckError(nc_def_dim (grpid, _name.c_str(), NC_UNLIMITED, &retvalue));
+      return (retvalue);
+   }
+   
+   int CONetCDF4::addVariable (const std::string & _name, nc_type _type,
+                               const std::vector<std::string> & _dims)
+   {
+      int retvalue = 0;
+      std::vector<int> dimids;
+      int grpid = this->getCurrentGroup();
+         
+      std::vector<std::string>::const_iterator
+         it  = _dims.begin(), end = _dims.end();
+
+      for (;it != end; it++)
+      {
+         const std::string & dimid = *it;
+         dimids.push_back(this->getDimension(dimid));
+      }
+      CheckError(nc_def_var(grpid, _name.c_str(), _type, dimids.size(), &(dimids[0]), &retvalue));
+      return (retvalue);
+   }
+   
+   int CONetCDF4::addGroup(const std::string & _name)
+   {
+      int retvalue = 0;
+      int grpid = this->getCurrentGroup();
+      CheckError(nc_def_grp(grpid, const_cast<char*>(_name.c_str()), &retvalue));
+      return (retvalue);
+   }
+   
+   // --------------------------- Accesseurs protÃ©gÃ©s --------------------------
+   
+   int CONetCDF4::getCurrentGroup(void)
+   {
+      return (this->getGroup(this->getCurrentPath()));
+   }
+   
+   int CONetCDF4::getGroup(const CNetCDF4Path & path)
+   {
+      int retvalue = this->ncidp;
+      
+      CNetCDF4Path::const_iterator
+         it  = path.begin(), end = path.end();
+
+      for (;it != end; it++)
+      {
+         const std::string & groupid = *it;
+         CheckError(nc_inq_ncid(retvalue, const_cast<char*>(groupid.c_str()), &retvalue));
+      }
+      return (retvalue);
+   }
+   
+   int CONetCDF4::getVariable(const std::string & varname)
+   {
+      int varid = 0;
+      int grpid = this->getCurrentGroup();
+      CheckError(nc_inq_varid (grpid, varname.c_str(), &varid));
+      return (varid);
+   }
+   
+   int CONetCDF4::getDimension(const std::string & dimname)
+   {
+      int dimid = 0;
+      int grpid = this->getCurrentGroup();
+      CheckError(nc_inq_dimid (grpid, dimname.c_str(), &dimid));
+      return (dimid);
+   }
+   
+   int CONetCDF4::getUnlimitedDimension(void)
+   {
+      int dimid = 0;
+      int grpid = this->getCurrentGroup();
+      CheckError(nc_inq_unlimdim (grpid, &dimid));
+      return (dimid);
+   }
+   
+   std::vector<std::size_t> CONetCDF4::getDimensions(const std::string & varname)
+   {
+      std::size_t size = 0;
+      std::vector<std::size_t> retvalue;
+      int grpid = this->getCurrentGroup();
+      int varid = this->getVariable(varname);
+      int nbdim = 0, *dimid = NULL;
+
+      CheckError(nc_inq_varndims(grpid, varid, &nbdim));
+      dimid = new int[nbdim]();
+      CheckError(nc_inq_vardimid(grpid, varid, dimid));
+
+      for (int i = 0; i < nbdim; i++)
+      {
+         CheckError(nc_inq_dimlen (grpid, dimid[i], &size));
+         if (size == NC_UNLIMITED)
+             size = UNLIMITED_DIM;
+         retvalue.push_back(size);
+      }
+
+      return (retvalue);
+   }
+   
+   bool CONetCDF4::varExist(const std::string & _varname)
+   {
+      int varid = 0;
+      int grpid = this->getCurrentGroup();
+      return (nc_inq_varid (grpid, _varname.c_str(), &varid) == NC_NOERR);
+   }
+   
+// ----------------- Obtention des informations d'Ã©criture ------------------
+   
+   void CONetCDF4::getWriteDataInfos(const std::string & _varname,
+                                     std::size_t   _record, 
+                                     std::size_t & _array_size,
+                                     std::vector<std::size_t> & _sstart,
+                                     std::vector<std::size_t> & _scount,
+                                     const std::vector<std::size_t> * _start,
+                                     const std::vector<std::size_t> * _count)
+   {
+      std::vector<std::size_t> sizes  = this->getDimensions(_varname);
+      std::vector<std::string> iddims = this->getDimensionsIdList (&_varname);   
+      std::vector<std::size_t>::const_iterator
+         it  = sizes.begin(), end = sizes.end();
+      int i = 0;
+      
+      if (iddims.begin()->compare(this->getUnlimitedDimensionName()) == 0)
+      {
+         _sstart.push_back(_record);
+         _scount.push_back(1); 
+         if ((_start == NULL) &&
+             (_count == NULL)) i++;
+         it++;
+      }
+
+      for (;it != end; it++)
+      {      
+         if ((_start != NULL) && (_count != NULL))
+         {
+            _sstart.push_back((*_start)[i]);
+            _scount.push_back((*_count)[i]);
+            _array_size *= (*_count)[i];
+            i++;
+         }
+         else
+         {
+            _sstart.push_back(0);
+            _scount.push_back(sizes[i]);
+            _array_size *= sizes[i];
+            i++;
+         }
+      }
+   }
+   
+   // ------------------------- Ecriture des donnÃ©es --------------------------
+     
+   template <>
+      void CONetCDF4::writeData_(int _grpid, int _varid,
+                                const std::vector<std::size_t> & _sstart,
+                                const std::vector<std::size_t> & _scount,
+                                const float * _data)
+   {
+      CheckError(nc_put_vara_float(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
+   }
+   
+   template <>
+      void CONetCDF4::writeData_(int _grpid, int _varid,
+                                const std::vector<std::size_t> & _sstart,
+                                const std::vector<std::size_t> & _scount,
+                                const int * _data)
+   {
+      CheckError(nc_put_vara_int(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
+   }
+   
+   template <>
+      void CONetCDF4::writeData_(int _grpid, int _varid,
+                                const std::vector<std::size_t> & _sstart,
+                                const std::vector<std::size_t> & _scount,
+                                const double * _data)
+   {
+      CheckError(nc_put_vara_double(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
+   }
+
+   // ------------------------- Ecriture des attributs --------------------------
+
+   template <>
+      void CONetCDF4::writeAttribute_
+         (const std::string & _attname, const double * _value, std::size_t _size, int _grpid, int _varid)
+   {       
+        CheckError(nc_put_att_double(_grpid, _varid, _attname.c_str(), NC_DOUBLE, _size, _value));
+   }
+   
+   template <>
+      void CONetCDF4::writeAttribute_
+         (const std::string & _attname, const float * _value, std::size_t _size, int _grpid, int _varid)
+   {
+       CheckError(nc_put_att_float(_grpid, _varid, _attname.c_str(), NC_FLOAT, _size, _value));
+   }
+   
+   template <>
+      void CONetCDF4::writeAttribute_
+         (const std::string & _attname, const int * _value, std::size_t _size, int _grpid, int _varid)
+   {
+       CheckError(nc_put_att_int(_grpid, _varid, _attname.c_str(), NC_INT, _size, _value));
+   }
+   
+   template <>
+      void CONetCDF4::writeAttribute_
+         (const std::string & _attname, const char * _value, std::size_t _size, int _grpid, int _varid)
+   {
+       CheckError(nc_put_att_text(_grpid, _varid, _attname.c_str(), _size, _value));
+   }
+   
+   void CONetCDF4::writeAttribute
+      (const std::string & _attname, const std::string & _value, const std::string * _varname)
+   {
+      std::vector<char> chart;
+      chart.assign (_value.begin(), _value.end());
+      this->writeAttribute(_attname, chart, _varname);
+   }
+   
+} // namespace io
+} // namespace xmlioserver
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/onetcdf4.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/onetcdf4.hpp	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/onetcdf4.hpp	(revision 249)
@@ -0,0 +1,224 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+ 
+#ifndef __ONETCDF4_HPP__
+#define __ONETCDF4_HPP__
+
+#ifndef __XIOS_NO_EXTERN
+
+// M(essage) P(assing) I(nterface) headers
+#include <mpi.h>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
+// NetCDF headers
+#define MPI_INCLUDED
+#include <netcdf.h>
+
+// C++ standard headers
+#include <vector>
+
+// boost Headers
+#include <boost/multi_array.hpp>
+#include <boost/optional.hpp>
+
+#endif // __XIOS_NO_EXTERN
+
+// XMLIOServer headers
+#include "xmlioserver_spl.hpp"
+
+#ifndef UNLIMITED_DIM
+   #define UNLIMITED_DIM (size_t)(-1)
+#endif  //UNLIMITED_DIM
+
+// ////////////////////////////// DÃ©clarations ///////////////////////////// //
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      /**
+       * \class CONetCDF4
+       * \brief Classe permettant d'Ã©crire des fichiers de donnÃ©es au format netCDF-4.
+       */
+      class CONetCDF4
+      {
+         public : // DÃ©finition de type
+            
+            //! \brief RedÃ©finition de std::vector<std::string> pour simplification d'Ã©criture.
+            typedef std::vector<std::string> CNetCDF4Path;
+            
+         public : // Constructeurs
+         
+            //! \brief Constructeur simple.
+            CONetCDF4(void); // NIY
+            
+            /*!
+             * \brief Constructeur Ã  partir d'un nom de fichier au format netCDF4.
+             * \param _filename : un nom de fichier au format netCDF4.
+             */
+            explicit CONetCDF4(const std::string & _filename, bool exist = false,
+                               const MPI_Comm * _comm_server = NULL);
+            
+            /*!
+             * \brief Constructeur par copie .
+             * \param _onetcdf4 : rÃ©fÃ©rence de l'objet Ã  copier.
+             */
+            CONetCDF4(const CONetCDF4 & _onetcdf4);// NIY
+            
+            /*!
+             * \brief Constructeur par copie.
+             * \param _onetcdf4_ptr : le pointeur sur l'objet Ã  copier.
+             */
+            CONetCDF4(const CONetCDF4 * const _onetcdf4_ptr); // NIY
+            
+         public : // Destructeur
+         
+            //! \brief Destructeur de l'objet (le fichier est clos lors de son appel).
+            virtual ~CONetCDF4(void);
+            
+         public : // Mutateur
+            
+            void setCurrentPath(const CNetCDF4Path & _path);
+
+            int addDimension(const std::string & _name, std::size_t _size = UNLIMITED_DIM);
+            int addVariable (const std::string & _name, nc_type _type,
+                             const std::vector<std::string> & _dims);            
+            int addGroup    (const std::string & _name);
+            
+         public : // Accesseurs
+            
+            const CNetCDF4Path & getCurrentPath(void) const;
+            
+            std::string getUnlimitedDimensionName(void);          
+            std::vector<std::string> getDimensionsIdList (const std::string * _varname);
+            
+         protected : // Accesseurs protÃ©gÃ©s
+         
+            /*!
+             * \brief Retourne l'identifiant du groupe courant 
+             * (le chemin est gardÃ©e en mÃ©moire dans la variable path).
+             * \return  l'identifiant du groupe courant
+             * \see path
+             */
+            int getCurrentGroup(void);
+            
+            /*!
+             * \brief Retourne l'identifiant du groupe  dont le chemin est passÃ© en argument.
+             * \param _path : Un chemin dans la structure de donnÃ©e netCDF.
+             * \return l'identifiant du groupe.
+             *
+             * <i> Exemple d'utilisation: </i>
+             * \code
+             * //> Retourne l'identifiant d'un group.
+             * CINetCDF4 ncinput(std::string("mon_fichier.nc"));
+             * CNetCDF4Path path;
+             * path.push_back("mes_donnees"); path.push_back("mes_tableaux");
+             * int groupid = ncinput.getGroup(path);
+             * \endcode
+             */
+            int getGroup(const CNetCDF4Path & _path);
+            
+            /*!
+             * \brief Retourne l'identifiant d'une variable dans le groupe courant.
+             * \param _varname : Le nom d'une variable dans le fichier de donnÃ©es.
+             * \return l'identifiant de la variable.
+             */
+            int getVariable(const std::string & _varname);
+            
+            /*!
+             * \brief Retourne l'identifiant d'une dimension dans le groupe courant.
+             * \param _dimname : Le nom d'une dimension dans le  fichier de donnÃ©es.
+             * \return l'identifiant de la dimension.
+             */
+            int getDimension(const std::string & _dimname);
+            
+            /*!
+             * \brief Retourne les dimensions d'une variable.
+             * \param _varname : Le nom d'une variable dans le  fichier de donnÃ©es.
+             * \return Un vecteur des dimensions associÃ©es Ã  la variables
+             */
+            std::vector<std::size_t> getDimensions(const std::string & _varname);
+            
+            /*!
+             * \brief Retourne l'identifiant de la dimension non limitÃ© dans le fichier.
+             * \return l'identifiant de la dimension non limitÃ© ou <b>-1</b> s'il n'y en a pas.
+             */
+            int getUnlimitedDimension(void);
+            
+            /*!
+             * \brief Indique si une variable existe dans le groupe courant.
+             * \param _varname : Le nom d'une variable dans le  fichier de donnÃ©es.
+             * \return  <b>true</b> si la variable existe, <b>false</b> sinon.
+             */
+            bool varExist(const std::string & _varname);
+            
+         public : // Ecriture
+         
+            template <class DataType>
+               void writeAttribute
+                  (const std::string &           _attname,
+                   const std::vector<DataType> & _value,
+                   const std::string           * _varname = NULL);
+            
+           void writeAttribute
+                  (const std::string & _attname,
+                   const std::string & _value,
+                   const std::string * _varname = NULL);
+
+            template <class DataType, std::size_t ndim>
+               void writeData( const boost::multi_array<DataType, ndim> & _data,
+                               const std::string                        & _varname,
+                               std::size_t                                _record     = 0,
+                               bool                                       _collective = true,
+                               const std::vector<std::size_t>           * _start      = NULL,
+                               const std::vector<std::size_t>           * _count      = NULL);
+                               
+         private : // Ecriture privÃ©e
+             
+            template <class DataType>
+               void writeData_(int                               _grpid,
+                                int                              _varid,
+                                const std::vector<std::size_t> & _sstart,
+                                const std::vector<std::size_t> & _scount,
+                                const DataType                 * _data);
+             
+            template <class DataType>
+                void writeAttribute_
+                        (const std::string & _attname,
+                         const DataType    * _value,
+                         std::size_t         _size,
+                         int                 _grpid,
+                         int                 _varid = NC_GLOBAL);
+                         
+         private : // Obtention des informations d'Ã©criture
+            
+            void getWriteDataInfos(const std::string              & _varname,
+                                   std::size_t                      _record, 
+                                   std::size_t                    & _array_size,
+                                   std::vector<std::size_t>       & _sstart,
+                                   std::vector<std::size_t>       & _scount,
+                                   const std::vector<std::size_t> * _start,
+                                   const std::vector<std::size_t> * _count);
+            
+         public : // DÃ©but/Fin de dÃ©finition
+
+            void definition_start(void);
+            void definition_end(void);
+            
+         private : // VÃ©rification des erreurs NetCDF
+
+            static void CheckError(int _status) throw (CException);
+            
+         public : // PropriÃ©tÃ©s privÃ©es
+         
+            boost::optional<MPI_Comm> comm_server;
+            std::vector<std::string> path;
+            int ncidp;                            
+         
+      }; // class CONetCDF4
+
+   } // namespace io
+
+} // namespace xmlioserver
+
+#endif// __ONETCDF4_HPP__
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/onetcdf4_impl.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/onetcdf4_impl.hpp	(revision 249)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/onetcdf4_impl.hpp	(revision 249)
@@ -0,0 +1,54 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#ifndef __ONETCDF4_IMPL_HPP__
+#define __ONETCDF4_IMPL_HPP__
+
+// XMLIOServer headers
+#include "xmlioserver_spl.hpp"
+
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+namespace xmlioserver{
+namespace io {
+   
+   template <class DataType, std::size_t ndim>
+      void CONetCDF4::writeData(const boost::multi_array<DataType, ndim> & _data,
+                                const std::string                        & _varname,
+                                std::size_t                                _record,
+                                bool                                       _collective,
+                                const std::vector<std::size_t>           * _start,
+                                const std::vector<std::size_t>           * _count)
+   {
+      int grpid = this->getCurrentGroup();
+      int varid = this->getVariable(_varname);
+      std::size_t _array_size = 1;
+      std::vector<std::size_t> _sstart, _scount;
+      
+      if (this->comm_server && _collective)
+         CheckError(nc_var_par_access(grpid, varid, NC_COLLECTIVE));
+      if (this->comm_server && !_collective)
+         CheckError(nc_var_par_access(grpid, varid, NC_INDEPENDENT));
+      
+      this->getWriteDataInfos
+         (_varname, _record, _array_size,  _sstart, _scount, _start, _count);
+      this->writeData_(grpid, varid, _sstart, _scount, _data.data());
+   }
+
+   template <class DataType>
+      void CONetCDF4::writeAttribute
+          (const std::string           & _attname,
+           const std::vector<DataType> & _value,
+           const std::string           * _varname)
+   {
+       std::pair<nc_type, std::size_t> attinfos;
+       int grpid = this->getCurrentGroup();                                 
+       int varid = (_varname != NULL) ? this->getVariable(*_varname) : NC_GLOBAL;
+       this->writeAttribute_(_attname, &_value[0], _value.size(), grpid, varid);       
+   }
+   
+} // namespace io
+} // namespace xmlioserver
+
+#endif	// __ONETCDF4_IMPL_HPP__
