Skip to content

Glide fixes and dome/Halfar test updates - #101

Open
whlipscomb wants to merge 3 commits into
lipscomb/remove_deprecatedfrom
lipscomb/glide_fixes
Open

whlipscomb wants to merge 3 commits into
lipscomb/remove_deprecatedfrom
lipscomb/glide_fixes

Conversation

@whlipscomb

@whlipscomb whlipscomb commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Branch: lipscomb/glide_fixes
Base: lipscomb/remove_deprecated (#100, PR B). Stacked; the base will be changed to main after the previous PRs are merged.
Third of six PRs (A-F) that replace #94. No matching CISM-wrapper PR.

Summary

Commit From #94 Description
e9f0892 8559727 Glide fixes: remove a spurious factor of scyr in cflow (init_velo), which made Glide velocities wrong by orders of magnitude; remove the redundant bed_softness field; Glide refuses which_ho_ice_age = 1; no ice-age diagnostics when it is off
7117846 6c98aaa Dome test: replace dome.config with dome.config.{diva,l1l2,bp,glide} (default DIVA); Halfar: halfar.config.{glide,diva} (default Glide)
cbe11c8 e45f336 Fix the grid coordinates written by Glide runs with no input file (EISMINT-2 restarts from e2.a aborted)

Answer changes

Glide standalone runs change (the velocity fix). Glide runs on main currently fail. Glissade and CESM: none. The default dome and Halfar configs change (new file names; dome default DIVA instead of BP).

Testing

All on derecho.

🤖 Generated with Claude Code

whlipscomb and others added 3 commits November 11, 2026 13:54
This commit fixes a major bug in glide_velo.F90.
In subroutine init_velo, the parameter cflow was initialized with an expression
that included a spurious factor of scyr. I think this factor was introduced
when the Glide scaling factors (thk0, vel0, etc.) were removed.
As a result, velocity computations were off by several orders of magnitude.
With the factor removed, the velocity computation is correct.

Also in Glide, I removed the redundant field model%velocity%bed_softness
(known as 'soft' in glide_vars.def). The basal traction coefficient is now
contained only in model%velocity%btrc (known as 'btrc' in glide_vars.def).
I removed btrac_const and btrac_max from the velowk derived type;
they are now part of the paramets derived type.

I added logic in glide_setup to prevent Glide from running with which_ho_ice_age = 1
(since Glide does not support ice age calculations).
I added logic in glide_diagnostics to turn off ice age diagnostics when which_ho_ice_age = 0.

I tested these Glide changes in dome tests (both no-slip and with slip_coeff = 1),
a Halfar test, and EISMINT-2 Experiment A. In these tests I was able to reproduce
earlier results within roundoff.
Other EISMINT-2 tests fail on restart; this still needs to be fixed.

Glissade answers are unchanged.
For the dome test, this commit replaces dome.config with four similar files:
dome.config.diva, dome.config.l1l2, dome.config.bp, and dome.config.glide.
This makes it easier to test multiple velocity solvers with the same test problem.
The default is dome.config.diva. (The old default, dome.config, used the BP solver.)

For the Halfar test, this commit replaces halfar.config and halfar-HO.config
with halfar.config.glide and halfar.config.diva. The new default is halfar.config.glide.
Recall that for the Halfar test, Glide is more accurate than any of the Glissade solvers.

I also modified runHalfar.py so that config files do not need semicolons before comments.
EISMINT-2 tests that start from the output of an earlier test (e.g., e2.b reads
e2.a.restart.nc) were aborting at startup with a fatal error:

  deltax1 of file e2.a.restart.nc does not match with config deltax: 9.9692100E+36 25000.0

The cause was in subroutine glide_nc_filldvars. When there is no input file
(as in e2.a), the grid coordinates x0, y0, x1 and y1 are computed from the grid
spacing. The old code, which dated from early Glimmer, wrote one value per
nf90_put_var call without a 'start' index, so each call overwrote the first
element. Only the first element was set (to the last value computed), and the
rest of each array was left as fill values. The x1 and y1 loops also stopped
one point short.

This commit computes each coordinate array in full and writes it with a single
parallel_put_var call, as is done when there is an input file. The coordinate
conventions are unchanged: x1 = (i-1)*dew and x0 = (i-1/2)*dew, and likewise
for y.

The fix changes only the coordinate values in output files of runs with no
input file. Model answers are unchanged. Glissade is not affected, since it
requires the coordinates to be read from an input file.

Tested with the full EISMINT-2 suite, which now runs through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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