Loading web-font TeX/Math/Italic
PISM, A Parallel Ice Sheet Model 2.2.1-cd005eec8 committed by Constantine Khrulev on 2025-03-07
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages

◆ compute_surface_gradient()

void pism::stressbalance::SIAFD::compute_surface_gradient ( const Inputs inputs,
array::Staggered1 h_x,
array::Staggered1 h_y 
)
protectedvirtual

Compute the ice surface gradient for the SIA.

There are three methods for computing the surface gradient. Which method is controlled by configuration parameter sia.surface_gradient_method which can have values haseloff, mahaffy, or eta.

The most traditional method is to directly differentiate the surface elevation h by the Mahaffy method [Mahaffy]. The haseloff method, suggested by Marianne Haseloff, modifies the Mahaffy method only where ice-free adjacent bedrock points are above the ice surface, and in those cases the returned gradient component is zero.

The alternative method, when sia.surface_gradient_method = eta, transforms the thickness to something more regular and differentiates that. We get back to the gradient of the surface by applying the chain rule. In particular, as shown in [Vazquezetal2003] for the flat bed and n=3 case, if we define

\eta = H^{(2n+2)/n}

then \eta is more regular near the margin than H. So we compute the surface gradient by

\nabla h = \frac{n}{(2n+2)} \eta^{(-n-2)/(2n+2)} \nabla \eta + \nabla b,

recalling that h = H + b. This method is only applied when \eta > 0 at a given point; otherwise \nabla h = \nabla b.

In all cases we are computing the gradient by finite differences onto a staggered grid. In the method with \eta we apply centered differences using (roughly) the same method for \eta and b that applies directly to the surface elevation h in the mahaffy and haseloff methods.

Parameters
[out]h_xthe X-component of the surface gradient, on the staggered grid
[out]h_ythe Y-component of the surface gradient, on the staggered grid

Reimplemented in pism::stressbalance::SIAFD_Regional.

Definition at line 188 of file SIAFD.cc.

References pism::Geometry::bed_elevation, pism::Geometry::cell_type, pism::RuntimeError::formatted(), pism::stressbalance::Inputs::geometry, pism::Geometry::ice_surface_elevation, pism::Geometry::ice_thickness, pism::Component::m_config, PISM_ERROR_LOCATION, surface_gradient_eta(), surface_gradient_haseloff(), and surface_gradient_mahaffy().

Referenced by pism::stressbalance::SIAFD_Regional::compute_surface_gradient(), and update().