Index: XIOS/trunk/src/interface/fortran_attr/igrid_attr.F90
===================================================================
--- XIOS/trunk/src/interface/fortran_attr/igrid_attr.F90	(revision 817)
+++ XIOS/trunk/src/interface/fortran_attr/igrid_attr.F90	(revision 932)
@@ -12,5 +12,6 @@
 
   SUBROUTINE xios(set_grid_attr)  &
-    ( grid_id, description, mask_1d, mask_2d, mask_3d, name )
+    ( grid_id, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+     )
 
     IMPLICIT NONE
@@ -24,14 +25,24 @@
       LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d(:,:,:)
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
 
       CALL xios(get_grid_handle)(grid_id,grid_hdl)
       CALL xios(set_grid_attr_hdl_)   &
-      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name )
+      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+       )
 
   END SUBROUTINE xios(set_grid_attr)
 
   SUBROUTINE xios(set_grid_attr_hdl)  &
-    ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name )
+    ( grid_hdl, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+     )
 
     IMPLICIT NONE
@@ -44,13 +55,23 @@
       LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d(:,:,:)
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name
 
       CALL xios(set_grid_attr_hdl_)  &
-      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name )
+      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+       )
 
   END SUBROUTINE xios(set_grid_attr_hdl)
 
   SUBROUTINE xios(set_grid_attr_hdl_)   &
-    ( grid_hdl, description_, mask_1d_, mask_2d_, mask_3d_, name_ )
+    ( grid_hdl, description_, mask_1d_, mask_2d_, mask_3d_, mask_4d_, mask_5d_, mask_6d_, mask_7d_  &
+    , name_ )
 
     IMPLICIT NONE
@@ -63,4 +84,12 @@
       LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d_(:,:,:)
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d__tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_4d_(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d__tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_5d_(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d__tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_6d_(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d__tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_7d_(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d__tmp(:,:,:,:,:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_
 
@@ -87,4 +116,28 @@
       ENDIF
 
+      IF (PRESENT(mask_4d_)) THEN
+        ALLOCATE(mask_4d__tmp(SIZE(mask_4d_,1), SIZE(mask_4d_,2), SIZE(mask_4d_,3), SIZE(mask_4d_,4)))
+        mask_4d__tmp = mask_4d_
+        CALL cxios_set_grid_mask_4d(grid_hdl%daddr, mask_4d__tmp, SHAPE(mask_4d_))
+      ENDIF
+
+      IF (PRESENT(mask_5d_)) THEN
+        ALLOCATE(mask_5d__tmp(SIZE(mask_5d_,1), SIZE(mask_5d_,2), SIZE(mask_5d_,3), SIZE(mask_5d_,4), SIZE(mask_5d_,5)))
+        mask_5d__tmp = mask_5d_
+        CALL cxios_set_grid_mask_5d(grid_hdl%daddr, mask_5d__tmp, SHAPE(mask_5d_))
+      ENDIF
+
+      IF (PRESENT(mask_6d_)) THEN
+        ALLOCATE(mask_6d__tmp(SIZE(mask_6d_,1), SIZE(mask_6d_,2), SIZE(mask_6d_,3), SIZE(mask_6d_,4), SIZE(mask_6d_,5), SIZE(mask_6d_,6)))
+        mask_6d__tmp = mask_6d_
+        CALL cxios_set_grid_mask_6d(grid_hdl%daddr, mask_6d__tmp, SHAPE(mask_6d_))
+      ENDIF
+
+      IF (PRESENT(mask_7d_)) THEN
+        ALLOCATE(mask_7d__tmp(SIZE(mask_7d_,1), SIZE(mask_7d_,2), SIZE(mask_7d_,3), SIZE(mask_7d_,4), SIZE(mask_7d_,5), SIZE(mask_7d_,6), SIZE(mask_7d_,7)))
+        mask_7d__tmp = mask_7d_
+        CALL cxios_set_grid_mask_7d(grid_hdl%daddr, mask_7d__tmp, SHAPE(mask_7d_))
+      ENDIF
+
       IF (PRESENT(name_)) THEN
         CALL cxios_set_grid_name(grid_hdl%daddr, name_, len(name_))
@@ -94,5 +147,6 @@
 
   SUBROUTINE xios(get_grid_attr)  &
-    ( grid_id, description, mask_1d, mask_2d, mask_3d, name )
+    ( grid_id, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+     )
 
     IMPLICIT NONE
@@ -106,14 +160,24 @@
       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d(:,:,:)
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
 
       CALL xios(get_grid_handle)(grid_id,grid_hdl)
       CALL xios(get_grid_attr_hdl_)   &
-      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name )
+      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+       )
 
   END SUBROUTINE xios(get_grid_attr)
 
   SUBROUTINE xios(get_grid_attr_hdl)  &
-    ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name )
+    ( grid_hdl, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+     )
 
     IMPLICIT NONE
@@ -126,13 +190,23 @@
       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d(:,:,:)
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_4d(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d_tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_5d(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d_tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_6d(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d_tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_7d(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d_tmp(:,:,:,:,:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name
 
       CALL xios(get_grid_attr_hdl_)  &
-      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name )
+      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+       )
 
   END SUBROUTINE xios(get_grid_attr_hdl)
 
   SUBROUTINE xios(get_grid_attr_hdl_)   &
-    ( grid_hdl, description_, mask_1d_, mask_2d_, mask_3d_, name_ )
+    ( grid_hdl, description_, mask_1d_, mask_2d_, mask_3d_, mask_4d_, mask_5d_, mask_6d_, mask_7d_  &
+    , name_ )
 
     IMPLICIT NONE
@@ -145,4 +219,12 @@
       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d_(:,:,:)
       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d__tmp(:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_4d_(:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_4d__tmp(:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_5d_(:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_5d__tmp(:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_6d_(:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_6d__tmp(:,:,:,:,:,:)
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_7d_(:,:,:,:,:,:,:)
+      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_7d__tmp(:,:,:,:,:,:,:)
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_
 
@@ -169,4 +251,28 @@
       ENDIF
 
+      IF (PRESENT(mask_4d_)) THEN
+        ALLOCATE(mask_4d__tmp(SIZE(mask_4d_,1), SIZE(mask_4d_,2), SIZE(mask_4d_,3), SIZE(mask_4d_,4)))
+        CALL cxios_get_grid_mask_4d(grid_hdl%daddr, mask_4d__tmp, SHAPE(mask_4d_))
+        mask_4d_ = mask_4d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_5d_)) THEN
+        ALLOCATE(mask_5d__tmp(SIZE(mask_5d_,1), SIZE(mask_5d_,2), SIZE(mask_5d_,3), SIZE(mask_5d_,4), SIZE(mask_5d_,5)))
+        CALL cxios_get_grid_mask_5d(grid_hdl%daddr, mask_5d__tmp, SHAPE(mask_5d_))
+        mask_5d_ = mask_5d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_6d_)) THEN
+        ALLOCATE(mask_6d__tmp(SIZE(mask_6d_,1), SIZE(mask_6d_,2), SIZE(mask_6d_,3), SIZE(mask_6d_,4), SIZE(mask_6d_,5), SIZE(mask_6d_,6)))
+        CALL cxios_get_grid_mask_6d(grid_hdl%daddr, mask_6d__tmp, SHAPE(mask_6d_))
+        mask_6d_ = mask_6d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_7d_)) THEN
+        ALLOCATE(mask_7d__tmp(SIZE(mask_7d_,1), SIZE(mask_7d_,2), SIZE(mask_7d_,3), SIZE(mask_7d_,4), SIZE(mask_7d_,5), SIZE(mask_7d_,6), SIZE(mask_7d_,7)))
+        CALL cxios_get_grid_mask_7d(grid_hdl%daddr, mask_7d__tmp, SHAPE(mask_7d_))
+        mask_7d_ = mask_7d__tmp
+      ENDIF
+
       IF (PRESENT(name_)) THEN
         CALL cxios_get_grid_name(grid_hdl%daddr, name_, len(name_))
@@ -176,5 +282,6 @@
 
   SUBROUTINE xios(is_defined_grid_attr)  &
-    ( grid_id, description, mask_1d, mask_2d, mask_3d, name )
+    ( grid_id, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+     )
 
     IMPLICIT NONE
@@ -189,4 +296,12 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d
       LOGICAL(KIND=C_BOOL) :: mask_3d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_4d
+      LOGICAL(KIND=C_BOOL) :: mask_4d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_5d
+      LOGICAL(KIND=C_BOOL) :: mask_5d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_6d
+      LOGICAL(KIND=C_BOOL) :: mask_6d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_7d
+      LOGICAL(KIND=C_BOOL) :: mask_7d_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: name
       LOGICAL(KIND=C_BOOL) :: name_tmp
@@ -194,10 +309,12 @@
       CALL xios(get_grid_handle)(grid_id,grid_hdl)
       CALL xios(is_defined_grid_attr_hdl_)   &
-      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name )
+      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+       )
 
   END SUBROUTINE xios(is_defined_grid_attr)
 
   SUBROUTINE xios(is_defined_grid_attr_hdl)  &
-    ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name )
+    ( grid_hdl, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+     )
 
     IMPLICIT NONE
@@ -211,14 +328,24 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d
       LOGICAL(KIND=C_BOOL) :: mask_3d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_4d
+      LOGICAL(KIND=C_BOOL) :: mask_4d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_5d
+      LOGICAL(KIND=C_BOOL) :: mask_5d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_6d
+      LOGICAL(KIND=C_BOOL) :: mask_6d_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_7d
+      LOGICAL(KIND=C_BOOL) :: mask_7d_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: name
       LOGICAL(KIND=C_BOOL) :: name_tmp
 
       CALL xios(is_defined_grid_attr_hdl_)  &
-      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name )
+      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, mask_4d, mask_5d, mask_6d, mask_7d, name  &
+       )
 
   END SUBROUTINE xios(is_defined_grid_attr_hdl)
 
   SUBROUTINE xios(is_defined_grid_attr_hdl_)   &
-    ( grid_hdl, description_, mask_1d_, mask_2d_, mask_3d_, name_ )
+    ( grid_hdl, description_, mask_1d_, mask_2d_, mask_3d_, mask_4d_, mask_5d_, mask_6d_, mask_7d_  &
+    , name_ )
 
     IMPLICIT NONE
@@ -232,4 +359,12 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d_
       LOGICAL(KIND=C_BOOL) :: mask_3d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_4d_
+      LOGICAL(KIND=C_BOOL) :: mask_4d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_5d_
+      LOGICAL(KIND=C_BOOL) :: mask_5d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_6d_
+      LOGICAL(KIND=C_BOOL) :: mask_6d__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_7d_
+      LOGICAL(KIND=C_BOOL) :: mask_7d__tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: name_
       LOGICAL(KIND=C_BOOL) :: name__tmp
@@ -255,4 +390,24 @@
       ENDIF
 
+      IF (PRESENT(mask_4d_)) THEN
+        mask_4d__tmp = cxios_is_defined_grid_mask_4d(grid_hdl%daddr)
+        mask_4d_ = mask_4d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_5d_)) THEN
+        mask_5d__tmp = cxios_is_defined_grid_mask_5d(grid_hdl%daddr)
+        mask_5d_ = mask_5d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_6d_)) THEN
+        mask_6d__tmp = cxios_is_defined_grid_mask_6d(grid_hdl%daddr)
+        mask_6d_ = mask_6d__tmp
+      ENDIF
+
+      IF (PRESENT(mask_7d_)) THEN
+        mask_7d__tmp = cxios_is_defined_grid_mask_7d(grid_hdl%daddr)
+        mask_7d_ = mask_7d__tmp
+      ENDIF
+
       IF (PRESENT(name_)) THEN
         name__tmp = cxios_is_defined_grid_name(grid_hdl%daddr)
