Index: codes/icosagcm/devel/src/kernels_unst/scalar_laplacian.k90
===================================================================
--- codes/icosagcm/devel/src/kernels_unst/scalar_laplacian.k90	(revision 784)
+++ codes/icosagcm/devel/src/kernels_unst/scalar_laplacian.k90	(revision 784)
@@ -0,0 +1,109 @@
+   !--------------------------------------------------------------------------
+   !---------------------------- scalar_laplacian ----------------------------------
+   !$OMP DO SCHEDULE(STATIC)
+   DO edge = 1, edge_num
+      ij_left = left(edge)
+      ij_right = right(edge)
+      !DIR$ SIMD
+      DO l = 1, llm
+         grad(l,edge) = 1.*(b(l,ij_right)-b(l,ij_left))
+      END DO
+   END DO
+   !$OMP END DO
+   !$OMP DO SCHEDULE(STATIC)
+   DO ij = 1, primal_num
+      ! this VLOOP iterates over primal cell edges
+      SELECT CASE(primal_deg(ij))
+      CASE(4)
+         edge1 = primal_edge(1,ij)
+         edge2 = primal_edge(2,ij)
+         edge3 = primal_edge(3,ij)
+         edge4 = primal_edge(4,ij)
+         le_de1 = le_de(edge1)
+         le_de2 = le_de(edge2)
+         le_de3 = le_de(edge3)
+         le_de4 = le_de(edge4)
+         sign1 = primal_ne(1,ij)
+         sign2 = primal_ne(2,ij)
+         sign3 = primal_ne(3,ij)
+         sign4 = primal_ne(4,ij)
+         !DIR$ SIMD
+         DO l = 1, llm
+            div_ij=0.
+            div_ij = div_ij + sign1*le_de1*grad(l,edge1)
+            div_ij = div_ij + sign2*le_de2*grad(l,edge2)
+            div_ij = div_ij + sign3*le_de3*grad(l,edge3)
+            div_ij = div_ij + sign4*le_de4*grad(l,edge4)
+            divu(l,ij) = div_ij / Ai(ij)
+         END DO
+      CASE(5)
+         edge1 = primal_edge(1,ij)
+         edge2 = primal_edge(2,ij)
+         edge3 = primal_edge(3,ij)
+         edge4 = primal_edge(4,ij)
+         edge5 = primal_edge(5,ij)
+         le_de1 = le_de(edge1)
+         le_de2 = le_de(edge2)
+         le_de3 = le_de(edge3)
+         le_de4 = le_de(edge4)
+         le_de5 = le_de(edge5)
+         sign1 = primal_ne(1,ij)
+         sign2 = primal_ne(2,ij)
+         sign3 = primal_ne(3,ij)
+         sign4 = primal_ne(4,ij)
+         sign5 = primal_ne(5,ij)
+         !DIR$ SIMD
+         DO l = 1, llm
+            div_ij=0.
+            div_ij = div_ij + sign1*le_de1*grad(l,edge1)
+            div_ij = div_ij + sign2*le_de2*grad(l,edge2)
+            div_ij = div_ij + sign3*le_de3*grad(l,edge3)
+            div_ij = div_ij + sign4*le_de4*grad(l,edge4)
+            div_ij = div_ij + sign5*le_de5*grad(l,edge5)
+            divu(l,ij) = div_ij / Ai(ij)
+         END DO
+      CASE(6)
+         edge1 = primal_edge(1,ij)
+         edge2 = primal_edge(2,ij)
+         edge3 = primal_edge(3,ij)
+         edge4 = primal_edge(4,ij)
+         edge5 = primal_edge(5,ij)
+         edge6 = primal_edge(6,ij)
+         le_de1 = le_de(edge1)
+         le_de2 = le_de(edge2)
+         le_de3 = le_de(edge3)
+         le_de4 = le_de(edge4)
+         le_de5 = le_de(edge5)
+         le_de6 = le_de(edge6)
+         sign1 = primal_ne(1,ij)
+         sign2 = primal_ne(2,ij)
+         sign3 = primal_ne(3,ij)
+         sign4 = primal_ne(4,ij)
+         sign5 = primal_ne(5,ij)
+         sign6 = primal_ne(6,ij)
+         !DIR$ SIMD
+         DO l = 1, llm
+            div_ij=0.
+            div_ij = div_ij + sign1*le_de1*grad(l,edge1)
+            div_ij = div_ij + sign2*le_de2*grad(l,edge2)
+            div_ij = div_ij + sign3*le_de3*grad(l,edge3)
+            div_ij = div_ij + sign4*le_de4*grad(l,edge4)
+            div_ij = div_ij + sign5*le_de5*grad(l,edge5)
+            div_ij = div_ij + sign6*le_de6*grad(l,edge6)
+            divu(l,ij) = div_ij / Ai(ij)
+         END DO
+      CASE DEFAULT
+         !DIR$ SIMD
+         DO l = 1, llm
+            div_ij=0.
+            DO iedge = 1, primal_deg(ij)
+               edge = primal_edge(iedge,ij)
+               div_ij = div_ij + primal_ne(iedge,ij)*le_de(edge)*grad(l,edge)
+            END DO
+            divu(l,ij) = div_ij / Ai(ij)
+         END DO
+      END SELECT
+   END DO
+   !$OMP END DO
+   !---------------------------- scalar_laplacian ----------------------------------
+   !--------------------------------------------------------------------------
