From f0ad6948c338bc32aa28f28c1470272ab05dd430 Mon Sep 17 00:00:00 2001 From: Trevor Hillebrand Date: Tue, 12 Sep 2023 09:41:21 -0700 Subject: [PATCH 1/2] Add non-dynamic cells to openOceanMask to fix calving bug Add non-dynamic cells to openOceanMask to fix bug that shut down calving when there was a non-dynamic cell between the dynamic margin and the open ocean. This is slightly inconsistent with the variable name "openOceanMask", but the other implementation option involved looping over neighbors of neighbors, which would be messier and more expensive. This also should fix the edge case in which a single non- dynamic cell shuts down calving in an entire embayment between two areas of floating ice, which could happen at Thwaites, for instance. --- .../mpas-albany-landice/src/mode_forward/mpas_li_calving.F | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/mpas-albany-landice/src/mode_forward/mpas_li_calving.F b/components/mpas-albany-landice/src/mode_forward/mpas_li_calving.F index d6fee67ee637..36302a1a78c3 100644 --- a/components/mpas-albany-landice/src/mode_forward/mpas_li_calving.F +++ b/components/mpas-albany-landice/src/mode_forward/mpas_li_calving.F @@ -3058,7 +3058,7 @@ subroutine find_open_ocean(domain, openOceanMask, err) integer, dimension(:,:), pointer :: cellsOnCell ! list of cells that neighbor each cell integer, dimension(:), pointer :: nEdgesOnCell type (field1dInteger), pointer :: seedMaskField, growMaskField - integer, dimension(:), pointer :: seedMask, growMask + integer, dimension(:), pointer :: seedMask, growMask, cellMask real (kind=RKIND), dimension(:), pointer :: bedTopography, thickness real (kind=RKIND), pointer :: config_sea_level integer, pointer :: nCells @@ -3076,6 +3076,7 @@ subroutine find_open_ocean(domain, openOceanMask, err) call mpas_pool_get_array(meshPool, 'cellsOnCell', cellsOnCell) call mpas_pool_get_array(geometryPool, 'bedTopography', bedTopography) call mpas_pool_get_array(geometryPool, 'thickness', thickness) + call mpas_pool_get_array(geometryPool, 'cellMask', cellMask) call mpas_pool_get_config(liConfigs, 'config_sea_level', config_sea_level) call mpas_pool_get_field(scratchPool, 'seedMask', seedMaskField) @@ -3088,8 +3089,8 @@ subroutine find_open_ocean(domain, openOceanMask, err) seedMask(:) = 0 growMask(:) = 0 do iCell = 1, nCells - if ((bedTopography(iCell) < config_sea_level) .and. (thickness(iCell) == 0.0_RKIND)) then - growMask(iCell) = 1 + if ((bedTopography(iCell) < config_sea_level) .and. ( .not. li_mask_is_dynamic_ice(cellMask(iCell)) ) ) then + growMask(iCell) = 1 ! includes floating non-dynamic cells do iNeighbor = 1, nEdgesOnCell(iCell) jCell = cellsOnCell(iNeighbor, iCell) if (jCell == nCells + 1) then From 4b668c766118e155e4d84597a45b64db49a3bdba Mon Sep 17 00:00:00 2001 From: Trevor Hillebrand Date: Tue, 12 Sep 2023 09:52:58 -0700 Subject: [PATCH 2/2] Update description of openOceanMask in Registry.xml Update description of openOceanMask in Registry.xml to explain that this includes floating non-dynamic cells. --- components/mpas-albany-landice/src/Registry.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mpas-albany-landice/src/Registry.xml b/components/mpas-albany-landice/src/Registry.xml index a6cf3e947a81..b6c9b54980d9 100644 --- a/components/mpas-albany-landice/src/Registry.xml +++ b/components/mpas-albany-landice/src/Registry.xml @@ -1225,7 +1225,7 @@ is the value of that variable from the *previous* time level! description="mask of grid cells that should be calved. 0=no calving, 1=should be calved" />