Repository navigation
Reorganize the Glissade config file into sections by physics (R1) - #105
Open
whlipscomb wants to merge 20 commits into
Open
whlipscomb wants to merge 20 commits into
whlipscomb wants to merge 20 commits into
Conversation
A key in a config file that the code never reads has no effect, and the default value is used instead. This happens for misspelled keys, keys with the wrong case, keys in the wrong section, and the second copy of a duplicated key. Until now, such keys were ignored silently. glimmer_config now tracks whether each key is read (new flag ConfigValue%used, set in GetValueChar, through which all GetValue variants read, and in ConfigSectionHasValue). CheckSections, which runs after initialization in the standalone driver, GLAD and Glint, now writes a warning for each unread key in a section that was read: Unused key in section [grid]: udn (not read by the code; check the spelling and section) Keys that are absent from the config file never cause a warning, and unused sections still get the existing single 'Unused section' warning. The new warning found a typo in tests/halfar/runHalfar.py, which wrote 'udn' instead of 'upn' to the generated config file. This was harmless, since the config template also sets upn to the same value. Fixed. Answers are unchanged: all outputs in the standalone test suite are identical; the only log differences were the new warnings for 'udn' in the two Halfar tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The option which_ho_flow_enhancement_factor had three values:
0 = flow enhancement factor E computed from flow_factor_ground and
flow_factor_float (default)
1 = invert for E, matching observed surface speeds
2 = read E from an external file
Options 1 and 2 are removed. Since only the default behavior remains,
the option itself is removed, along with the constants
HO_FLOW_ENHANCEMENT_FACTOR_* and the inversion parameters
inversion_flow_enhancement_{timescale,velo_scale,thck_scale,
length_scale,relax_factor} in [parameters].
Changes:
- glissade_inversion: removed subroutine invert_flow_enhancement_factor
and the E-specific code in glissade_inversion_init and
glissade_inversion_solve, with the locals used only there.
- glissade_therm: glissade_flow_factor no longer takes the option and
always computes E. Removed the block that reset E = 0 to the default
values in ice-filled cells; it was needed only because the inversion
set E = 0 in ice-free ocean cells, which could later fill with ice.
- glissade_setup: removed reading, scaling and printing of the option
and parameters, and the related restart variables (flow_enhancement_factor
and velo_sfc, which were added only for options 1 and 2).
- glissade_types, glissade: removed the option, constants and parameters.
Config files that still set these keys will get the new 'Unused key'
warnings. CISM-wrapper has no entries for these keys.
Answers are unchanged: all outputs and logs in the standalone test suite
are identical to the baseline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…btrc options In Glissade, the Glide-style basal traction coefficient (used only by the local SIA solver) was stored as btrac_const, while the local SIA solver and Glide use btrc. Rename the Glissade variable to btrc_const for consistency. (btractx/btracty, the basal traction stress, are a different quantity and are unchanged.) Remove the slip_coeff options BTRC_LINEAR_BMLT (4) and BTRC_TANH_BWAT (5) from Glissade. They were never supported by the Glissade local SIA solver, which aborted if they were selected. Glide keeps them. Since slip_coeff now has only four valid values (0-3), the general range check rejects 4 and 5, so the separate local-SIA check is removed. Note: other Glissade approximations previously ignored slip_coeff, so a config with slip_coeff = 4 or 5 and (e.g.) DIVA used to run; now it stops with an error. The config keys (slip_coeff, basal_tract_const) are unchanged; they will be renamed (btrc_method, btrc_const) with the config reorganization. Answers are unchanged: the standalone test suite is BFB, and the local SIA dome test with slip_coeff = 1, 2, 3 gives identical output with the old and new code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bmlt_float option 5 (BMLT_FLOAT_MISOMIP) was not supported: the model aborted at startup if it was selected, and most of the old plume model had already been removed. Remove what was left: - in glissade_bmlt_float: the MISOMIP parameter block, the unused verbose_velo/verbose_continuity/verbose_melt flags, the commented-out MISOMIP branch, and the unused utility subroutines compute_edge_gradients, compute_plume_velocity, compute_plume_melt_rate and cubic_solver; - glissade_plume_type, model%plume and the T_ambient/S_ambient fields (glissade_types, glissade_vars.def); - the config parameters T0, Tbot, S0, Sbot, gammaT and gammaS, and their log output (glissade_setup). The specific heat of seawater, cpw, was defined in the MISOMIP block but is also used by the thermal-forcing melt schemes. It moves to glimmer_physcon with the same value, as on lipscomb/plume. bmlt_float = 5 is still rejected, with a message that the option has been removed; the other bmlt_float values are not renumbered. interpolate_3d_forcing_to_lsrf, used by the thermal-forcing schemes, stays. The new 2D meltwater-layer model on lipscomb/plume replaces the old plume code, so removing it here should not complicate bringing that branch in. Answers are unchanged: the standalone test suite and a CESM aux_glc subset are BFB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The [isostasy], [lateral_melt], [basal_hydro] and [glaciers] sections were read only if the feature's switch was on. Read them whenever they are present. A section's presence does not turn its feature on; the switch does, and an absent section leaves its parameters at their default values. This prepares for the config reorganization, in which each switch moves into its own section: a section may then be present with its switch off, so that (for example) runs with and without isostasy can use the same config file except for the switch. The handlers only read values, so reading a section for a feature that is off does not change the results. Answers are unchanged: the standalone test suite is BFB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The config key flwa_basal in [parameters] was read into model%basal_physics%flwa_basal but never used. The Coulomb friction law (which_ho_babc = HO_BABC_COULOMB_FRICTION) uses the flow factor of the basal ice layer, flwa(nz-1,:,:), which is passed to glissade_calcbeta as its argument flwa_basal. Remove the key, the variable, and the setting in the MISMIP and MISMIP3d config templates, where it had no effect. The basal hydrology parameter of the same name, model%basal_hydro%flwa_basal (cavity closing), is unchanged; it is now the only config key named flwa_basal, as the CESM namelist needs. Answers are unchanged: the standalone test suite is BFB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
utils/config_reorg/convert_cism_config.py moves config keys to their new sections and renames them, for the config reorganization in which the long [options], [ho_options] and [parameters] sections are split into short sections by topic. It also converts CESM user_nl_cism files, in which only key names change. The tables of moved and renamed keys are empty here; the commits that create the new sections fill them in, one topic at a time, and convert the test configs with the script. The script keeps comments, blank lines and the order of keys, so a file with nothing to convert is unchanged; converting a converted file again changes nothing. Run it with --self-test for the built-in tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Glissade now reads all 31 calving keys from a new [calving] section (handle_calving) instead of [options], [ho_options] and [parameters]. Four keys are renamed: marine_margin -> calving_law which_ho_calving_front -> subgrid_calving_front which_ho_calvingmip_domain -> calvingmip_domain length_scale -> calving_length_scale The option values are unchanged, and so are the Fortran variables. In print_options, the character arrays that describe the calving options are named after their keys (calving_law, calving_init, calving_domain, subgrid_calving_front, calvingmip_domain), and the log labels use the new key names. The config converter (utils/config_reorg/convert_cism_config.py) gets the [calving] rows, and now leaves Glide configs (dycore = 0) unchanged, since the Glide config format is frozen. All Glissade test configs and templates are converted with it, and the MISMIP and calvingMIP setup scripts write the calving keys to [calving]. Answers are unchanged: the standalone test suite is BFB, with configs converted by the script; the logs differ only in the relabeled lines. A matching CISM-wrapper commit moves the calving namelist entries to a calving group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CISM's config reader (glimmer_config.F90) treats any line that starts with '[' in column 1 as a section header, named by the text before the first ']', and ignores lines that start with a space. The converter required a header line to end at ']', so a header with a trailing comment, such as [ho_options] # Higher order options was taken as part of the previous section, and its keys were not moved. The converter also moved indented keys, which CISM never reads. The converter now matches the CISM reader in both respects, and the self-test covers both cases. Of the configs checked (the test tree and the GrIS, AIS and Alps realistic configs), only the Alps configs convert differently; the converted test configs in the previous commit are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
remove_ice_caps and force_retreat move from [ho_options] to a new [removal] section, read by a new subroutine handle_removal. These options remove ice other than by calving. The key names are unchanged. Like the other optional sections, [removal] is read whenever it is present. convert_cism_config.py moves both keys. No standalone test config uses them; CESM writes both (see the CISM-wrapper commit that adds a removal group). Testing (no answer changes): - Standalone suite: all 78 output comparisons BFB; Glissade logs differ only in the calving labels changed in the previous commit; Glide logs identical. - GrIS, AIS and Alps restart tests (old exe + original configs vs new exe + converted configs): all netCDF output BFB. - CESM subset vs alpha11e_stage1: 5 of 6 tests BFB; the fractional ERS_Ly5 test is deferred to the full aux_glc at the end of R1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ction
Move the options and parameters for surface climate forcing (SMB and
surface air temperature) to a new [climate] section, read by a new
subroutine handle_climate:
from [options]: smb_input, smb_input_function, artm_input_function,
enable_smb_anomaly, enable_artm_anomaly,
enable_snow_anomaly, enable_precip_anomaly,
overwrite_acab, enable_acab_dthck_dt_correction
from [ho_options]: block_inception
from [parameters]: t_lapse, degree_factor, tmlt, snow_threshold_min,
snow_threshold_max, smb_factor, smb_anomaly_tstart,
smb_anomaly_timescale, overwrite_acab_value,
overwrite_acab_minthck, artm_anomaly_const,
artm_anomaly_tstart, artm_anomaly_timescale
The key names and log labels are unchanged. [glaciers] keeps its own
tmlt, snow_threshold_min and snow_threshold_max (glacier versions; to be
renamed with a glacier_ prefix later in R1).
convert_cism_config.py moves all 23 keys; the calvingMIP config template
is converted (smb_input).
Testing (no answer changes):
- Standalone suite: all 78 output comparisons BFB; Glissade logs differ
only in the labels changed in this commit; Glide logs identical.
- CESM: tested at the end of this batch (see the [grounding_line] commit).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…] section
Move the sliding-law options and basal friction parameters to a new
[basal_physics] section, read by a new subroutine handle_basal_physics.
Twelve keys are renamed (no which_/ho_ prefixes; misspelling fixed):
[options] slip_coeff -> btrc_method
[ho_options] which_ho_babc -> sliding_law
which_ho_beta_limit -> beta_limit_method
which_ho_powerlaw_c -> powerlaw_c_method
which_ho_coulomb_c -> coulomb_c_method
which_ho_effecpress -> effecpress_method
[parameters] basal_tract_const -> btrc_const
ho_beta_const -> beta_const
ho_beta_small -> beta_small
ho_beta_large -> beta_large
zoet_iversion_ut -> zoet_iverson_ut
zoet_iversion_nmax -> zoet_iverson_nmax
Moved with unchanged names: use_c_space_factor and
elevation_based_coulomb_c ([ho_options]); beta_grounded_min, the
powerlaw_c_*, coulomb_c_*, schoof_*, pseudo_plastic_* and coulomb_bump_*
parameters, powerlaw_m, beta_powerlaw_umax, friction_powerlaw_k and
p_ocean_penetration ([parameters]). 40 keys in all.
As agreed for R1, the log labels, the description arrays in
print_options and the error messages that name a key use the new names
(e.g. 'sliding_law' for 'ho_whichbabc'); so does a message in
glissade_basal_traction.F90.
convert_cism_config.py moves all 40 keys and renames the seven that CESM
users can set in user_nl_cism. The test configs and templates are
converted, and the MISMIP, MISMIP3d, MISMIP+, ISMIP-HOM and slab setup
scripts write the new section and key names.
Testing (no answer changes):
- Standalone suite: all 78 output comparisons BFB; Glissade logs differ
only in the labels changed in this commit; Glide logs identical.
- CESM: tested at the end of this batch (see the [grounding_line] commit).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_hydro] Move the four grounding-line options from [ho_options] to a new [grounding_line] section, read by a new subroutine handle_grounding_line, with new names (no which_ho_ prefixes): which_ho_ground -> grounding_line_param which_ho_fground_no_glp -> fground_no_glp which_ho_ground_bmlt -> grounding_line_bmlt which_ho_flotation_function -> flotation_function Also move the basal water option, which switches basal hydrology on, into the existing [basal_hydro] section, and rename a [basal_hydro] key: [ho_options] which_ho_bwat -> [basal_hydro] bwat_method [basal_hydro] ho_flux_routing_scheme -> [basal_hydro] flux_routing_method [basal_hydro] is read whenever it is present; bwat_method is now the switch inside it, as for the other feature sections. As agreed for R1, the log labels, the description arrays and the error messages that name a key use the new names. convert_cism_config.py moves and renames all six keys, including the five that CESM users can set in user_nl_cism. The MISMIP, MISMIP3d, MISMIP+ and calvingMIP templates are converted. grounding_line_bmlt = 1 or 2 with grounding_line_param /= 2 is now a fatal error. Previously CISM reset grounding_line_bmlt to 0 and wrote a log message that was easy to miss. The MISMIP+ template, which had this combination, now sets grounding_line_bmlt = 0, the value the reset gave. Testing (no answer changes): - Standalone suite: all 78 output comparisons BFB; Glissade logs differ only in the changed labels and, for MISMIP+, in the removed reset messages; Glide logs identical. With the original MISMIP+ configs (grounding_line_bmlt = 1, grounding_line_param = 1) CISM now aborts. - GrIS, AIS and Alps restart tests (old exe + original configs vs new exe + converted configs): all netCDF output BFB. - CESM subset (5 tests) vs alpha11e_stage1, with the climate, basal_physics and grounding_line commits: all BFB; NLCOMP differs as expected; the new sections are in each CaseDocs cism config, with no unused-key warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions
Move the options and parameters for basal melting of floating ice to a new
[basal_melt] section, read by a new subroutine handle_basal_melt, and the
ocean data used by the thermal-forcing melt schemes to a new [ocean_data]
section, read by handle_ocean_data:
[basal_melt]
from [options]: bmlt_float (now bmlt_float_method),
bmlt_float_thermal_forcing_param, bmlt_float_init,
enable_bmlt_anomaly, basal_mass_balance
from [ho_options]: which_ho_deltaT_ocn (now deltaT_ocn_method)
from [parameters]: bmlt_float_factor, bmlt_cavity_h0,
bmlt_anomaly_tstart, bmlt_anomaly_timescale,
bmlt_float_omega, bmlt_float_h0, bmlt_float_z0,
bmlt_float_const, bmlt_float_xlim, and the seven
bmlt_float_depth_* parameters
[ocean_data]
from [options]: ocean_data_domain, ocean_data_extrapolate
from [parameters]: gamma0, thermal_forcing_basin_min,
thermal_forcing_basin_max, thermal_forcing_anomaly,
thermal_forcing_anomaly_tstart,
thermal_forcing_anomaly_timescale,
thermal_forcing_anomaly_basin
Two keys are renamed: bmlt_float becomes bmlt_float_method (the switch;
the bmlt_float_* keys are its parameters), and which_ho_deltaT_ocn
becomes deltaT_ocn_method. The description arrays are named after their
keys (bmlt_float_method, deltaT_ocn_method, basal_mass_balance), and the
deltaT_ocn_method log label and the error messages use the new names,
including two fatal messages in glissade_bmlt_float.F90. Descriptive log
labels such as "basal melt, floating ice" are unchanged. The message
saying that deltaT_ocn_method needs the thermal-forcing scheme gets an
explicit format, so that with the longer names it still fits on one line.
The deltaT_ocn inversion parameters (inversion_deltaT_ocn_*) stay in
[parameters] until the [inversion] section is created.
convert_cism_config.py moves all 31 keys and renames the two keys in
user_nl_cism. The EISMINT-2-glissade, halfar (DIVA) and slab configs and
the MISMIP, MISMIP3d, MISMIP+ and calvingMIP templates are converted, and
mismip+Setup.py writes bmlt_float_method to [basal_melt].
Testing (no answer changes):
- Standalone suite: all 78 output comparisons BFB; Glissade logs differ
only in the labels changed in this commit; Glide logs identical.
- CESM: tested at the end of R1 (see the commit that moves the feature
switches into their sections) and with the full aux_glc suite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the velocity options and parameters to a new [velocity] section,
read by a new subroutine handle_velocity, and the options of the
nonlinear and linear velocity solvers, including matrix assembly, to a
new [velocity_solver] section, read by handle_velocity_solver. Thirteen
keys are renamed:
[velocity]
which_ho_approx -> stokes_approx
which_ho_efvs -> efvs_method
which_ho_gradient -> surface_gradient_method
which_ho_gradient_margin -> surface_gradient_margin_method
diva_slope_correction (from [ho_options]) and efvs_constant,
effstrain_min, max_slope (from [parameters]) keep their names.
[velocity_solver]
which_ho_nonlinear -> nonlinear_method
which_ho_resid -> nonlinear_residual
glissade_maxiter -> nonlinear_maxiters
which_ho_sparse -> linear_solver
which_ho_precond -> preconditioner
which_ho_assemble_beta -> assemble_beta
which_ho_assemble_taud -> assemble_taud
which_ho_assemble_bfric -> assemble_bfric
which_ho_assemble_lateral -> assemble_lateral
linear_solve_ncheck, linear_maxiters and linear_tolerance keep
their names.
The description arrays are named after their keys, and the log labels
and the two warnings that tell the user to set assemble_beta or
assemble_bfric use the new names. Descriptive error messages such as
"HO sparse solver input out of range" are unchanged.
convert_cism_config.py moves all 20 keys and renames the 13 keys in
user_nl_cism. All Glissade test configs and templates that set these
keys are converted (dome, EISMINT-2-glissade, halfar, ismip-hom, new,
ross, shelf, slab, stream, MISMIP, MISMIP3d, MISMIP+, calvingMIP); the
MISMIP, MISMIP3d, MISMIP+ and calvingMIP setup scripts and the ISMIP-HOM
and slab run scripts write the new keys, and three READMEs use the new
names.
Testing (no answer changes):
- Standalone suite: all 78 output comparisons BFB; Glissade logs differ
only in the labels changed in this commit,
and in where the longer surface_gradient_margin_method label wraps; Glide logs identical.
- CESM: tested at the end of R1 (see the commit that moves the feature
switches into their sections) and with the full aux_glc suite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the options and parameters for ice advection, the flow law and ice
temperature to three new sections, read by new subroutines
handle_advection, handle_flow_law and handle_temperature:
[advection]
evolution -> advection_method
which_ho_vertical_remap -> vertical_remap_order
which_ho_ice_age -> compute_ice_age
[flow_law]
flow_law, damage_flwa_feedback (from [options]) and n_glen,
flow_factor_ground, flow_factor_float, default_flwa (from
[parameters]); names unchanged
[temperature]
temperature -> temperature_method
which_ho_disp -> dissipation_method
which_ho_thermal_timestep -> thermal_timestep
temp_init (from [options]) and pmp_offset, pmp_threshold (from
[parameters]); names unchanged
The description arrays are named after their keys, and the log labels
and the messages that name a renamed key (the advection_method,
temperature_method and compute_ice_age range errors, and the warning
that tells the user to set thermal_timestep) use the new names.
Descriptive labels such as "temperature calculation" and "flow law" are
unchanged.
convert_cism_config.py moves all 15 keys and renames the six keys in
user_nl_cism. The Glissade test configs and templates are converted; the
MISMIP, MISMIP+ and calvingMIP setup scripts and the slab scripts write
the new sections, and the halfar scripts use [flow_law] when the config
has one and the old sections otherwise, since halfar also runs a Glide
config.
Testing (no answer changes):
- Standalone suite: all 78 output comparisons BFB; Glissade logs differ
only in the labels changed in this commit; Glide logs identical.
- GrIS, AIS and Alps restart tests (old exe + original configs vs new exe
+ converted configs): all netCDF output BFB.
- CESM subset at the end of this batch: SMS_D_Ly1 (intel and gnu) BFB;
the other three tests were rerun at the end of R1 (see the commit that
moves the feature switches) and with the full aux_glc suite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the parameters of the basal-friction and deltaT_ocn inversions from
[parameters] to a new [inversion] section, read by a new subroutine
handle_inversion, and the geothermal heat flux option and parameter to a
new [geothermal] section, read by handle_geothermal:
[inversion]
inversion_thck_flotation_buffer, inversion_thck_threshold,
inversion_damping_factor, inversion_babc_* (4 keys),
inversion_deltaT_ocn_* (4 keys), inversion_deltaT_basin_relax,
inversion_basin_flotation_threshold, inversion_basin_mass_correction,
inversion_basin_number_mass_correction; names unchanged
[geothermal]
gthf (from [options]) -> geothermal_method
geothermal (from [parameters]) -> geothermal_flux
The inversions themselves are still chosen in [basal_physics]
(powerlaw_c_method, coulomb_c_method) and [basal_melt]
(deltaT_ocn_method). The geothermal_method description array is named
after its key, and the comment and the log message that told the user to
set gthf = 1 name geothermal_method. The descriptive log label
"geothermal heat flux" is unchanged.
convert_cism_config.py moves all 17 keys and renames gthf and geothermal
in user_nl_cism. It also renames four user_nl_cism keys that the CESM
wrapper used to write under names CISM never read (deltaT_basin_relax and
three inversion_bmlt_basin_* keys); see the matching CISM-wrapper commit.
The EISMINT-2-glissade and slab configs and the calvingMIP template are
converted.
Testing (no answer changes):
- Standalone suite: all 78 output comparisons BFB; Glissade logs differ
only in the labels changed in this commit; Glide logs identical.
- CESM: tested at the end of R1 (see the commit that moves the feature
switches into their sections) and with the full aux_glc suite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the options and parameters left in [parameters], and the general
ones in [options] and [ho_options], to sections by topic, read by new
subroutines handle_numerics, handle_constants, handle_initialization and
handle_diagnostics:
[numerics] compute_blocks, reproducible_sums (from [ho_options]);
ice_limit, ice_limit_temp, thck_gradient_ramp,
periodic_offset_ew, periodic_offset_ns
[constants] rhoi, rhoo, grav, shci, lhci, trpt (still ignored in
CESM builds, which use the CESM shared constants)
[initialization] adjust_input_thickness, smooth_input_topography,
smooth_input_usrf, adjust_input_topography (from
[options]); the seven adjust_topg_* parameters
[diagnostics] dm_dt_diag, diag_minthck (from [options])
[grid] read_lat_lon, and sigma (now sigma_method), from
[options]
[options] log_level, from [parameters]
[parameters] is no longer read; handle_parameters is removed. [options]
keeps dycore, ioparams, restart, restart_extend_velo, forcewrite_final
and log_level, plus the isostasy and lateral melt switches, which move to
their own sections in the next commit. handle_grid reads sigma_method
after sigma_file, so that an explicit sigma_method still overrides the
SIGMA_EXTERNAL setting implied by sigma_file, as before.
handle_options now sets the message level, so configs without a
[parameters] section (ismip-hom, ross, shelf) also echo errors and
warnings to standard output; the log files are unchanged.
convert_cism_config.py moves all 29 keys and renames sigma in
user_nl_cism. 23 test configs and templates are converted. The MISMIP
and MISMIP3d templates keep a [parameters] section with powerlaw_c and
coulomb_c, which CISM has never read (it reads powerlaw_c_const and
coulomb_c_const); CISM now warns about an unused section instead of two
unused keys.
The ISMIP-HOM, slab and stream run scripts write periodic_offset_* to
[numerics] and the slab script writes rhoi and grav to [constants],
adding the section if the config lacks it. This also fixes the ISMIP-HOM
script for non-cyclic runs, which has failed since the [basal_physics]
commit removed the empty [parameters] section from ismip-hom.config.
Testing (no answer changes):
- Standalone suite: all 78 output comparisons BFB; Glissade log files
differ only in the labels changed in R1; Glide logs identical.
- CESM: tested at the end of R1 (see the commit that moves the feature
switches into their sections) and with the full aux_glc suite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…acier keys
Move the switches for three optional features into the existing sections
that hold their parameters, and rename keys in those sections:
[isostasy]
isostasy (from [options]; name unchanged)
which_relaxed -> input_topg_method
lithosphere -> lithosphere_method
asthenosphere -> asthenosphere_method
[lateral_melt]
which_lateral_melt (from [options]) -> lateral_melt_method
[glaciers]
enable_glaciers (from [ho_options]; name unchanged)
set_mu_star -> mu_star_method
set_alpha_snow -> alpha_snow_method
set_powerlaw_c -> glacier_powerlaw_c_method
snow_calc -> snow_method
tmlt -> glacier_tmlt
snow_threshold_min -> glacier_snow_threshold_min
snow_threshold_max -> glacier_snow_threshold_max
The glacier_ prefixes keep the keys unique across sections: [climate]
has its own tmlt, snow_threshold_min and snow_threshold_max, and
[basal_physics] has powerlaw_c_method.
Each switch now lives in its feature's section, which is read whenever
it is present. [ho_options] is no longer read; handle_ho_options is
removed. [options] now holds only dycore, ioparams, restart,
restart_extend_velo, forcewrite_final and log_level.
The description arrays are named after their keys, and the log labels
and the error messages that name a renamed key use the new names,
including three messages in glissade_isostasy.F90 about
input_topg_method.
convert_cism_config.py moves the three switches and renames the ten keys
(also in user_nl_cism, where tmlt and snow_threshold_* are the glacier
keys). The EISMINT-2-glissade configs are converted (isostasy).
Testing (no answer changes):
- Standalone suite: all 78 output comparisons BFB; Glissade logs differ
only in the labels changed in this commit; Glide logs identical.
- GrIS, AIS and Alps restart tests (old exe + original configs vs new exe
+ converted configs): all netCDF output BFB.
- CESM subset (5 tests) vs alpha11e_stage1, with this commit and the
matching CISM-wrapper commit: all BFB; NLCOMP differs as expected; the
CISM logs have no unused-key warnings.
- Full aux_glc suite (37 tests; NCK_Ly3, a known failure, skipped) vs
alpha11e_stage1, with this commit: all tests run; all restart, branch
and hybrid comparisons pass; all BFB except ERI_Ly10, whose baseline is
incomplete.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ates The MISMIP and MISMIP3d config templates set powerlaw_c and coulomb_c in [parameters], the names these basal friction coefficients had before they were renamed powerlaw_c_const and coulomb_c_const. CISM has not read the old names since then, so these tests have run with the CISM defaults instead of the values that the experiments prescribe. Rename the keys to powerlaw_c_const and coulomb_c_const, with unchanged values, and move them to [basal_physics], where CISM reads them. The templates no longer have a [parameters] section. This changes answers for MISMIP and MISMIP3d runs. Neither test is part of the standalone regression suite. 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_r1Base:
lipscomb/post_split_fixes(#104, PR F of Stage 2). Stacked; the base will be changed tomainafter the Stage 2 PRs are merged.Matching CISM-wrapper PR: ESCOMP/CISM-wrapper#162 (branch
lipscomb/config_reorg_r1).Summary
Glissade used to read almost every option from three long sections,
[options],[ho_options]and[parameters]. This PR splits them into short sections by physics, renames keys whose names were unclear (no morewhich_ho_prefixes), and adds a script that converts existing config files and CESMuser_nl_cismfiles. Option values are unchanged: they are still integers (strings and logicals come in a follow-up PR, R2).New sections:
[numerics],[constants],[initialization],[velocity],[velocity_solver],[advection],[flow_law],[temperature],[basal_physics],[grounding_line],[basal_melt],[ocean_data],[climate],[calving],[removal],[inversion],[geothermal],[diagnostics]. The existing sections[grid],[isostasy],[lateral_melt],[basal_hydro]and[glaciers]gain keys.[parameters]and[ho_options]are no longer read;[options]keeps onlydycore,ioparams,restart,restart_extend_velo,forcewrite_finalandlog_level.Rules:
isostasy,lateral_melt_method,bwat_method,enable_glaciers). A section is read whenever it is present; a missing section means defaults (feature off).glacier_tmltnext to[climate] tmlt).Converting config files
--checkexits with status 1 if a file needs converting, which is convenient in scripts. The same forms work for CESMuser_nl_cismfiles with--user-nl, e.g.The script moves 227 keys, 57 of them renamed, and leaves Glide configs (
dycore = 0) alone. All Glissade test configs and templates intests/are converted, and the test scripts write the new sections.Renamed keys
sigmasigma_methodwhich_ho_efvsefvs_methodwhich_ho_approxstokes_approxwhich_ho_gradient_marginsurface_gradient_margin_methodwhich_ho_gradientsurface_gradient_methodwhich_ho_assemble_betaassemble_betawhich_ho_assemble_bfricassemble_bfricwhich_ho_assemble_lateralassemble_lateralwhich_ho_assemble_taudassemble_taudwhich_ho_sparselinear_solverglissade_maxiternonlinear_maxiterswhich_ho_nonlinearnonlinear_methodwhich_ho_residnonlinear_residualwhich_ho_precondpreconditionerevolutionadvection_methodwhich_ho_ice_agecompute_ice_agewhich_ho_vertical_remapvertical_remap_orderwhich_ho_dispdissipation_methodtemperaturetemperature_methodwhich_ho_thermal_timestepthermal_timestepho_beta_constbeta_constho_beta_largebeta_largewhich_ho_beta_limitbeta_limit_methodho_beta_smallbeta_smallbasal_tract_constbtrc_constslip_coeffbtrc_methodwhich_ho_coulomb_ccoulomb_c_methodwhich_ho_effecpresseffecpress_methodwhich_ho_powerlaw_cpowerlaw_c_methodwhich_ho_babcsliding_lawzoet_iversion_nmaxzoet_iverson_nmaxzoet_iversion_utzoet_iverson_utwhich_ho_bwatbwat_methodho_flux_routing_schemeflux_routing_methodwhich_ho_fground_no_glpfground_no_glpwhich_ho_flotation_functionflotation_functionwhich_ho_ground_bmltgrounding_line_bmltwhich_ho_groundgrounding_line_parambmlt_floatbmlt_float_methodwhich_ho_deltaT_ocndeltaT_ocn_methodmarine_margincalving_lawlength_scalecalving_length_scalewhich_ho_calvingmip_domaincalvingmip_domainwhich_ho_calving_frontsubgrid_calving_frontwhich_lateral_meltlateral_melt_methodgeothermalgeothermal_fluxgthfgeothermal_methodasthenosphereasthenosphere_methodwhich_relaxedinput_topg_methodlithospherelithosphere_methodset_alpha_snowalpha_snow_methodset_powerlaw_cglacier_powerlaw_c_methodsnow_threshold_maxglacier_snow_threshold_maxsnow_threshold_minglacier_snow_threshold_mintmltglacier_tmltset_mu_starmu_star_methodsnow_calcsnow_methodKeys moved with unchanged names (170)
read_lat_lonlog_levelcompute_blocks,ice_limit,ice_limit_temp,periodic_offset_ew,periodic_offset_ns,reproducible_sums,thck_gradient_rampgrav,lhci,rhoi,rhoo,shci,trptadjust_input_thickness,adjust_input_topography,adjust_topg_delta,adjust_topg_max_adjust,adjust_topg_no_adjust,adjust_topg_xmax,adjust_topg_xmin,adjust_topg_ymax,adjust_topg_ymin,smooth_input_topography,smooth_input_usrfdiva_slope_correction,effstrain_min,efvs_constant,max_slopelinear_maxiters,linear_solve_ncheck,linear_tolerancedamage_flwa_feedback,default_flwa,flow_factor_float,flow_factor_ground,flow_law,n_glenpmp_offset,pmp_threshold,temp_initbeta_grounded_min,beta_powerlaw_umax,coulomb_bump_max_slope,coulomb_bump_wavelength,coulomb_c_bed_hi,coulomb_c_bed_lo,coulomb_c_const,coulomb_c_hi,coulomb_c_lo,coulomb_c_max,coulomb_c_min,elevation_based_coulomb_c,friction_powerlaw_k,p_ocean_penetration,powerlaw_c_const,powerlaw_c_max,powerlaw_c_min,powerlaw_m,pseudo_plastic_bedmax,pseudo_plastic_bedmin,pseudo_plastic_phimax,pseudo_plastic_phimin,pseudo_plastic_q,pseudo_plastic_u0,schoof_gamma,schoof_n,schoof_p,use_c_space_factorbasal_mass_balance,bmlt_anomaly_timescale,bmlt_anomaly_tstart,bmlt_cavity_h0,bmlt_float_const,bmlt_float_depth_frzmax,bmlt_float_depth_meltmax,bmlt_float_depth_meltmin,bmlt_float_depth_zfrzmax,bmlt_float_depth_zmelt0,bmlt_float_depth_zmeltmax,bmlt_float_depth_zmeltmin,bmlt_float_factor,bmlt_float_h0,bmlt_float_init,bmlt_float_omega,bmlt_float_thermal_forcing_param,bmlt_float_xlim,bmlt_float_z0,enable_bmlt_anomalygamma0,ocean_data_domain,ocean_data_extrapolate,thermal_forcing_anomaly,thermal_forcing_anomaly_basin,thermal_forcing_anomaly_timescale,thermal_forcing_anomaly_tstart,thermal_forcing_basin_max,thermal_forcing_basin_minartm_anomaly_const,artm_anomaly_timescale,artm_anomaly_tstart,artm_input_function,block_inception,degree_factor,enable_acab_dthck_dt_correction,enable_artm_anomaly,enable_precip_anomaly,enable_smb_anomaly,enable_snow_anomaly,overwrite_acab,overwrite_acab_minthck,overwrite_acab_value,smb_anomaly_timescale,smb_anomaly_tstart,smb_factor,smb_input,smb_input_function,snow_threshold_max,snow_threshold_min,t_lapse,tmltapply_calving_mask,calving_domain,calving_fraction,calving_front_radius,calving_front_x,calving_front_y,calving_init,calving_minthck,calving_timescale,cf_advance_retreat_amplitude,cf_advance_retreat_period,cliff_timescale,damage_constant,dthck_dx_cf,effec_stress_min,eigenconstant,f_ground_threshold,lateral_rate_min,limit_marine_cliffs,marine_limit,remove_icebergs,remove_isthmuses,stress_threshold,tau_eigenconstant1,tau_eigenconstant2,taumax_cliff,thck_effective_minforce_retreat,remove_ice_capsinversion_babc_length_scale,inversion_babc_relax_factor,inversion_babc_thck_scale,inversion_babc_timescale,inversion_basin_flotation_threshold,inversion_basin_mass_correction,inversion_basin_number_mass_correction,inversion_damping_factor,inversion_deltaT_basin_relax,inversion_deltaT_ocn_length_scale,inversion_deltaT_ocn_temp_scale,inversion_deltaT_ocn_thck_scale,inversion_deltaT_ocn_timescale,inversion_thck_flotation_buffer,inversion_thck_thresholdisostasyenable_glaciersdiag_minthck,dm_dt_diagCommits
btrac_consttobtrc_const; remove the unsupportedbtrcoptions 4 and 5[basal_physics] flwa_basal[calving][removal][climate][basal_physics][grounding_line]; basal water switch into[basal_hydro]; incompatiblegrounding_line_bmlt/grounding_line_paramis now an error[basal_melt]and[ocean_data][velocity]and[velocity_solver][advection],[flow_law],[temperature][inversion]and[geothermal][numerics],[constants],[initialization],[diagnostics],[grid]additions, short[options];[parameters]no longer read[isostasy],[lateral_melt],[glaciers]; isostasy and glacier renames;[ho_options]no longer readpowerlaw_c/coulomb_c, unread since an earlier rename, becomepowerlaw_c_const/coulomb_c_constAnswer changes
None for configs converted with the script, standalone or in CESM, except:
btrcoptions 4 and 5, the MISOMIP plume option (bmlt_float_method = 5), andgrounding_line_bmlt= 1 or 2 withoutgrounding_line_param = 2(which used to be reset silently; the MISMIP+ template now setsgrounding_line_bmlt = 0, the value the reset gave).Testing
All on derecho, in three batches of section commits plus a full suite at the end.
aux_glcsuite at the R1 tip (37 tests;NCK_Ly3, a known failure, skipped), against thealpha11e_stage1baseline (CISM-wrappercismwrap_3_00_003): all tests run, all restart/branch/hybrid comparisons pass, all bit-for-bit; NLCOMP differs as expected (config sections). TheERI_Ly10baseline is incomplete, so that test has no baseline comparison. The CISM logs of the CESM tests have no unused-key warnings.🤖 Generated with Claude Code