<p><b>qchen3@fsu.edu</b> 2012-04-19 16:46:45 -0600 (Thu, 19 Apr 2012)</p><p>BRANCH COMMIT<br>
<br>
Now h_kappa depends on its meridional location. It is now computed using an exponential function. It is zero near the boundary, and peaks in the middle of the channel.<br>
<br>
<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/accgm/namelist.input
===================================================================
--- branches/ocean_projects/accgm/namelist.input        2012-04-19 22:19:10 UTC (rev 1798)
+++ branches/ocean_projects/accgm/namelist.input        2012-04-19 22:46:45 UTC (rev 1799)
@@ -1 +1 @@
-link namelist.input.ocean.inviscid
\ No newline at end of file
+link namelist.input.ocean
\ No newline at end of file
Modified: branches/ocean_projects/accgm/namelist.input.ocean
===================================================================
--- branches/ocean_projects/accgm/namelist.input.ocean        2012-04-19 22:19:10 UTC (rev 1798)
+++ branches/ocean_projects/accgm/namelist.input.ocean        2012-04-19 22:46:45 UTC (rev 1799)
@@ -1,6 +1,6 @@
&sw_model
config_test_case = 0
- config_time_integration = 'rk4'
+ config_time_integration = 'RK4'
config_rk_filter_btr_mode = .false.
config_dt = 180.0
config_start_time = '0000-01-01_00:00:00'
@@ -41,7 +41,7 @@
&hmix
config_h_mom_eddy_visc2 = 0.0
config_h_mom_eddy_visc4 = 0.0
- config_h_kappa = 0.0
+ config_h_kappa = 800.0
config_h_kappa_q = 0.0
config_visc_vorticity_term = .true.
config_h_tracer_eddy_diff2 = 1.0e5
Modified: branches/ocean_projects/accgm/src/core_ocean/mpas_ocn_gm.F
===================================================================
--- branches/ocean_projects/accgm/src/core_ocean/mpas_ocn_gm.F        2012-04-19 22:19:10 UTC (rev 1798)
+++ branches/ocean_projects/accgm/src/core_ocean/mpas_ocn_gm.F        2012-04-19 22:46:45 UTC (rev 1799)
@@ -73,7 +73,7 @@
type(state_type), intent(inout) :: s
type(mesh_type), intent(in) :: grid
- real(kind=RKIND), dimension(:,:), pointer :: hEddyFlux, h
+ real(kind=RKIND), dimension(:,:), pointer :: hEddyFlux, h, h_kappa
real(kind=RKIND), dimension(:), pointer :: dcEdge
integer, dimension(:,:), pointer :: cellsOnEdge
integer, dimension(:), pointer :: maxLevelEdgeTop
@@ -81,6 +81,7 @@
hEddyFlux => s % hEddyFlux % array
h => s % h % array
+ h_kappa => s % h_kappa % array
dcEdge => grid % dcEdge % array
cellsOnEdge => grid % cellsOnEdge % array
@@ -88,6 +89,9 @@
nEdges = grid % nEdges
+
+ call ocn_get_h_kappa(s,grid)
+
hEddyFlux(:,:) = 0.0
if (config_vert_grid_type .EQ. 'isopycnal') then
@@ -95,7 +99,7 @@
cell1 = cellsOnEdge(1,iEdge)
cell2 = cellsOnEdge(2,iEdge)
do k=1,maxLevelEdgeTop(iEdge)
- hEddyFlux(k,iEdge) = -config_h_kappa * (h(k,cell2) - h(k,cell1)) / dcEdge(iEdge)
+ hEddyFlux(k,iEdge) = -h_kappa(k,iEdge) * (h(k,cell2) - h(k,cell1)) / dcEdge(iEdge)
end do
end do
else
@@ -113,14 +117,26 @@
type (state_type), intent(inout) :: s
type (mesh_type), intent(in) :: grid
+ real(kind=RKIND), dimension(:), pointer :: yEdge
real(kind=RKIND), dimension(:,:), pointer :: h_kappa
+ real(kind=RKIND) :: ymid, Ly
+ integer :: nVertLevels, k
+ yEdge => grid % yEdge % array
h_kappa => s % h_kappa % array
- h_kappa(:,:) = config_h_kappa
+ nVertLevels = grid % nVertLevels
+ ymid = 0.5*(maxval(yEdge) + minval(yEdge))
+ Ly = maxval(yEdge) - minval(yEdge)
+ !h_kappa(:,:) = config_h_kappa
+ do k = 1, nVertLevels
+ h_kappa(k,:) = 1500.0*exp(-((yEdge(:)-ymid)*4/Ly)**2)
+ end do
+
+
end subroutine ocn_get_h_kappa
@@ -131,9 +147,9 @@
real(kind=RKIND), dimension(:,:), pointer :: h_kappa_q
-
h_kappa_q => s % h_kappa_q % array
+
h_kappa_q(:,:) = config_h_kappa_q
Modified: branches/ocean_projects/accgm/src/core_ocean/mpas_ocn_tendency.F
===================================================================
--- branches/ocean_projects/accgm/src/core_ocean/mpas_ocn_tendency.F        2012-04-19 22:19:10 UTC (rev 1798)
+++ branches/ocean_projects/accgm/src/core_ocean/mpas_ocn_tendency.F        2012-04-19 22:46:45 UTC (rev 1799)
@@ -625,7 +625,7 @@
end do
! Annihilate vorticity on the boundary to enforce free-slip boundary conditions
- vorticity(:,:) = vorticity(:,:) * vertexMask(:,:)
+ !vorticity(:,:) = vorticity(:,:) * vertexMask(:,:)
!
! Compute kinetic energy in each vertex
</font>
</pre>