Skip to content

Commit

Permalink
Generalize layerThicknessEdgeFlux for all thickness advection
Browse files Browse the repository at this point in the history
Generalize layerThicknessEdgeFlux for all thickness advection, rather
than just using it for FCT.
  • Loading branch information
trhille committed Oct 4, 2023
1 parent 4eb8b82 commit 8be7fbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/mpas-albany-landice/src/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ is the value of that variable from the *previous* time level!
description="horizonal velocity, normal component to an edge, layer midpoint"
/>
<var name="layerThicknessEdgeFlux" type="real" dimensions="nVertLevels nEdges Time" units="m^2 s^{-1}"
description="layer-normal thickness flux on edges for higher-order advection"
description="layer-normal thickness flux on edges"
/>
<var name="normalVelocityInitial" type="real" dimensions="nVertInterfaces nEdges Time" units="m s^{-1}"
description="horizonal velocity, normal component to an edge, computed at initialization"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ subroutine li_advection_thickness_tracers(&

! save old copycellMask for determining cells changing from grounded to floating and vice versa
cellMaskTemporaryField % array(:) = cellMask(:)
layerThicknessEdgeFlux(:,:) = 0.0_RKIND

!-----------------------------------------------------------------
! Horizontal transport of thickness and tracers
Expand Down Expand Up @@ -414,7 +415,6 @@ subroutine li_advection_thickness_tracers(&
(trim(config_tracer_advection) .eq. 'fct' ) ) then
allocate(tend(nTracers,nVertLevels,nCells+1))
tend(:,:,:) = 0.0_RKIND
layerThicknessEdgeFlux(:,:) = 0.0_RKIND
endif

! Transport thickness and tracers
Expand Down Expand Up @@ -648,8 +648,8 @@ subroutine li_advection_thickness_tracers(&
enddo
else
do k = 1, nVertLevels
thicknessFluxEdge = layerNormalVelocity(k,iEdge) * dvEdge(iEdge) * layerThicknessEdge(k,iEdge)
fluxAcrossGroundingLine(iEdge) = fluxAcrossGroundingLine(iEdge) + GLfluxSign * thicknessFluxEdge / dvEdge(iEdge)
layerThicknessEdgeFlux(k,iEdge) = layerNormalVelocity(k,iEdge) * layerThicknessEdge(k,iEdge)
fluxAcrossGroundingLine(iEdge) = fluxAcrossGroundingLine(iEdge) + GLfluxSign * layerThicknessEdgeFlux(k,iEdge)
enddo
endif
! assign to grounded cell in fluxAcrossGroundingLineOnCells
Expand Down

0 comments on commit 8be7fbb

Please sign in to comment.