source: issm/trunk-jpl/test/NightlyRun/test239.m@ 19527

Last change on this file since 19527 was 19527, checked in by Eric.Larour, 10 years ago

CHG: moved md.surfaceforcings to md.smb.
By doing so, had to rename the SMB class to SMBforcing class (it's just that, a mass_balance forcing inside
a SMB class, hence the name).
We also now have an smb_core solution, taken out of the mass transport core. Makes more sense long term.
Synced all enums according to the new changes, and operated the adjustments in all the test decks.

In addition, progressing in terms of GEMB integration into ISSM, specifically at the SMBgemb level (which
is spurring all the changes described above). Brought the class up to the level of the GEMB.m call in Alex's
code. Starting the C integration now.

File size: 3.7 KB
Line 
1%Test Name: SquareShelfTranIspddIsdeltaO18pdInterpSSA2d
2md=triangle(model(),'../Exp/Square.exp',150000.);
3md=setmask(md,'all','');
4md=parameterize(md,'../Par/SquareShelf.par');
5
6%md.verbose=verbose('all');
7
8% Use of ispdd and isdelta18o methods
9md.smb = SMBd18opdd();
10md.smb.isd18opd=1;
11%md.smb.precipitation(1:md.mesh.numberofvertices,1:12)=0;
12%md.smb.monthlytemperatures(1:md.mesh.numberofvertices,1:12)=273;
13
14% Add temperature, precipitation and delta18o needed to measure the surface mass balance
15% creating delta18o
16load '../Data/delta18o.data'
17md.smb.delta18o=delta18o;
18
19% creating Present day temperatures
20% Same temperature over the all region:
21tmonth(1:12)=238.15+20.;
22for imonth=0:11
23 md.smb.temperatures_presentday(1:md.mesh.numberofvertices,imonth+1)=tmonth(imonth+1);
24 % Time for the last line:
25 md.smb.temperatures_presentday(md.mesh.numberofvertices+1,imonth+1)=((imonth+1)/12);
26end
27
28% creating initialization and spc temperatures initialization and
29% spc
30md.thermal.spctemperature=mean(md.smb.temperatures_presentday(1:md.mesh.numberofvertices,1:12),2)-10; %-10*ones(md.mesh.numberofvertices,1);
31
32md.initialization.temperature=md.thermal.spctemperature; %md.smb.temperatures_presentday(1:md.mesh.numberofvertices,1);
33
34% creating precipitation
35for imonth=0:11
36 md.smb.precipitations_presentday(1:md.mesh.numberofvertices,imonth+1)=-0.4*10^(-6)*md.mesh.y+0.5;
37 % Time for the last line:
38 md.smb.precipitations_presentday(md.mesh.numberofvertices+1,imonth+1)=((imonth+1)/12);
39end
40md.smb = initialize(md.smb,md);
41
42% time steps and resolution
43md.timestepping.time_step=0.5;
44md.settings.output_frequency=1;
45md.timestepping.final_time=2;
46
47%
48md.transient.requested_outputs={'default','SmbMonthlytemperatures'};
49md=setflowequation(md,'SSA','all');
50md.cluster=generic('name',oshostname(),'np',1); % 3 for the cluster
51md=solve(md,TransientSolutionEnum());
52
53%Fields and tolerances to track changes
54field_names ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMonthlytemperatures1','SmbMassBalance1',...
55 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMonthlytemperatures2','SmbMassBalance2',...
56 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMonthlytemperatures3','SmbMassBalance3'};
57field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
58 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
59 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
60field_values={...
61 (md.results.TransientSolution(1).Vx),...
62 (md.results.TransientSolution(1).Vy),...
63 (md.results.TransientSolution(1).Vel),...
64 (md.results.TransientSolution(1).Pressure),...
65 (md.results.TransientSolution(1).Base),...
66 (md.results.TransientSolution(1).Surface),...
67 (md.results.TransientSolution(1).Thickness),...
68 (md.results.TransientSolution(1).SmbMonthlytemperatures),...
69 (md.results.TransientSolution(1).SmbMassBalance),...
70 (md.results.TransientSolution(2).Vx),...
71 (md.results.TransientSolution(2).Vy),...
72 (md.results.TransientSolution(2).Vel),...
73 (md.results.TransientSolution(2).Pressure),...
74 (md.results.TransientSolution(2).Base),...
75 (md.results.TransientSolution(2).Surface),...
76 (md.results.TransientSolution(2).Thickness),...
77 (md.results.TransientSolution(2).SmbMonthlytemperatures),...
78 (md.results.TransientSolution(2).SmbMassBalance),...
79 (md.results.TransientSolution(3).Vx),...
80 (md.results.TransientSolution(3).Vy),...
81 (md.results.TransientSolution(3).Vel),...
82 (md.results.TransientSolution(3).Pressure),...
83 (md.results.TransientSolution(3).Base),...
84 (md.results.TransientSolution(3).Surface),...
85 (md.results.TransientSolution(3).Thickness),...
86 (md.results.TransientSolution(3).SmbMonthlytemperatures),...
87 (md.results.TransientSolution(3).SmbMassBalance),...
88 };
Note: See TracBrowser for help on using the repository browser.