Skip to content

Commit 50617e1

Browse files
committed
matlab experiment
1 parent d391667 commit 50617e1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

examples/runad.m

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
clear
2+
md = loadmodel('./ModelAllControls.mat');
3+
4+
md.timestepping = timestepping();
5+
md.timestepping.start_time = 1995;
6+
md.timestepping.final_time = 1995.5;
7+
md.timestepping.time_step = 0.1;
8+
9+
% manually set basal forcings
10+
md.basalforcings = linearbasalforcings();
11+
md.basalforcings.deepwater_melting_rate = 50.0
12+
md.basalforcings.upperwater_melting_rate = 0.0
13+
md.basalforcings.deepwater_elevation = -500.0
14+
md.basalforcings.upperwater_elevation = 0.0
15+
md.basalforcings.groundedice_melting_rate = zeros(md.mesh.numberofvertices, 1)
16+
md.basalforcings.perturbation_melting_rate = ones(md.mesh.numberofvertices, 1)
17+
% change the name of the first independent
18+
md.autodiff.independents{1}.name = 'BasalforcingsPerturbationMeltingRate';
19+
%md.groundingline.migration = 'None';
20+
21+
22+
md.toolkits=toolkits;
23+
md.cluster=generic('name',oshostname,'np',60);
24+
md.settings.output_frequency = 1;
25+
26+
%md.inversion.iscontrol = 0;
27+
%md.autodiff.isautodiff = 0;
28+
%md.verbose = verbose('All');
29+
30+
md=solve(md,'tr');
31+
save ./Model_AD.mat md
32+
saveasstruct(md, 'issm_ad.mat');

0 commit comments

Comments
 (0)