Skip to content

Bug fixes and test-case updates after the Glide/Glissade split - #104

Open
whlipscomb wants to merge 13 commits into
lipscomb/split_glide_glissade_2from
lipscomb/post_split_fixes
Open

whlipscomb wants to merge 13 commits into
lipscomb/split_glide_glissade_2from
lipscomb/post_split_fixes

Conversation

@whlipscomb

@whlipscomb whlipscomb commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Branch: lipscomb/post_split_fixes
Base: lipscomb/split_glide_glissade_2 (#103, PR E). Stacked; the base will be changed to main after the previous PRs are merged.
Last of six PRs (A-F) that replace #94. No matching CISM-wrapper PR.

Summary

Bug fixes (none affects CESM configurations):

Commit From #94 Description
0504b39 172ba53 Fix the units of the external beta passed to glissade_calcbeta (which_ho_babc = 5); basal traction was too large by a factor of scyr^2
4d22af3 b9bb654 Fix the units of acab in the EISMINT exact verification test (Glide)
2ed1189 785cb1a Make native PCG (which_ho_sparse = 3) the default sparse solver in Glissade, and allow local SIA in parallel
1805569 1c59cbf Fix the double scaling of some basal melt parameters (bmlt_float options used by MISMIP+)
50b3eb6 fbb55e2 Fix the depth test for maximum melting in the depth-dependent bmlt_float option
954c05e 8b3bac8 Fix the timescale test for immediate calving with a calving mask

Test cases:

Commit From #94 Description
25b324a 10ef85d SSA and local SIA config files for the dome test
fab0fbd ba7388b DIVA by default in the ISMIP-HOM test; updated ISMIP-HOM URLs
3c2c1b3 239a961 Comments
f2e70b5 fe965a0 MISMIP+ experiment updates
9d5b7c9 (new) calvingMIP: time-averaged output in its own file
cecfff1 (new) Faster creation of calvingMIP input files (identical inputs)
212741b (new) MISMIP+ plot time-axis labels

The three commits marked (new) were made after #94 was last updated, so they have no counterpart there.

Answer changes

  • CESM: none. CESM sets which_ho_sparse = 3, and the Greenland and Antarctic configurations do not use the external beta, the bmlt_float options changed here, or a calving mask with a nonzero timescale.
  • Standalone: the slab and circular shelf tests (external beta), MISMIP+ (basal melt), single-task runs that relied on the default sparse solver, and runs with immediate calving and a calving mask. The default ISMIP-HOM approximation is now DIVA.

Testing

All on derecho.

🤖 Generated with Claude Code

whlipscomb and others added 13 commits November 11, 2026 14:05
Creating a more complete set of dome config files to test each
of the most important Glissade approximations.
Set which_ho_approx = 4 (DIVA) in ismip-hom.config, so that the
ISMIP-HOM experiments run with DIVA by default instead of BP.

The ISMIP-HOM web pages at homepages.ulb.ac.be and homepages.vub.ac.be
no longer respond. In the README and in the messages and comments of
runISMIP_HOM.py and plotISMIP_HOM.py, refer instead to the paper
(Pattyn et al., 2008, https://doi.org/10.5194/tc-2-95-2008) and to its
supplement on the Copernicus site, which contains the results of the
other models. The README now explains that the supplement zip file
contains tc-2007-0019-sp2.zip, which unzips to the ismip_all directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With which_ho_babc = 5 (HO_BABC_BETA_EXTERNAL), beta is read from the
input file in Pa yr/m and stored in model%velocity%beta in SI units
(Pa s/m; factor = 1.0/scyr in glissade_vars.def). glissade_calcbeta
expects Pa yr/m, but glissade_velo_higher passed beta*scyr instead of
beta/scyr, making the basal traction too large by a factor of scyr^2
(~1e15). As a result, the bed was effectively no-slip wherever the
external beta was nonzero.

The bug was introduced in 9d16020 ("Removed scale parameters tau0,
vis0, and evs0", April 2025), which changed scale_beta from tau0/scyr
to 1/scyr; the argument beta*tau0/scyr should have become beta/scyr.

With the fix, the slab test cases of Robinson et al. (2022) (thin
sliding and thick shearing) again agree with the analytic solution
and with results from March 2024. In the circular shelf test, the
velocity at the four pinned center vertices (beta = 1e8 Pa yr/m)
changes from ~1e-18 to ~1e-3 m/yr. Answers are unchanged for runs
with which_ho_babc /= 5, and for runs with zero external beta.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In exact_surfmass (eismint_type = 4, Glide only), acab was set to
M*SperA (m/yr) inside the ice and to -0.1 (meant as 0.1 m/yr ablation)
outside, but acab has internal units of m/s. The mass balance M from
the testsFG module is already in m/s, so acab is now set to M, and the
ablation outside the ice to -0.1d0/scyr.

This bug predates the April 2025 removal of the scale parameters;
before that, acab was off by the old scale factor scale_acab. The
exact test is not part of the supported test suite, and this fix
has not been tested in a run. Other answers are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n parallel

Change the default of which_ho_sparse from 0 (SLAP biconjugate gradient,
serial only) to HO_SPARSE_PCG_CHRONGEAR (3, native parallel PCG). With
the old default, a Glissade run on more than one task stopped with
"SLAP solver not supported for more than one processor" unless the
config file set which_ho_sparse. CESM already sets which_ho_sparse = 3,
and all the standard test configs set it explicitly, so their answers
are unchanged. Single-task runs whose config files do not set
which_ho_sparse will now use the PCG solver instead of SLAP.

Also skip that check when which_ho_approx = HO_APPROX_LOCAL_SIA, since
the local SIA solver does not use a sparse linear solver. Update the
comment for which_ho_sparse in the dome local SIA config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit modifies obsolete references to Glide code in several Glissade modules.

No answer changes
Several basal melt parameters were erroneously divided by scyr twice:
first in subroutine glissade_scale_params, then again locally in
glissade_bmlt_float.F90. This resulted in melt rates that were too small
by several orders of magnitude in MISMIP+ and other applications.

I removed the scaling in glissade_scale_params. Now the scaling is done
only once, with comments noting a division by scyr to convert to mks units.

This commit is answer-changing for MISMIP+, whose results are now as expected.
This commit updates the scripts, default options, and README file
for the MISMIP+ experiments.

I updated several default options:
* upn = 5 instead of 3
* which_ho_nlinear = 1 (Picard acceleration) instead of 0
* restart = 2 (hybrid restart) instead of 1 for all experiments except the Spinup
* which_ho_flotation_function = 2 (replacing the old option 3)

When I first ran the experiments, the melt rates were too small by several
orders of magnitude because there was one too many divisions by scyr.
This was fixed in a preceding commit.

After the bug fix, the results for all experiments are as expected,
similar to those described in the MISMIP+ paper by Cornford et al. (2020).
…oat option

In the depth-dependent basal melt scheme in glissade_bmlt_float.F90, the
branches for maximum melting (warm-ocean and standard profiles) compared
the ice draft z_draft (m, negative) with the melt rate
bmlt_float_depth_meltmax instead of the depth bmlt_float_depth_zmeltmax.
Since the preceding branches cover z_draft > zmeltmax and meltmax is a
non-negative rate, the test was always true and acted like a plain else,
so answers should be unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a binary calving mask (CALVING_GRID_MASK or apply_calving_mask,
without a subgrid calving front), ice in masked cells is removed
immediately if calving%timescale is at most 1 yr, and otherwise thinned
with a relaxation timescale. The test compared calving%timescale with
1.0, but calving%timescale has units of s (it is converted from yr in
glissade_scale_params), so the test was effectively timescale = 0.
Now the test compares with scyr, as intended.

This changes answers for runs with a calving mask and a calving
timescale between 0 and 1 yr. The default timescale is 0, and CESM runs
do not use a calving mask, so they are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since commit 72087b9 (September 2026), CISM aborts if time-averaged
fields are in the same output file as snapshot fields. calvingMIP.Setup.py
put calving_flux_tavg in the [CF output1] section along with snapshot
fields, so experiments 1-5 failed at startup with the generated config files.

calvingMIP.Setup.py now writes calving_flux_tavg to a new section,
[CF output4], with output file calvingMIP.<expt>.out.tavg.x1.nc,
the same frequency as the other 2D output, and write_init = False.
The Experiment 4 advance-phase config inherits the new section.

README.calvingMIP: list the x0 and tavg.x1 output files (the list said
x2 instead of x0), and fix the name of the Thule spin-up restart file.

Note on Experiment 4: results differ from those of April 2026 and earlier
because of commit 82fb9f5 (June 2026), which allows the leftover calving
beyond a calving-front cell to remove ice only from floating upstream
neighbors, not grounded ones. In a 500-year retreat run on 128 tasks,
results with 82fb9f5 are identical to its parent through year 140 and
diverge from year 141. At year 500, ice mass is 1.9% higher and thickness
differs by > 1 m in about 22,600 cells. The current code is bit-for-bit
with 82fb9f5 for this run. Experiment 2 agrees with the April results at
year 1000 to within roundoff.

This commit does not change answers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
calvingMIP.Setup.py computed thk and topg for the input files in double
loops that read and wrote the netCDF variables one element at a time
(e.g., ncfile['topg'][:,j,i] = computeBedThule(ncfile['x1'][i], ...)).
Each access is a separate netCDF I/O call, so creating the input files
took about 4 minutes at 5 km resolution, scaling with the number of cells.

The loops and formulas are unchanged, but now fill float32 numpy arrays
using the in-memory coordinate arrays x and y, and each field is written
to the file once. Setting up Experiment 4 now takes about 2 s at 5 km
and 8 s at 2 km.

The loops are kept, rather than vectorizing with numpy, so that the
arithmetic is exactly as before: vectorized float32 functions can differ
from the scalar versions in the last bit.

The input files at 5 km are identical to those from the previous version.
At 5 km and 2 km, thk and topg in both input files are exactly symmetric
about the x and y axes (and, for the circular domain, under x <-> y).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In mismip+PlotGL.py, the tick labels for the scaled time axis of the
grounded-area plot were computed as intscale(tscale(t)) = sqrt(t)**2,
which gives roundoff in some labels (e.g., 800.0000000000001).
The labels now come directly from the list of tick times, giving
0, 10, 50, 100, 200, 400 and 800. Removed the related TODO comment.

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