Skip to content

Commit 7b031c9

Browse files
committed
Make treatment of basal mass bal components consistent
Grounded and floating components of sfcMassBal were using the mass balance mask fields, while basalMassBal components used cellMask. Make both of them use mass balance masks.
1 parent c655d4f commit 7b031c9

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

components/mpas-albany-landice/src/mode_forward/mpas_li_advection.F

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,27 +1052,20 @@ subroutine apply_mass_balance(&
10521052
where ( (groundedMaskForMassBudget .eq. 1) .or. (bedTopography > config_sea_level) )
10531053
groundedSfcMassBalApplied = sfcMassBalApplied
10541054
floatingSfcMassBalApplied = 0.0_RKIND
1055+
groundedBasalMassBalApplied = basalMassBalApplied
1056+
floatingBasalMassBalApplied = 0.0_RKIND
10551057
elsewhere (floatingMaskForMassBudget .eq. 1)
10561058
groundedSfcMassBalApplied = 0.0_RKIND
10571059
floatingSfcMassBalApplied = sfcMassBalApplied
1060+
groundedBasalMassBalApplied = 0.0_RKIND
1061+
floatingBasalMassBalApplied = basalMassBalApplied
10581062
elsewhere
10591063
groundedSfcMassBalApplied = 0.0_RKIND
10601064
floatingSfcMassBalApplied = 0.0_RKIND
1065+
groundedBasalMassBalApplied = 0.0_RKIND
1066+
floatingBasalMassBalApplied = 0.0_RKIND
10611067
end where
10621068
1063-
do iCell = 1, nCells
1064-
if (li_mask_is_grounded_ice(cellMask(iCell))) then
1065-
groundedBasalMassBalApplied(iCell) = basalMassBalApplied(iCell)
1066-
floatingBasalMassBalApplied(iCell) = 0.0_RKIND
1067-
elseif (li_mask_is_floating_ice(cellMask(iCell))) then
1068-
floatingBasalMassBalApplied(iCell) = basalMassBalApplied(iCell)
1069-
groundedBasalMassBalApplied(iCell) = 0.0_RKIND
1070-
else
1071-
groundedBasalMassBalApplied(iCell) = 0.0_RKIND
1072-
floatingBasalMassBalApplied(iCell) = 0.0_RKIND
1073-
endif
1074-
enddo
1075-
10761069
deallocate(thckTracerProducts)
10771070
10781071
end subroutine apply_mass_balance

0 commit comments

Comments
 (0)