<p><b>dwj07@fsu.edu</b> 2013-04-03 10:58:43 -0600 (Wed, 03 Apr 2013)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Renaming variables<br>
        uh -> normalThicknessFlux<br>
        uhSum -> normalThicknessFluxSum<br>
        hSum -> thicknessSum<br>
        u_src -> normalVelocityForcing<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/variable_name_change/src/core_ocean/Registry.xml
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/Registry.xml        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/Registry.xml        2013-04-03 16:58:43 UTC (rev 2716)
@@ -344,7 +344,7 @@
        </nml_record>
        <nml_record name="forcing">
                <nml_option name="config_use_monthly_forcing" type="logical" default_value=".false." units="unitless"
-                 description="Controls time frequency of forcing. If false, a constant forcing is used, provided by the input fields u_src, temperatureRestore, and salinityRestore. If true, forcing is interpolated between monthly fields given by windStressMonthly, temperatureRestoreMonthly, and salinityRestoreMonthly."
+                 description="Controls time frequency of forcing. If false, a constant forcing is used, provided by the input fields normalVelocityForcing, temperatureRestore, and salinityRestore. If true, forcing is interpolated between monthly fields given by windStressMonthly, temperatureRestoreMonthly, and salinityRestoreMonthly."
                 possible_values=".true. or .false."
                />
                <nml_option name="config_restoreTS" type="logical" default_value=".false." units="unitless"
@@ -1001,7 +1001,7 @@
                <var name="cellMask" type="integer" dimensions="nVertLevels nCells" streams="o" units="unitless"
                 description="Mask on cells that determines if computations should be done on cell."
                />
-                <var name="u_src" type="real" dimensions="nVertLevels nEdges" streams="ir" units="N m^{-2}"
+                <var name="normalVelocityForcing" type="real" dimensions="nVertLevels nEdges" streams="ir" units="N m^{-2}"
                 description="Velocity forcing field. Defines a forcing at an edge."
                />
                <var name="temperatureRestore" type="real" dimensions="nCells" streams="ir" units="^\circ C"
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_diagnostics.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_diagnostics.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_diagnostics.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -532,7 +532,7 @@
!-----------------------------------------------------------------
integer :: iEdge, iCell, iVertex, k, cell1, cell2, vertex1, vertex2, eoe, i, j, cov
- real (kind=RKIND) :: flux, layerThicknessVertex, workpv, density0Inv, hSum, invAreaCell
+ real (kind=RKIND) :: flux, layerThicknessVertex, workpv, density0Inv, thicknessSum, invAreaCell
integer :: nCells, nEdges, nVertices, nVertLevels, vertexDegree
@@ -582,7 +582,7 @@
do iCell=1,nCells
div_hu(:) = 0.0
div_hu_btr = 0.0
- hSum = 0.0
+ thicknessSum = 0.0
invAreaCell = 1.0 / areaCell(iCell)
do i = 1, nEdgesOnCell(iCell)
@@ -597,11 +597,11 @@
do k = 1, maxLevelCell(iCell)
h_tend_col(k) = - vertCoordMovementWeights(k) * layerThickness(k, iCell) * div_hu_btr
- hSum = hSum + vertCoordMovementWeights(k) * layerThickness(k, iCell)
+ thicknessSum = thicknessSum + vertCoordMovementWeights(k) * layerThickness(k, iCell)
end do
- if(hSum > 0.0) then
- h_tend_col = h_tend_col / hSum
+ if(thicknessSum > 0.0) then
+ h_tend_col = h_tend_col / thicknessSum
end if
! Vertical transport through layer interface at top and bottom is zero.
@@ -699,7 +699,7 @@
type (mesh_type), intent(in) :: grid
integer :: iEdge, k, nEdges
- real (kind=RKIND) :: vertSum, uhSum, hSum
+ real (kind=RKIND) :: vertSum, normalThicknessFluxSum, thicknessSum
real (kind=RKIND), dimension(:,:), pointer :: layerThicknessEdge, normalVelocity
integer, dimension(:), pointer :: maxLevelEdgeTop
@@ -712,18 +712,18 @@
do iEdge=1,nEdges
- ! hSum is initialized outside the loop because on land boundaries
- ! maxLevelEdgeTop=0, but I want to initialize hSum with a
+ ! thicknessSum is initialized outside the loop because on land boundaries
+ ! maxLevelEdgeTop=0, but I want to initialize thicknessSum with a
! nonzero value to avoid a NaN.
- uhSum = layerThicknessEdge(1,iEdge) * normalVelocity(1,iEdge)
- hSum = layerThicknessEdge(1,iEdge)
+ normalThicknessFluxSum = layerThicknessEdge(1,iEdge) * normalVelocity(1,iEdge)
+ thicknessSum = layerThicknessEdge(1,iEdge)
do k=2,maxLevelEdgeTop(iEdge)
- uhSum = uhSum + layerThicknessEdge(k,iEdge) * normalVelocity(k,iEdge)
- hSum = hSum + layerThicknessEdge(k,iEdge)
+ normalThicknessFluxSum = normalThicknessFluxSum + layerThicknessEdge(k,iEdge) * normalVelocity(k,iEdge)
+ thicknessSum = thicknessSum + layerThicknessEdge(k,iEdge)
enddo
- vertSum = uhSum/hSum
+ vertSum = normalThicknessFluxSum/thicknessSum
do k=1,maxLevelEdgeTop(iEdge)
normalVelocity(k,iEdge) = normalVelocity(k,iEdge) - vertSum
enddo
@@ -753,7 +753,7 @@
type (mesh_type), intent(in) :: grid
integer :: iEdge, k, nEdges
- real (kind=RKIND) :: vertSum, uhSum, hSum
+ real (kind=RKIND) :: vertSum, normalThicknessFluxSum, thicknessSum
real (kind=RKIND), dimension(:,:), pointer :: layerThicknessEdge, tend_normalVelocity
integer, dimension(:), pointer :: maxLevelEdgeTop
@@ -767,18 +767,18 @@
do iEdge=1,nEdges
- ! hSum is initialized outside the loop because on land boundaries
- ! maxLevelEdgeTop=0, but I want to initialize hSum with a
+ ! thicknessSum is initialized outside the loop because on land boundaries
+ ! maxLevelEdgeTop=0, but I want to initialize thicknessSum with a
! nonzero value to avoid a NaN.
- uhSum = layerThicknessEdge(1,iEdge) * tend_normalVelocity(1,iEdge)
- hSum = layerThicknessEdge(1,iEdge)
+ normalThicknessFluxSum = layerThicknessEdge(1,iEdge) * tend_normalVelocity(1,iEdge)
+ thicknessSum = layerThicknessEdge(1,iEdge)
do k=2,maxLevelEdgeTop(iEdge)
- uhSum = uhSum + layerThicknessEdge(k,iEdge) * tend_normalVelocity(k,iEdge)
- hSum = hSum + layerThicknessEdge(k,iEdge)
+ normalThicknessFluxSum = normalThicknessFluxSum + layerThicknessEdge(k,iEdge) * tend_normalVelocity(k,iEdge)
+ thicknessSum = thicknessSum + layerThicknessEdge(k,iEdge)
enddo
- vertSum = uhSum/hSum
+ vertSum = normalThicknessFluxSum/thicknessSum
do k=1,maxLevelEdgeTop(iEdge)
tend_normalVelocity(k,iEdge) = tend_normalVelocity(k,iEdge) - vertSum
enddo
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_monthly_forcing.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_monthly_forcing.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_monthly_forcing.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -102,7 +102,7 @@
real (kind=RKIND), dimension(:,:), pointer :: windStressMonthly
real (kind=RKIND), dimension(:), pointer :: temperatureRestore
real (kind=RKIND), dimension(:), pointer :: salinityRestore
- real (kind=RKIND), dimension(:,:), pointer :: u_src
+ real (kind=RKIND), dimension(:,:), pointer :: normalVelocityForcing
integer :: iCell, iEdge, nCells, nEdges, nMonths, k
integer :: iMonth, iMonthP1, iDayInMonth, ierr
real (kind=RKIND) :: data, dataP1, weight, weightP1
@@ -117,7 +117,7 @@
temperatureRestore => grid % temperatureRestore % array
salinityRestore => grid % salinityRestore % array
- u_src => grid % u_src % array
+ normalVelocityForcing => grid % normalVelocityForcing % array
temperatureRestoreMonthly => grid % temperatureRestoreMonthly % array
salinityRestoreMonthly => grid % salinityRestoreMonthly % array
@@ -146,7 +146,7 @@
! Interpolate between iMonth and iMonthP1 records, using iDayInMonth
data = windStressMonthly(iMonth,iEdge)
dataP1 = windStressMonthly(iMonthP1,iEdge)
- u_src(1,iEdge) = data * weight + dataP1 * weightP1
+ normalVelocityForcing(1,iEdge) = data * weight + dataP1 * weightP1
end do
!--------------------------------------------------------------------
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_mpas_core.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_mpas_core.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_mpas_core.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -290,7 +290,7 @@
block % state % time_levs(1) % state % uReconstructMeridional % array &
)
- call mpas_reconstruct(mesh, mesh % u_src % array, &
+ call mpas_reconstruct(mesh, mesh % normalVelocityForcing % array, &
block % state % time_levs(1) % state % uSrcReconstructX % array, &
block % state % time_levs(1) % state % uSrcReconstructY % array, &
block % state % time_levs(1) % state % uSrcReconstructZ % array, &
@@ -552,7 +552,7 @@
type (block_type), pointer :: block
integer :: iTracer, cell, cell1, cell2
- real (kind=RKIND) :: uhSum, hSum, hEdge1, zMidPBC
+ real (kind=RKIND) :: normalThicknessFluxSum, thicknessSum, hEdge1, zMidPBC
integer, dimension(:), pointer :: maxLevelCell
real (kind=RKIND), dimension(:), pointer :: refBottomDepth, &
@@ -739,7 +739,7 @@
type (block_type), pointer :: block
integer :: iTracer, cell, cell1, cell2
- real (kind=RKIND) :: uhSum, layerThicknessSum, layerThicknessEdge1
+ real (kind=RKIND) :: normalThicknessFluxSum, layerThicknessSum, layerThicknessEdge1
real (kind=RKIND), dimension(:), pointer :: refBottomDepth
real (kind=RKIND), dimension(:,:), pointer :: layerThickness
@@ -778,13 +778,13 @@
! ocn_diagnostic_solve has not yet been called, so compute hEdge
! just for this edge.
- ! hSum is initialized outside the loop because on land boundaries
- ! maxLevelEdgeTop=0, but I want to initialize hSum with a
+ ! thicknessSum is initialized outside the loop because on land boundaries
+ ! maxLevelEdgeTop=0, but I want to initialize thicknessSum with a
! nonzero value to avoid a NaN.
layerThicknessEdge1 = 0.5*( &
block % state % time_levs(1) % state % layerThickness % array(1,cell1) &
+ block % state % time_levs(1) % state % layerThickness % array(1,cell2) )
- uhSum = layerThicknessEdge1*block % state % time_levs(1) % state % normalVelocity % array(1,iEdge)
+ normalThicknessFluxSum = layerThicknessEdge1*block % state % time_levs(1) % state % normalVelocity % array(1,iEdge)
layerThicknessSum = layerThicknessEdge1
do k=2,block % mesh % maxLevelEdgeTop % array(iEdge)
@@ -794,12 +794,12 @@
block % state % time_levs(1) % state % layerThickness % array(k,cell1) &
+ block % state % time_levs(1) % state % layerThickness % array(k,cell2) )
- uhSum = uhSum &
+ normalThicknessFluxSum = normalThicknessFluxSum &
+ layerThicknessEdge1*block % state % time_levs(1) % state % normalVelocity % array(k,iEdge)
layerThicknessSum = layerThicknessSum + layerThicknessEdge1
enddo
- block % state % time_levs(1) % state % uBtr % array(iEdge) = uhSum/layerThicknessSum
+ block % state % time_levs(1) % state % uBtr % array(iEdge) = normalThicknessFluxSum/layerThicknessSum
! uBcl(k,iEdge) = normalVelocity(k,iEdge) - uBtr(iEdge)
do k=1,block % mesh % maxLevelEdgeTop % array(iEdge)
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tendency.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tendency.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tendency.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -159,7 +159,7 @@
tend_normalVelocity, circulation, relativeVorticity, viscosity, ke, ke_edge, potentialVorticityEdge, &
MontPot, wTop, divergence, vertViscTopOfEdge
- real (kind=RKIND), dimension(:,:), pointer :: u_src
+ real (kind=RKIND), dimension(:,:), pointer :: normalVelocityForcing
integer :: err
@@ -182,7 +182,7 @@
tend_normalVelocity => tend % normalVelocity % array
- u_src => grid % u_src % array
+ normalVelocityForcing => grid % normalVelocityForcing % array
!
! velocity tendency: start accumulating tendency terms
@@ -231,7 +231,7 @@
!
call mpas_timer_start("forcings", .false., velForceTimer)
- call ocn_vel_forcing_tend(grid, normalVelocity, u_src, ke_edge, layerThicknessEdge, tend_normalVelocity, err)
+ call ocn_vel_forcing_tend(grid, normalVelocity, normalVelocityForcing, ke_edge, layerThicknessEdge, tend_normalVelocity, err)
call mpas_timer_stop("forcings", velForceTimer)
!
@@ -263,7 +263,7 @@
real (kind=RKIND), intent(in) :: dt !< Input: Time step
real (kind=RKIND), dimension(:,:), pointer :: &
- uTransport, layerThickness,wTop, layerThicknessEdge, vertDiffTopOfCell, tend_layerThickness, uh
+ uTransport, layerThickness,wTop, layerThicknessEdge, vertDiffTopOfCell, tend_layerThickness, normalThicknessFlux
real (kind=RKIND), dimension(:,:,:), pointer :: &
tracers, tend_tr
@@ -288,13 +288,13 @@
if(config_disable_tr_all_tend) return
- allocate(uh(grid % nVertLevels, grid % nEdges+1))
+ allocate(normalThicknessFlux(grid % nVertLevels, grid % nEdges+1))
!
! QC Comment (3/15/12): need to make sure that uTransport is the right
! transport velocity for the tracer.
do iEdge = 1, grid % nEdges
do k = 1, grid % nVertLevels
- uh(k, iEdge) = uTransport(k, iEdge) * layerThicknessEdge(k, iEdge)
+ normalThicknessFlux(k, iEdge) = uTransport(k, iEdge) * layerThicknessEdge(k, iEdge)
end do
end do
@@ -304,7 +304,7 @@
! Monotonoic Advection, or standard advection
call mpas_timer_start("adv", .false., tracerHadvTimer)
- call mpas_ocn_tracer_advection_tend(tracers, uh, wTop, layerThickness, layerThickness, dt, grid, tend_layerThickness, tend_tr)
+ call mpas_ocn_tracer_advection_tend(tracers, normalThicknessFlux, wTop, layerThickness, layerThickness, dt, grid, tend_layerThickness, tend_tr)
call mpas_timer_stop("adv", tracerHadvTimer)
!
@@ -325,7 +325,7 @@
call mpas_timer_stop("ocn_tend_tracer")
- deallocate(uh)
+ deallocate(normalThicknessFlux)
end subroutine ocn_tend_tracer!}}}
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_time_integration_rk4.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_time_integration_rk4.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_time_integration_rk4.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -314,7 +314,7 @@
block % state % time_levs(2) % state % uReconstructMeridional % array &
)
- call mpas_reconstruct(block % mesh, block % mesh % u_src % array, &
+ call mpas_reconstruct(block % mesh, block % mesh % normalVelocityForcing % array, &
block % state % time_levs(2) % state % uSrcReconstructX % array, &
block % state % time_levs(2) % state % uSrcReconstructY % array, &
block % state % time_levs(2) % state % uSrcReconstructZ % array, &
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_time_integration_split.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_time_integration_split.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_time_integration_split.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -89,7 +89,7 @@
eoe, oldBtrSubcycleTime, newBtrSubcycleTime, uPerpTime, BtrCorIter, &
n_bcl_iter(config_n_ts_iter), stage1_tend_time
type (block_type), pointer :: block
- real (kind=RKIND) :: uhSum, hSum, flux, sshEdge, hEdge1, &
+ real (kind=RKIND) :: normalThicknessFluxSum, thicknessSum, flux, sshEdge, hEdge1, &
CoriolisTerm, uCorr, temp, temp_h, coef, FBtr_coeff, sshCell1, sshCell2
integer :: num_tracers, ucorr_coef, err
real (kind=RKIND), dimension(:,:), pointer :: &
@@ -236,17 +236,17 @@
/block % mesh % dcEdge % array(iEdge) )
enddo
- ! hSum is initialized outside the loop because on land boundaries
- ! maxLevelEdgeTop=0, but I want to initialize hSum with a
+ ! thicknessSum is initialized outside the loop because on land boundaries
+ ! maxLevelEdgeTop=0, but I want to initialize thicknessSum with a
! nonzero value to avoid a NaN.
- uhSum = block % state % time_levs(2) % state % layerThicknessEdge % array(1,iEdge) * uTemp(1)
- hSum = block % state % time_levs(2) % state % layerThicknessEdge % array(1,iEdge)
+ normalThicknessFluxSum = block % state % time_levs(2) % state % layerThicknessEdge % array(1,iEdge) * uTemp(1)
+ thicknessSum = block % state % time_levs(2) % state % layerThicknessEdge % array(1,iEdge)
do k=2,block % mesh % maxLevelEdgeTop % array(iEdge)
- uhSum = uhSum + block % state % time_levs(2) % state % layerThicknessEdge % array(k,iEdge) * uTemp(k)
- hSum = hSum + block % state % time_levs(2) % state % layerThicknessEdge % array(k,iEdge)
+ normalThicknessFluxSum = normalThicknessFluxSum + block % state % time_levs(2) % state % layerThicknessEdge % array(k,iEdge) * uTemp(k)
+ thicknessSum = thicknessSum + block % state % time_levs(2) % state % layerThicknessEdge % array(k,iEdge)
enddo
- block % state % time_levs(1) % state % GBtrForcing % array(iEdge) = split*uhSum/hSum/dt
+ block % state % time_levs(1) % state % GBtrForcing % array(iEdge) = split*normalThicknessFluxSum/thicknessSum/dt
do k=1,block % mesh % maxLevelEdgeTop % array(iEdge)
@@ -432,21 +432,21 @@
+ block % state % time_levs(oldBtrSubcycleTime) % state % sshSubcycle % array(cell2) )
! method 0: orig, works only without pbc:
- !hSum = sshEdge + block % mesh % refBottomDepthTopOfCell % array (block % mesh % maxLevelEdgeTop % array(iEdge)+1)
+ !thicknessSum = sshEdge + block % mesh % refBottomDepthTopOfCell % array (block % mesh % maxLevelEdgeTop % array(iEdge)+1)
! method 1, matches method 0 without pbcs, works with pbcs.
- hSum = sshEdge + min(block % mesh % bottomDepth % array(cell1), &
+ thicknessSum = sshEdge + min(block % mesh % bottomDepth % array(cell1), &
block % mesh % bottomDepth % array(cell2))
! method 2: may be better than method 1.
! Take average of full thickness at two neighboring cells.
- !hSum = sshEdge + 0.5 *( block % mesh % bottomDepth % array(cell1) &
+ !thicknessSum = sshEdge + 0.5 *( block % mesh % bottomDepth % array(cell1) &
! + block % mesh % bottomDepth % array(cell2) )
flux = ((1.0-config_btr_gam1_uWt1) * block % state % time_levs(oldBtrSubcycleTime) % state % uBtrSubcycle % array(iEdge) &
+ config_btr_gam1_uWt1 * block % state % time_levs(newBtrSubcycleTime) % state % uBtrSubcycle % array(iEdge)) &
- * hSum
+ * thicknessSum
block % tend % ssh % array(iCell) = block % tend % ssh % array(iCell) + block % mesh % edgeSignOncell % array(i, iCell) * flux &
* block % mesh % dvEdge % array(iEdge)
@@ -462,20 +462,20 @@
+ block % state % time_levs(oldBtrSubcycleTime) % state % sshSubcycle % array(cell2) )
! method 0: orig, works only without pbc:
- !hSum = sshEdge + block % mesh % refBottomDepthTopOfCell % array (block % mesh % maxLevelEdgeTop % array(iEdge)+1)
+ !thicknessSum = sshEdge + block % mesh % refBottomDepthTopOfCell % array (block % mesh % maxLevelEdgeTop % array(iEdge)+1)
! method 1, matches method 0 without pbcs, works with pbcs.
- hSum = sshEdge + min(block % mesh % bottomDepth % array(cell1), &
+ thicknessSum = sshEdge + min(block % mesh % bottomDepth % array(cell1), &
block % mesh % bottomDepth % array(cell2))
! method 2: may be better than method 1.
! take average of full thickness at two neighboring cells
- !hSum = sshEdge + 0.5 *( block % mesh % bottomDepth % array(cell1) &
+ !thicknessSum = sshEdge + 0.5 *( block % mesh % bottomDepth % array(cell1) &
! + block % mesh % bottomDepth % array(cell2) )
flux = ((1.0-config_btr_gam1_uWt1) * block % state % time_levs(oldBtrSubcycleTime) % state % uBtrSubcycle % array(iEdge) &
+ config_btr_gam1_uWt1 * block % state % time_levs(newBtrSubcycleTime) % state % uBtrSubcycle % array(iEdge)) &
- * hSum
+ * thicknessSum
block % state % time_levs(1) % state % FBtr % array(iEdge) = block % state % time_levs(1) % state % FBtr % array(iEdge) &
+ FBtr_coeff*flux
@@ -576,21 +576,21 @@
sshEdge = 0.5 * (sshCell1 + sshCell2)
! method 0: orig, works only without pbc:
- !hSum = sshEdge + block % mesh % refBottomDepthTopOfCell % array (block % mesh % maxLevelEdgeTop % array(iEdge)+1)
+ !thicknessSum = sshEdge + block % mesh % refBottomDepthTopOfCell % array (block % mesh % maxLevelEdgeTop % array(iEdge)+1)
! method 1, matches method 0 without pbcs, works with pbcs.
- hSum = sshEdge + min(block % mesh % bottomDepth % array(cell1), &
+ thicknessSum = sshEdge + min(block % mesh % bottomDepth % array(cell1), &
block % mesh % bottomDepth % array(cell2))
! method 2: may be better than method 1.
! take average of full thickness at two neighboring cells
- !hSum = sshEdge + 0.5 *( block % mesh % bottomDepth % array(cell1) &
+ !thicknessSum = sshEdge + 0.5 *( block % mesh % bottomDepth % array(cell1) &
! + block % mesh % bottomDepth % array(cell2) )
flux = ((1.0-config_btr_gam3_uWt2) * block % state % time_levs(oldBtrSubcycleTime) % state % uBtrSubcycle % array(iEdge) &
+ config_btr_gam3_uWt2 * block % state % time_levs(newBtrSubcycleTime) % state % uBtrSubcycle % array(iEdge)) &
- * hSum
+ * thicknessSum
block % tend % ssh % array(iCell) = block % tend % ssh % array(iCell) + block % mesh % edgeSignOnCell % array(i, iCell) * flux &
* block % mesh % dvEdge % array(iEdge)
@@ -610,20 +610,20 @@
sshEdge = 0.5 * (sshCell1 + sshCell2)
! method 0: orig, works only without pbc:
- !hSum = sshEdge + block % mesh % refBottomDepthTopOfCell % array (block % mesh % maxLevelEdgeTop % array(iEdge)+1)
+ !thicknessSum = sshEdge + block % mesh % refBottomDepthTopOfCell % array (block % mesh % maxLevelEdgeTop % array(iEdge)+1)
! method 1, matches method 0 without pbcs, works with pbcs.
- hSum = sshEdge + min(block % mesh % bottomDepth % array(cell1), &
+ thicknessSum = sshEdge + min(block % mesh % bottomDepth % array(cell1), &
block % mesh % bottomDepth % array(cell2))
! method 2, better, I think.
! take average of full thickness at two neighboring cells
- !hSum = sshEdge + 0.5 *( block % mesh % bottomDepth % array(cell1) &
+ !thicknessSum = sshEdge + 0.5 *( block % mesh % bottomDepth % array(cell1) &
! + block % mesh % bottomDepth % array(cell2) )
flux = ((1.0-config_btr_gam3_uWt2) * block % state % time_levs(oldBtrSubcycleTime) % state % uBtrSubcycle % array(iEdge) &
+ config_btr_gam3_uWt2 * block % state % time_levs(newBtrSubcycleTime) % state % uBtrSubcycle % array(iEdge)) &
- * hSum
+ * thicknessSum
block % state % time_levs(1) % state % FBtr % array(iEdge) = block % state % time_levs(1) % state % FBtr % array(iEdge) + flux
end do
@@ -725,18 +725,18 @@
+ block % state % time_levs(2) % state % uBcl % array(:,iEdge) &
+ block % state % time_levs(1) % state % uBolusGM % array(:,iEdge)
- ! hSum is initialized outside the loop because on land boundaries
- ! maxLevelEdgeTop=0, but I want to initialize hSum with a
+ ! thicknessSum is initialized outside the loop because on land boundaries
+ ! maxLevelEdgeTop=0, but I want to initialize thicknessSum with a
! nonzero value to avoid a NaN.
- uhSum = block % state % time_levs(2) % state % layerThicknessEdge % array(1,iEdge) * uTemp(1)
- hSum = block % state % time_levs(2) % state % layerThicknessEdge % array(1,iEdge)
+ normalThicknessFluxSum = block % state % time_levs(2) % state % layerThicknessEdge % array(1,iEdge) * uTemp(1)
+ thicknessSum = block % state % time_levs(2) % state % layerThicknessEdge % array(1,iEdge)
do k=2,block % mesh % maxLevelEdgeTop % array(iEdge)
- uhSum = uhSum + block % state % time_levs(2) % state % layerThicknessEdge % array(k,iEdge) * uTemp(k)
- hSum = hSum + block % state % time_levs(2) % state % layerThicknessEdge % array(k,iEdge)
+ normalThicknessFluxSum = normalThicknessFluxSum + block % state % time_levs(2) % state % layerThicknessEdge % array(k,iEdge) * uTemp(k)
+ thicknessSum = thicknessSum + block % state % time_levs(2) % state % layerThicknessEdge % array(k,iEdge)
enddo
- uCorr = ucorr_coef*(( block % state % time_levs(1) % state % FBtr % array(iEdge) - uhSum)/hSum)
+ uCorr = ucorr_coef*(( block % state % time_levs(1) % state % FBtr % array(iEdge) - normalThicknessFluxSum)/thicknessSum)
do k=1,block % mesh % nVertLevels
@@ -977,7 +977,7 @@
block % state % time_levs(2) % state % uReconstructMeridional % array &
)
- call mpas_reconstruct(block % mesh, block % mesh % u_src % array, &
+ call mpas_reconstruct(block % mesh, block % mesh % normalVelocityForcing % array, &
block % state % time_levs(2) % state % uSrcReconstructX % array, &
block % state % time_levs(2) % state % uSrcReconstructY % array, &
block % state % time_levs(2) % state % uSrcReconstructZ % array, &
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -240,11 +240,11 @@
!> advection of tracers.
!
!-----------------------------------------------------------------------
- subroutine mpas_ocn_tracer_advection_tend(tracers, uh, w, layerThickness, verticalCellSize, dt, grid, tend_layerThickness, tend)!{{{
+ subroutine mpas_ocn_tracer_advection_tend(tracers, normalThicknessFlux, w, layerThickness, verticalCellSize, dt, grid, tend_layerThickness, tend)!{{{
real (kind=RKIND), dimension(:,:,:), intent(inout) :: tend !< Input/Output: tracer tendency
real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input/Output: tracer values
- real (kind=RKIND), dimension(:,:), intent(in) :: uh !< Input: Thickness weighted horizontal velocity
+ real (kind=RKIND), dimension(:,:), intent(in) :: normalThicknessFlux !< Input: Thickness weighted horizontal velocity
real (kind=RKIND), dimension(:,:), intent(in) :: w !< Input: Vertical velocity
real (kind=RKIND), dimension(:,:), intent(in) :: layerThickness !< Input: Thickness field
real (kind=RKIND), dimension(:,:), intent(in) :: verticalCellSize !< Input: Distance between vertical interfaces of a cell
@@ -255,9 +255,9 @@
if(.not. tracerAdvOn) return
if(monotonicOn) then
- call mpas_ocn_tracer_advection_mono_tend(tracers, uh, w, layerThickness, verticalCellSize, dt, grid, tend_layerThickness, tend)
+ call mpas_ocn_tracer_advection_mono_tend(tracers, normalThicknessFlux, w, layerThickness, verticalCellSize, dt, grid, tend_layerThickness, tend)
else
- call mpas_ocn_tracer_advection_std_tend(tracers, uh, w, verticalCellSize, grid, tend)
+ call mpas_ocn_tracer_advection_std_tend(tracers, normalThicknessFlux, w, verticalCellSize, grid, tend)
endif
end subroutine mpas_ocn_tracer_advection_tend!}}}
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection_mono.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection_mono.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection_mono.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -43,7 +43,7 @@
!> Both horizontal and vertical.
!
!-----------------------------------------------------------------------
- subroutine mpas_ocn_tracer_advection_mono_tend(tracers, uh, w, layerThickness, verticalCellSize, dt, grid, tend_layerThickness, tend)!{{{
+ subroutine mpas_ocn_tracer_advection_mono_tend(tracers, normalThicknessFlux, w, layerThickness, verticalCellSize, dt, grid, tend_layerThickness, tend)!{{{
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Input: s - current model state
@@ -52,7 +52,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input: current tracer values
- real (kind=RKIND), dimension(:,:), intent(in) :: uh !< Input: Thichness weighted velocitiy
+ real (kind=RKIND), dimension(:,:), intent(in) :: normalThicknessFlux !< Input: Thichness weighted velocitiy
real (kind=RKIND), dimension(:,:), intent(in) :: w !< Input: Vertical velocitiy
real (kind=RKIND), dimension(:,:), intent(in) :: layerThickness !< Input: Thickness
real (kind=RKIND), dimension(:,:), intent(in) :: verticalCellSize !< Input: Distance between vertical interfaces of a cell
@@ -199,9 +199,9 @@
iCell = advCellsForEdge(i,iEdge)
do k = 1, maxLevelCell(iCell)
tracer_weight = lowOrderAdvectionMask(k, iEdge) * adv_coefs_2nd(i,iEdge) &
- + highOrderAdvectionMask(k, iEdge) * (adv_coefs(i,iEdge) + coef_3rd_order*sign(1.0_RKIND,uh(k,iEdge))*adv_coefs_3rd(i,iEdge))
+ + highOrderAdvectionMask(k, iEdge) * (adv_coefs(i,iEdge) + coef_3rd_order*sign(1.0_RKIND,normalThicknessFlux(k,iEdge))*adv_coefs_3rd(i,iEdge))
- tracer_weight = uh(k,iEdge)*tracer_weight
+ tracer_weight = normalThicknessFlux(k,iEdge)*tracer_weight
high_order_horiz_flux(k,iEdge) = high_order_horiz_flux(k,iEdge) + tracer_weight* tracer_cur(k,iCell)
end do ! k loop
end do ! i loop over nAdvCellsForEdge
@@ -247,7 +247,7 @@
invAreaCell2 = 1.0 / areaCell(cell2)
do k = 1, maxLevelEdgeTop(iEdge)
- flux_upwind = dvEdge(iEdge) * (max(0.0_RKIND,uh(k,iEdge))*tracer_cur(k,cell1) + min(0.0_RKIND,uh(k,iEdge))*tracer_cur(k,cell2))
+ flux_upwind = dvEdge(iEdge) * (max(0.0_RKIND,normalThicknessFlux(k,iEdge))*tracer_cur(k,cell1) + min(0.0_RKIND,normalThicknessFlux(k,iEdge))*tracer_cur(k,cell2))
high_order_horiz_flux(k,iEdge) = high_order_horiz_flux(k,iEdge) - flux_upwind
end do ! k loop
end do ! iEdge loop
@@ -259,7 +259,7 @@
cell1 = cellsOnEdge(1,iEdge)
cell2 = cellsOnEdge(2,iEdge)
do k = 1, maxLevelEdgeTop(iEdge)
- flux_upwind = dvEdge(iEdge) * (max(0.0_RKIND,uh(k,iEdge))*tracer_cur(k,cell1) + min(0.0_RKIND,uh(k,iEdge))*tracer_cur(k,cell2))
+ flux_upwind = dvEdge(iEdge) * (max(0.0_RKIND,normalThicknessFlux(k,iEdge))*tracer_cur(k,cell1) + min(0.0_RKIND,normalThicknessFlux(k,iEdge))*tracer_cur(k,cell2))
upwind_tendency(k,iCell) = upwind_tendency(k,iCell) + edgeSignOncell(i, iCell) * flux_upwind * invAreaCell1
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection_std.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection_std.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection_std.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -45,7 +45,7 @@
!> tracer advection tendencies.
!
!-----------------------------------------------------------------------
- subroutine mpas_ocn_tracer_advection_std_tend(tracers, uh, w, verticalCellSize, grid, tend)!{{{
+ subroutine mpas_ocn_tracer_advection_std_tend(tracers, normalThicknessFlux, w, verticalCellSize, grid, tend)!{{{
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Input: s - current model state
@@ -56,13 +56,13 @@
real (kind=RKIND), dimension(:,:,:), intent(inout) :: tend !< Input/Output: Tracer tendency
real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input: Tracer values
- real (kind=RKIND), dimension(:,:), intent(in) :: uh !< Input: Thickness weighted horizontal velocity
+ real (kind=RKIND), dimension(:,:), intent(in) :: normalThicknessFlux !< Input: Thickness weighted horizontal velocity
real (kind=RKIND), dimension(:,:), intent(in) :: w !< Input: Vertical Velocity
real (kind=RKIND), dimension(:,:), intent(in) :: verticalCellSize !< Input: Distance between vertical interfaces of a cell
type (mesh_type), intent(in) :: grid !< Input: Grid information
call mpas_timer_start("tracer-hadv", .false.)
- call mpas_ocn_tracer_advection_std_hadv_tend(tracers, uh, grid, tend)
+ call mpas_ocn_tracer_advection_std_hadv_tend(tracers, normalThicknessFlux, grid, tend)
call mpas_timer_stop("tracer-hadv")
call mpas_timer_start("tracer-vadv", .false.)
call mpas_ocn_tracer_advection_std_vadv_tend(tracers, w, verticalCellSize, grid, tend)
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection_std_hadv.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection_std_hadv.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_tracer_advection_std_hadv.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -45,10 +45,10 @@
!> This routine computes the tendency for 3rd order horizontal advection of tracers.
!
!-----------------------------------------------------------------------
- subroutine mpas_ocn_tracer_advection_std_hadv_tend(tracers, uh, grid, tend)!{{{
+ subroutine mpas_ocn_tracer_advection_std_hadv_tend(tracers, normalThicknessFlux, grid, tend)!{{{
real (kind=RKIND), dimension(:,:,:), intent(inout) :: tend !< Input/output: Tracer tendency
real (kind=RKIND), dimension(:,:,:), intent(in) :: tracers !< Input: Tracer values
- real (kind=RKIND), dimension(:,:), intent(in) :: uh !< Input: Thickness weighted horizontal velocity
+ real (kind=RKIND), dimension(:,:), intent(in) :: normalThicknessFlux !< Input: Thickness weighted horizontal velocity
type (mesh_type), intent(in) :: grid !< Input: Grid information
integer :: i, iCell, iEdge, k, iTracer, cell1, cell2
@@ -91,7 +91,7 @@
iCell = advCellsForEdge(i,iEdge)
do k=1,grid % nVertLevels
tracer_weight = lowOrderAdvectionMask(k, iEdge) * adv_coefs_2nd(i,iEdge) &
- + highOrderAdvectionMask(k, iEdge) * (adv_coefs(i,iEdge) + coef_3rd_order*sign(1.0_RKIND,uh(k,iEdge))*adv_coefs_3rd(i,iEdge))
+ + highOrderAdvectionMask(k, iEdge) * (adv_coefs(i,iEdge) + coef_3rd_order*sign(1.0_RKIND,normalThicknessFlux(k,iEdge))*adv_coefs_3rd(i,iEdge))
do iTracer=1,num_tracers
flux_arr(iTracer,k) = flux_arr(iTracer,k) + tracer_weight* tracers(iTracer,k,iCell)
end do
@@ -100,8 +100,8 @@
do k=1,grid % nVertLevels
do iTracer=1,num_tracers
- tend(iTracer,k,cell1) = tend(iTracer,k,cell1) - uh(k,iEdge)*flux_arr(iTracer,k)/areaCell(cell1)
- tend(iTracer,k,cell2) = tend(iTracer,k,cell2) + uh(k,iEdge)*flux_arr(iTracer,k)/areaCell(cell2)
+ tend(iTracer,k,cell1) = tend(iTracer,k,cell1) - normalThicknessFlux(k,iEdge)*flux_arr(iTracer,k)/areaCell(cell1)
+ tend(iTracer,k,cell2) = tend(iTracer,k,cell2) + normalThicknessFlux(k,iEdge)*flux_arr(iTracer,k)/areaCell(cell2)
end do
end do
end if
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_vel_forcing.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_vel_forcing.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_vel_forcing.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -68,7 +68,7 @@
!
!-----------------------------------------------------------------------
- subroutine ocn_vel_forcing_tend(grid, u, u_src, ke_edge, layerThicknessEdge, tend, err)!{{{
+ subroutine ocn_vel_forcing_tend(grid, u, normalVelocityForcing, ke_edge, layerThicknessEdge, tend, err)!{{{
!-----------------------------------------------------------------
!
@@ -80,7 +80,7 @@
u !< Input: velocity
real (kind=RKIND), dimension(:,:), intent(in) :: &
- u_src !< Input: wind stress
+ normalVelocityForcing !< Input: wind stress
real (kind=RKIND), dimension(:,:), intent(in) :: &
ke_edge !< Input: kinetic energy at edge
@@ -124,7 +124,7 @@
!
!-----------------------------------------------------------------
- call ocn_vel_forcing_windstress_tend(grid, u_src, layerThicknessEdge, tend, err1)
+ call ocn_vel_forcing_windstress_tend(grid, normalVelocityForcing, layerThicknessEdge, tend, err1)
call ocn_vel_forcing_rayleigh_tend(grid, u, tend, err2)
err = ior(err1, err2)
Modified: branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_vel_forcing_windstress.F
===================================================================
--- branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_vel_forcing_windstress.F        2013-04-03 16:37:04 UTC (rev 2715)
+++ branches/ocean_projects/variable_name_change/src/core_ocean/mpas_ocn_vel_forcing_windstress.F        2013-04-03 16:58:43 UTC (rev 2716)
@@ -62,7 +62,7 @@
!
!-----------------------------------------------------------------------
- subroutine ocn_vel_forcing_windstress_tend(grid, u_src, layerThicknessEdge, tend, err)!{{{
+ subroutine ocn_vel_forcing_windstress_tend(grid, normalVelocityForcing, layerThicknessEdge, tend, err)!{{{
!-----------------------------------------------------------------
!
@@ -71,7 +71,7 @@
!-----------------------------------------------------------------
real (kind=RKIND), dimension(:,:), intent(in) :: &
- u_src !< Input: wind stress
+ normalVelocityForcing !< Input: wind stress
real (kind=RKIND), dimension(:,:), intent(in) :: &
layerThicknessEdge !< Input: thickness at edge
@@ -130,7 +130,7 @@
do k = 1,min(maxLevelEdgeTop(iEdge),1)
! forcing in top layer only
- tend(k,iEdge) = tend(k,iEdge) + edgeMask(k, iEdge) * (u_src(k,iEdge) / config_density0 / layerThicknessEdge(k,iEdge))
+ tend(k,iEdge) = tend(k,iEdge) + edgeMask(k, iEdge) * (normalVelocityForcing(k,iEdge) / config_density0 / layerThicknessEdge(k,iEdge))
enddo
enddo
</font>
</pre>