<p><b>ringler@lanl.gov</b> 2010-04-06 10:19:36 -0600 (Tue, 06 Apr 2010)</p><p><br>
file changed: module_time_integration.F<br>
<br>
reason: support for lateral boundary conditions<br>
<br>
comments: all seems to be working with the execption of the vorticity<br>
calculation along the boundary. temporarily set pv flux to zero<br>
to allow for debugging.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/lateral_boundary_conditions/src/core_sw/module_time_integration.F
===================================================================
--- branches/lateral_boundary_conditions/src/core_sw/module_time_integration.F        2010-04-06 15:35:46 UTC (rev 178)
+++ branches/lateral_boundary_conditions/src/core_sw/module_time_integration.F        2010-04-06 16:19:36 UTC (rev 179)
@@ -343,6 +343,10 @@
workpv = 0.5 * (pv_edge(k,iEdge) + pv_edge(k,eoe))
q = q + weightsOnEdge(j,iEdge) * u(k,eoe) * workpv * h_edge(k,eoe)
end do
+
+ ! turn off pv flux until boundary vorticity is debugged
+ q = 0
+
tend_u(k,iEdge) = &
q &
+ u_diffusion &
@@ -511,6 +515,12 @@
end do
!
+ ! set the velocity in the nEdges+1 slot to zero, this is a dummy address
+ ! used to when reading for edges that do not exist
+ !
+ u(:,nEdges+1) = 0.0
+
+ !
! Compute circulation and relative vorticity at each vertex
!
circulation(:,:) = 0.0
@@ -532,6 +542,7 @@
end do
end do
+
!
! Compute the divergence at each cell center
!
@@ -712,16 +723,22 @@
!
! set pv_edge = fEdge / h_edge at boundary points
!
- if (maxval(boundaryEdge).gt.0) then
+ if (maxval(boundaryEdge).ge.0) then
do iEdge = 1,nEdges
cell1 = cellsOnEdge(1,iEdge)
cell2 = cellsOnEdge(2,iEdge)
do k = 1,nVertLevels
if(boundaryEdge(k,iEdge).eq.1) then
- if(cell1.gt.0) h1 = h(k,cell1)
- if(cell2.gt.0) h2 = h(k,cell2)
- pv_edge(k,iEdge) = fEdge(iEdge) / ( max(h1,h2) )
v(k,iEdge) = 0.0
+ if(cell1.gt.0) then
+ h1 = h(k,cell1)
+ pv_edge(k,iEdge) = fEdge(iEdge) / h1
+ h_edge(k,iEdge) = h1
+ else
+ h2 = h(k,cell2)
+ pv_edge(k,iEdge) = fEdge(iEdge) / h2
+ h_edge(k,iEdge) = h2
+ endif
endif
enddo
enddo
</font>
</pre>