Skip to content

Commit

Permalink
Correct indexing for critical depth
Browse files Browse the repository at this point in the history
This uses the layer that the desired depth is in, rather than the layer
above it.

Co-authored-by: Xylar Asay-Davis <[email protected]>
  • Loading branch information
matthewhoffman and xylar committed Aug 20, 2024
1 parent d9f9c8e commit 5c1ac5a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,10 @@ subroutine ocn_time_average_coupled_accumulate(statePool, forcingPool, timeLevel

! find vertical level that is just above the critical depth reference level
! this does not account for depression due to ice shelf cavities or sea ice
iLevelCritDepth = 1
iLevelCritDepth = nVertLevels ! default to deepest layer if we don't find the desired depth
do iLevel = 1, nVertLevels
if(refBottomDepth(iLevel) > config_2d_thermal_forcing_depth) then
iLevelCritDepth = iLevel-1
iLevelCritDepth = iLevel
exit
end if
end do
Expand Down

0 comments on commit 5c1ac5a

Please sign in to comment.