<p><b>gaw06e@fsu.edu</b> 2011-06-05 11:31:26 -0600 (Sun, 05 Jun 2011)</p><p>- fix logic statement in alter_grid_for_triangle_borders<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/triangle_border_swm/src/core_sw/module_mpas_core.F
===================================================================
--- branches/ocean_projects/triangle_border_swm/src/core_sw/module_mpas_core.F        2011-06-04 23:59:53 UTC (rev 875)
+++ branches/ocean_projects/triangle_border_swm/src/core_sw/module_mpas_core.F        2011-06-05 17:31:26 UTC (rev 876)
@@ -286,7 +286,13 @@
             pA(3) = zEdge(iEdge)
             pA = pA / sqrt( dot_product(pA,pA) )
             
-            if (vOEa.eq.2) then
+            ! if boundaryEdge = 1, then the boundaryVertex values of the
+            ! verticesOnEdge entry for the corresponding edge should 
+            ! consist of 0,2 or 2,0 - so we compute the distance
+            ! between the vertex with boundaryVertex = 0 and our edge
+            
+            ! vertex b has bV = 0
+            if (bVa.eq.2) then
                
                ! get and normalizee coordinate for vOEb
                pB(1) = xVertex(vOEb)
@@ -299,9 +305,10 @@
                
                ! set dvEdge to this value (multiplied by rEarth)
                dvEdge(iEdge) = a * dvEdgeTemp
+            
+            ! vertex a has bV = 0
+            elseif (bVb.eq.2) then
                
-            elseif (vOEb.eq.2) then
-               
                ! get and normalize coordinate for vOEa
                pB(1) = xVertex(vOEa)
                pB(2) = yVertex(vOEa)
@@ -317,7 +324,7 @@
             else
                write(0,*) 'Error: alter_grid_for_triangle_borders problem ', &amp;
                   ' with verticesOnEdge at edge ',iEdge,' with vOE values ', &amp;
-                  vOEA,' ',vOEB
+                  vOEA,' ',vOEB, ' and bV values ',bVa,' ',bVb
             end if
             
          end if appropriateEdgeIf

</font>
</pre>