Skip to content

Commit 69a796b

Browse files
committed
update bm test
1 parent 587304c commit 69a796b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

examples/ModelBig.mat

-6.91 MB
Binary file not shown.

examples/test_bm.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,22 @@ file = matopen(joinpath(@__DIR__, ".", "","ModelBig.mat"))
88

99
mat = read(file, "md")
1010
close(file)
11-
md = model(mat, friction=DJUICE.BuddFriction(), basalforcings=DJUICE.LinearBasalforcings())
11+
md = model(mat, friction=DJUICE.SchoofFriction(), basalforcings=DJUICE.LinearBasalforcings())
1212

1313
md.timestepping.time_step = 0.1
1414
md.timestepping.start_time = 1995
1515
md.timestepping.final_time = 1995.5
1616
#make model run faster
1717
#md.stressbalance.maxiter = 100
18+
19+
# manually set basal forcings
20+
md.basalforcings.deepwater_melting_rate = 50.0
21+
md.basalforcings.upperwater_melting_rate = 0.0
22+
md.basalforcings.deepwater_elevation = -500.0
23+
md.basalforcings.upperwater_elevation = 0.0
24+
md.basalforcings.groundedice_melting_rate = zeros(md.mesh.numberofvertices)
25+
md.basalforcings.perturbation_melting_rate = zeros(md.mesh.numberofvertices)
26+
1827
#
1928
##Now call AD!
2029
md.inversion.iscontrol = 1
@@ -33,7 +42,7 @@ md.inversion.vy_obs = md.initialization.vy
3342
md = solve(md, :Transient)
3443

3544
# save
36-
#@save "test_bm.jld2" md
45+
@save "test_bm_pm.jld2" md
3746

3847
# the gradient
3948
#g = md.results["StressbalanceSolution"]["Gradient"]

0 commit comments

Comments
 (0)