Skip to content

Commit

Permalink
Don't set ssh from landIceDraft in global ocean init
Browse files Browse the repository at this point in the history
Instead, it will be read in from the topography file directly,
meaning it can be updated (e.g. from ssh adjustment).
  • Loading branch information
xylar committed Apr 29, 2024
1 parent 21d0f25 commit 114c9a3
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ subroutine ocn_init_setup_global_ocean(domain, iErr)!{{{
real (kind=RKIND), dimension(:, :), pointer :: normalVelocity
real (kind=RKIND), dimension(:, :, :), pointer :: ecosysTracers, activeTracers, debugTracers, &
DMSTracers, MacroMoleculesTracers
integer, pointer :: nVertLevels, nCellsSolve, tracerIndex
integer, pointer :: nVertLevels, nCellsSolve, nCells, tracerIndex
integer :: iCell, k, iTracer
integer, dimension(3) :: indexField

Expand Down Expand Up @@ -964,8 +964,7 @@ subroutine ocn_init_setup_global_ocean_interpolate_land_ice_topography(domain, i
real (kind=RKIND), dimension(:), pointer :: landIceDraft, &
landIcePressure, &
landIceFraction, &
landIceFloatingFraction, &
ssh
landIceFloatingFraction

integer, pointer :: nCells
integer, dimension(:), pointer :: maxLevelCell, landIceMask, landIceFloatingMask
Expand Down Expand Up @@ -1007,7 +1006,6 @@ subroutine ocn_init_setup_global_ocean_interpolate_land_ice_topography(domain, i
call mpas_pool_get_array(landIceInitPool, 'landIcePressureObserved', landIcePressureObserved)
call mpas_pool_get_array(landIceInitPool, 'landIceFracObserved', landIceFracObserved)
call mpas_pool_get_array(landIceInitPool, 'landIceFloatingFracObserved', landIceFloatingFracObserved)
call mpas_pool_get_array(statePool, 'ssh', ssh, 1)
call mpas_pool_get_array(forcingPool, 'landIceMask', landIceMask)
call mpas_pool_get_array(forcingPool, 'landIceFloatingMask', landIceFloatingMask)
call mpas_pool_get_array(forcingPool, 'landIceDraft', landIceDraft)
Expand All @@ -1020,7 +1018,6 @@ subroutine ocn_init_setup_global_ocean_interpolate_land_ice_topography(domain, i
'indicates that this field is missing in the initial condition file (e.g. ' // &
'because it is meant for an older E3SM version).', MPAS_LOG_CRIT)
endif
ssh(:) = 0.0_RKIND
landIceFraction(:) = 0.0_RKIND
landIceDraft(:) = 0.0_RKIND
landIcePressure(:) = 0.0_RKIND
Expand All @@ -1038,7 +1035,6 @@ subroutine ocn_init_setup_global_ocean_interpolate_land_ice_topography(domain, i
end if

landIceDraft(iCell) = landIceDraftObserved(iCell)
ssh(iCell) = landIceDraft(iCell)
landIcePressure(iCell) = landIcePressureObserved(iCell)
if (landIcePressure(iCell) > 0.0_RKIND) then
modifyLandIcePressureMask(iCell) = 1
Expand Down

0 comments on commit 114c9a3

Please sign in to comment.