From d33a72f144e5c7b9c37e65305d564c0a878a7226 Mon Sep 17 00:00:00 2001 From: Trevor Hillebrand Date: Tue, 29 Oct 2024 15:52:43 -0700 Subject: [PATCH] Use layerNormalVelocity to calculate layerThicknessEdge Use layerNormalVelocity instead of normalVelocity to calculate layerThicknessEdge. --- .../src/mode_forward/mpas_li_time_integration_fe_rk.F | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/mpas-albany-landice/src/mode_forward/mpas_li_time_integration_fe_rk.F b/components/mpas-albany-landice/src/mode_forward/mpas_li_time_integration_fe_rk.F index 148dda8ddff2..b7e059bd8add 100644 --- a/components/mpas-albany-landice/src/mode_forward/mpas_li_time_integration_fe_rk.F +++ b/components/mpas-albany-landice/src/mode_forward/mpas_li_time_integration_fe_rk.F @@ -1458,7 +1458,7 @@ subroutine calculate_layerThicknessEdge(meshPool, geometryPool, velocityPool, er ! local variables !----------------------------------------------------------------- real (kind=RKIND), dimension(:), pointer :: thickness - real (kind=RKIND), dimension(:,:), pointer :: layerThickness, layerThicknessEdge, normalVelocity + real (kind=RKIND), dimension(:,:), pointer :: layerThickness, layerThicknessEdge, layerNormalVelocity integer, dimension(:,:), pointer :: cellsOnEdge integer, pointer :: nEdges, nVertLevels integer :: iEdge, cell1, cell2, k @@ -1472,7 +1472,7 @@ subroutine calculate_layerThicknessEdge(meshPool, geometryPool, velocityPool, er call mpas_pool_get_array(geometryPool, 'thickness', thickness, timeLevel = 1) call mpas_pool_get_array(geometryPool, 'layerThickness', layerThickness, timeLevel = 1) call mpas_pool_get_array(geometryPool, 'layerThicknessEdge', layerThicknessEdge) - call mpas_pool_get_array(velocityPool, 'normalVelocity', normalVelocity) + call mpas_pool_get_array(velocityPool, 'layerNormalVelocity', layerNormalVelocity) ! Note: SIA velocity solver uses its own local calculation of h_edge that is always 2nd order. ! Note: ocn_diagnostic_solve in mpas_ocn_tendency.F has 2, 3, & 4th order calculations for h_edge that can be used. @@ -1486,7 +1486,7 @@ subroutine calculate_layerThicknessEdge(meshPool, geometryPool, velocityPool, er cell2 = cellsOnEdge(2,iEdge) do k=1, nVertLevels ! Calculate h on edges using first order - VelSign = sign(1.0_RKIND, normalVelocity(k, iEdge)) + VelSign = sign(1.0_RKIND, layerNormalVelocity(k, iEdge)) layerThicknessEdge(k,iEdge) = max(VelSign * layerThickness(k, cell1), & VelSign * (-1.0_RKIND) * layerThickness(k, cell2)) ! + velocity goes from index 1 to 2 in the cellsOnEdge array.