@@ -195,13 +195,10 @@ subroutine li_SGH_init(domain, err)
195195
196196 block => domain % blocklist
197197 do while (associated(block))
198- call mpas_pool_get_subpool(block % structs, ' mesh' , meshPool)
199198 call mpas_pool_get_subpool(block % structs, ' hydro' , hydroPool)
200199 call mpas_pool_get_subpool(block % structs, ' geometry' , geometryPool)
201- call mpas_pool_get_subpool(block % structs, ' velocity' , velocityPool)
202200
203201 call mpas_pool_get_array(hydroPool, ' waterPressure' , waterPressure)
204- call mpas_pool_get_array(hydroPool, ' deltatSGH' , deltatSGH)
205202 call mpas_pool_get_array(hydroPool, ' iceThicknessHydro' , iceThicknessHydro)
206203
207204 waterPressure = max(0.0_RKIND, waterPressure)
@@ -225,7 +222,7 @@ subroutine li_SGH_init(domain, err)
225222 block => block % next
226223 end do
227224
228- !updates halos for waterPressure
225+ !updates halos for waterPressureSmooth
229226 call mpas_timer_start("halo updates")
230227 call mpas_dmpar_field_halo_exch(domain, ' waterPressureSmooth' )
231228 call mpas_timer_stop("halo updates")
@@ -661,7 +658,7 @@ subroutine li_SGH_solve(domain, err)
661658 call calc_pressure(block, err_tmp)
662659 err = ior(err, err_tmp)
663660
664- call calc_waterPressureSmooth(block, err_tmp) !adjust ice thickness along boundaries
661+ call calc_waterPressureSmooth(block, err_tmp) !compute smoothed version of waterPressure
665662 err = ior(err,err_tmp)
666663
667664 block => block % next
@@ -830,7 +827,6 @@ subroutine calc_edge_quantities(block, err)
830827 integer, dimension(:), pointer :: edgeMask
831828 integer, dimension(:,:), pointer :: cellsOnEdge
832829 integer, dimension(:,:), pointer :: edgesOnCell
833- integer, dimension(:,:), pointer :: cellsOnCell
834830 integer, dimension(:,:), pointer :: verticesOnEdge
835831 integer, dimension(:,:), pointer :: baryCellsOnVertex
836832 real (kind=RKIND), dimension(:,:), pointer :: baryWeightsOnVertex
@@ -850,10 +846,6 @@ subroutine calc_edge_quantities(block, err)
850846 real (kind=RKIND) :: velSign
851847 integer :: numGroundedCells
852848 integer :: err_tmp
853- integer :: isMarineMargin
854- integer :: edgeNum
855- integer :: iNeighbor
856- integer :: numCells
857849
858850 err = 0
859851 err_tmp = 0
@@ -891,7 +883,6 @@ subroutine calc_edge_quantities(block, err)
891883 call mpas_pool_get_array(geometryPool, ' cellMask' , cellMask)
892884 call mpas_pool_get_array(meshPool, ' cellsOnEdge' , cellsOnEdge)
893885 call mpas_pool_get_array(meshPool, ' edgesOnCell' , edgesOnCell)
894- call mpas_pool_get_array(meshPool, ' cellsOnCell' , cellsOnCell)
895886 call mpas_pool_get_array(meshPool, ' edgeSignOnCell' , edgeSignOnCell)
896887 call mpas_pool_get_array(hydroPool, ' hydropotentialBaseSlopeTangent' , hydropotentialBaseSlopeTangent)
897888 call mpas_pool_get_array(hydroPool, ' hydropotentialSlopeTangent' , hydropotentialSlopeTangent)
@@ -2215,7 +2206,7 @@ subroutine ocean_connection_N(domain)
22152206 type (mpas_pool_type), pointer :: geometryPool
22162207 real (kind=RKIND), dimension(:), pointer :: bedTopography
22172208 real (kind=RKIND), dimension(:), pointer :: effectivePressure
2218- real (kind=RKIND), dimension(:), pointer :: iceThicknessHydro
2209+ real (kind=RKIND), dimension(:), pointer :: thickness
22192210 real (kind=RKIND), pointer :: rhoi, rhoo
22202211
22212212 ! Calculate N assuming perfect ocean connection
@@ -2229,9 +2220,9 @@ subroutine ocean_connection_N(domain)
22292220 call mpas_pool_get_subpool(block % structs, ' hydro' , hydroPool)
22302221 call mpas_pool_get_array(geometryPool, ' bedTopography' , bedTopography)
22312222 call mpas_pool_get_array(hydroPool, ' effectivePressure' , effectivePressure)
2232- call mpas_pool_get_array(hydroPool, ' iceThicknessHydro' , iceThicknessHydro )
2223+ call mpas_pool_get_array(hydroPool, ' iceThicknessHydro' , thickness )
22332224
2234- effectivePressure = rhoi * gravity * iceThicknessHydro - rhoi * gravity * max(0.0_RKIND, -1.0_RKIND * rhoo/rhoi * bedTopography)
2225+ effectivePressure = rhoi * gravity * thickness - rhoi * gravity * max(0.0_RKIND, -1.0_RKIND * rhoo/rhoi * bedTopography)
22352226 effectivePressure = max(effectivePressure, 0.0_RKIND) ! This is just to zero out N in the open ocean to avoid confusion
22362227
22372228 block => block % next
@@ -2398,7 +2389,6 @@ subroutine calc_iceThicknessHydro(block, err)
23982389 real (kind=RKIND), dimension(:), pointer :: thickness
23992390 real (kind=RKIND), dimension(:), pointer :: bedTopography
24002391 real (kind=RKIND), dimension(:), pointer :: iceThicknessHydro
2401- real (kind=RKIND), dimension(:), pointer :: upperSurfaceHydro
24022392 real (kind=RKIND), dimension(:), pointer :: upperSurface
24032393 integer, dimension(:,:), pointer :: cellsOnCell
24042394 integer, dimension(:), pointer :: cellMask
@@ -2427,7 +2417,6 @@ subroutine calc_iceThicknessHydro(block, err)
24272417 call mpas_pool_get_array(geometryPool, ' bedTopography' , bedTopography)
24282418 call mpas_pool_get_array(geometryPool, ' cellMask' , cellMask)
24292419 call mpas_pool_get_array(hydroPool, ' iceThicknessHydro' , iceThicknessHydro)
2430- call mpas_pool_get_array(hydroPool, ' upperSurfaceHydro' , upperSurfaceHydro)
24312420 call mpas_pool_get_array(geometryPool, ' upperSurface' , upperSurface)
24322421 call mpas_pool_get_array(meshPool, ' nEdgesOnCell' , nEdgesOnCell)
24332422 call mpas_pool_get_dimension(meshPool, ' nCells' , nCells)
@@ -2499,8 +2488,6 @@ subroutine calc_iceThicknessHydro(block, err)
24992488 enddo
25002489 endif
25012490
2502- upperSurfaceHydro = iceThicknessHydro + bedTopography
2503-
25042491 end subroutine calc_iceThicknessHydro
25052492
25062493!***********************************************************************
@@ -2679,7 +2666,7 @@ subroutine calc_waterPressureSmooth(block,err)
26792666 do jEdge = 1, nEdgesOnCell(iCell)
26802667 iNeighbor = cellsOnCell(jEdge,iCell)
26812668
2682- if ((li_mask_is_grounded_ice(cellMask(iNeighbor)))) then
2669+ if ((li_mask_is_grounded_ice(cellMask(iNeighbor)))) then !only include GROUNDED neighboring cells in smoothing
26832670
26842671 totalPressure = totalPressure + pressureField(iNeighbor)*areaCell(iNeighbor)
26852672
0 commit comments