<p><b>dwj07@fsu.edu</b> 2012-02-07 15:44:41 -0700 (Tue, 07 Feb 2012)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Fixing temperature as a function of Z. This was broken when the thickness fields were fixed.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/basin_src/basin-template.F
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/basin_src/basin-template.F        2012-02-07 22:34:37 UTC (rev 1477)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/basin_src/basin-template.F        2012-02-07 22:44:41 UTC (rev 1478)
@@ -292,6 +292,7 @@
real :: surfMaxTemp, surfMinTemp
real :: y_0, x_0, x_1, x_2, x_3, width, cff1
real :: yTrans, vertTempChange, maxTemp
+real, dimension(:), allocatable :: vertCoord
real, dimension(:,:,:), allocatable :: tempHolder
integer :: iTracer, ix, iy, ndata, i, j, k, ixt, iyt, ncull, jcount, iNoData, kdata(nVertLevelsMod)
logical :: flag_lat
@@ -306,6 +307,7 @@
uNew = 0
vNew = 0
+allocate(vertCoord(nVertLevelsMOD))
allocate(tempHolder(1, nVertLevelsMOD, nCellsNew))
if(.not.real_bathymetry) then
@@ -321,9 +323,11 @@
! basin-mod
! setting for three levels - Set h values for isopycnal system
write(6,*) ' setting three levels for isopycnal system'
+ vertCoord = 0
do i = 1, nVertLevelsMOD
hNew(1,i,:) = h_total_max / nVertLevelsMOD
hZLevel(i) = h_total_max / nVertLevelsMOD
+ vertCoord(i) = i * h_total_max / nVertLevelsMOD
end do
h_sNew(:) = -h_total_max
@@ -344,7 +348,7 @@
surfMaxTemp = 13.1
surfMinTemp = 10.1
do k = 1, nVertLevelsMOD
- temperatureNew(1,k,:) = (surfMaxTemp - surfMinTemp) * ((-hZLevel(k)+h_total_max)/h_total_max)+ surfMinTemp
+ temperatureNew(1,k,:) = (surfMaxTemp - surfMinTemp) * ((-vertCoord(k)+h_total_max)/h_total_max)+ surfMinTemp
enddo
tempHolder = temperatureNew
@@ -571,6 +575,9 @@
write(6,*) ' done get_init_conditions'
+deallocate(tempHolder)
+deallocate(vertCoord)
+
end subroutine get_init_conditions
Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/internal_waves/basin_src/basin-template.F
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/internal_waves/basin_src/basin-template.F        2012-02-07 22:34:37 UTC (rev 1477)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/internal_waves/basin_src/basin-template.F        2012-02-07 22:44:41 UTC (rev 1478)
@@ -292,6 +292,7 @@
real :: surfMaxTemp, surfMinTemp
real :: y_a, y_0, A_0, beta
real :: yTrans, vertTempChange, maxTemp
+real, dimension(:), allocatable :: vertCoord
real, dimension(:,:,:), allocatable :: tempHolder
integer :: iTracer, ix, iy, ndata, i, j, k, ixt, iyt, ncull, jcount, iNoData, kdata(nVertLevelsMod)
logical :: flag_lat
@@ -307,6 +308,7 @@
vNew = 0
allocate(tempHolder(1, nVertLevelsMOD, nCellsNew))
+allocate(vertCoord(nVertLevelsMOD))
if(.not.real_bathymetry) then
@@ -321,9 +323,12 @@
! basin-mod
! setting for three levels - Set h values for isopycnal system
write(6,*) ' setting three levels for isopycnal system'
+ vertCoord = 0.0
do i = 1, nVertLevelsMOD
hNew(1,i,:) = h_total_max / nVertLevelsMOD
hZLevel(i) = h_total_max / nVertLevelsMOD
+ vertCoord(i) = i * h_total_max / nVertLevelsMOD
+
end do
h_sNew(:) = -h_total_max
@@ -344,7 +349,7 @@
surfMaxTemp = 20.1
surfMinTemp = 10.1
do k = 1, nVertLevelsMOD
- temperatureNew(1,k,:) = (surfMaxTemp - surfMinTemp) * ((-hZLevel(k)+h_total_max)/h_total_max)+ surfMinTemp
+ temperatureNew(1,k,:) = (surfMaxTemp - surfMinTemp) * ((-vertCoord(k)+h_total_max)/h_total_max)+ surfMinTemp
enddo
y_a = 50.0e3
@@ -552,6 +557,8 @@
write(6,*) ' done get_init_conditions'
+deallocate(vertCoord)
+
end subroutine get_init_conditions
</font>
</pre>