Skip to content

Fix ice-shelf SSA Newton scheme and convergence#1107

Merged
Hallberg-NOAA merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
alex-huth:IS_inexact_newton
May 29, 2026
Merged

Fix ice-shelf SSA Newton scheme and convergence#1107
Hallberg-NOAA merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
alex-huth:IS_inexact_newton

Conversation

@alex-huth
Copy link
Copy Markdown

Two big commits regarding the SSA solution:

The first moves all evaluation of ice-shelf basal friction components (nonlinear and linear) to quadrature points, and sets the viscosity to be evaluated at the 4 quadrature points (not cell-centers) by default. This allows Newton iterations to achieve the expected quadratic convergence, as everything is properly evaluated in the same space. This commit also corrects the ice-shelf Newton viscosity factor, which was half what it should be.

The second makes a number of fixes/improvements to the ice-shelf SSA inexact Newton/Eisenstat-Walker (EW) scheme, and adds some new convergence tolerances. A separate (initial) tolerance for Newton iterations is introduced, Newton can now run without Picard, some new parameters to control the EW scheme are added (with reasonable defaults), and two new convergence tolerances are added that are needed for the inexact Newton/EW scheme. A convergence tolerance based on the relative residual can also be combined with the other stopping criteria.

Verbosity is also added to the ice-shelf driver, which is useful because a few new MOM_mesg calls were added.

@alex-huth
Copy link
Copy Markdown
Author

@Hallberg-NOAA I can split this into two PRs if you'd like, but the two commits are closely related

Comment thread src/ice_shelf/MOM_ice_shelf_dynamics.F90 Outdated
Comment thread src/ice_shelf/MOM_ice_shelf_dynamics.F90
Comment thread src/ice_shelf/MOM_ice_shelf_dynamics.F90 Outdated
Copy link
Copy Markdown
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have examined the code, and without understanding in great detail exactly what is going on, it all looks reasonable to me. I have just a few minor stylistic or performance-related comments to consider before this is accepted.

Comment thread src/ice_shelf/MOM_ice_shelf_dynamics.F90 Outdated
Comment thread src/ice_shelf/MOM_ice_shelf_dynamics.F90 Outdated
Comment thread src/ice_shelf/MOM_ice_shelf_dynamics.F90 Outdated
Comment thread src/ice_shelf/MOM_ice_shelf_dynamics.F90 Outdated
@alex-huth alex-huth force-pushed the IS_inexact_newton branch from 4ecc348 to 91272a0 Compare May 21, 2026 17:02
Comment thread src/ice_shelf/MOM_ice_shelf_dynamics.F90 Outdated
Copy link
Copy Markdown
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am now completely satisfied with this PR. Thank you for the addition of these valuable new capabilities.

Previously, the nonlinear part of basal friction was evaluated
cell-wise, while the linear part was evaluated at quadrature points;
the resulting inconsistency in the Jacobian prevented quadratic
convergence when using Newton iterations, so moved all friction to be
evaluated evaluated at quadrature points instead. Viscosity should
also be evaluated at the 4 quad points rather than cell-centered, so
changed the default for NUMBER_OF_ICE_VISCOSITY_QUADRATURE_POINTS from
1 to 4 (which is more accurate anyway). These changes allow us to
achieve the expected quadratic convergence when using Newton.

With these changes, several deprecated cell-averaged ice-shelf CS
fields were removed: basal_traction, newton_umid, newton_vmid,
newton_drag_coef. Subroutine calc_shelf_taub was converted to return
area-averaged basal shear stress, now for diagnostic purposes only.

Also removed incorrect 0.5 factor from newton_visc_factor
@alex-huth alex-huth force-pushed the IS_inexact_newton branch from 91d786e to 44b64fa Compare May 27, 2026 14:50
-Added NEWTON_CONJUGATE_GRADIENT_TOLERANCE to set a separate tolerance
for Newton iterations compared to Picard. Helpful when using a higher
convergence tolerance for initial inexact Newton tolerances, or a
lower tolerance is used for "exact" Newton.
-Can now set NEWTON_AFTER_TOLERANCE<=0 to only use
Newton iterations to solve the SSA, bypassing Picard iterations
entirely. This works well if the initial guess is close to the
solution.

Further developed the Inexact Newton Eisenstat-Walker (EW) scheme:
-EW now evolves (correctly) based on the change in L2 norm of the
stress residual
-New parameters NEWTON_EW_GAMMA and NEWTON_EW_ALPHA to specify the EW
gamma and alpha instead of hardcoding them
-Added new EW safeguard based on PETSc, choice 3, along with
parameters:
 -NEWTON_EW_SAFETY: choose between the 2 safeguards
 -NEWTON_EW_1_THRES: threshold used for when NEWTON_EW_SAFETY is 1
 -NEWTON_EW_ETA_MAX: Max allowed EW eta (between 0 and 1)
All of these new parameters will typically work well at their
defaults, but are available for fine-tuning

Added new SSA convergence criteria based on L2 norms (needed for EW):
-NONLIN_SOLVE_ERR_MODE=4: err_mode for convergence based on nonlin
residual | F | / | F_0 |
-NONLIN_SOLVE_ERR_MODE=5: err_mode for convergence based on relative
residual | F | / | tau |
-SSA_ADD_REL_RESID = True: If NONLIN_SOLVE_ERR_MODE<=4, this will also
ensure convergence of the relative residual (via err_mode=5). While
generally useful for ensuring convergence of the solution (err_mode 2
or 3) and the residual simultaneously, in some cases, it is
essential. For example, if using a solution-based convergence
criterion with inexact Newton, initial Newton iterations may not
change the solution much and could trigger the stopping criterion
before the problem is actually converged; using SSA_ADD_REL_RESID
avoids this issue.
-ICE_RR_NONLINEAR_TOLERANCE: Tolerance for err_mode 5 if
SSA_ADD_REL_RESID=True.

Added several new MOM_mesg calls to track the adaptive inner solver
tolerance and the nonlinear relative residual.

Added VERBOSITY parameter to ice-shelf driver

Ice-shelf efficiency improvements

- Precomputed some commonly-used variables
- Replace some pass_var()/pass_vector() pairs with do_group_pass()
- Indentation

Add missing ice_shelf CS%rhow_rhoi substitutions
@alex-huth alex-huth force-pushed the IS_inexact_newton branch from 44b64fa to c8d148c Compare May 27, 2026 19:11
@Hallberg-NOAA
Copy link
Copy Markdown
Member

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/30977.

@Hallberg-NOAA Hallberg-NOAA merged commit a0a7eea into NOAA-GFDL:dev/gfdl May 29, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants