source: issm/trunk-jpl/test/NightlyRun/test257.m@ 27250

Last change on this file since 27250 was 27250, checked in by vverjans, 3 years ago

CHG Changing autoregression schemes towards ARMA schemes: work is ongoing

File size: 3.6 KB
RevLine 
[27250]1%Test Name: SquareShelfSMBarma
[26487]2md=triangle(model(),'../Exp/Square.exp',80000.);
3md=setmask(md,'all','');
4md=parameterize(md,'../Par/SquareShelfConstrained.par');
5md=setflowequation(md,'SSA','all');
6md.cluster=generic('name',oshostname(),'np',3);
[26553]7md.transient.requested_outputs={'default','IceVolume','SmbMassBalance'};
[26487]8
9ymax = max(md.mesh.y);
10xmax = max(md.mesh.x);
11%Generate basin IDs for 3 basins
12idbasin = zeros(md.mesh.numberofelements,1);
13iid1 = find(md.mesh.y>=2/3*ymax);
14iid2 = intersect(find(md.mesh.y<2/3*ymax),find(md.mesh.x>=1/3*xmax));
15iid3 = intersect(find(md.mesh.y<2/3*ymax),find(md.mesh.x<1/3*xmax));
16for ii=1:md.mesh.numberofelements
17 for vertex=1:3
18 if any(iid1==md.mesh.elements(ii,vertex)) %one vertex in basin 1
19 idbasin(ii) = 1;
20 end
21 end
22 if idbasin(ii)==0 %no vertex was found in basin 1
23 for vertex=1:3
24 if any(iid2==md.mesh.elements(ii,vertex)) %one vertex in basin 2
25 idbasin(ii) = 2;
26 end
27 end
28 end
29 if idbasin(ii)==0 %no vertex was found in basin 1 and 2
30 idbasin(ii) = 3;
31 end
32end
33
[26495]34%SMB parameters
35md.timestepping.start_time = 0;
36md.timestepping.time_step = 1;
37md.timestepping.final_time = 5;
[27250]38md.smb = SMBarma();
39md.smb.num_basins = 3; %number of basins
40md.smb.basin_id = idbasin; %prescribe basin ID number to elements
41md.smb.const = [0.5,1.2,1.5]; %intercept values of SMB in basins [m ice eq./yr]
42md.smb.trend = [0.0,0.01,-0.01]; %trend values of SMB in basins [m ice eq./yr^2]
43md.smb.arma_initialtime = md.timestepping.start_time;
44md.smb.ar_order = 4;
45md.smb.ma_order = 1;
46md.smb.arma_timestep = 2.0; %timestep of the ARMA model [yr]
47md.smb.arlag_coefs = [[0.2,0.1,0.05,0.01];[0.4,0.2,-0.2,0.1];[0.4,-0.4,0.1,-0.1]];
48md.smb.malag_coefs = [0;0;0];
49md.smb.lapserates = [0.01,0.0;0.01,-0.01;0.0,-0.01];
50md.smb.elevationbins = [100;150;100];
[26495]51
[26526]52%Stochastic forcing
53md.stochasticforcing.isstochasticforcing = 1;
[27250]54md.stochasticforcing.fields = [{'SMBarma'}];
[26526]55md.stochasticforcing.covariance = [[0.15 0.08 -0.02];[0.08 0.12 -0.05];[-0.02 -0.05 0.1]]; %global covariance among- and between-fields
56md.stochasticforcing.randomflag = 0; %fixed random seeds
[26947]57md.stochasticforcing.stochastictimestep = 1.0;
[26526]58
[26487]59md=solve(md,'Transient');
60
61%Fields and tolerances to track changes
62field_names ={'Vx1','Vy1','Vel1','Thickness1','Volume1','SmbMassBalance1','Vx2','Vy2','Vel2','Thickness2','Volume2','SmbMassBalance2','Vx3','Vy3','Vel3','Thickness3','Volume3','SmbMassBalance3'};
63field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
64 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13...
65 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
66field_values={...
67 (md.results.TransientSolution(1).Vx),...
68 (md.results.TransientSolution(1).Vy),...
69 (md.results.TransientSolution(1).Vel),...
70 (md.results.TransientSolution(1).Thickness),...
71 (md.results.TransientSolution(1).IceVolume),...
[26553]72 (md.results.TransientSolution(1).SmbMassBalance),...
[26487]73 (md.results.TransientSolution(2).Vx),...
74 (md.results.TransientSolution(2).Vy),...
75 (md.results.TransientSolution(2).Vel),...
76 (md.results.TransientSolution(2).Thickness),...
77 (md.results.TransientSolution(2).IceVolume),...
[26553]78 (md.results.TransientSolution(2).SmbMassBalance),...
[26487]79 (md.results.TransientSolution(3).Vx),...
80 (md.results.TransientSolution(3).Vy),...
81 (md.results.TransientSolution(3).Vel),...
82 (md.results.TransientSolution(3).Thickness),...
83 (md.results.TransientSolution(3).IceVolume),...
[26553]84 (md.results.TransientSolution(3).SmbMassBalance),...
[26487]85 };
Note: See TracBrowser for help on using the repository browser.