1 | if any(steps==8)
|
---|
2 | disp(' Step 8: Plotting exercise');
|
---|
3 |
|
---|
4 | %Load historic transient model
|
---|
5 | md = loadmodel('./Models/Greenland.HistoricTransient');
|
---|
6 |
|
---|
7 | %Create Line Plots of relaxation run. Create a figure.
|
---|
8 | figure
|
---|
9 |
|
---|
10 | %Save surface mass balance, by looping through 200 years, or 1000 steps
|
---|
11 | surfmb=[]; for i=1:1000; surfmb=[surfmb ...
|
---|
12 | md.results.TransientSolution(i).SmbMassBalance]; end
|
---|
13 |
|
---|
14 | %Plot surface mass balance time series in first subplot
|
---|
15 | subplot(3,1,1); plot([0.2:0.2:200],mean(surfmb));
|
---|
16 |
|
---|
17 | %Title this plot Mean surface mass balance
|
---|
18 | title('Mean Surface mass balance');
|
---|
19 |
|
---|
20 | %Save velocity by looping through 1000 steps
|
---|
21 | vel=[]; for i=1:1000; vel=[vel md.results.TransientSolution(i).Vel]; end
|
---|
22 |
|
---|
23 | %Plot velocity time series in second subplot
|
---|
24 | subplot(3,1,2); plot([0.2:0.2:200],mean(vel));
|
---|
25 |
|
---|
26 | %Title this plot Mean Velocity
|
---|
27 | title('Mean Velocity');
|
---|
28 |
|
---|
29 | %Save Ice Volume by looping through 1000 steps
|
---|
30 | volume=[]; for i=1:1000; volume=[volume md.results.TransientSolution(i).IceVolume]; end
|
---|
31 |
|
---|
32 | %Plot volume time series in third subplot
|
---|
33 | subplot(3,1,3); plot([0.2:0.2:200],volume);
|
---|
34 |
|
---|
35 | %Title this plot Mean Velocity and add an x label of years
|
---|
36 | title('Ice Volume'); xlabel('years');
|
---|
37 | end
|
---|