<p><b>duda</b> 2012-04-12 11:52:42 -0600 (Thu, 12 Apr 2012)</p><p>BRANCH COMMIT<br>
<br>
Fix faulty if-tests that assumed short-circuit evaluation. Thanks to Doug for finding this.<br>
<br>
<br>
M    src/framework/mpas_io_streams.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/omp_blocks/io/src/framework/mpas_io_streams.F
===================================================================
--- branches/omp_blocks/io/src/framework/mpas_io_streams.F        2012-04-12 17:46:22 UTC (rev 1775)
+++ branches/omp_blocks/io/src/framework/mpas_io_streams.F        2012-04-12 17:52:42 UTC (rev 1776)
@@ -1385,8 +1385,8 @@
             end if
 
             do j=1,ncons
-               if ((field_cursor % int1dField % isSuperArray) .and. (.not. field_cursor % isAvailable(j))) cycle
                if (field_cursor % int1dField % isSuperArray) then
+                  if (.not. field_cursor % isAvailable(j)) cycle
                   call MPAS_io_get_var(stream % fileHandle, field_cursor % int1dField % constituentNames(j), int0d_temp, io_err)
                else
                   call MPAS_io_get_var(stream % fileHandle, field_cursor % int1dField % fieldName, int1d_temp, io_err)
@@ -1460,8 +1460,8 @@
             end if
 
             do j=1,ncons
-               if ((field_cursor % int2dField % isSuperArray) .and. (.not. field_cursor % isAvailable(j))) cycle
                if (field_cursor % int2dField % isSuperArray) then
+                  if (.not. field_cursor % isAvailable(j)) cycle
                   call MPAS_io_get_var(stream % fileHandle, field_cursor % int2dField % constituentNames(j), int1d_temp, io_err)
                else
                   call MPAS_io_get_var(stream % fileHandle, field_cursor % int2dField % fieldName, int2d_temp, io_err)
@@ -1541,8 +1541,8 @@
             end if
 
             do j=1,ncons
-               if ((field_cursor % int3dField % isSuperArray) .and. (.not. field_cursor % isAvailable(j))) cycle
                if (field_cursor % int3dField % isSuperArray) then
+                  if (.not. field_cursor % isAvailable(j)) cycle
                   call MPAS_io_get_var(stream % fileHandle, field_cursor % int3dField % constituentNames(j), int2d_temp, io_err)
                else
                   call MPAS_io_get_var(stream % fileHandle, field_cursor % int3dField % fieldName, int3d_temp, io_err)
@@ -1642,8 +1642,8 @@
             end if
 
             do j=1,ncons
-               if ((field_cursor % real1dField % isSuperArray) .and. (.not. field_cursor % isAvailable(j))) cycle
                if (field_cursor % real1dField % isSuperArray) then
+                  if (.not. field_cursor % isAvailable(j)) cycle
                   call MPAS_io_get_var(stream % fileHandle, field_cursor % real1dField % constituentNames(j), real0d_temp, io_err)
                else
                   call MPAS_io_get_var(stream % fileHandle, field_cursor % real1dField % fieldName, real1d_temp, io_err)
@@ -1717,8 +1717,8 @@
             end if
 
             do j=1,ncons
-               if ((field_cursor % real2dField % isSuperArray) .and. (.not. field_cursor % isAvailable(j))) cycle
                if (field_cursor % real2dField % isSuperArray) then
+                  if (.not. field_cursor % isAvailable(j)) cycle
                   call MPAS_io_get_var(stream % fileHandle, field_cursor % real2dField % constituentNames(j), real1d_temp, io_err)
                else
                   call MPAS_io_get_var(stream % fileHandle, field_cursor % real2dField % fieldName, real2d_temp, io_err)
@@ -1800,8 +1800,8 @@
             end if
 
             do j=1,ncons
-               if ((field_cursor % real3dField % isSuperArray) .and. (.not. field_cursor % isAvailable(j))) cycle
                if (field_cursor % real3dField % isSuperArray) then
+                  if (.not. field_cursor % isAvailable(j)) cycle
 write(0,*) 'DEBUGGING : calling get_var for a constitutent'
                   call MPAS_io_get_var(stream % fileHandle, field_cursor % real3dField % constituentNames(j), real2d_temp, io_err)
                else

</font>
</pre>