PISM, A Parallel Ice Sheet Model
stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
|
◆ surface_gradient_haseloff()
Compute the ice surface gradient using a modification of Marianne Haseloff's approach. The original code deals correctly with adjacent ice-free points with bed elevations which are above the surface of the ice nearby. This is done by setting surface gradient at the margin to zero at such locations. This code also deals with shelf fronts: sharp surface elevation change at the ice shelf front would otherwise cause abnormally high diffusivity values, which forces PISM to take shorter time-steps than necessary. (Note that the mass continuity code does not use SIA fluxes in floating areas.) This is done by assuming that the ice surface near shelf fronts is horizontal (i.e. here the surface gradient is set to zero also). The code below uses an interpretation of the standard Mahaffy scheme. We compute components of the surface gradient at staggered grid locations. The field h_x stores the x-component on the i-offset and j-offset grids, h_y — the y-component. The Mahaffy scheme for the x-component at grid points on the i-offset grid (offset in the x-direction) is just the centered finite difference using adjacent regular-grid points. (Similarly for the y-component at j-offset locations.) Mahaffy's prescription for computing the y-component on the i-offset can be interpreted as:
The code below does just that.
This method communicates ghost values of h_x and h_y. They cannot be computed locally because the first loop uses width=2 stencil of surface, mask, and bed to compute values at all grid points including width=1 ghosts, then the second loop uses width=1 stencil to compute local values. (In other words, a purely local computation would require width=3 stencil of surface, mask, and bed fields.) Definition at line 360 of file SIAFD.cc. References pism::Component::m_grid, m_work_2d_0, m_work_2d_1, pism::array::Array::stencil_width(), and pism::array::Array::update_ghosts(). Referenced by pism::stressbalance::SIAFD_Regional::compute_surface_gradient(), and compute_surface_gradient(). |