Repository navigation
Separate the Glide and Glissade dycores, part 2: model types, driver split, trimming, directory renames - #103
Open
whlipscomb wants to merge 39 commits into
Open
whlipscomb wants to merge 39 commits into
whlipscomb wants to merge 39 commits into
Conversation
Move glide_model_registry from libglide to libglimmer as glimmer_model_registry. The registry no longer keeps pointers to glide_global_type instances; register_model and deregister_model now take the integer model_id. This lets Glide and Glissade share the registry after Glissade gets its own model type. Remove glide_finalise_all, which was never called and was the only user of the stored pointers. Existing build directories need to rerun cmake, since the source lists are globbed. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… dycore Add libglissade/glissade_nc_custom.F90, a copy of glide_nc_custom with glissade_nc_fillall and glissade_nc_filldvars. GLAD and the standalone driver (for Glissade runs) now call glissade_nc_fillall; Glint and Glide keep glide_nc_custom. Add a dycore_prefix key to the [VARSET] section of each vars.def file (glide for glide_io, glint_io and glint_mbal_io; glissade for glissade_io, glad_io and glad_mbal_io). ncdf_template.F90.in uses DYCORE_PREFIX_types, DYCORE_PREFIX_global_type and DYCORE_PREFIX_nc_filldvars in place of the hard-coded glide names. (The placeholder must not contain the other VARSET placeholders such as NAME, or any uppercase text already in the template, e.g. DYCORE_GLIDE.) Until Glissade gets its own model type, glissade_types makes glide_global_type available as glissade_global_type. The CISM-wrapper (glc_io.F90) still calls glide_nc_filldvars, which works until the type switch; it will be changed to glissade_nc_filldvars in a separate wrapper commit. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move eismint_climate_type from glide_types to the driver module eismint_forcing, and remove model%eismint_climate; cism_front_end now holds the EISMINT climate parameters. eismint_massbalance and eismint_surftemp take the arrays they use (acab, artm, thck) plus the grid spacing and parallel info, instead of the model instance, so they can be used with either dycore. Remove the unused local variable periodic. The EXACT verification test (eismint_type = 4) sets model%tempwk%compheat from the Glide temperature solver, so it is moved to a new Glide-only subroutine, eismint_exact_forcing, and gives a fatal error with Glissade. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace cism_init_dycore, cism_run_dycore and cism_finalize_dycore with separate routines for each dycore (cism_init_glide, cism_run_glide, cism_finalize_glide, and the Glissade equivalents), each holding only its own dycore's calls. Steps shared by both dycores (reading the config file, timing, closing the log) are in private helper routines. gcm_to_cism_type gets a glissade_model alongside glide_model, plus whichdycore (read in gci_init_interface; default 2, as in glide_types), and gcm_cism_interface calls the routines for that dycore. This prepares for Glissade having its own model type. spinup_lithot is now called only for Glide (it did nothing for Glissade, since gthf = 2 is not allowed with Glissade). No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
glissade_types is now a full copy of glide_types instead of a re-export, with the derived types renamed from glide_* to glissade_* (e.g. glissade_global_type, glissade_geometry) and glide_allocarr and glide_deallocarr renamed to glissade_allocarr and glissade_deallocarr. Four types get a _type suffix to avoid clashing with module names: glissade_calving_type, glissade_lateral_melt_type, glissade_inversion_type and glissade_glacier_type. Option constants are duplicated in both modules. libglissade, libglad and glissade_vars.def now use the Glissade types, and GLAD no longer uses any libglide module: glad_i_readdata calls calc_lsrf_usrf (glimmer_utils), as Glissade does, instead of glide_calclsrf. (This is identical for eus = 0; for nonzero eus it is consistent with Glissade.) Glint gets its own copy of glad_read_restart_gcm (glint_restart_gcm), since it uses the Glide type. Existing build directories need to rerun cmake. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace each call to glide_calclsrf, and the line computing usrf that followed it, with a call to calc_lsrf_usrf (glimmer_utils), which Glissade and GLAD already use. Remove glide_calclsrf. For floating ice, glide_calclsrf set lsrf = -(rhoi/rhoo)*thck, leaving out eus; calc_lsrf_usrf uses eus - (rhoi/rhoo)*thck. The results are identical for eus = 0, which is the case in all current tests. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rename the remaining derived types in glissade_types so that every type name ends in _type, e.g. glissade_geometry -> glissade_geometry_type and glissade_velocity -> glissade_velocity_type. glissade_stress_t becomes glissade_stress_type, and isos_elastic becomes isos_elastic_type. (Four types already had the suffix, to avoid clashing with module names.) No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove libglad/glad_constants.F90, which was also used by Glint. The time conversion factors (days2hours, hours2seconds, days_in_year, years2hours, hours2years) are now in a time-conversion block at the end of glimmer_physcon, together with scyr and scday, and glad_set_year_length becomes set_year_length in the same module. The defaults default_diy and default_y2h are folded into the initial values. The lapse rate, used only by Glint, is now a local parameter in glint_downscaling_gcm. min_thck (always 0) is replaced by 0.d0 at its three uses; Glint now tests thck == 0.d0, since thck >= 0, and GLAD has a TODO to consider a small positive threshold. Glint no longer uses any libglad module. Existing build directories need to rerun cmake. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The standalone drivers (cism_front_end and the Glint example driver gcm_to_cism_glint) appended a line with the elapsed wall-clock time and other run information to a file named 'results' (or the name given with the -r command-line option). The wall time was wrong: gf_writestats (writestats.c) took the time by value, but the Fortran caller passed it by reference. GPTL timing (once working again) gives the same information. Remove glimmer_writestats.F90, writestats.c and writestats.h, the -r option and commandline_resultsname (glimmer_commandline and glint_commandline), and the timing variables (wall_start_time and wall_stop_time in glimmer_global, and the g2c timing fields). Also remove libglimmer/cfortran.h, which was not included anywhere. Existing build directories need to rerun cmake. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The component is not used by Glissade. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thk_scale, len_scale and velo_scale were left over from the old Glimmer scaling and are used in only a few places. Define them as local parameters where they are used (thk_scale in glide_thck, velo_scale in glide_temp, and velo_scale and len_scale in glissade_velo_higher, for whichefvs = HO_EFVS_FLOWFACT), with the same values. Write velo_scale as 500.0d0/scyr instead of 500.0/scyr; 500 is exact in single precision, so the value is unchanged. glimmer_paramets no longer uses glimmer_physcon, so eismint_forcing and glint_main now get scyr from glimmer_physcon directly. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The logical parameter oldglide (glimmer_paramets) was set to .false. It was used to reproduce Glimmer 1.0.18 results for the dome and EISMINT-2 tests, and those comparisons are no longer needed. Keep only the oldglide = .false. code paths: - cism_front_end: always call glide_init_state_diagnostic - glide.F90: remove the vertical velocity call in glide_tstep_p1 (oldglide only); always reset the mask after calving and compute the vertical velocity in glide_tstep_p3; remove a commented-out oldglide block - glide_temp: thin-ice columns always use glide_init_temp_column - glide_thck: always update the diffusivity before the final velocity Also remove the unused import of gn in glissade_basal_traction. No answer changes (dome DIVA/SLAP/Glide, dome restart tests, EISMINT-2 A/B, Glide dome no-slip and btrc, Halfar). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Glide used an integer parameter, gn = 3, for the Glen flow-law exponent, while Glissade used the real(dp) variable n_glen. Glide already read n_glen from the config file and wrote it to the log, but ignored it. Now Glide uses n_glen: - glimmer_physcon: remove gn - glide_temp: p1 is a local real(dp), n_glen + 1 - glide_velo: p1, p2 and p4 are module-private real(dp) variables, set in init_velo; remove the unused p3 - glide_velo: velowk%depth and cflow use n_glen Also change gn to n_glen in two Glissade comments. Glissade answers do not change. Glide answers change at roundoff level, since x**n_glen (real exponent) is computed differently from x**3 (integer exponent). Max relative differences are ~1e-16 for the 10-year Glide dome test and ~1e-12 for Halfar and EISMINT-2 A. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
glissade_types started as a copy of glide_types. Remove the parts that Glissade never uses: - The Glide work types glissade_velowk_type, glissade_thckwk_type and glissade_tempwk_type, glissade_prof_type, and glissade_solver_type (for the Glide thickness solver), with the corresponding components of glissade_global_type - The commented-out basalproc and phaml types, and commented-out allocations and deallocations for phaml, ground and basalproc arrays - The whichdycore conditionals in glissade_allocarr: keep the Glissade branches and drop the Glide branches glissade_allocarr no longer allocates the solver_data arrays (rhsd, answ and a sparse matrix), which were allocated in every Glissade run but never used. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Glissade is always run with whichdycore = DYCORE_GLISSADE, so these checks are no longer needed: - glissade.F90: two select case blocks with only a DYCORE_GLISSADE case (velocity solver initialization and call) - glissade_diagnostics: two "if (whichdycore == DYCORE_GLISSADE)" blocks for the global mass budget and its log output The remaining whichdycore checks are in glissade_setup (to be trimmed with the setup cleanup) and in glad_initialise (the check that GLAD runs only with Glissade). No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove components of the Glissade derived types that Glissade never uses (left over from the copy of glide_types), with their allocations, deallocations and doc comments: - geometry: stagmask, lower_cell_loc, lower_cell_temp, thck_index, totpts, empty - geomderv: dlsrfdew, dlsrfdns, stagusrf, staglsrf, stagtopg - temper: stagbtemp, stagbpmp, lcondflx, dissipcol, perturb, grid, tpt, first1, newtemps - velocity: ubas, vbas, diffu_x, diffu_y, total_diffu, btraction - climate: acab_tavg (acab has no 'average' flag in glissade_vars.def; users should use acab_applied_tavg) - basal_hydro: stagbwat - basal_physics: powerlaw_c_basin_relax - numerics: alpha, alphas, nshlf - paramets: slip_ratio, bwat_smooth - plume: zbed_deep Glissade code uses some of these names (e.g., ubas, stagusrf, lcondflx) only for local variables, not for the type components. The ubas and vbas output fields are computed from uvel and vvel. Move stagthck from glissade_geomderv_type to glissade_geometry_type, since it is an interpolated field, not a derivative. glissade_wvelintg now takes stagthck as an argument. In glissade_vars.def, add 'average: 1' to removal_rate, so that removal_rate_tavg (already allocated) is available as an output. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lithosphere temperature model (computed geothermal heat flux, gthf = 2) is supported only in Glide; since f428478, Glissade aborts if gthf = 2. Remove the remaining lithosphere code from Glissade: - glissade_types: glissade_lithot_type and the lithot component of glissade_global_type, with its allocation and deallocation - glissade_setup: handle_gthf and print_gthf ([GTHF] config section), and the litho_temp restart variable - glissade_diagnostics: lithosphere temperature profile at the diagnostic point - glissade_nc_custom: writing the lithoz coordinate - glissade_vars.def: the lithoz dimension and the litho_temp field - glad_mbal_vars.def: the lithoz dimension The gthf option remains (0 = uniform, 1 = prescribed 2D field), and gthf = 2 is still a fatal error for Glissade. No answer changes. Glissade output and restart files (including CESM history and restart files) no longer have the lithoz dimension and its coordinate variable, which were always present but never filled. Tested with: - Standalone dome (DIVA, SLAP, Glide), dome DIVA and Glide restart tests, Glide dome variants, Halfar, and EISMINT-2 A and B: identical except for the missing lithoz coordinate in Glissade files - CESM: 4 aux_glc tests (intel and gnu) compared against baseline dycore_split_3b2: all pass, including the baseline comparisons (cprnc does not compare coordinate variables such as lithoz) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
glissade_setup started as a copy of glide_setup. Remove config options that Glissade does not use, with their fields in glissade_types: - Glide-only: basal_water (whichbwat, with the BWATER_* constants), vertical_integration (whichwvel, with the VERTINT_* constants), periodic_ew, hydro_time (hydtim), basal_tract_max, basal_tract_slope and basal_tract_tanh (btrac_max, btrac_slope, bpar; only for slip_coeff options that the Glissade SIA solver rejects), and profile (profile_period) - No longer used: expand_calving_mask (its code was removed in d1583a5), damage_threshold (last used before af61e5d), and forcewrite_restart (replaced by the hybrid restart option in 38f406a; put back by mistake in a 2024 merge fix, with no effect). To write the initial state on a restart, use restart = 2 (hybrid restart). Old config files with these keys still work; the config parser ignores unused keys. Remove the whichdycore checks in glissade_setup: drop the Glide branches (Glide-only checks and logging, the Glide restart variables) and keep the Glissade branches. The dycore option is still read and logged, and Glam (dycore = 1) still gives a fatal error. Rename define_glide_restart_variables to define_glissade_restart_variables, and glide_calc_sigma_pattyn to glissade_calc_sigma_pattyn. No answer changes. The log no longer lists the basal_water and vertical_integration options. Tested with: - Standalone dome (DIVA, SLAP, Glide), dome DIVA and Glide restart tests, Glide dome variants, Halfar, and EISMINT-2 A and B: identical outputs; logs differ only by the two removed option lines - CESM (with the matching CISM-wrapper change): 4 aux_glc tests (intel and gnu) compared against baseline dycore_split_3b2: runs, restart comparisons and baseline comparisons pass; NLCOMP differs only because cism.config no longer contains vertical_integration Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove entries from glissade_vars.def for fields that Glissade never computes, along with their components in glissade_types: - Glide-only fields, not allocated in Glissade (requesting them gave a log message and no output): wgrd, diffu, taux and tauy (velocity%tau_x, tau_y), dthckdtm, dusrfdtm - Fields that were allocated but never set (output was all zeros): uflx, vflx (Glide fluxes) and thkmask (Glide mask; Glissade has not used it since b953d2c) - glacier_area_factor (glacier%area_factor): replaced by projection%stere%area_factor in a270ff8; the area_factor output remains - calving_lateral (calving%lateral_rate): no longer set since the stochastic calving changes in af61e5d. Could be brought back if that option is supported again. - tau_c (basal_physics%tau_c, yield stress for plastic sliding): never set in Glissade Config files that request these fields still run; CISM writes a warning that not all requested output variables were created. No answer changes. Tested with: - Standalone dome (DIVA, SLAP, Glide), dome DIVA and Glide restart tests, Glide dome variants, Halfar, and EISMINT-2 A and B: identical to the previous commit - CESM: 4 aux_glc tests (intel and gnu) compared against baseline dycore_split_3b2: runs, restart comparisons and baseline comparisons pass (NLCOMP differs only by vertical_integration, removed in the previous commit) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
glissade_write_diag had branches for temperatures on the unstaggered vertical grid (at layer interfaces), as in Glide: one in the total ice energy sum and one in the vertical profile at the diagnostic point. Glissade temperatures are always on the staggered grid (temp is allocated with vertical dimension 0:upn), so these branches never ran. Remove them and keep the staggered-grid code. No answer changes; the log output is unchanged. Tested with the standalone dome (DIVA, SLAP, Glide), dome DIVA and Glide restart tests, Glide dome variants, Halfar, and EISMINT-2 A and B: outputs and logs identical to the previous commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
glide_vars.def still had the full list of output fields from before the Glide/Glissade split. Remove the 160 entries whose fields are never computed or used by Glide (Glissade velocity solver, stress, calving, lateral melt, ocean forcing, inversion, glacier and mass-flux fields), along with the zocn, zatm, glacierid and axis dimensions and their coordinate output in glide_nc_custom. The basin dimension and the per-basin scalars remain for now, since glide_diagnostics still computes them. No answer changes. Glide output files no longer have the empty zocn, zatm, glacierid and axis coordinate variables. Glide configs that request a removed field (e.g., total_smb_flux_tavg, which Glide wrote as zeros) still run, with a warning that the field was not created. Tested with: - Standalone dome DIVA/SLAP (identical), and Glide dome, Glide restart, Glide dome variants, Halfar and EISMINT-2 A and B: all fields identical; files lack the four coordinate variables, and the Glide restart test's time-average file lacks total_smb_flux_tavg - EISMINT-1 (6 configs) and isostasy (4 configs, local and elastic lithosphere), shortened to 5000 years, old vs new executable: all fields identical except the four removed coordinate variables Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
glide_write_diag still computed and printed diagnostics that came from Glissade, based on fields that Glide never sets. Remove them: - Ice cap area and volume (ice_cap_mask is never set in Glide, so the log always showed zeros) - Total basal melt for floating ice and its target (bmlt_float and bmlt_float_target are never set in Glide) - Per-basin diagnostics (Glide does not set basin_number; these were active only with nbasin > 1) - The ice age at the diagnostic point (Glide does not compute ice age) - The bwat_diag option for flux-routing basal hydrology; the point diagnostics now always show bwat Also remove the branches for temperatures on the staggered vertical grid (in the total energy and the point profile). Glide temperatures are always on the unstaggered grid, so these branches never ran. Remove the corresponding entries from glide_vars.def (bmlt_float, bmlt_float_target, basin_number, total_bmlt_float, total_bmlt_float_target, the *_basin scalars, ice_cap_mask, and the basin dimension) and the basin coordinate output in glide_nc_custom. As a result, Glide no longer uses any options from the [ho_options] section (which_ho_bwat, which_ho_ice_age, remove_ice_caps, enable_glaciers). No answer changes. The Glide log no longer has the ice cap lines, and the header of the point temperature profile no longer has an ice age column. Glide output files no longer have the basin coordinate. Tested with: - Standalone dome DIVA/SLAP and Glissade restart test: identical - Glide dome, Glide restart, Glide dome variants, Halfar and EISMINT-2 A and B: all fields identical except the removed basin coordinate; logs differ only by the removed ice cap lines and the profile header - EISMINT-1 (6 configs) and isostasy (4 configs), shortened to 5000 years, old vs new executable: same as above Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
glide_setup still read, checked and logged the full set of Glissade options and parameters. Remove everything that Glide does not use: - The [ho_options], [glaciers], [basal_hydro], [lateral_melt], [grid_ocn] and [grid_atm] sections, with their handle_* and print_* routines and glide_get_zocn/glide_get_zatm (called from glide.F90) - From [grid]: nx_block, ny_block and global_bc (Glide is serial, and distributed_grid is called without a global_bc argument) - From [time]: subcyc and adaptive_cfl_threshold - From [options]: 30 Glissade options (ocean melt, SMB/artm input functions, anomaly forcing, calving, input adjustments, etc.) - From [parameters]: 140 Glissade parameters (basal friction laws, calving, inversion, ocean melt, anomalies, plume, etc.), with their scaling in glide_scale_params - The whichdycore branches: keep the Glide branches and drop the Glissade branches, including the Glissade restart variables - The Glissade-only logging, consistency checks and restart variables that depended on the removed options, and the option name lists that are no longer used The Glide restart file keeps acab (or smb), now selected directly by options%smb_input instead of through the Glissade smb_input_function option. Glide still reads sigma, sigma_file, ntem, dt_input_option, nsteps_per_year and the [isostasy], [GTHF] and [sigma] sections. The Glide config format is otherwise unchanged; old Glide config files that contain the removed keys still run (unused keys are ignored, and unused sections give a warning). No answer changes. The Glide log no longer lists the Glissade options and parameters or the global boundary condition. Tested with: - Standalone dome DIVA/SLAP and Glissade restart test: identical - Glide dome, Glide restart (including restart files), Glide dome variants, Halfar and EISMINT-2 A and B: identical outputs; logs differ only by removed lines - EISMINT-1 (6 configs) and isostasy (4 configs), shortened to 5000 years, old vs new executable: identical outputs; logs differ only by removed lines Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Glide is a serial code that uses cism_parallel in a trivial form (one task, no halo cells). Remove the uses that are no longer needed: - glide_mask: remove glide_marine_margin_normal, calc_normal_45deg and upwind_from_mask, which were not called (old routines with TODOs to remove them), along with their halo updates and the cism_parallel import - isostasy_elastic: compute the elastic load directly on the model arrays, without the gather/scatter and halo update. These were left over from when Glissade used the Glide isostasy modules; Glissade now has its own parallel isostasy modules. Remove the parallel argument from calc_elastic. Add a comment in glide_initialise explaining why Glide still calls distributed_grid: the shared netCDF I/O layer uses model%parallel. No answer changes. Tested with the standalone dome, Glide restart, Halfar and EISMINT-2 tests, and the four isostasy configs (local and elastic lithosphere, fluid and relaxing asthenosphere; 5000 years), old vs new: identical outputs and logs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NAME_set_nc_dims in the shared ncdf_template.F90.in set the sizes of the ocean level, atmosphere level, glacier, basin and CalvingMIP axis dimensions from model%ocean_data, model%climate, model%glacier and model%calving. These dimensions are used only by Glissade, but the shared template required every model type (including Glide's) to have these components. Move these assignments to a new subroutine, glissade_nc_set_custom_dims in glissade_nc_custom, called from NAME_set_nc_dims. Add glide_nc_set_custom_dims to glide_nc_custom; it sets nothing, since Glide has none of these dimensions. This allows the unused ocean_data and glacier types to be removed from glide_types. No answer changes. Tested with: - Standalone dome (DIVA, SLAP, Glide), dome DIVA and Glide restart tests, Glide dome variants, Halfar, and EISMINT-2 A and B: identical - Standalone Antarctica 8 km (ISMIP6-style ocean forcing: nzocn = 30, nbasin = 16) and Alps 200 m (3633 glaciers) runs, 5 years plus a restart to 10 years, old vs new executable: all fields identical in all output and restart files; logs identical - CESM: 4 aux_glc tests (intel and gnu) compared against baseline dycore_split_3b2: runs, restart comparisons and baseline comparisons pass (NLCOMP differs only by vertical_integration, removed earlier) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
glide_types still had the full set of derived types and components from before the Glide/Glissade split. Remove everything that Glide does not use (glide_types.F90 goes from about 4300 to about 1500 lines): - Types used only by Glissade: glide_mass_flux, glide_tensor, glide_stress_t, glide_lateral_melt, glide_basal_physics, glide_ocean_data, glide_glacier, glide_inversion and glide_plume, with their components in glide_global_type - About 330 unused components of the remaining types, e.g. 72 Glissade options, Glissade geometry, velocity, climate, calving and temperature fields, and all but bmlt, bmlt_applied(_tavg) and bmlt_ground in glide_basal_melt and all but bwat, stagbwat and bwatflx in glide_basal_hydro - 183 option constants that no Glide or Glint code uses - The whichdycore branches in glide_allocarr (keep the Glide branches), the allocations and deallocations of removed fields, the unused accessor functions get_nzocn and get_nzatm, and the commented-out basalproc and phaml types - Comments and doc items for removed fields Rename glissade_solver (the type for the Glide thickness solver) to glide_solver. Also remove two glide_vars.def entries for fields that Glide never sets (latmelt_thck, bwat_diag), and the lateral melt term in glint_upscale, which was always zero for Glide. Note: Glint is not tested here (there is no standalone Glint test case). No answer changes. Tested with: - Standalone dome DIVA/SLAP and Glissade restart test: identical - Glide dome, Glide restart (including time-average and restart files), Glide dome variants, Halfar and EISMINT-2 A and B: identical outputs and logs - EISMINT-1 (6 configs) and isostasy (4 configs), shortened to 5000 years, old vs new executable: identical outputs and logs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final cleanup after separating the Glide and Glissade dycores: - glissade_velo: remove the unused include of glide_nan.inc - glissade_diagnostics: remove a branch for uhalo = 0 (used only by Glide; Glissade always has halo cells), and a completed TODO - Update comments in Glissade code that referred to glide_io, glide_types, glide_vars.def and glide_setup where the Glissade versions now apply, and remove notes about the Glide dycore from glissade_types - glide_types: set the default whichdycore to 0 (Glide) - libglad/README: refer to Glissade instead of glide_tstep_p1 The dycore option itself (read by both glide_setup and glissade_setup) will be revisited with the dycore renumbering in the config reorganization. No answer changes. Tested with the standalone dome (DIVA, SLAP, Glide), dome DIVA and Glide restart tests, Glide dome variants, Halfar, and EISMINT-2 A and B: identical outputs and logs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GLAD keeps its own model time (in years), which it advances by one ice time step at a time and passes to glissade_tstep. The name glide_time dates from when GLAD drove the Glide dycore; GLAD now runs only with Glissade. (Glint, which runs with Glide, keeps glide_time.) This requires a matching change in CISM-wrapper (glc_io.F90 and a comment in glc_InitMod.F90). No answer changes. Tested with the standalone tests (identical) and 4 CESM aux_glc tests (intel and gnu) compared against baseline dycore_split_3b2: runs, restart comparisons and baseline comparisons pass (NLCOMP differs only by vertical_integration, removed in f10e90e). New baseline dycore_split_phase7 generated from this version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cleanup from a readthrough of the separated Glide and Glissade code. Glide (glide_types, glide_setup, glide_vars.def, glide_diagnostics): - Remove options supported only by Glissade: evolution 3-5, temperature option 3 (enthalpy), temp_init 3 and 4, calving options 5-11, asthenosphere option 2 (laterally varying relaxation time), the compute_blocks option, and the HO_SPARSE_PCG_* solver constants. Remove the checks that rejected these options with Glide; they are now caught by the range checks. - Renumber Huybrechts calving (whichcalving = CALVING_HUYBRECHTS) from 12 to 5. Old Glide config files that use marine_margin = 12 must change to marine_margin = 5; with 12, Glide now stops with an out-of-range error. No config file in the repo uses this option. - Rename ASTHENOSPHERE_RELAXING_CONST to ASTHENOSPHERE_RELAXING (value unchanged). - Remove Glissade-only fields: ice_domain_mask, ice_age, removal_thck, artm_corrected, adv_cfl_dt, diff_cfl_dt, and the damage constants. Remove ice_domain_mask, ice_age, adv_cfl_dt and diff_cfl_dt from glide_vars.def. - Restore parameters for supported options that are not referenced in the code (GTHF_PRESCRIBED_2D, ISOSTASY_NONE, CALVING_INIT_OFF, DT_IN_YEARS), following the convention that every supported option, including the default, has a named parameter. - Remove the enthalpy (waterfrac) and tau_relax restart-list entries and an empty whichbtrc block from define_glide_restart_variables. - glide_diagnostics: set artm_diag from artm instead of artm_corrected, which Glide never set. (artm_diag is computed but not written to the log, so the log is unchanged.) Remove the "Max bmlt grnd" line, since all Glide basal melt is grounded (bmlt = bmlt_ground); the old block also tested the wrong variable (max_bmlt_global) before writing. - Remove obsolete comments and empty parameter-section headers. Glissade (glissade_types, glissade_setup, glissade, glissade_diagnostics): - Remove options supported only by Glide: evolution 0-2, gthf option 2 (and the check that rejected it), and Huybrechts calving (option 12). The remaining evolution options keep their numbers (3-5) until the config reorganization; the range check now tests for 3 <= whichevol <= 5. - Change the default whichevol from 0 to 3 (incremental remapping). Before, a config with no evolution setting stopped with an error. - Remove the unused basal-processes (BAS_PROC) options and temper%niter, and the "Some Stats" lines that wrote niter (always zero) to the log at the end of the run. - verbose_diagnostics is now a variable instead of a parameter. - Remove obsolete comments and blank lines. Glint: glint_upscale no longer adds removal_thck to the solid runoff. Glide never set removal_thck, so it was always zero. Other: minor comment fixes in glide.F90, glide_bwater.F90, glide_ground.F90, isostasy.F90, glimmer_sparse.F90 (the method numbers written by sparse_easy_solve) and glimmer_scales.F90. Add WHL TODO comments for later changes, including some for the config reorganization. No answer changes. Log changes: the Glide diagnostic-point air temperature, the removed Glide "Max bmlt grnd" line, and the removed Glissade "Some Stats" lines. Tested with the standalone dome (DIVA, SLAP, Glide), dome DIVA and Glide restart tests, Glide dome variants, Halfar, and EISMINT-2 A and B: identical outputs; logs identical except for the Glissade "Some Stats" lines. Greenland standalone test OK. CESM: SMS_D_Ly1.f09_g17_gris4.T1850Gg (intel and gnu) built and passed, including the baseline comparison against dycore_split_phase7 (BFB). Glint and the Glide isostasy tests were not run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Glam dycore (dycore = 1) was removed long ago; choosing it gave a fatal error. Remove the remaining references: - glide_types, glissade_types: remove DYCORE_GLAM, and the Glam (and other-dycore) entries in the dycore documentation. - glide_setup, glissade_setup: each dycore now accepts only its own dycore value (0 for Glide, 2 for Glissade) and stops with an error otherwise. The 'Dycore' line in the log is unchanged. - gcm_cism_interface: the standalone driver now stops with an error unless dycore is 0 (Glide) or 2 (Glissade). Before, any value other than 0 was passed to Glissade. - Update comments in glimmer_ncio and glissade_therm that mentioned Glam. glissade_types keeps DYCORE_GLIDE, which is used in ncdf_template.F90.in (from which both glide_io and glissade_io are generated). Slot 1 is now free. Glissade will become dycore = 1 in the config reorganization. No answer changes. Tested with the standalone dome (DIVA, SLAP, Glide), dome DIVA and Glide restart tests, Glide dome variants, Halfar, and EISMINT-2 A and B: identical outputs and logs. A dome run with dycore = 1 (or 5) stops with the new error message. CESM: SMS_D_Ly1.f09_g17_gris4.T1850Gg (intel) passed, including the baseline comparison against dycore_split_phase7 (BFB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Small Phase 7 follow-ups after the Glide/Glissade split: - glide_types: move stagthck from glide_geomderv to glide_geometry (as done for Glissade in 2042ca5). wvelintg now takes stagthck as an argument instead of reading it from geomderv. - glide_diagnostics: remove the cism_parallel calls. Glide runs on a single task with no halo cells, so the reductions, broadcasts and local/global index conversions did nothing. glide_init_diag now sets idiag_local = idiag, jdiag_local = jdiag and rdiag_local = 0 directly (idiag and jdiag are checked in glide_setup). The global sums use two private functions, masked_sum_2d and masked_sum_3d, with the same loop order as parallel_global_sum, so the log output is unchanged. verbose_diagnostics is now a variable instead of a parameter. - glide_types/glide_temp: tempwk%cons and tempwk%f now have 4 elements instead of 5. The fifth element was always zero and never used. - glide_types: remove the unused ewn and nsn components of glide_solver. - glide_deallocarr: deallocate numerics%dups and the solver sparse matrix (del_sparse_matrix), which were allocated in glide_allocarr but never freed. - Rename the isostasy types: isos_elastic -> glide_isos_elastic and isostasy_type -> glide_isostasy_type in Glide; isos_elastic_type -> glissade_isos_elastic_type and isostasy_type -> glissade_isostasy_type in Glissade. - cism_front_end: remove the reads of the dycore option in cism_init_glide and cism_init_glissade. glide_config and glissade_config read it themselves before it is used. No answer changes. Tested with the standalone dome (DIVA, SLAP, Glide), dome DIVA and Glide restart tests, Glide dome variants, Halfar, and EISMINT-2 A and B: identical outputs; logs identical except for the Glissade "Some Stats" lines removed in 16af291. EISMINT-1 (6 configs) and the four Glide isostasy configs (5000 years): identical outputs and logs compared to reference runs made on 2026-10-31 (no Glide answer changes since). CESM: SMS_D_Ly1.f09_g17_gris4.T1850Gg (intel with cism-isostasy_period1, and gnu) passed, including the baseline comparison against dycore_split_phase7_full (BFB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Small Phase 7 follow-ups in the shared libglimmer code: - Remove module glimmer_scales. glimmer_init_scales has been empty since the old Glimmer scale factors were removed (April 2025). Remove its calls in glide_initialise and glissade_initialise, and the 'use glimmer_scales' lines in glide, glissade and ncdf_template.F90.in. - Move the check_fill_values interface (real8 2d and 3d) from glissade_setup to glimmer_utils, and remove the identical copy in glide_setup (Glide never called it). glissade_initialise now gets it from glimmer_utils. - generate_ncvars.py: for glide_io and glissade_io, DATAMOD is the dycore's own types module, which the template already uses in full. Skip the redundant 'use <dycore>_types, only: <dycore>_global_type' line in that case, removing a compiler warning (intel remark #6536) that began with d8ed7f5. The Glint and GLAD I/O files are unchanged. No answer changes. Tested with the standalone dome (DIVA, SLAP, Glide), dome DIVA and Glide restart tests, Glide dome variants, Halfar, and EISMINT-2 A and B: identical outputs; logs identical except for the Glissade "Some Stats" lines removed in 16af291. CESM: SMS_D_Ly1.f09_g17_gris4.T1850Gg (intel with cism-isostasy_period1, and gnu) passed, including the baseline comparison against dycore_split_phase7_full (BFB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The module holds only glide_calve_ice, so name it for what it does. Rename libglide/glide_ground.F90 to glide_calve.F90 and module glide_ground to glide_calve, and update the two use statements in glide.F90 and a comment in glide_mask.F90. The name glide_calving (suggested in an old TODO, now removed) cannot be used, because glide_types already defines a derived type glide_calving; ifort, ifx and gfortran reject a module and a type with the same name when both are visible. No answer changes. Tested with the standalone suite (dome DIVA, SLAP, Glide; DIVA and Glide restart tests; Glide dome variants; Halfar; EISMINT-2 A and B): identical outputs and logs, except for the Glissade "Some Stats" lines removed in 16af291. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…carr The header comments of glide_allocarr and glissade_allocarr listed the allocated arrays and their dimensions as LaTeX itemized lists (Doxygen '!>' comments). The lists were far from complete (about 70 of ~250 allocated arrays in Glissade, 33 of ~72 in Glide) and had some stale names. Nothing reads them: the old cism-documentation repo used them only through a Doxygen run that has been disabled for years and never covered libglissade, and the documentation variable tables come from vars.def via generate_ncvars.py. Remove the lists and the TODO comments about them; keep the one-line description of each subroutine. Comment-only change. Tested with the standalone suite: identical outputs and logs, except for the Glissade "Some Stats" lines removed in 16af291. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Glint example (Greenland 20 km, PDD and SMB cases) runs correctly again. It could not run on the code before the Glide/Glissade split: Glide crashed in its diagnostics (unallocated ice_age), and Glide velocities were wrong by orders of magnitude (spurious factor of scyr in cflow); both were fixed in 8559727. Since c409e81, the 20 km results are unchanged (identical in all fields). README.md: - Note that the input files can be copied from the CESM inputdata directory on Derecho, and add the Derecho build path - The 5 km case now uses gland5.input.nc from CESM inputdata (instead of Greenland_5km_v1.1.nc) - Note that the 5 km case is currently unstable with gland5.input.nc (not investigated); the 20 km cases are used to test Glint - Glint is no longer described as required for coupling to a climate model (CESM uses GLAD) greenland_5km.config.pdd: read gland5.input.nc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rename isostasy.F90, isostasy_elastic.F90 and isostasy_kelvin.F90 in libglide to glide_isostasy.F90, glide_isostasy_elastic.F90 and glide_isostasy_kelvin.F90, and rename the modules accordingly, for consistency with the other Glide modules (and with glissade_isostasy* in Glissade). Existing build directories need to rerun cmake, since CMake collects the source files with a glob. No answer changes. Tested with the standalone tests (identical to baseline 4f87262) and the four Glide isostasy configs (tests/EISMINT/isos, 5000 years), old vs new: identical outputs and logs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In libglimmer: - Remove four modules that are not used anywhere in CISM or CISM-wrapper: glimmer_map_proj4, glimmer_searchcircle, glimmer_ts and ncdf_utils - Rename parallel_mpi.F90 to cism_parallel.F90, to match the name of the module it contains (cism_parallel) - Rename profile.F90 to cism_profile.F90, and the module profile to cism_profile, and update the 'use' statements Existing build directories need to rerun cmake, since CMake collects the source files with a glob. No answer changes. Tested with the standalone tests: identical to baseline 4f87262. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rename the source directories libglide -> glide libglissade -> glissade libglad -> glad libglint -> glint The 'lib' prefix suggested separate libraries, but these directories have not been built as separate libraries for many years: CMake builds all the CISM source directories into a single library (glimmercismfortran), which is linked into cism_driver (and used by CESM). The new names match the module prefixes in each directory. This is a rename-only commit: the files are moved with git mv, and the only content changes are path updates in CMakeLists.txt, the scripts in utils/build, a few READMEs and comments, and the (unbuilt) Makefile.am in tests/unsupported/exact-isothermal. Existing build directories need to rerun cmake. The libglimmer and libglimmer-solve directories are not renamed here. We are considering renaming libglimmer to cism_shared and libglimmer-solve to glimmer-solve or cism_solve, possibly together with renaming the glimmer_* files, modules and identifiers with a cism_ prefix. This decision is deferred to a future PR. No answer changes. Tested with: - A fresh out-of-source build and the in-place build - Standalone tests: identical to baseline 4f87262 - CESM: 4 aux_glc tests (intel and gnu) compared against baseline dycore_split_phase7: all pass, including NLCOMP and the baseline comparisons (this also covers f462028) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 12, 2026
…fixes 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. Conflicts resolved in glissade_setup.F90 and glissade_types.F90, the Glissade copies of the Glide files created in this branch: the basin_number restart condition and the comment on the ocean arrays are applied to the Glissade copies (the Glide files do not need them). 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
…fixes 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/split_glide_glissade_2Base:
lipscomb/split_glide_glissade_1(#102, PR D). Stacked; the base will be changed tomainafter the previous PRs are merged.Fifth of six PRs (A-F) that replace #94. Matching CISM-wrapper PR: ESCOMP/CISM-wrapper#161.
Update (December 2026): one merge commit at the end of this branch (5cad210) 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. The merge resolves conflicts in the new Glissade copies of the setup and types modules, where the fixes are applied to the Glissade copies.
Summary
Second half of the Glide/Glissade separation (phases 6-7 of #94). After this PR, Glide and Glissade each have their own model type, setup, I/O and diagnostics, neither uses the other's modules, and the source directories are renamed (
libglide->glide,libglissade->glissade,libglad->glad,libglint->glint).Differences from #94: the SMB budget fields from #97 move with the code. In 4f2b326 they are added to Glissade's own types module, and in 1c214f1 and e6882aa they leave
glide_vars.defandglide_types.F90together with the other Glissade-only fields.Answer changes
None for Glissade or CESM. Glide changes at roundoff level in one commit (f8d5df3,
n_gleninstead ofgn). The CESM namelist no longer hasvertical_integration(removed in ESCOMP/CISM-wrapper#161).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; the only namelist difference is the removedvertical_integration. 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.🤖 Generated with Claude Code