You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit modifies the run and plot scripts for the Dukowicz slab test case,
as described in Section 5 of this paper:
J.K. Dukowicz, 2012. Reformulating the full-Stokes ice sheet model for a
more efficient computational solution. The Cryosphere, 6, 21-34,
https://doi.org/10.5194/tc-6-21-2012.
The test case consists of an ice slab of uniform thickness moving down an
inclined plane by a combination of sliding and shearing.
Analytic Stokes and first-order velocity solutions exist for all values of Glen's exponent n >= 1.
The solutions for n = 1 are derived in Dukowicz (2012), and solutions for n > 1
are derived in an unpublished manuscript by Dukowicz (2013).
These solutions can be compared to those simulated by CISM.
The original scripts, runSlab.py and plotSlab.py, were written by Matt Hoffman
with support for n = 1. They came with warnings that the test is not supported.
The test is now supported, and the scripts include some new features:
* The user may specify any value of n >= 1 (not necessarily an integer).
The tests assume which_ho_efvs = 2 (nonlinear viscosity) with flow_law = 0 (constant).
* Physics parameters are no longer hard-coded. The user can enter the ice thickness,
beta, viscosity coefficient (mu_n), and slope angle (theta) on the command line.
* The user can specify time parameters dt (the dynamic time step) and nt (number of steps).
The previous version did not support transient runs.
* The user can specify a small thickness perturbation dh, which is added to the initial
uniform thickness via random sampling from a Gaussian distribution.
The perturbation will grow or decay, depending on the solver stability for given dx and dt.
For n = 1, the viscosity coefficient mu_1 has a default value of 1.e6 Pa yr in the relation
mu = mu_1 * eps((1-n)/n), where eps is the effective strain rate.
For n > 1, the user can specify a coefficient mu_n; otherwise the run script computes mu_n
such that the basal and surface speeds are nearly the same as for an n = 1 case with the
mu_1 = 1.e6 Pa yr and the same values of thickness, beta, and theta.
(Note: There is a subtle difference between the Dukowicz and CISM definitions of the
effective strain rate; the Dukowicz value is twice as large. Later, it might be helpful
to make the Dukowicz convention consistent with CISM.)
I modified the plotting script, plotSlab.py, to look in the config and output files
for physics parameters that are no longer hardwired.
I slightly modified the analytic formulas to give the correct solution for non-integer n.
This script creates two plots. The first plot shows excellent agreement between higher-order
CISM solutions and the analytic solution for small values of the slope angle theta.
For steep slopes, the answers diverge as expected.
For the second plot, the extent of the y-axis is wrong. This remains to be fixed.
I also added a new script, stabilitySlab.py, to carry out stability tests as described in:
Robinson, A., D. Goldberg, and W. H. Lipscomb, A comparison of the performance
of depth-integrated ice-dynamics solvers, to be submitted to The Cryosphere.
The idea is that for a given set of physics parameters and stress-balance approximation
(DIVA, L1L2, etc.), the script launches multiple CISM runs at a range of grid resolutions.
At each grid resolution, the script determines the maximum stable time step.
A run is deemed stable when the standard deviation of an initial small thickness perturbation
is reduced over the course of 100 time steps. A run is unstable if the standard deviation
increases or if the model aborts (usually with a CFL violation).
I have run the stability script for several solvers (DIVA, L1L2, SIA, SSA) for each of
two physical cases: one with thick shearing ice and one with thin sliding ice.
Each suite of experiments runs in a few minutes on 4 Macbook cores for solvers other than BP.
As expected, DIVA and SSA are much more stable than L1L2 and SIA.
This and the previous commit correspond to the CISM code and scripts used for
the initial submission by Robinson et al. (2021).
# Note we are not plotting like in Fig 3 of paper.
142
223
# That figure plotted a profile against zprime.
143
224
# It seemed more accurate to plot a profile against z to avoid interpolating model results (analytic solution can be calculated anywhere).
144
-
# Also, the analytic solution calculates the bed-parallel u velocity, but CISM calculates u as parallel to the geoid, so we need to transform the analytic solution to the CISM coordinate system.
225
+
# Also, the analytic solution calculates the bed-parallel u velocity, but CISM calculates u as parallel to the geoid,
226
+
# so we need to transform the analytic solution to the CISM coordinate system.
227
+
228
+
#WHL - I think the analytic solution is actually for u(z'), which is not bed-parallel.
229
+
# The bed-parallel solution would be u'(z'), with w'(z') = 0.
145
230
146
231
fig=plt.figure(1, facecolor='w', figsize=(12, 6))
147
232
@@ -151,24 +236,23 @@ def main():
151
236
x= (x0-x0[xp]) /thickness
152
237
# calculate rotated zprime coordinates for this column (we assume the solution truly is spatially uniform)
153
238
zprime=x[xp] *sin(thetar) +z*cos(thetar)
154
-
#print 'zprime', zprime
155
239
156
240
# Calculate analytic solution for x-component of velocity (eq. 39 in paper) for the CISM-column
0 commit comments