1 | md=triangle(model(),'../Exp/Square.exp',600000.);%180000
|
---|
2 | md=setmask(md,'all','');
|
---|
3 |
|
---|
4 | % Use of ispdd and isdelta18o methods
|
---|
5 | md.surfaceforcings = SMBpdd();
|
---|
6 | md.surfaceforcings.isdelta18o=1;
|
---|
7 |
|
---|
8 | md=parameterize(md,'../Par/SquareShelf.par');
|
---|
9 |
|
---|
10 | % Add temperature, precipitation and delta18o needed to measure the surface mass balance
|
---|
11 | % creating delta18o
|
---|
12 | load '../Data/delta18o.data'
|
---|
13 | md.surfaceforcings.delta18o=delta18o;
|
---|
14 | % creating delta18oSurface
|
---|
15 | md.surfaceforcings.delta18o_surface(1,1:(length(delta18o))) = 0;
|
---|
16 | md.surfaceforcings.delta18o_surface(2,:) = delta18o(2,:);
|
---|
17 |
|
---|
18 | % creating Present day and lgm temperatures
|
---|
19 | % Same temperature over the all region:
|
---|
20 | tmonth(1:12)=238.15+20.;
|
---|
21 | for imonth=0:11
|
---|
22 | md.surfaceforcings.temperatures_presentday(1:md.mesh.numberofvertices,imonth+1)=tmonth(imonth+1);
|
---|
23 | md.surfaceforcings.temperatures_lgm(1:md.mesh.numberofvertices,imonth+1)=tmonth(imonth+1)-20.;
|
---|
24 | % Time for the last line:
|
---|
25 | md.surfaceforcings.temperatures_presentday(md.mesh.numberofvertices+1,imonth+1)=((imonth+1)/12);
|
---|
26 | md.surfaceforcings.temperatures_lgm(md.mesh.numberofvertices+1,imonth+1)=((imonth+1)/12);
|
---|
27 | end
|
---|
28 |
|
---|
29 | % creating initialization and spc temperatures initialization and spc
|
---|
30 | md.thermal.spctemperature=mean(md.surfaceforcings.temperatures_lgm(1:md.mesh.numberofvertices,1:12),2); %-10*ones(md.mesh.numberofvertices,1);
|
---|
31 | md.thermal.spctemperature=repmat(md.thermal.spctemperature,1,md.timestepping.final_time/md.timestepping.time_step);
|
---|
32 | itemp=0:md.timestepping.time_step:md.timestepping.final_time-md.timestepping.time_step;
|
---|
33 | md.thermal.spctemperature(md.mesh.numberofvertices+1,:)=itemp;
|
---|
34 |
|
---|
35 | md.initialization.temperature=md.surfaceforcings.temperatures_lgm(1:md.mesh.numberofvertices,1); %*ones(md.mesh.numberofvertices,1);
|
---|
36 |
|
---|
37 | % creating precipitation
|
---|
38 | for imonth=0:11
|
---|
39 | md.surfaceforcings.precipitations_presentday(1:md.mesh.numberofvertices,imonth+1)=-0.4*10^(-6)*md.mesh.y+0.5;
|
---|
40 | md.surfaceforcings.precipitations_presentday(md.mesh.numberofvertices+1,imonth+1)=((imonth+1)/12);
|
---|
41 | end
|
---|
42 |
|
---|
43 | % time steps and resolution
|
---|
44 | md.timestepping.time_step=20;
|
---|
45 | md.settings.output_frequency=1;
|
---|
46 | md.timestepping.final_time=60;
|
---|
47 |
|
---|
48 | %
|
---|
49 | md.transient.requested_outputs={'default','SurfaceforcingsMonthlytemperatures'};
|
---|
50 | md=extrude(md,3,1.);
|
---|
51 | md=setflowequation(md,'SSA','all');
|
---|
52 | md.cluster=generic('name',oshostname(),'np',1);
|
---|
53 | md=solve(md,TransientSolutionEnum());
|
---|
54 |
|
---|
55 | %Fields and tolerances to track changes
|
---|
56 | field_names ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1', ...
|
---|
57 | 'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2', ...
|
---|
58 | 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3'};
|
---|
59 | field_tolerances={...
|
---|
60 | 1e-13,1e-13,1e-13,1e-13,1e-13,1e-8,1e-8,1e-8,1e-13,1e-8,...
|
---|
61 | 1e-13,1e-13,1e-13,1e-13,1e-13,1e-8,1e-8,1e-8,1e-13,1e-8,...
|
---|
62 | 1e-13,1e-13,1e-08,1e-13,1e-13,1e-8,1e-8,1e-8,1e-13,1e-8};
|
---|
63 | field_values={...
|
---|
64 | (md.results.TransientSolution(1).Vx),...
|
---|
65 | (md.results.TransientSolution(1).Vy),...
|
---|
66 | (md.results.TransientSolution(1).Vz),...
|
---|
67 | (md.results.TransientSolution(1).Vel),...
|
---|
68 | (md.results.TransientSolution(1).Pressure),...
|
---|
69 | (md.results.TransientSolution(1).Base),...
|
---|
70 | (md.results.TransientSolution(1).Surface),...
|
---|
71 | (md.results.TransientSolution(1).Thickness),...
|
---|
72 | (md.results.TransientSolution(1).Temperature),...
|
---|
73 | (md.results.TransientSolution(1).BasalforcingsGroundediceMeltingRate),...
|
---|
74 | (md.results.TransientSolution(1).SurfaceforcingsMonthlytemperatures),...
|
---|
75 | (md.results.TransientSolution(1).SurfaceforcingsMassBalance),...
|
---|
76 | (md.results.TransientSolution(2).Vx),...
|
---|
77 | (md.results.TransientSolution(2).Vy),...
|
---|
78 | (md.results.TransientSolution(2).Vz),...
|
---|
79 | (md.results.TransientSolution(2).Vel),...
|
---|
80 | (md.results.TransientSolution(2).Pressure),...
|
---|
81 | (md.results.TransientSolution(2).Base),...
|
---|
82 | (md.results.TransientSolution(2).Surface),...
|
---|
83 | (md.results.TransientSolution(2).Thickness),...
|
---|
84 | (md.results.TransientSolution(2).Temperature),...
|
---|
85 | (md.results.TransientSolution(2).BasalforcingsGroundediceMeltingRate),...
|
---|
86 | (md.results.TransientSolution(2).SurfaceforcingsMonthlytemperatures),...
|
---|
87 | (md.results.TransientSolution(2).SurfaceforcingsMassBalance),...
|
---|
88 | (md.results.TransientSolution(3).Vx),...
|
---|
89 | (md.results.TransientSolution(3).Vy),...
|
---|
90 | (md.results.TransientSolution(3).Vz),...
|
---|
91 | (md.results.TransientSolution(3).Vel),...
|
---|
92 | (md.results.TransientSolution(3).Pressure),...
|
---|
93 | (md.results.TransientSolution(3).Base),...
|
---|
94 | (md.results.TransientSolution(3).Surface),...
|
---|
95 | (md.results.TransientSolution(3).Thickness),...
|
---|
96 | (md.results.TransientSolution(3).Temperature),...
|
---|
97 | (md.results.TransientSolution(3).BasalforcingsGroundediceMeltingRate),...
|
---|
98 | (md.results.TransientSolution(3).SurfaceforcingsMonthlytemperatures),...
|
---|
99 | (md.results.TransientSolution(3).SurfaceforcingsMassBalance),...
|
---|
100 | };
|
---|