Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/core_seaice/shared/mpas_seaice_berg_velocity_solver.F
Original file line number Diff line number Diff line change
Expand Up @@ -1846,6 +1846,10 @@ subroutine seaice_berg_forcing_for_ice(domain)
call MPAS_pool_get_array(bergVelocitySolverPool, "bergStressU", bergStressU)
call MPAS_pool_get_array(bergVelocitySolverPool, "bergStressV", bergStressV)

! initialize
bergStressU(:) = 0.0_RKIND
bergStressV(:) = 0.0_RKIND

! interpolate cell to vertex
call seaice_interpolate_cell_to_vertex(&
meshPool, &
Expand Down
15 changes: 11 additions & 4 deletions src/core_seaice/shared/mpas_seaice_velocity_solver.F
Original file line number Diff line number Diff line change
Expand Up @@ -2731,7 +2731,8 @@ subroutine solve_velocity_revised(domain)

type(MPAS_pool_type), pointer :: &
velocitySolverPool, &
icestatePool
icestatePool, &
bergVelocitySolverPool

integer, dimension(:), pointer :: &
solveVelocity
Expand All @@ -2751,7 +2752,9 @@ subroutine solve_velocity_revised(domain)
surfaceTiltForceV, &
oceanStressU, &
oceanStressV, &
oceanStressCoeff
oceanStressCoeff, &
bergStressU, &
bergStressV

real(kind=RKIND), pointer :: &
dynamicsTimeStep
Expand All @@ -2778,6 +2781,7 @@ subroutine solve_velocity_revised(domain)

call MPAS_pool_get_subpool(block % structs, "velocity_solver", velocitySolverPool)
call MPAS_pool_get_subpool(block % structs, "icestate", icestatePool)
call MPAS_pool_get_subpool(block % structs, "berg_velocity_solver", bergVelocitySolverPool)

call MPAS_pool_get_array(icestatePool, "totalMassVertex", totalMassVertex)

Expand All @@ -2798,6 +2802,9 @@ subroutine solve_velocity_revised(domain)
call MPAS_pool_get_array(velocitySolverPool, "oceanStressCoeff", oceanStressCoeff)
call MPAS_pool_get_array(velocitySolverPool, "dynamicsTimeStep", dynamicsTimeStep)

call MPAS_pool_get_array(bergVelocitySolverPool, "bergStressU", bergStressU)
call MPAS_pool_get_array(bergVelocitySolverPool, "bergStressV", bergStressV)

do iVertex = 1, nVerticesSolve

if (solveVelocity(iVertex) == 1) then
Expand All @@ -2816,12 +2823,12 @@ subroutine solve_velocity_revised(domain)

! right hand side of matrix solve
rightHandSide(1) = stressDivergenceU(iVertex) + airStressVertexU(iVertex) + surfaceTiltForceU(iVertex) + &
oceanStressCoeff(iVertex) * oceanStressU(iVertex) + &
oceanStressCoeff(iVertex) * oceanStressU(iVertex) + bergStressU(iVertex) + &
Copy link
Owner Author

@darincomeau darincomeau May 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The terms bergStressU, bergStressV are in units kg m s^{-2}, and I believe this (rightHandSide) is the appropriate place to put them.

These terms are calculated when namelist config_berg_seaice_interaction = .true., and are calculated in the subroutine seaice_run_berg_postdynamics.

(totalMassVertex(iVertex) * (numericalInertiaCoefficient * uVelocity(iVertex) + &
uVelocityInitial(iVertex))) / dynamicsTimeStep

rightHandSide(2) = stressDivergenceV(iVertex) + airStressVertexV(iVertex) + surfaceTiltForceV(iVertex) + &
oceanStressCoeff(iVertex) * oceanStressV(iVertex) + &
oceanStressCoeff(iVertex) * oceanStressV(iVertex) + bergStressV(iVertex) + &
(totalMassVertex(iVertex) * (numericalInertiaCoefficient * vVelocity(iVertex) + &
vVelocityInitial(iVertex))) / dynamicsTimeStep

Expand Down