Repository navigation
Config reorganization R2b: give options by name - #164
Open
whlipscomb wants to merge 9 commits into
Open
whlipscomb wants to merge 9 commits into
whlipscomb wants to merge 9 commits into
Conversation
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>
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/config_reorg_r2b(9 commits)Base:
lipscomb/config_reorg_r2(#163). Stacked; the base will be changed tomasterafter #162 and #163 are merged.CISM: companion PR ESCOMP/CISM#108 (R2b, branch
lipscomb/config_reorg_r2b). Thesource_cismpointer 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:
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.basal_mbal_in_continuity(wasbasal_mass_balance),extrapolate_ocean_data(wasocean_data_extrapolate),calve_at_startup(wascalving_init),compute_isostasy(wasisostasy), plussubgrid_calving_front.namelist_definition_cism.xmlis reorganized by config section, in the order of the CISM log (a9a1b31).user_nl_cismfiles that set these options with integers must use the names.convert_cism_config.py --user-nlin CISM converts them; thegris_powerlawandisostasytestmods are converted here.Changes
block_inception: it was.false(no closing period), which the old CISM reader accepted but the new strict reader rejects.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').flow_law: value 3 dropped (not in CISM); the description ofpaterson_budd_minus5csays -5 deg C (it said -10).sliding_lawvalue 15 dropped (not in CISM);gris_powerlawtestmod converted.subgrid_calving_frontvalue 2 dropped); buildnml writes [lateral_melt] whenlateral_melt_methodis not'none'.compute_isostasylogical, now the switch for the [isostasy] section in buildnml (_ISOSTASY_ONremoved);isostasytestmod converted.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.flwa_constdescription says it is used whenflow_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_law15,flow_law3,subgrid_calving_front2) were accepted by the wrapper but would have stopped CISM; they are dropped.Testing
preview_namelistsafter each commit (gris4): the config differs only in the converted values and renamed keys. Also checked:sigma_method = 'config')dt/nsteps_per_yearselectioncism.ais.config,cism.gris.configandcism_inare byte-identical to those from the previous commit (T1850Gag,f09_g17_ais8gris4).--compare alpha11e_stage1), withsource_cismat the matching CISM commit: all PASS after H2, H3 and H6. After H1, the 2 AIS tests stopped on theblock_inceptiontypo, which is fixed in a901ae4.--compare alpha11e_stage1,source_cismat 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-nodecism-fractional_ice_coveredtest (throughput 28% below the baseline, tolerance 25%), which is machine variability.🤖 Generated with Claude Code