Skip to content

Config reorganization R2b: give options by name - #164

Open
whlipscomb wants to merge 9 commits into
lipscomb/config_reorg_r2from
lipscomb/config_reorg_r2b
Open

whlipscomb wants to merge 9 commits into
lipscomb/config_reorg_r2from
lipscomb/config_reorg_r2b

Conversation

@whlipscomb

@whlipscomb whlipscomb commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Branch: lipscomb/config_reorg_r2b (9 commits)
Base: lipscomb/config_reorg_r2 (#163). Stacked; the base will be changed to master after #162 and #163 are merged.
CISM: companion PR ESCOMP/CISM#108 (R2b, branch lipscomb/config_reorg_r2b). The source_cism pointer is not changed here; it will be updated to a CISM tag once the CISM PRs are merged.

Summary

This PR follows CISM R2b, in which every Glissade option is given by name instead of by number:

  • Option entries become char. Their valid values, defaults and descriptions use the CISM names (e.g. sliding_law = 'schoof', stokes_approx = 'diva', calving_law = 'float_zero'), and the generated config contains the names (sliding_law = "schoof"). CIME rejects an integer as an invalid value.
  • Some entries become logicals, four of them renamed as in CISM: basal_mbal_in_continuity (was basal_mass_balance), extrapolate_ocean_data (was ocean_data_extrapolate), calve_at_startup (was calving_init), compute_isostasy (was isostasy), plus subgrid_calving_front.
  • No answer changes. The values are the same, written as names.
  • namelist_definition_cism.xml is reorganized by config section, in the order of the CISM log (a9a1b31).

user_nl_cism files that set these options with integers must use the names. convert_cism_config.py --user-nl in CISM converts them; the gris_powerlaw and isostasy testmods are converted here.

Changes

commit change
a901ae4 Fix the Antarctic default of block_inception: it was .false (no closing period), which the old CISM reader accepted but the new strict reader rejects.
10e0aa2 [grid], [time], [diagnostics], [options], [numerics] options by name: global_bc, sigma_method, dt_input_option, dm_dt_diag, diag_ice_threshold, dycore, restart, compute_blocks. buildnml compares names (_SIGMA_IN_CONFIG_FILE = 'config', _DT_STEPS_PER_YEAR = 'nsteps_per_year', restart = 'none'/'standard').
a5161a5 [velocity], [velocity_solver], [advection] options by name (14 entries).
33cb7f7 [temperature], [flow_law] options by name. flow_law: value 3 dropped (not in CISM); the description of paterson_budd_minus5c says -5 deg C (it said -10).
a4af494 [basal_physics], [basal_hydro], [grounding_line] options by name (12 entries); sliding_law value 15 dropped (not in CISM); gris_powerlaw testmod converted.
856b536 [basal_melt], [ocean_data], [calving], [lateral_melt], [removal] options by name; the four logicals above (subgrid_calving_front value 2 dropped); buildnml writes [lateral_melt] when lateral_melt_method is not 'none'.
d525c1f [climate], [geothermal], [isostasy], [glaciers] options by name; compute_isostasy logical, now the switch for the [isostasy] section in buildnml (_ISOSTASY_ON removed); isostasy testmod converted.
a9a1b31 namelist_definition_cism.xml: entries listed by group, one banner per group, in the order of the CISM config sections; within a group, switches first, then the order in which CISM reads the keys. Pure move: entries unchanged, comments move with their entries.
a913296 Remaining descriptions name the option values; the flwa_const description says it is used when flow_law = constant.

In each commit, descriptions of other entries that referred to the converted options by number (or by the old key marine_margin) now use the names. Values that CISM does not have (sliding_law 15, flow_law 3, subgrid_calving_front 2) were accepted by the wrapper but would have stopped CISM; they are dropped.

Testing

  • preview_namelists after each commit (gris4): the config differs only in the converted values and renamed keys. Also checked:
    • the [sigma] section (sigma_method = 'config')
    • the dt/nsteps_per_year selection
    • [lateral_melt] and [isostasy] with their switches on
    • rejected integers.
  • After a9a1b31 (the reorder), the generated cism.ais.config, cism.gris.config and cism_in are byte-identical to those from the previous commit (T1850Gag, f09_g17_ais8gris4).
  • aux_glc subset of 5 tests (--compare alpha11e_stage1), with source_cism at the matching CISM commit: all PASS after H2, H3 and H6. After H1, the 2 AIS tests stopped on the block_inception typo, which is fixed in a901ae4.
  • Full aux_glc at the tip (37 tests, --compare alpha11e_stage1, source_cism at CISM 708bdd35): every test passes its run, restart/branch comparisons and baseline comparison. 1 test passes; the other 36 show NLFAIL because NLCOMP fails, which is expected (option values are now names). The only other failed phase is TPUTCOMP, for the 15-node cism-fractional_ice_covered test (throughput 28% below the baseline, tolerance 25%), which is machine variability.

🤖 Generated with Claude Code

whlipscomb and others added 9 commits November 17, 2026 21:22
The default for ais was '.false' (no closing period). CISM read it as
false, because the old logical reader looked only at the first letter;
the stricter reader in R2b (which accepts .true./.false., true/false,
t/f, 1/0) rejects it and stops the run. No answer change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matches the CISM commit 'Give options by name and read logicals strictly
(H1: grid to numerics)'. These entries change from integer to char, with
the CISM names as valid values and defaults:
  global_bc            periodic, outflow, no_penetration, no_ice
                       (default outflow)
  sigma_method         glide, config, uniform, pattyn (default glide)
  dt_input_option      dt, nsteps_per_year (default nsteps_per_year)
  dm_dt_diag           kg_per_s, gt_per_yr (default gt_per_yr)
  diag_ice_threshold   zero, thcklim
  dycore               glissade
  restart              none, standard, hybrid (set by buildnml)
  compute_blocks       all, active_only, inquire (default all)
buildnml compares names: _SIGMA_IN_CONFIG_FILE = 'config',
_DT_STEPS_PER_YEAR = 'nsteps_per_year', and _set_restart_options sets
restart to 'none' or 'standard'.

user_nl_cism files that set these options with integers must use the
names (convert_cism_config.py --user-nl in CISM converts them); CIME
rejects an integer as an invalid value. No testmod sets them.

preview_namelists (gris4): the config differs only in these values
(e.g. global_bc = "outflow" instead of 1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matches the CISM commit 'Give the velocity, solver and advection
options by name (H2)'. These entries change from integer to char, with
the CISM names as valid values, defaults and descriptions:
  stokes_approx        local_sia, sia, ssa, blatter_pattyn, l1l2, diva
                       (default diva)
  efvs_method          constant, flow_factor, nonlinear (default nonlinear)
  surface_gradient_method         centered, upstream1, upstream2
  surface_gradient_margin_method  land, hybrid, marine (default hybrid)
  nonlinear_method     picard, accelerated_picard
                       (default accelerated_picard)
  nonlinear_residual   max, max_no_ubas, mean, l2norm, relative_l2norm
                       (default relative_l2norm)
  linear_solver        slap_pcg, slap_bicg, slap_gmres, pcg, pcg_chrongear
                       (default pcg_chrongear)
  preconditioner       none, diagonal, sia, tridiag_local, tridiag_global
                       (default diagonal)
  assemble_beta, assemble_taud, assemble_bfric, assemble_lateral
                       standard, local (default local)
  advection_method     remap, upwind, fixed_thickness (default remap)
(vertical_remap_order and compute_ice_age are not in the wrapper.)

preview_namelists (gris4): the config differs only in these values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matches the CISM commit 'Give the temperature and flow-law options by
name (H3)'. These entries change from integer to char, with the CISM
names as valid values, defaults and descriptions:
  temperature_method   isothermal_artm, prognostic, fixed, enthalpy
                       (default prognostic)
  temperature_init     zero_celsius, artm, linear, advective_diffusive,
                       file (default advective_diffusive)
  dissipation_method   none, sia, first_order (default first_order)
  flow_law             constant, paterson_budd_minus5c, paterson_budd
                       (default paterson_budd)
Two corrections to the flow_law entry: value 3 ('read flwa from file')
is dropped, since Glissade has no such option (CISM stopped with an
out-of-range error); and the description of paterson_budd_minus5c says
-5 deg C, the temperature CISM uses (it said -10).

preview_namelists (gris4): the config differs only in these values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matches the CISM commit 'Give the basal physics, hydrology and
grounding-line options by name (H4)'. These entries change from integer
to char, with the CISM names as valid values, defaults and descriptions:
sliding_law, beta_limit_method, powerlaw_c_method, coulomb_c_method,
effecpress_method, bwat_method, flux_routing_method, cavity_open_slide,
cavity_open_melt, grounding_line_param, grounding_line_bmlt and
flotation_function (btrc_method and fground_no_glp are not in the
wrapper). Descriptions of other entries that referred to these options
by number now use the names (e.g. 'Relevant only for bwat_method =
local_till'), and the old Fortran constant names are dropped from them.

sliding_law: the valid value 15 is dropped (CISM has no such law and
stopped with an out-of-range error).

The gris_powerlaw testmod uses the names (sliding_law = 'powerlaw',
powerlaw_c_method = 'file', bwat_method = 'none', effecpress_method =
'overburden').

preview_namelists (gris4): the config differs only in these values; the
gris_powerlaw settings are written by name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tions by name

Matches the CISM commit 'Give the basal melt, ocean data, calving,
lateral melt and removal options by name (H5)'.

- These entries change from integer to char, with the CISM names as
  valid values, defaults and descriptions: bmlt_float_method,
  bmlt_float_thermal_forcing_param, deltaT_ocn_method, ocean_data_domain,
  calving_law, calving_domain, lateral_melt_method, force_retreat
  (calvingmip_domain is not in the wrapper).
- These become logicals, three of them renamed as in CISM:
  basal_mass_balance -> basal_mbal_in_continuity,
  ocean_data_extrapolate -> extrapolate_ocean_data,
  calving_init -> calve_at_startup, subgrid_calving_front (its valid
  value 2 is dropped; CISM has only off/on).
- buildnml: the lateral_melt feature section is written when
  lateral_melt_method is not 'none'.
- Descriptions of other entries that referred to these options by number
  (or by the old key marine_margin) now use the names.

preview_namelists (gris4): the config differs only in these values and
key names; lateral_melt_method = 'constant' still writes the
[lateral_melt] section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matches the CISM commit 'Give the climate, geothermal, isostasy and
glacier options by name (H6)'.

- These entries change from integer to char, with the CISM names as
  valid values, defaults and descriptions: smb_input_units,
  smb_input_function, artm_input_function, geothermal_method,
  lithosphere_method, asthenosphere_method, input_topg_method,
  mu_star_method, alpha_snow_method, glacier_powerlaw_c_method,
  snow_method (overwrite_acab is not in the wrapper).
- isostasy becomes the logical compute_isostasy. buildnml writes the
  [isostasy] section when compute_isostasy is true (_ISOSTASY_ON is
  removed); setting other isostasy entries without it is still an error.
  The isostasy testmod sets compute_isostasy = .true.
- Descriptions of other entries that referred to these options by number
  now use the names.

preview_namelists (gris4): the config differs only in these values; with
compute_isostasy = .true. the [isostasy] section is written as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cism.icesheet.config entries of namelist_definition_cism.xml were
still arranged under the old banners (options, ho_options, parameters),
with entries of many sections mixed together. They are now listed by
group, one banner per group, in the order of the config sections in the
CISM log and in glissade_setup:
  derived, grid, sigma, time, diagnostics, options, numerics,
  initialization, velocity, velocity_solver, advection, temperature,
  flow_law, basal_physics, basal_hydro, grounding_line, basal_melt,
  calving, lateral_melt, removal, climate, grid_ocn, ocean_data,
  geothermal, isostasy, inversion, glaciers,
followed by GLAD climate and esm_output (written last in the config
file) and cism_history (used by buildnml, not written). Within a group,
the switches and most-edited keys come first (the lead keys of the CISM
config converter), then the keys in the order handle_<section> reads
them, then wrapper-only keys.

This is a pure move: every entry is unchanged, a comment directly above
an entry moves with it, and the group notes ('This group is only
relevant if ...') stay under their banners. The cism_in groups and the
header are unchanged. preview_namelists (gris4) gives an identical
cism.gris.config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Descriptions and comments that still referred to options by number now
use the value names: compute_blocks = active_only, sigma_method = config,
dt_input_option = nsteps_per_year, temperature_init =
advective_diffusive, bmlt_float_method = depth, lateral_melt_method /=
none. The flwa_const description now says it is used when flow_law =
constant (it said 'in the isothermal case').

Text only; preview_namelists (gris4) gives an identical config.

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