Repository navigation
Rename libglimmer, libglimmer-solve and two basal modules; merge the isostasy modules - #112
Open
whlipscomb wants to merge 8 commits into
Open
whlipscomb wants to merge 8 commits into
whlipscomb wants to merge 8 commits into
Conversation
The directory holds the code shared by Glide, Glissade, GLAD and Glint; the new name says so. The files and modules in it keep their glimmer_* names, so no use statement changes. Paths are updated in CMakeLists.txt (the source glob and the I/O template and version files), the three utils/build scripts and the Halfar test scripts, which read rhoi from glimmer_physcon.F90. The warning in the Halfar scripts also had a wrong path (../../../); it now names the same file as the grep. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The directory holds the SLAP sparse solvers and their interface (glimmer_sparse*); the new name drops the "lib" prefix, as cism_shared does, and uses an underscore like the other source directories. Paths are updated in CMakeLists.txt and the README, and a comment in glissade_types.F90. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runHalfar.py and halfar_results.py got the ice density by grepping glimmer_physcon.F90 for "real(dp),parameter :: rhoi =". rhoi has been a variable (settable in the config) for a long time, so the grep found nothing and the scripts always fell back to 910 with a warning; a config that set rhoi would have been compared with the wrong analytic solution. A new function get_rhoi in runHalfar.py, also used by halfar_results.py, reads rhoi from [constants] (Glissade) or [parameters] (Glide) and otherwise uses CISM's default of 910. No answer changes (the Halfar configs do not set rhoi). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The module now has the name of the config section ([basal_physics]) and of the derived type (glissade_basal_physics_type) whose settings it uses. It computes beta for the sliding laws and the effective pressure. The procedure names are unchanged. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The module now has the name of the config section ([basal_hydro]) and of the derived type (glissade_basal_hydro_type) whose settings it uses; its init routine is renamed glissade_basal_hydro_init to match. The other procedure names are unchanged. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…de_isostasy glissade_isostasy_elastic and glissade_isostasy_kelvin were used only by glissade_isostasy. Their code is now at the end of glissade_isostasy as private procedures, in keeping with one module per physics category. glissade_isostasy_init and glissade_isostasy_solve (and verbose_isostasy) remain the only public names. The procedures are moved unchanged, except: - glissade_init_elastic and glissade_calc_elastic, now private, are renamed elastic_init and elastic_calc; - the Kelvin parameter gamma (Euler's constant) is renamed euler_gamma, so that it no longer hides the Fortran intrinsic GAMMA in the module; - the use statements between the three modules are removed; the module variables (verbose_elastic, euler_gamma, j_max, tolerance) and the Kelvin generic interfaces move to the top of the module. No answer changes (dome with local and elastic lithosphere, relaxing asthenosphere: BFB with the previous executable). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Kelvin functions (ber, bei, ker, kei and their derivatives) had single-precision versions s_* behind generic interfaces; nothing used them. They are removed, and the double-precision functions d_* take the generic names, so the calls in the elastic-lithosphere code are unchanged. The local variables p_d_* are renamed p_* to match. No answer changes (dome with local and elastic lithosphere, relaxing asthenosphere: BFB with the previous executable). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rom the review of #99 The fixes for the issues found in Kate's review of #99, first made in #114, were added at the end of the #99 branch (lipscomb/lateral_melt). This merge carries them forward to this branch; it brings in no other changes. Answers change only for lateral melt (lateral_melt_method = ismip), as in #114. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
whlipscomb
added a commit
that referenced
this pull request
Dec 2, 2026
…es from the review of #99 The fixes for the issues found in Kate's review of #99, first made in #114, were added at the end of the #99 branch (lipscomb/lateral_melt). This merge carries them forward to this branch; it brings in no other changes. Answers change only for lateral melt (lateral_melt_method = ismip), as in #114. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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/rename_dirs_modules(7 commits, 5702131..a4bebfe, plus the merge commit 593b92d)Base:
lipscomb/config_reorg_r4(#111). Stacked; the base will be changed tomainafter the config reorganization PRs are merged.CISM-wrapper: companion PR ESCOMP/CISM-wrapper#167 (1 commit: the unit-test
Filepath). The wrapper's build (buildlib) needs no change.Update (December 2026): one merge commit at the end of this branch (593b92d) brings in the lateral melt fixes from the review of #99, which are now at the end of the #99 branch (they were first made in #114, which no longer changes anything). It changes nothing else in this PR.
Summary
Code reorganization with no answer changes:
libglimmer→cism_sharedandlibglimmer-solve→glimmer_solve. The files and modules keep their names (glimmer_*), so nousestatement changes.glissade_basal_traction→glissade_basal_physics([basal_physics],glissade_basal_physics_type) andglissade_basal_water→glissade_basal_hydro([basal_hydro],glissade_basal_hydro_type).glissade_isostasy_elasticandglissade_isostasy_kelvin, used only byglissade_isostasy, are merged into it as private procedures, in keeping with one module per physics category (as for calving, basal physics and basal hydrology). The unused single-precision Kelvin functions are removed.rhoifrom the config file.Module names were checked against all other names in the code: no procedure, type or variable has the name of a new module, and the new names keep the
glissade_prefix, so they stay unique in CESM.Changes
libglimmer→cism_shared(5702131). The directory holds the code shared by Glide, Glissade, GLAD and Glint. Paths are updated inCMakeLists.txt(the source glob and the I/O template and version files), the threeutils/buildscripts, the Halfar scripts and a comment inglide.F90.libglimmer-solve→glimmer_solve(98e7bca). Paths are updated inCMakeLists.txtand theREADME, and a comment inglissade_types.F90.Halfar
rhoi(61bb5cc).runHalfar.pyandhalfar_results.pygot the ice density by greppingglimmer_physcon.F90forreal(dp),parameter :: rhoi =.rhoihas been a variable since 2015 (66b123a), so the grep found nothing and the scripts always used 910 with a warning. A new functionget_rhoireadsrhoifrom[constants](Glissade) or[parameters](Glide), else uses CISM's default of 910.glissade_basal_traction→glissade_basal_physics(9085c61) andglissade_basal_water→glissade_basal_hydro(d21a83f), withglissade_basal_water_init→glissade_basal_hydro_init. The other procedure names are unchanged.Isostasy (bf07092, a4bebfe).
glissade_isostasykeeps its public interface (glissade_isostasy_init,glissade_isostasy_solve,verbose_isostasy);glissade.F90is unchanged. The elastic-lithosphere and Kelvin-function procedures are moved to the end of the module unchanged (checked with a script), except:glissade_init_elasticandglissade_calc_elastic, now private, areelastic_initandelastic_calc;gamma(Euler's constant) iseuler_gamma, so it no longer hides the intrinsicGAMMA;s_ber...s_dkei, which nothing used, are removed, and the double-precision functions take the generic names (ber,bei, ...,dkei) directly.git diff --color-moved(orgit log -p --color-moved) shows the moved code.Testing
runHalfar.py -swith both configs writes input files identical to those of the baseline, and reportsrhoi= 910 from the default.--compare alpha11e_stage1; CISM a4bebfe, wrapper with the companion PR): all PASS (namelist comparison excepted, as for R4). This also tests the build with the renamed directories.Commits
🤖 Generated with Claude Code