<p><b>xylar@lanl.gov</b> 2010-05-24 13:48:08 -0600 (Mon, 24 May 2010)</p><p>BRANCH COMMIT<br>
<br>
Adding changes to handle planar grids when computing the vertical normal vector<br>
<br>
M    mpas/src/operators/module_RBF_interpolation.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/IBinterp/mpas/src/operators/module_RBF_interpolation.F
===================================================================
--- branches/ocean_projects/IBinterp/mpas/src/operators/module_RBF_interpolation.F        2010-05-24 19:42:21 UTC (rev 305)
+++ branches/ocean_projects/IBinterp/mpas/src/operators/module_RBF_interpolation.F        2010-05-24 19:48:08 UTC (rev 306)
@@ -122,6 +122,7 @@
     real(kind=RKIND), dimension(:,:,:), pointer :: cellTangentPlane
     real(kind=RKIND), dimension(3) :: xHatPlane, yHatPlane, rHat
     real(kind=RKIND) :: normalDotRHat
+    logical :: on_a_sphere
 
     xCell       =&gt; grid % xCell % array
     yCell       =&gt; grid % yCell % array
@@ -133,6 +134,7 @@
     edgesOnCell =&gt; grid % edgesOnCell % array
     nCells      = grid % nCells
     nEdges      = grid % nEdges
+    on_a_sphere = grid % on_a_sphere
 
     localVerticalUnitVectors =&gt; grid % localVerticalUnitVectors % array
     edgeNormalVectors =&gt; grid % edgeNormalVectors % array
@@ -144,14 +146,14 @@
 
     ! loop over all cells to be solved on this block
     do iCell=1,nCells
-      ! if(on_a_sphere) then
-         localVerticalUnitVectors(1,iCell) = xCell(iCell)
-         localVerticalUnitVectors(2,iCell) = yCell(iCell)
-         localVerticalUnitVectors(3,iCell) = zCell(iCell)
-         call unit_vec_in_R3(localVerticalUnitVectors(:,iCell))
-      ! else ! on a plane
-      !   localVerticalUnitVectors(:,iCell) = (/ 0., 0., 1. /)
-      ! end if
+      if(on_a_sphere) then
+        localVerticalUnitVectors(1,iCell) = xCell(iCell)
+        localVerticalUnitVectors(2,iCell) = yCell(iCell)
+        localVerticalUnitVectors(3,iCell) = zCell(iCell)
+        call unit_vec_in_R3(localVerticalUnitVectors(:,iCell))
+      else ! on a plane
+        localVerticalUnitVectors(:,iCell) = (/ 0., 0., 1. /)
+      end if
     end do
 
     do iEdge = 1,nEdges

</font>
</pre>