Skip to content

Commit

Permalink
Rename modifyLandIcePressureMask to sshAdjustmentMask
Browse files Browse the repository at this point in the history
this is a more accurate description for how it is uses, since it
can determine where we modify either ssh or landIcePressure,
depending on the approach.
  • Loading branch information
xylar committed May 2, 2024
1 parent e28a1a1 commit cb9ca7e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions components/mpas-ocean/src/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2824,8 +2824,8 @@
<var name="pressure" type="real" dimensions="nVertLevels nCells Time" units="N m^-2"
description="pressure used in the momentum equation"
/>
<var name="modifyLandIcePressureMask" type="integer" dimensions="nCells Time"
description="A mask indicating where landIcePressure can be modified during iterative init. The mask is 1 under (and perhaps near) ice shelves and 0 elsewhere."
<var name="sshAdjustmentMask" type="integer" dimensions="nCells Time"
description="A mask indicating where ssh or landIcePressure can be modified during iterative init. The mask is 1 under (and perhaps near) ice shelves and 0 elsewhere."
packages="initMode"
/>
<var name="normalTransportVelocity" type="real" dimensions="nVertLevels nEdges Time" units="m s^-1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ subroutine ocn_init_setup_global_ocean_interpolate_land_ice_topography(domain, i
landIceFraction(:) = 0.0_RKIND
landIceDraft(:) = 0.0_RKIND
landIcePressure(:) = 0.0_RKIND
modifyLandIcePressureMask(:) = 0
sshAdjustmentMask(:) = 0
do iCell = 1, nCells
! nothing to do here if the cell is land
if (maxLevelCell(iCell) <= 0) cycle
Expand All @@ -1037,7 +1037,7 @@ subroutine ocn_init_setup_global_ocean_interpolate_land_ice_topography(domain, i
landIceDraft(iCell) = landIceDraftObserved(iCell)
landIcePressure(iCell) = landIcePressureObserved(iCell)
if (landIcePressure(iCell) > 0.0_RKIND) then
modifyLandIcePressureMask(iCell) = 1
sshAdjustmentMask(iCell) = 1
end if
end do

Expand Down
4 changes: 2 additions & 2 deletions components/mpas-ocean/src/mode_init/mpas_ocn_init_isomip.F
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ subroutine ocn_init_setup_isomip(domain, iErr)!{{{

landIceFraction(:) = 0.0_RKIND
landIceSurfaceTemperature(:) = -25.0_RKIND !doesn't matter because ice is insulating
modifyLandIcePressureMask(:) = 0
sshAdjustmentMask(:) = 0
landIceMask(:) = 0
Expand All @@ -301,7 +301,7 @@ subroutine ocn_init_setup_isomip(domain, iErr)!{{{
end if
if(ssh(iCell) < 0.0_RKIND) then
modifyLandIcePressureMask(iCell) = 1
sshAdjustmentMask(iCell) = 1
end if
if(.not. associated(activeTracers)) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,9 @@ subroutine ocn_init_setup_isomip_plus_interpolate_topo(domain, iErr)!{{{

do iCell = 1,nCells
if(landIceFraction(iCell) > 0.01_RKIND) then
modifyLandIcePressureMask(iCell) = 1
sshAdjustmentMask(iCell) = 1
else
modifyLandIcePressureMask(iCell) = 0
sshAdjustmentMask(iCell) = 0
end if
end do

Expand Down Expand Up @@ -605,7 +605,7 @@ subroutine ocn_init_setup_isomip_plus_interpolate_topo(domain, iErr)!{{{
ssh(iCell) = 0.0_RKIND
landIceFraction(iCell) = 0.0_RKIND
landIceMask(iCell) = 0
modifyLandIcePressureMask(iCell) = 0
sshAdjustmentMask(iCell) = 0
end if
end do !iCell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ subroutine ocn_init_ssh_and_landIcePressure_balance(domain, iErr)!{{{
end if

do iCell = 1, nCells
if(modifyLandIcePressureMask(iCell) == 0) then
if(sshAdjustmentMask(iCell) == 0) then
ssh(iCell) = 0.0_RKIND
landIcePressure(iCell) = 0.0_RKIND

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ subroutine ocn_init_setup_sub_ice_shelf_2D(domain, iErr)!{{{

if(associated(landIceFraction)) &
landIceFraction(:) = 0.0_RKIND
modifyLandIcePressureMask(:) = 0
sshAdjustmentMask(:) = 0
if(associated(landIceMask)) &
landIceMask(:) = 0

Expand All @@ -241,7 +241,7 @@ subroutine ocn_init_setup_sub_ice_shelf_2D(domain, iErr)!{{{
ssh(iCell) = -config_sub_ice_shelf_2D_bottom_depth + totalSubIceThickness

if(ssh(iCell) < 0.0_RKIND) then
modifyLandIcePressureMask(iCell) = 1
sshAdjustmentMask(iCell) = 1
end if
end do

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ module ocn_diagnostics_variables
integer, dimension(:), pointer :: smoothingMask
real (kind=RKIND), dimension(:,:), pointer :: verticalStretch

integer, dimension(:), pointer :: modifyLandIcePressureMask
integer, dimension(:), pointer :: sshAdjustmentMask

real (kind=RKIND), dimension(:,:), pointer :: velocityMeridional
real (kind=RKIND), dimension(:,:), pointer :: velocityZonal
Expand Down Expand Up @@ -636,8 +636,8 @@ subroutine ocn_diagnostics_variables_init(domain, jenkinsOn, hollandJenkinsOn, e
call mpas_pool_get_field(diagnosticsPool, 'verticalStretch', &
verticalStretchField, 1)
call mpas_pool_get_array(diagnosticsPool, &
'modifyLandIcePressureMask', &
modifyLandIcePressureMask)
'sshAdjustmentMask', &
sshAdjustmentMask)
call mpas_pool_get_array(diagnosticsPool, 'indMLD', indMLD)
call mpas_pool_get_array(diagnosticsPool, 'dThreshMLD', dThreshMLD)
call mpas_pool_get_array(diagnosticsPool, 'surfacePressure', &
Expand Down

0 comments on commit cb9ca7e

Please sign in to comment.