Repository navigation
Bug fixes and test-case updates after the Glide/Glissade split - #104
Open
whlipscomb wants to merge 13 commits into
Open
whlipscomb wants to merge 13 commits into
whlipscomb wants to merge 13 commits into
Conversation
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>
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch:
lipscomb/post_split_fixesBase:
lipscomb/split_glide_glissade_2(#103, PR E). Stacked; the base will be changed tomainafter 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):
glissade_calcbeta(which_ho_babc = 5); basal traction was too large by a factor of scyr^2which_ho_sparse = 3) the default sparse solver in Glissade, and allow local SIA in parallelbmlt_floatoptions used by MISMIP+)bmlt_floatoptionTest cases:
The three commits marked (new) were made after #94 was last updated, so they have no counterpart there.
Answer changes
which_ho_sparse = 3, and the Greenland and Antarctic configurations do not use the external beta, thebmlt_floatoptions changed here, or a calving mask with a nonzero timescale.Testing
All on derecho.
cismwrap_3_00_003(Support CISM's SMB budget diagnostics and fractional ice_covered option CISM-wrapper#158: CISMcism_main_3.00.003with the CESM3 alpha11e externals, including cmeps1.1.76), with Update CISM-wrapper for the Glide/Glissade separation, part 2 CISM-wrapper#161. Also bit-for-bit with the SMB water-budget fixes and GLAD ocean-mask fix for coupled runs #97 code using the earlier (alpha11d) externals.main(including Increase cmake minimum version #98) and Update CISM-wrapper for the Glide/Glissade separation, part 2 CISM-wrapper#161: all builds, runs and restart/branch/hybrid comparisons pass (except NCK's multi-instance comparison, a known failure that is also in the baseline run), and all tests are bit-for-bit with the baseline forcismwrap_3_00_003. The only namelist difference is the removedvertical_integration. ERI_Ly10 (I compset, isostasy) has no baseline, because it failed in the baseline run at the year-13 restart; with this code it passes, including its branch/hybrid and restart comparisons.🤖 Generated with Claude Code