<p><b>duda</b> 2012-03-16 13:40:23 -0600 (Fri, 16 Mar 2012)</p><p>Add components to the field derived data types to identify whether the<br>
field is a super-array (isSuperArray), and if so, the names of the <br>
constituent fields (constituentNames). Also, add code to initialize these<br>
new components in the registry.<br>
<br>
Example: For the scalars super-array, we have<br>
<br>
   scalars % isSuperArray = .true.<br>
   scalars % constituentNames(1) = 'qv'<br>
   scalars % constituentNames(2) = 'qc'<br>
   scalars % constituentNames(3) = 'qr'<br>
<br>
and for a non-super-array like u, we have<br>
<br>
   scalars % isSuperArray = .false.<br>
   scalars % constituentNames =&gt; null()<br>
<br>
<br>
M    registry/gen_inc.c<br>
M    framework/mpas_grid_types.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/omp_blocks/io/src/framework/mpas_grid_types.F
===================================================================
--- branches/omp_blocks/io/src/framework/mpas_grid_types.F        2012-03-16 18:20:53 UTC (rev 1663)
+++ branches/omp_blocks/io/src/framework/mpas_grid_types.F        2012-03-16 19:40:23 UTC (rev 1664)
@@ -33,9 +33,11 @@
       ! Information used by the I/O layer
       type (io_info), pointer :: ioinfo       ! to be removed later
       character (len=64) :: fieldName
+      character (len=64), dimension(:), pointer :: constituentNames =&gt; null()
       character (len=64), dimension(3) :: dimNames
       integer, dimension(3) :: dimSizes
       logical :: hasTimeDimension
+      logical :: isSuperArray
       type (att_list_type), pointer :: attList =&gt; null()     
 
       ! Pointers to the prev and next blocks for this field on this task
@@ -60,9 +62,11 @@
       ! Information used by the I/O layer
       type (io_info), pointer :: ioinfo       ! to be removed later
       character (len=64) :: fieldName
+      character (len=64), dimension(:), pointer :: constituentNames =&gt; null()
       character (len=64), dimension(2) :: dimNames
       integer, dimension(2) :: dimSizes
       logical :: hasTimeDimension
+      logical :: isSuperArray
       type (att_list_type), pointer :: attList =&gt; null()     
 
       ! Pointers to the prev and next blocks for this field on this task
@@ -87,9 +91,11 @@
       ! Information used by the I/O layer
       type (io_info), pointer :: ioinfo       ! to be removed later
       character (len=64) :: fieldName
+      character (len=64), dimension(:), pointer :: constituentNames =&gt; null()
       character (len=64), dimension(1) :: dimNames
       integer, dimension(1) :: dimSizes
       logical :: hasTimeDimension
+      logical :: isSuperArray
       type (att_list_type), pointer :: attList =&gt; null()     
 
       ! Pointers to the prev and next blocks for this field on this task
@@ -114,7 +120,9 @@
       ! Information used by the I/O layer
       type (io_info), pointer :: ioinfo       ! to be removed later
       character (len=64) :: fieldName
+      character (len=64), dimension(:), pointer :: constituentNames =&gt; null()
       logical :: hasTimeDimension
+      logical :: isSuperArray
       type (att_list_type), pointer :: attList =&gt; null()     
 
       ! Pointers to the prev and next blocks for this field on this task
@@ -139,9 +147,11 @@
       ! Information used by the I/O layer
       type (io_info), pointer :: ioinfo       ! to be removed later
       character (len=64) :: fieldName
+      character (len=64), dimension(:), pointer :: constituentNames =&gt; null()
       character (len=64), dimension(3) :: dimNames
       integer, dimension(3) :: dimSizes
       logical :: hasTimeDimension
+      logical :: isSuperArray
       type (att_list_type), pointer :: attList =&gt; null()     
 
       ! Pointers to the prev and next blocks for this field on this task
@@ -166,9 +176,11 @@
       ! Information used by the I/O layer
       type (io_info), pointer :: ioinfo       ! to be removed later
       character (len=64) :: fieldName
+      character (len=64), dimension(:), pointer :: constituentNames =&gt; null()
       character (len=64), dimension(2) :: dimNames
       integer, dimension(2) :: dimSizes
       logical :: hasTimeDimension
+      logical :: isSuperArray
       type (att_list_type), pointer :: attList =&gt; null()     
 
       ! Pointers to the prev and next blocks for this field on this task
@@ -193,9 +205,11 @@
       ! Information used by the I/O layer
       type (io_info), pointer :: ioinfo       ! to be removed later
       character (len=64) :: fieldName
+      character (len=64), dimension(:), pointer :: constituentNames =&gt; null()
       character (len=64), dimension(1) :: dimNames
       integer, dimension(1) :: dimSizes
       logical :: hasTimeDimension
+      logical :: isSuperArray
       type (att_list_type), pointer :: attList =&gt; null()     
 
       ! Pointers to the prev and next blocks for this field on this task
@@ -220,7 +234,9 @@
       ! Information used by the I/O layer
       type (io_info), pointer :: ioinfo       ! to be removed later
       character (len=64) :: fieldName
+      character (len=64), dimension(:), pointer :: constituentNames =&gt; null()
       logical :: hasTimeDimension
+      logical :: isSuperArray
       type (att_list_type), pointer :: attList =&gt; null()     
 
       ! Pointers to the prev and next blocks for this field on this task
@@ -245,9 +261,11 @@
       ! Information used by the I/O layer
       type (io_info), pointer :: ioinfo       ! to be removed later
       character (len=64) :: fieldName
+      character (len=64), dimension(:), pointer :: constituentNames =&gt; null()
       character (len=64), dimension(1) :: dimNames
       integer, dimension(1) :: dimSizes
       logical :: hasTimeDimension
+      logical :: isSuperArray
       type (att_list_type), pointer :: attList =&gt; null()     
 
       ! Pointers to the prev and next blocks for this field on this task
@@ -272,7 +290,9 @@
       ! Information used by the I/O layer
       type (io_info), pointer :: ioinfo       ! to be removed later
       character (len=64) :: fieldName
+      character (len=64), dimension(:), pointer :: constituentNames =&gt; null()
       logical :: hasTimeDimension
+      logical :: isSuperArray
       type (att_list_type), pointer :: attList =&gt; null()     
 
       ! Pointers to the prev and next blocks for this field on this task

Modified: branches/omp_blocks/io/src/registry/gen_inc.c
===================================================================
--- branches/omp_blocks/io/src/registry/gen_inc.c        2012-03-16 18:20:53 UTC (rev 1663)
+++ branches/omp_blocks/io/src/registry/gen_inc.c        2012-03-16 19:40:23 UTC (rev 1664)
@@ -176,6 +176,7 @@
    struct variable * var_ptr2;
    struct variable_list * var_list_ptr;
    struct variable_list * var_list_ptr2;
+   struct variable_list * var_list_ptr3;
    struct dimension * dim_ptr;
    struct dimension_list * dimlist_ptr;
    struct group_list * group_ptr;
@@ -576,6 +577,20 @@
             fortprintf(fd, &quot;      allocate(%s %% %s)</font>
<font color="black">&quot;, group_ptr-&gt;name, var_ptr2-&gt;super_array);
             fortprintf(fd, &quot;      allocate(%s %% %s %% ioinfo)</font>
<font color="black">&quot;, group_ptr-&gt;name, var_ptr2-&gt;super_array);
             fortprintf(fd, &quot;      %s %% %s %% fieldName = \'%s\'</font>
<font color="blue">&quot;, group_ptr-&gt;name, var_ptr2-&gt;super_array, var_ptr2-&gt;super_array);
+            fortprintf(fd, &quot;      %s %% %s %% isSuperArray = .true.</font>
<font color="blue">&quot;, group_ptr-&gt;name, var_ptr2-&gt;super_array);
+            fortprintf(fd, &quot;      allocate(%s %% %s %% constituentNames(%i))</font>
<font color="blue">&quot;, group_ptr-&gt;name, var_ptr2-&gt;super_array, i);
+
+            /* Initialization for constituent names */
+            i = 0;
+            var_list_ptr3 = group_ptr-&gt;vlist;
+            while (var_list_ptr3) {
+               if (strncmp(super_array, var_list_ptr3-&gt;var-&gt;super_array, 1024) == 0) {
+                  i++;
+                  fortprintf(fd, &quot;      %s %% %s %% constituentNames(%i) = \'%s\'</font>
<font color="gray">&quot;, group_ptr-&gt;name, var_ptr2-&gt;super_array, i, var_list_ptr3-&gt;var-&gt;name_in_file);
+               }
+               var_list_ptr3 = var_list_ptr3-&gt;next;
+            }
+
             fortprintf(fd, &quot;      allocate(%s %% %s %% array(%i, &quot;, group_ptr-&gt;name, var_ptr2-&gt;super_array, i);
             dimlist_ptr = var_ptr2-&gt;dimlist;
             if (!strncmp(dimlist_ptr-&gt;dim-&gt;name_in_file, &quot;nCells&quot;, 1024) ||
@@ -669,6 +684,7 @@
             fortprintf(fd, &quot;      allocate(%s %% %s)</font>
<font color="black">&quot;, group_ptr-&gt;name, var_ptr-&gt;name_in_code);
             fortprintf(fd, &quot;      allocate(%s %% %s %% ioinfo)</font>
<font color="black">&quot;, group_ptr-&gt;name, var_ptr-&gt;name_in_code);
             fortprintf(fd, &quot;      %s %% %s %% fieldName = \'%s\'</font>
<font color="blue">&quot;, group_ptr-&gt;name, var_ptr-&gt;name_in_code, var_ptr-&gt;name_in_file);
+            fortprintf(fd, &quot;      %s %% %s %% isSuperArray = .false.</font>
<font color="black">&quot;, group_ptr-&gt;name, var_ptr-&gt;name_in_code);
             if (var_ptr-&gt;ndims &gt; 0) {
                fortprintf(fd, &quot;      allocate(%s %% %s %% array(&quot;, group_ptr-&gt;name, var_ptr-&gt;name_in_code);
                dimlist_ptr = var_ptr-&gt;dimlist;

</font>
</pre>