Repository navigation
Glide fixes and dome/Halfar test updates - #101
Open
whlipscomb wants to merge 3 commits into
Open
whlipscomb wants to merge 3 commits into
whlipscomb wants to merge 3 commits into
Conversation
This commit fixes a major bug in glide_velo.F90. In subroutine init_velo, the parameter cflow was initialized with an expression that included a spurious factor of scyr. I think this factor was introduced when the Glide scaling factors (thk0, vel0, etc.) were removed. As a result, velocity computations were off by several orders of magnitude. With the factor removed, the velocity computation is correct. Also in Glide, I removed the redundant field model%velocity%bed_softness (known as 'soft' in glide_vars.def). The basal traction coefficient is now contained only in model%velocity%btrc (known as 'btrc' in glide_vars.def). I removed btrac_const and btrac_max from the velowk derived type; they are now part of the paramets derived type. I added logic in glide_setup to prevent Glide from running with which_ho_ice_age = 1 (since Glide does not support ice age calculations). I added logic in glide_diagnostics to turn off ice age diagnostics when which_ho_ice_age = 0. I tested these Glide changes in dome tests (both no-slip and with slip_coeff = 1), a Halfar test, and EISMINT-2 Experiment A. In these tests I was able to reproduce earlier results within roundoff. Other EISMINT-2 tests fail on restart; this still needs to be fixed. Glissade answers are unchanged.
For the dome test, this commit replaces dome.config with four similar files: dome.config.diva, dome.config.l1l2, dome.config.bp, and dome.config.glide. This makes it easier to test multiple velocity solvers with the same test problem. The default is dome.config.diva. (The old default, dome.config, used the BP solver.) For the Halfar test, this commit replaces halfar.config and halfar-HO.config with halfar.config.glide and halfar.config.diva. The new default is halfar.config.glide. Recall that for the Halfar test, Glide is more accurate than any of the Glissade solvers. I also modified runHalfar.py so that config files do not need semicolons before comments.
EISMINT-2 tests that start from the output of an earlier test (e.g., e2.b reads e2.a.restart.nc) were aborting at startup with a fatal error: deltax1 of file e2.a.restart.nc does not match with config deltax: 9.9692100E+36 25000.0 The cause was in subroutine glide_nc_filldvars. When there is no input file (as in e2.a), the grid coordinates x0, y0, x1 and y1 are computed from the grid spacing. The old code, which dated from early Glimmer, wrote one value per nf90_put_var call without a 'start' index, so each call overwrote the first element. Only the first element was set (to the last value computed), and the rest of each array was left as fill values. The x1 and y1 loops also stopped one point short. This commit computes each coordinate array in full and writes it with a single parallel_put_var call, as is done when there is an input file. The coordinate conventions are unchanged: x1 = (i-1)*dew and x0 = (i-1/2)*dew, and likewise for y. The fix changes only the coordinate values in output files of runs with no input file. Model answers are unchanged. Glissade is not affected, since it requires the coordinates to be read from an input file. Tested with the full EISMINT-2 suite, which now runs through. 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/glide_fixesBase:
lipscomb/remove_deprecated(#100, PR B). Stacked; the base will be changed tomainafter the previous PRs are merged.Third of six PRs (A-F) that replace #94. No matching CISM-wrapper PR.
Summary
cflow(init_velo), which made Glide velocities wrong by orders of magnitude; remove the redundantbed_softnessfield; Glide refuseswhich_ho_ice_age = 1; no ice-age diagnostics when it is offdome.configwithdome.config.{diva,l1l2,bp,glide}(default DIVA); Halfar:halfar.config.{glide,diva}(default Glide)Answer changes
Glide standalone runs change (the velocity fix). Glide runs on
maincurrently fail. Glissade and CESM: none. The default dome and Halfar configs change (new file names; dome default DIVA instead of BP).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). 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