Skip to content

Commit

Permalink
Refactor PressureForce_FV before ice shelf fixes
Browse files Browse the repository at this point in the history
  Refactored PressureForce_FV_nonBouss and PressureForce_FV_Bouss to use more
3-dimensional arrays in preparation for the changes that we are expecting from
Claire Yung to reduce the pressure gradient errors in ice shelf cavities.  These
anticipated changes will involve selecting an internal interface at which to
define the shape of the interfaces with depth when there is an ice shelf, rather
than assuming that the top surface pressure varies linearly with depth between
the two top corners.  In PressureForce_FV_nonBouss, this refactoring includes
turning za, intx_za and inty_za into 3-d arrays and moving the code setting
these arrays outside of the k-loop setting the pressure gradient forces.
Changes in PressureForce_FV_Bouss are analogous but involve turning 7 arrays
(pa, dpa, intz_dpa, intx_pa, intx_dpa, inty_pa and inty_dpa) into 3-d arrays.
In both cases, the code for a reduced gravity model is consolidated into a
single block toward the end of the routines.  These changes to use more 3-d
arrays could increase the computational time for the pressure gradient
calculations, but in short regression tests any such increase in computational
time appears to be small.  No external interfaces are changed, and all answers
are bitwise identical.
  • Loading branch information
Hallberg-NOAA authored and marshallward committed Jun 7, 2024
1 parent 09774d4 commit 215b960
Showing 1 changed file with 181 additions and 137 deletions.
Loading

0 comments on commit 215b960

Please sign in to comment.