Index: XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp
===================================================================
--- XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp	(revision 558)
+++ XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp	(revision 567)
@@ -69,24 +69,74 @@
   
   
-  void cxios_set_grid_mask(grid_Ptr grid_hdl, bool* mask, int extent1, int extent2, int extent3)
+  void cxios_set_grid_mask1(grid_Ptr grid_hdl, bool* mask1, int extent1)
   {
     CTimer::get("XIOS").resume();
-    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
-    grid_hdl->mask.reference(tmp.copy());
+    CArray<bool,1> tmp(mask1,shape(extent1),neverDeleteData) ;
+    grid_hdl->mask1.reference(tmp.copy());
      CTimer::get("XIOS").suspend();
   }
   
-  void cxios_get_grid_mask(grid_Ptr grid_hdl, bool* mask, int extent1, int extent2, int extent3)
+  void cxios_get_grid_mask1(grid_Ptr grid_hdl, bool* mask1, int extent1)
   {
     CTimer::get("XIOS").resume();
-    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
-    tmp=grid_hdl->mask.getInheritedValue() ;
+    CArray<bool,1> tmp(mask1,shape(extent1),neverDeleteData) ;
+    tmp=grid_hdl->mask1.getInheritedValue() ;
      CTimer::get("XIOS").suspend();
   }
   
-  bool cxios_is_defined_grid_mask(grid_Ptr grid_hdl )
+  bool cxios_is_defined_grid_mask1(grid_Ptr grid_hdl )
   {
      CTimer::get("XIOS").resume();
-    return grid_hdl->mask.hasInheritedValue();
+    return grid_hdl->mask1.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+  
+  
+  
+  void cxios_set_grid_mask2(grid_Ptr grid_hdl, bool* mask2, int extent1, int extent2)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask2,shape(extent1,extent2),neverDeleteData) ;
+    grid_hdl->mask2.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+  
+  void cxios_get_grid_mask2(grid_Ptr grid_hdl, bool* mask2, int extent1, int extent2)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask2,shape(extent1,extent2),neverDeleteData) ;
+    tmp=grid_hdl->mask2.getInheritedValue() ;
+     CTimer::get("XIOS").suspend();
+  }
+  
+  bool cxios_is_defined_grid_mask2(grid_Ptr grid_hdl )
+  {
+     CTimer::get("XIOS").resume();
+    return grid_hdl->mask2.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+  
+  
+  
+  void cxios_set_grid_mask3(grid_Ptr grid_hdl, bool* mask3, int extent1, int extent2, int extent3)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,3> tmp(mask3,shape(extent1,extent2,extent3),neverDeleteData) ;
+    grid_hdl->mask3.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+  
+  void cxios_get_grid_mask3(grid_Ptr grid_hdl, bool* mask3, int extent1, int extent2, int extent3)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,3> tmp(mask3,shape(extent1,extent2,extent3),neverDeleteData) ;
+    tmp=grid_hdl->mask3.getInheritedValue() ;
+     CTimer::get("XIOS").suspend();
+  }
+  
+  bool cxios_is_defined_grid_mask3(grid_Ptr grid_hdl )
+  {
+     CTimer::get("XIOS").resume();
+    return grid_hdl->mask3.hasInheritedValue();
      CTimer::get("XIOS").suspend();
   }
Index: XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp
===================================================================
--- XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp	(revision 558)
+++ XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp	(revision 567)
@@ -95,24 +95,74 @@
   
   
-  void cxios_set_gridgroup_mask(gridgroup_Ptr gridgroup_hdl, bool* mask, int extent1, int extent2, int extent3)
+  void cxios_set_gridgroup_mask1(gridgroup_Ptr gridgroup_hdl, bool* mask1, int extent1)
   {
     CTimer::get("XIOS").resume();
-    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
-    gridgroup_hdl->mask.reference(tmp.copy());
+    CArray<bool,1> tmp(mask1,shape(extent1),neverDeleteData) ;
+    gridgroup_hdl->mask1.reference(tmp.copy());
      CTimer::get("XIOS").suspend();
   }
   
-  void cxios_get_gridgroup_mask(gridgroup_Ptr gridgroup_hdl, bool* mask, int extent1, int extent2, int extent3)
+  void cxios_get_gridgroup_mask1(gridgroup_Ptr gridgroup_hdl, bool* mask1, int extent1)
   {
     CTimer::get("XIOS").resume();
-    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
-    tmp=gridgroup_hdl->mask.getInheritedValue() ;
+    CArray<bool,1> tmp(mask1,shape(extent1),neverDeleteData) ;
+    tmp=gridgroup_hdl->mask1.getInheritedValue() ;
      CTimer::get("XIOS").suspend();
   }
   
-  bool cxios_is_defined_gridgroup_mask(gridgroup_Ptr gridgroup_hdl )
+  bool cxios_is_defined_gridgroup_mask1(gridgroup_Ptr gridgroup_hdl )
   {
      CTimer::get("XIOS").resume();
-    return gridgroup_hdl->mask.hasInheritedValue();
+    return gridgroup_hdl->mask1.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+  
+  
+  
+  void cxios_set_gridgroup_mask2(gridgroup_Ptr gridgroup_hdl, bool* mask2, int extent1, int extent2)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask2,shape(extent1,extent2),neverDeleteData) ;
+    gridgroup_hdl->mask2.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+  
+  void cxios_get_gridgroup_mask2(gridgroup_Ptr gridgroup_hdl, bool* mask2, int extent1, int extent2)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,2> tmp(mask2,shape(extent1,extent2),neverDeleteData) ;
+    tmp=gridgroup_hdl->mask2.getInheritedValue() ;
+     CTimer::get("XIOS").suspend();
+  }
+  
+  bool cxios_is_defined_gridgroup_mask2(gridgroup_Ptr gridgroup_hdl )
+  {
+     CTimer::get("XIOS").resume();
+    return gridgroup_hdl->mask2.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+  
+  
+  
+  void cxios_set_gridgroup_mask3(gridgroup_Ptr gridgroup_hdl, bool* mask3, int extent1, int extent2, int extent3)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,3> tmp(mask3,shape(extent1,extent2,extent3),neverDeleteData) ;
+    gridgroup_hdl->mask3.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+  
+  void cxios_get_gridgroup_mask3(gridgroup_Ptr gridgroup_hdl, bool* mask3, int extent1, int extent2, int extent3)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<bool,3> tmp(mask3,shape(extent1,extent2,extent3),neverDeleteData) ;
+    tmp=gridgroup_hdl->mask3.getInheritedValue() ;
+     CTimer::get("XIOS").suspend();
+  }
+  
+  bool cxios_is_defined_gridgroup_mask3(gridgroup_Ptr gridgroup_hdl )
+  {
+     CTimer::get("XIOS").resume();
+    return gridgroup_hdl->mask3.hasInheritedValue();
      CTimer::get("XIOS").suspend();
   }
Index: XIOS/trunk/src/interface/fortran_attr/grid_interface_attr.F90
===================================================================
--- XIOS/trunk/src/interface/fortran_attr/grid_interface_attr.F90	(revision 558)
+++ XIOS/trunk/src/interface/fortran_attr/grid_interface_attr.F90	(revision 567)
@@ -52,27 +52,71 @@
     
     
-    SUBROUTINE cxios_set_grid_mask(grid_hdl, mask, extent1, extent2, extent3) BIND(C)
+    SUBROUTINE cxios_set_grid_mask1(grid_hdl, mask1, extent1) BIND(C)
       USE ISO_C_BINDING
       INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
-      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask1
+      INTEGER (kind = C_INT), VALUE  :: extent1
+    END SUBROUTINE cxios_set_grid_mask1
+    
+    SUBROUTINE cxios_get_grid_mask1(grid_hdl, mask1, extent1) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask1
+      INTEGER (kind = C_INT), VALUE  :: extent1
+    END SUBROUTINE cxios_get_grid_mask1
+    
+    FUNCTION cxios_is_defined_grid_mask1(grid_hdl ) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask1
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_mask1
+    
+    
+    SUBROUTINE cxios_set_grid_mask2(grid_hdl, mask2, extent1, extent2) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask2
+      INTEGER (kind = C_INT), VALUE  :: extent1
+      INTEGER (kind = C_INT), VALUE  :: extent2
+    END SUBROUTINE cxios_set_grid_mask2
+    
+    SUBROUTINE cxios_get_grid_mask2(grid_hdl, mask2, extent1, extent2) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask2
+      INTEGER (kind = C_INT), VALUE  :: extent1
+      INTEGER (kind = C_INT), VALUE  :: extent2
+    END SUBROUTINE cxios_get_grid_mask2
+    
+    FUNCTION cxios_is_defined_grid_mask2(grid_hdl ) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask2
+      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
+    END FUNCTION cxios_is_defined_grid_mask2
+    
+    
+    SUBROUTINE cxios_set_grid_mask3(grid_hdl, mask3, extent1, extent2, extent3) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask3
       INTEGER (kind = C_INT), VALUE  :: extent1
       INTEGER (kind = C_INT), VALUE  :: extent2
       INTEGER (kind = C_INT), VALUE  :: extent3
-    END SUBROUTINE cxios_set_grid_mask
+    END SUBROUTINE cxios_set_grid_mask3
     
-    SUBROUTINE cxios_get_grid_mask(grid_hdl, mask, extent1, extent2, extent3) BIND(C)
+    SUBROUTINE cxios_get_grid_mask3(grid_hdl, mask3, extent1, extent2, extent3) BIND(C)
       USE ISO_C_BINDING
       INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl
-      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask3
       INTEGER (kind = C_INT), VALUE  :: extent1
       INTEGER (kind = C_INT), VALUE  :: extent2
       INTEGER (kind = C_INT), VALUE  :: extent3
-    END SUBROUTINE cxios_get_grid_mask
+    END SUBROUTINE cxios_get_grid_mask3
     
-    FUNCTION cxios_is_defined_grid_mask(grid_hdl ) BIND(C)
+    FUNCTION cxios_is_defined_grid_mask3(grid_hdl ) BIND(C)
       USE ISO_C_BINDING
-      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask3
       INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl
-    END FUNCTION cxios_is_defined_grid_mask
+    END FUNCTION cxios_is_defined_grid_mask3
     
     
Index: XIOS/trunk/src/interface/fortran_attr/gridgroup_interface_attr.F90
===================================================================
--- XIOS/trunk/src/interface/fortran_attr/gridgroup_interface_attr.F90	(revision 558)
+++ XIOS/trunk/src/interface/fortran_attr/gridgroup_interface_attr.F90	(revision 567)
@@ -73,27 +73,71 @@
     
     
-    SUBROUTINE cxios_set_gridgroup_mask(gridgroup_hdl, mask, extent1, extent2, extent3) BIND(C)
+    SUBROUTINE cxios_set_gridgroup_mask1(gridgroup_hdl, mask1, extent1) BIND(C)
       USE ISO_C_BINDING
       INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
-      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask1
+      INTEGER (kind = C_INT), VALUE  :: extent1
+    END SUBROUTINE cxios_set_gridgroup_mask1
+    
+    SUBROUTINE cxios_get_gridgroup_mask1(gridgroup_hdl, mask1, extent1) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask1
+      INTEGER (kind = C_INT), VALUE  :: extent1
+    END SUBROUTINE cxios_get_gridgroup_mask1
+    
+    FUNCTION cxios_is_defined_gridgroup_mask1(gridgroup_hdl ) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask1
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_mask1
+    
+    
+    SUBROUTINE cxios_set_gridgroup_mask2(gridgroup_hdl, mask2, extent1, extent2) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask2
+      INTEGER (kind = C_INT), VALUE  :: extent1
+      INTEGER (kind = C_INT), VALUE  :: extent2
+    END SUBROUTINE cxios_set_gridgroup_mask2
+    
+    SUBROUTINE cxios_get_gridgroup_mask2(gridgroup_hdl, mask2, extent1, extent2) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask2
+      INTEGER (kind = C_INT), VALUE  :: extent1
+      INTEGER (kind = C_INT), VALUE  :: extent2
+    END SUBROUTINE cxios_get_gridgroup_mask2
+    
+    FUNCTION cxios_is_defined_gridgroup_mask2(gridgroup_hdl ) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask2
+      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
+    END FUNCTION cxios_is_defined_gridgroup_mask2
+    
+    
+    SUBROUTINE cxios_set_gridgroup_mask3(gridgroup_hdl, mask3, extent1, extent2, extent3) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask3
       INTEGER (kind = C_INT), VALUE  :: extent1
       INTEGER (kind = C_INT), VALUE  :: extent2
       INTEGER (kind = C_INT), VALUE  :: extent3
-    END SUBROUTINE cxios_set_gridgroup_mask
+    END SUBROUTINE cxios_set_gridgroup_mask3
     
-    SUBROUTINE cxios_get_gridgroup_mask(gridgroup_hdl, mask, extent1, extent2, extent3) BIND(C)
+    SUBROUTINE cxios_get_gridgroup_mask3(gridgroup_hdl, mask3, extent1, extent2, extent3) BIND(C)
       USE ISO_C_BINDING
       INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl
-      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask
+      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask3
       INTEGER (kind = C_INT), VALUE  :: extent1
       INTEGER (kind = C_INT), VALUE  :: extent2
       INTEGER (kind = C_INT), VALUE  :: extent3
-    END SUBROUTINE cxios_get_gridgroup_mask
+    END SUBROUTINE cxios_get_gridgroup_mask3
     
-    FUNCTION cxios_is_defined_gridgroup_mask(gridgroup_hdl ) BIND(C)
+    FUNCTION cxios_is_defined_gridgroup_mask3(gridgroup_hdl ) BIND(C)
       USE ISO_C_BINDING
-      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask3
       INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl
-    END FUNCTION cxios_is_defined_gridgroup_mask
+    END FUNCTION cxios_is_defined_gridgroup_mask3
     
     
Index: XIOS/trunk/src/interface/fortran_attr/igrid_attr.F90
===================================================================
--- XIOS/trunk/src/interface/fortran_attr/igrid_attr.F90	(revision 558)
+++ XIOS/trunk/src/interface/fortran_attr/igrid_attr.F90	(revision 567)
@@ -12,5 +12,5 @@
   
   SUBROUTINE xios(set_grid_attr)  &
-    ( grid_id, axisDomainOrder, description, mask, name )
+    ( grid_id, axisDomainOrder, description, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -20,16 +20,20 @@
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: axisDomainOrder_tmp(:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
-      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask1(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask2(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask3(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
       
       CALL xios(get_grid_handle)(grid_id,grid_hdl)
       CALL xios(set_grid_attr_hdl_)   &
-      ( grid_hdl, axisDomainOrder, description, mask, name )
+      ( grid_hdl, axisDomainOrder, description, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(set_grid_attr)
   
   SUBROUTINE xios(set_grid_attr_hdl)  &
-    ( grid_hdl, axisDomainOrder, description, mask, name )
+    ( grid_hdl, axisDomainOrder, description, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -38,15 +42,19 @@
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: axisDomainOrder_tmp(:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
-      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask1(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask2(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask3(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
       
       CALL xios(set_grid_attr_hdl_)  &
-      ( grid_hdl, axisDomainOrder, description, mask, name )
+      ( grid_hdl, axisDomainOrder, description, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(set_grid_attr_hdl)
   
   SUBROUTINE xios(set_grid_attr_hdl_)   &
-    ( grid_hdl, axisDomainOrder_, description_, mask_, name_ )
+    ( grid_hdl, axisDomainOrder_, description_, mask1_, mask2_, mask3_, name_ )
     
     IMPLICIT NONE
@@ -55,6 +63,10 @@
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: axisDomainOrder__tmp(:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description_
-      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask1_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask2_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2__tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask3_(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3__tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
       
@@ -69,8 +81,20 @@
       ENDIF
       
-      IF (PRESENT(mask_)) THEN
-        ALLOCATE(mask__tmp(size(mask_,1),size(mask_,2),size(mask_,3)))
-        mask__tmp=mask_
-        CALL cxios_set_grid_mask(grid_hdl%daddr, mask__tmp,size(mask_,1),size(mask_,2),size(mask_,3))
+      IF (PRESENT(mask1_)) THEN
+        ALLOCATE(mask1__tmp(size(mask1_,1)))
+        mask1__tmp=mask1_
+        CALL cxios_set_grid_mask1(grid_hdl%daddr, mask1__tmp,size(mask1_,1))
+      ENDIF
+      
+      IF (PRESENT(mask2_)) THEN
+        ALLOCATE(mask2__tmp(size(mask2_,1),size(mask2_,2)))
+        mask2__tmp=mask2_
+        CALL cxios_set_grid_mask2(grid_hdl%daddr, mask2__tmp,size(mask2_,1),size(mask2_,2))
+      ENDIF
+      
+      IF (PRESENT(mask3_)) THEN
+        ALLOCATE(mask3__tmp(size(mask3_,1),size(mask3_,2),size(mask3_,3)))
+        mask3__tmp=mask3_
+        CALL cxios_set_grid_mask3(grid_hdl%daddr, mask3__tmp,size(mask3_,1),size(mask3_,2),size(mask3_,3))
       ENDIF
       
@@ -84,5 +108,5 @@
   
   SUBROUTINE xios(get_grid_attr)  &
-    ( grid_id, axisDomainOrder, description, mask, name )
+    ( grid_id, axisDomainOrder, description, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -92,16 +116,20 @@
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: axisDomainOrder_tmp(:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
-      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
       
       CALL xios(get_grid_handle)(grid_id,grid_hdl)
       CALL xios(get_grid_attr_hdl_)   &
-      ( grid_hdl, axisDomainOrder, description, mask, name )
+      ( grid_hdl, axisDomainOrder, description, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(get_grid_attr)
   
   SUBROUTINE xios(get_grid_attr_hdl)  &
-    ( grid_hdl, axisDomainOrder, description, mask, name )
+    ( grid_hdl, axisDomainOrder, description, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -110,15 +138,19 @@
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: axisDomainOrder_tmp(:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
-      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
       
       CALL xios(get_grid_attr_hdl_)  &
-      ( grid_hdl, axisDomainOrder, description, mask, name )
+      ( grid_hdl, axisDomainOrder, description, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(get_grid_attr_hdl)
   
   SUBROUTINE xios(get_grid_attr_hdl_)   &
-    ( grid_hdl, axisDomainOrder_, description_, mask_, name_ )
+    ( grid_hdl, axisDomainOrder_, description_, mask1_, mask2_, mask3_, name_ )
     
     IMPLICIT NONE
@@ -127,6 +159,10 @@
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: axisDomainOrder__tmp(:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description_
-      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2__tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3_(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3__tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
       
@@ -141,8 +177,20 @@
       ENDIF
       
-      IF (PRESENT(mask_)) THEN
-        ALLOCATE(mask__tmp(size(mask_,1),size(mask_,2),size(mask_,3)))
-        CALL cxios_get_grid_mask(grid_hdl%daddr, mask__tmp,size(mask_,1),size(mask_,2),size(mask_,3))
-        mask_=mask__tmp
+      IF (PRESENT(mask1_)) THEN
+        ALLOCATE(mask1__tmp(size(mask1_,1)))
+        CALL cxios_get_grid_mask1(grid_hdl%daddr, mask1__tmp,size(mask1_,1))
+        mask1_=mask1__tmp
+      ENDIF
+      
+      IF (PRESENT(mask2_)) THEN
+        ALLOCATE(mask2__tmp(size(mask2_,1),size(mask2_,2)))
+        CALL cxios_get_grid_mask2(grid_hdl%daddr, mask2__tmp,size(mask2_,1),size(mask2_,2))
+        mask2_=mask2__tmp
+      ENDIF
+      
+      IF (PRESENT(mask3_)) THEN
+        ALLOCATE(mask3__tmp(size(mask3_,1),size(mask3_,2),size(mask3_,3)))
+        CALL cxios_get_grid_mask3(grid_hdl%daddr, mask3__tmp,size(mask3_,1),size(mask3_,2),size(mask3_,3))
+        mask3_=mask3__tmp
       ENDIF
       
@@ -156,5 +204,5 @@
   
   SUBROUTINE xios(is_defined_grid_attr)  &
-    ( grid_id, axisDomainOrder, description, mask, name )
+    ( grid_id, axisDomainOrder, description, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -165,6 +213,10 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: description
       LOGICAL(KIND=C_BOOL) :: description_tmp
-      LOGICAL, OPTIONAL, INTENT(OUT) :: mask
-      LOGICAL(KIND=C_BOOL) :: mask_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask1
+      LOGICAL(KIND=C_BOOL) :: mask1_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask2
+      LOGICAL(KIND=C_BOOL) :: mask2_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask3
+      LOGICAL(KIND=C_BOOL) :: mask3_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: name
       LOGICAL(KIND=C_BOOL) :: name_tmp
@@ -172,10 +224,10 @@
       CALL xios(get_grid_handle)(grid_id,grid_hdl)
       CALL xios(is_defined_grid_attr_hdl_)   &
-      ( grid_hdl, axisDomainOrder, description, mask, name )
+      ( grid_hdl, axisDomainOrder, description, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(is_defined_grid_attr)
   
   SUBROUTINE xios(is_defined_grid_attr_hdl)  &
-    ( grid_hdl, axisDomainOrder, description, mask, name )
+    ( grid_hdl, axisDomainOrder, description, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -185,16 +237,20 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: description
       LOGICAL(KIND=C_BOOL) :: description_tmp
-      LOGICAL, OPTIONAL, INTENT(OUT) :: mask
-      LOGICAL(KIND=C_BOOL) :: mask_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask1
+      LOGICAL(KIND=C_BOOL) :: mask1_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask2
+      LOGICAL(KIND=C_BOOL) :: mask2_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask3
+      LOGICAL(KIND=C_BOOL) :: mask3_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: name
       LOGICAL(KIND=C_BOOL) :: name_tmp
       
       CALL xios(is_defined_grid_attr_hdl_)  &
-      ( grid_hdl, axisDomainOrder, description, mask, name )
+      ( grid_hdl, axisDomainOrder, description, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(is_defined_grid_attr_hdl)
   
   SUBROUTINE xios(is_defined_grid_attr_hdl_)   &
-    ( grid_hdl, axisDomainOrder_, description_, mask_, name_ )
+    ( grid_hdl, axisDomainOrder_, description_, mask1_, mask2_, mask3_, name_ )
     
     IMPLICIT NONE
@@ -204,6 +260,10 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: description_
       LOGICAL(KIND=C_BOOL) :: description__tmp
-      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_
-      LOGICAL(KIND=C_BOOL) :: mask__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask1_
+      LOGICAL(KIND=C_BOOL) :: mask1__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask2_
+      LOGICAL(KIND=C_BOOL) :: mask2__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask3_
+      LOGICAL(KIND=C_BOOL) :: mask3__tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: name_
       LOGICAL(KIND=C_BOOL) :: name__tmp
@@ -219,7 +279,17 @@
       ENDIF
       
-      IF (PRESENT(mask_)) THEN
-        mask__tmp=cxios_is_defined_grid_mask(grid_hdl%daddr)
-        mask_=mask__tmp
+      IF (PRESENT(mask1_)) THEN
+        mask1__tmp=cxios_is_defined_grid_mask1(grid_hdl%daddr)
+        mask1_=mask1__tmp
+      ENDIF
+      
+      IF (PRESENT(mask2_)) THEN
+        mask2__tmp=cxios_is_defined_grid_mask2(grid_hdl%daddr)
+        mask2_=mask2__tmp
+      ENDIF
+      
+      IF (PRESENT(mask3_)) THEN
+        mask3__tmp=cxios_is_defined_grid_mask3(grid_hdl%daddr)
+        mask3_=mask3__tmp
       ENDIF
       
Index: XIOS/trunk/src/interface/fortran_attr/igridgroup_attr.F90
===================================================================
--- XIOS/trunk/src/interface/fortran_attr/igridgroup_attr.F90	(revision 558)
+++ XIOS/trunk/src/interface/fortran_attr/igridgroup_attr.F90	(revision 567)
@@ -12,5 +12,5 @@
   
   SUBROUTINE xios(set_gridgroup_attr)  &
-    ( gridgroup_id, axisDomainOrder, description, group_ref, mask, name )
+    ( gridgroup_id, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -21,16 +21,20 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
-      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask1(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask2(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask3(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
       
       CALL xios(get_gridgroup_handle)(gridgroup_id,gridgroup_hdl)
       CALL xios(set_gridgroup_attr_hdl_)   &
-      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask, name )
+      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(set_gridgroup_attr)
   
   SUBROUTINE xios(set_gridgroup_attr_hdl)  &
-    ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask, name )
+    ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -40,15 +44,19 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref
-      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask1(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask2(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask3(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
       
       CALL xios(set_gridgroup_attr_hdl_)  &
-      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask, name )
+      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(set_gridgroup_attr_hdl)
   
   SUBROUTINE xios(set_gridgroup_attr_hdl_)   &
-    ( gridgroup_hdl, axisDomainOrder_, description_, group_ref_, mask_, name_ )
+    ( gridgroup_hdl, axisDomainOrder_, description_, group_ref_, mask1_, mask2_, mask3_, name_ )
     
     IMPLICIT NONE
@@ -58,6 +66,10 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description_
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_
-      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask1_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask2_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2__tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask3_(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3__tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
       
@@ -76,8 +88,20 @@
       ENDIF
       
-      IF (PRESENT(mask_)) THEN
-        ALLOCATE(mask__tmp(size(mask_,1),size(mask_,2),size(mask_,3)))
-        mask__tmp=mask_
-        CALL cxios_set_gridgroup_mask(gridgroup_hdl%daddr, mask__tmp,size(mask_,1),size(mask_,2),size(mask_,3))
+      IF (PRESENT(mask1_)) THEN
+        ALLOCATE(mask1__tmp(size(mask1_,1)))
+        mask1__tmp=mask1_
+        CALL cxios_set_gridgroup_mask1(gridgroup_hdl%daddr, mask1__tmp,size(mask1_,1))
+      ENDIF
+      
+      IF (PRESENT(mask2_)) THEN
+        ALLOCATE(mask2__tmp(size(mask2_,1),size(mask2_,2)))
+        mask2__tmp=mask2_
+        CALL cxios_set_gridgroup_mask2(gridgroup_hdl%daddr, mask2__tmp,size(mask2_,1),size(mask2_,2))
+      ENDIF
+      
+      IF (PRESENT(mask3_)) THEN
+        ALLOCATE(mask3__tmp(size(mask3_,1),size(mask3_,2),size(mask3_,3)))
+        mask3__tmp=mask3_
+        CALL cxios_set_gridgroup_mask3(gridgroup_hdl%daddr, mask3__tmp,size(mask3_,1),size(mask3_,2),size(mask3_,3))
       ENDIF
       
@@ -91,5 +115,5 @@
   
   SUBROUTINE xios(get_gridgroup_attr)  &
-    ( gridgroup_id, axisDomainOrder, description, group_ref, mask, name )
+    ( gridgroup_id, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -100,16 +124,20 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
-      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
       
       CALL xios(get_gridgroup_handle)(gridgroup_id,gridgroup_hdl)
       CALL xios(get_gridgroup_attr_hdl_)   &
-      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask, name )
+      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(get_gridgroup_attr)
   
   SUBROUTINE xios(get_gridgroup_attr_hdl)  &
-    ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask, name )
+    ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -119,15 +147,19 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref
-      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
       
       CALL xios(get_gridgroup_attr_hdl_)  &
-      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask, name )
+      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(get_gridgroup_attr_hdl)
   
   SUBROUTINE xios(get_gridgroup_attr_hdl_)   &
-    ( gridgroup_hdl, axisDomainOrder_, description_, group_ref_, mask_, name_ )
+    ( gridgroup_hdl, axisDomainOrder_, description_, group_ref_, mask1_, mask2_, mask3_, name_ )
     
     IMPLICIT NONE
@@ -137,6 +169,10 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description_
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_
-      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_(:,:,:)
-      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1_(:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1__tmp(:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2_(:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2__tmp(:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3_(:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3__tmp(:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
       
@@ -155,8 +191,20 @@
       ENDIF
       
-      IF (PRESENT(mask_)) THEN
-        ALLOCATE(mask__tmp(size(mask_,1),size(mask_,2),size(mask_,3)))
-        CALL cxios_get_gridgroup_mask(gridgroup_hdl%daddr, mask__tmp,size(mask_,1),size(mask_,2),size(mask_,3))
-        mask_=mask__tmp
+      IF (PRESENT(mask1_)) THEN
+        ALLOCATE(mask1__tmp(size(mask1_,1)))
+        CALL cxios_get_gridgroup_mask1(gridgroup_hdl%daddr, mask1__tmp,size(mask1_,1))
+        mask1_=mask1__tmp
+      ENDIF
+      
+      IF (PRESENT(mask2_)) THEN
+        ALLOCATE(mask2__tmp(size(mask2_,1),size(mask2_,2)))
+        CALL cxios_get_gridgroup_mask2(gridgroup_hdl%daddr, mask2__tmp,size(mask2_,1),size(mask2_,2))
+        mask2_=mask2__tmp
+      ENDIF
+      
+      IF (PRESENT(mask3_)) THEN
+        ALLOCATE(mask3__tmp(size(mask3_,1),size(mask3_,2),size(mask3_,3)))
+        CALL cxios_get_gridgroup_mask3(gridgroup_hdl%daddr, mask3__tmp,size(mask3_,1),size(mask3_,2),size(mask3_,3))
+        mask3_=mask3__tmp
       ENDIF
       
@@ -170,5 +218,5 @@
   
   SUBROUTINE xios(is_defined_gridgroup_attr)  &
-    ( gridgroup_id, axisDomainOrder, description, group_ref, mask, name )
+    ( gridgroup_id, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -181,6 +229,10 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
       LOGICAL(KIND=C_BOOL) :: group_ref_tmp
-      LOGICAL, OPTIONAL, INTENT(OUT) :: mask
-      LOGICAL(KIND=C_BOOL) :: mask_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask1
+      LOGICAL(KIND=C_BOOL) :: mask1_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask2
+      LOGICAL(KIND=C_BOOL) :: mask2_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask3
+      LOGICAL(KIND=C_BOOL) :: mask3_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: name
       LOGICAL(KIND=C_BOOL) :: name_tmp
@@ -188,10 +240,10 @@
       CALL xios(get_gridgroup_handle)(gridgroup_id,gridgroup_hdl)
       CALL xios(is_defined_gridgroup_attr_hdl_)   &
-      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask, name )
+      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(is_defined_gridgroup_attr)
   
   SUBROUTINE xios(is_defined_gridgroup_attr_hdl)  &
-    ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask, name )
+    ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
     IMPLICIT NONE
@@ -203,16 +255,20 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref
       LOGICAL(KIND=C_BOOL) :: group_ref_tmp
-      LOGICAL, OPTIONAL, INTENT(OUT) :: mask
-      LOGICAL(KIND=C_BOOL) :: mask_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask1
+      LOGICAL(KIND=C_BOOL) :: mask1_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask2
+      LOGICAL(KIND=C_BOOL) :: mask2_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask3
+      LOGICAL(KIND=C_BOOL) :: mask3_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: name
       LOGICAL(KIND=C_BOOL) :: name_tmp
       
       CALL xios(is_defined_gridgroup_attr_hdl_)  &
-      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask, name )
+      ( gridgroup_hdl, axisDomainOrder, description, group_ref, mask1, mask2, mask3, name )
     
   END SUBROUTINE xios(is_defined_gridgroup_attr_hdl)
   
   SUBROUTINE xios(is_defined_gridgroup_attr_hdl_)   &
-    ( gridgroup_hdl, axisDomainOrder_, description_, group_ref_, mask_, name_ )
+    ( gridgroup_hdl, axisDomainOrder_, description_, group_ref_, mask1_, mask2_, mask3_, name_ )
     
     IMPLICIT NONE
@@ -224,6 +280,10 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref_
       LOGICAL(KIND=C_BOOL) :: group_ref__tmp
-      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_
-      LOGICAL(KIND=C_BOOL) :: mask__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask1_
+      LOGICAL(KIND=C_BOOL) :: mask1__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask2_
+      LOGICAL(KIND=C_BOOL) :: mask2__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask3_
+      LOGICAL(KIND=C_BOOL) :: mask3__tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: name_
       LOGICAL(KIND=C_BOOL) :: name__tmp
@@ -244,7 +304,17 @@
       ENDIF
       
-      IF (PRESENT(mask_)) THEN
-        mask__tmp=cxios_is_defined_gridgroup_mask(gridgroup_hdl%daddr)
-        mask_=mask__tmp
+      IF (PRESENT(mask1_)) THEN
+        mask1__tmp=cxios_is_defined_gridgroup_mask1(gridgroup_hdl%daddr)
+        mask1_=mask1__tmp
+      ENDIF
+      
+      IF (PRESENT(mask2_)) THEN
+        mask2__tmp=cxios_is_defined_gridgroup_mask2(gridgroup_hdl%daddr)
+        mask2_=mask2__tmp
+      ENDIF
+      
+      IF (PRESENT(mask3_)) THEN
+        mask3__tmp=cxios_is_defined_gridgroup_mask3(gridgroup_hdl%daddr)
+        mask3_=mask3__tmp
       ENDIF
       
