source: issm/oecreview/Archive/17984-18295/ISSM-18202-18203.diff@ 18296

Last change on this file since 18296 was 18296, checked in by Mathieu Morlighem, 11 years ago

Added 17984-18295

File size: 13.6 KB
RevLine 
[18296]1Index: ../trunk-jpl/examples/ISMIP/CheatyRunme.m
2===================================================================
3--- ../trunk-jpl/examples/ISMIP/CheatyRunme.m (revision 18202)
4+++ ../trunk-jpl/examples/ISMIP/CheatyRunme.m (revision 18203)
5@@ -2,17 +2,15 @@
6 %step 7 is specific to ISMIPA
7 %step 8 is specific to ISMIPF
8
9-steps=[1 2 3 4 5 6 8];
10+steps=[1:7];
11
12 % parameter file to be used, choose between CheatyIsmipA.par or CheatyIsmipF.par
13 ParamFile='CheatyIsmipF.par'
14
15-name_prefix='ISMIP';
16 %Run Steps
17-org=organizer('repository','./Models','prefix',name_prefix,'steps',steps);
18
19 % {{{ Mesh Generation #1
20-if perform(org,'Mesh_Generation')
21+if any(steps==1)
22
23 %initialize md as a new model #help model
24 %->
25@@ -30,17 +28,17 @@
26 plotmodel(md,'data','mesh')
27 % save the given model
28 %->
29- savemodel(org,md);
30+ save ./Models/ISMIP.Mesh_generation md;
31 end
32 % }}}
33
34 % {{{ Masks #2
35-if perform(org,'SetMask'),
36+if any(steps==2)
37
38 % load the preceding step #help loadmodel
39 % path is given by the organizer with the name of the given step
40 %->
41- md=loadmodel(org,'Mesh_Generation');
42+ md = loadmodel('./Models/ISMIP.Mesh_generation');
43 % set the mask #help setmask
44 % all MISMIP nodes are grounded
45 %->
46@@ -50,35 +48,35 @@
47 plotmodel(md,'data',md.mask.groundedice_levelset);
48 % save the given model
49 %->
50- savemodel(org,md);
51+ save ./Models/ISMIP.SetMask md;
52 end
53 % }}}
54
55 % {{{ Parameterization #3
56-if perform(org,'Parameterization')
57+if any(steps==3)
58
59 % load the preceding step #help loadmodel
60 % path is given by the organizer with the name of the given step
61 %->
62- md=loadmodel(org,'SetMask');
63+ md = loadmodel('./Models/ISMIP.SetMask');
64 % parametrize the model # help parameterize
65 % you will need to fil-up the parameter file defined by the
66- % ParamFile variable
67+ % ParamFile variable
68 %->
69 md=parameterize(md,ParamFile);
70 % save the given model
71 %->
72- savemodel(org,md);
73+ save ./Models/ISMIP.Parameterization md;
74 end
75 % }}}
76
77 % {{{ Extrusion #4
78-if perform(org,'Extrusion')
79+if any(steps==4)
80
81 % load the preceding step #help loadmodel
82 % path is given by the organizer with the name of the given step
83 %->
84- md=loadmodel(org,'Parameterization');
85+ md = loadmodel('./Models/ISMIP.Parameterization');
86 % vertically extrude the preceding mesh #help extrude
87 % only 5 layers exponent 1
88 %->
89@@ -88,35 +86,34 @@
90 plotmodel(md,'data',md.geometry.base)
91 % save the given model
92 %->
93- savemodel(org,md);
94+ save ./Models/ISMIP.Extrusion md;
95 end
96 % }}}
97
98 % {{{ Set the flow computing method #5
99+if any(steps==5)
100
101-if perform(org,'SetFlow')
102-
103 % load the preceding step #help loadmodel
104 % path is given by the organizer with the name of the given step
105 %->
106- md=loadmodel(org,'Extrusion');
107+ md = loadmodel('./Models/ISMIP.Extrusion');
108 % set the approximation for the flow computation #help setflowequation
109 % We will be using the Higher Order Model (HO)
110 %->
111 md=setflowequation(md,'HO','all');
112 % save the given model
113 %->
114- savemodel(org,md);
115+ save ./Models/ISMIP.SetFlow md;
116 end
117 % }}}
118
119 % {{{ Set Boundary Conditions #6
120-if perform(org,'BoundaryCondition')
121+if any(steps==6)
122
123 % load the preceding step #help loadmodel
124 % path is given by the organizer with the name of the given step
125 %->
126- md=loadmodel(org,'SetFlow');
127+ md = loadmodel('./Models/ISMIP.SetFlow');
128 % dirichlet boundary condition are known as SPCs
129 % ice frozen to the base, no velocity #md.stressbalance
130 % SPCs are initialized at NaN one value per vertex
131@@ -129,7 +126,7 @@
132 % extract the nodenumbers at the base #md.mesh.vertexonbase
133 %->
134 basalnodes=find(md.mesh.vertexonbase);
135- % set the sliding to zero on the bed
136+ % set the sliding to zero on the bed
137 %->
138 md.stressbalance.spcvx(basalnodes)=0.0;
139 %->
140@@ -161,16 +158,16 @@
141 end
142 % save the given model
143 %->
144- savemodel(org,md);
145+ save ./Models/ISMIP.BoundaryCondition md;
146 end
147 % }}}
148
149 % {{{ Solving #7
150-if perform(org,'SolvingISMIPA')
151+if any(steps==7)
152 % load the preceding step #help loadmodel
153 % path is given by the organizer with the name of the given step
154 %->
155- md=loadmodel(org,'BoundaryCondition');
156+ md = loadmodel('./Models/ISMIP.BoundaryCondition');
157 % Set cluster #md.cluster
158 % generic parameters #help generic
159 % set only the name and number of process
160@@ -185,7 +182,7 @@
161 md=solve(md,StressbalanceSolutionEnum());
162 % save the given model
163 %->
164- savemodel(org,md);
165+ save ./Models/ISMIP.StressBalance md;
166 % plot the surface velocities #plotdoc
167 %->
168 plotmodel(md,'data',md.results.StressbalanceSolution.Vel)
169@@ -193,11 +190,11 @@
170 % }}}
171
172 % {{{ Solving #8
173-if perform(org,'SolvingISMIPF')
174+if any(steps==8)
175 % load the preceding step #help loadmodel
176 % path is given by the organizer with the name of the given step
177 %->
178- md=loadmodel(org,'BoundaryCondition');
179+ md = loadmodel('./Models/ISMIP.BoundaryCondition');
180 % Set cluster #md.cluster
181 % generic parameters #help generic
182 % set only the name and number of process
183@@ -224,7 +221,7 @@
184 md=solve(md,TransientSolutionEnum);
185 % save the given model
186 %->
187- savemodel(org,md);
188+ save ./Models/ISMIP.Transient md;
189 % plot the surface velocities #plotdoc
190 %->
191 plotmodel(md,'data',md.results.TransientSolution(20).Vel)
192Index: ../trunk-jpl/examples/ISMIP/CheatyIsmipA.par
193===================================================================
194--- ../trunk-jpl/examples/ISMIP/CheatyIsmipA.par (revision 18202)
195+++ ../trunk-jpl/examples/ISMIP/CheatyIsmipA.par (revision 18203)
196@@ -49,4 +49,4 @@
197 %Set the default boundary conditions for an ice-sheet
198 % #help SetIceSheetBC
199 %->
200-md=SetIceSheetBC(md);
201\ No newline at end of file
202+md=SetIceSheetBC(md);
203Index: ../trunk-jpl/examples/ISMIP/runme.m
204===================================================================
205--- ../trunk-jpl/examples/ISMIP/runme.m (revision 18202)
206+++ ../trunk-jpl/examples/ISMIP/runme.m (revision 18203)
207@@ -7,12 +7,10 @@
208 % parameter file to be used, choose between IsmipA.par or IsmipF.par
209 ParamFile='IsmipA.par'
210
211-name_prefix='ISMIP';
212 %Run Steps
213-org=organizer('repository','./Models','prefix',name_prefix,'steps',steps);
214
215 % {{{ Mesh Generation #1
216-if perform(org,'Mesh_Generation')
217+if any(steps==1)
218
219 %initialize md as a new model #help model
220 %->
221@@ -31,7 +29,7 @@
222 % }}}
223
224 % {{{ Masks #2
225-if perform(org,'SetMask'),
226+if any(steps==2)
227
228 % load the preceding step #help loadmodel
229 % path is given by the organizer with the name of the given step
230@@ -51,7 +49,7 @@
231 % }}}
232
233 % {{{ Parameterization #3
234-if perform(org,'Parameterization')
235+if any(steps==3)
236
237 % load the preceding step #help loadmodel
238 % path is given by the organizer with the name of the given step
239@@ -69,7 +67,7 @@
240 % }}}
241
242 % {{{ Extrusion #4
243-if perform(org,'Extrusion')
244+if any(steps==4)
245
246 % load the preceding step #help loadmodel
247 % path is given by the organizer with the name of the given step
248@@ -90,7 +88,7 @@
249
250 % {{{ Set the flow computing method #5
251
252-if perform(org,'SetFlow')
253+if any(steps==5)
254
255 % load the preceding step #help loadmodel
256 % path is given by the organizer with the name of the given step
257@@ -107,7 +105,7 @@
258 % }}}
259
260 % {{{ Set Boundary Conditions #6
261-if perform(org,'BoundaryCondition')
262+if any(steps==6)
263
264 % load the preceding step #help loadmodel
265 % path is given by the organizer with the name of the given step
266@@ -161,7 +159,7 @@
267 % }}}
268
269 % {{{ Solving #7
270-if perform(org,'SolvingISMIPA')
271+if any(steps==7)
272 % load the preceding step #help loadmodel
273 % path is given by the organizer with the name of the given step
274 %->
275@@ -187,7 +185,7 @@
276 % }}}
277
278 % {{{ Solving #8
279-if perform(org,'SolvingISMIPF')
280+if any(steps==8)
281 % load the preceding step #help loadmodel
282 % path is given by the organizer with the name of the given step
283 %->
284Index: ../trunk-jpl/examples/ISMIP/CheatyIsmipF.par
285===================================================================
286--- ../trunk-jpl/examples/ISMIP/CheatyIsmipF.par (revision 18202)
287+++ ../trunk-jpl/examples/ISMIP/CheatyIsmipF.par (revision 18203)
288@@ -63,4 +63,4 @@
289 %->
290 md.initialization.vz=zeros(md.mesh.numberofvertices,1);
291 %->
292-md.initialization.pressure=zeros(md.mesh.numberofvertices,1);
293\ No newline at end of file
294+md.initialization.pressure=zeros(md.mesh.numberofvertices,1);
295Index: ../trunk-jpl/examples/UncertaintyQuantification/runme.m
296===================================================================
297--- ../trunk-jpl/examples/UncertaintyQuantification/runme.m (revision 18202)
298+++ ../trunk-jpl/examples/UncertaintyQuantification/runme.m (revision 18203)
299@@ -1,27 +1,27 @@
300 %PIG Uncertainty Quantification Application
301-steps=[3]; eval(['addpath ' pwd]);
302+steps=[3];
303
304 if any(steps==1)
305 disp(' Step 1: plot flux gates');
306
307- md = loadmodel('../Data/PIG.Control_drag_default');
308+ md = loadmodel('../Pig/Models/PIG.Control_drag');
309
310 texts=cell(1,13);
311 textpositions=cell(1,13);
312
313 for i=1:13,
314- contour=expread(['./Exp_Par/MassFluxes/MassFlux' num2str(i) '.exp']);
315+ contour=expread(['./MassFluxes/MassFlux' num2str(i) '.exp']);
316 textpositions{i}=[contour.x(end) contour.y(end)];
317 end
318
319 plotmodel(md,'data',md.results.StressbalanceSolution.Vel,'log',10,'expdisp',...
320- {'Exp_Par/MassFluxes/MassFlux1.exp','Exp_Par/MassFluxes/MassFlux2.exp',...
321- 'Exp_Par/MassFluxes/MassFlux3.exp','Exp_Par/MassFluxes/MassFlux4.exp',...
322- 'Exp_Par/MassFluxes/MassFlux5.exp','Exp_Par/MassFluxes/MassFlux6.exp',...
323- 'Exp_Par/MassFluxes/MassFlux7.exp','Exp_Par/MassFluxes/MassFlux8.exp',...
324- 'Exp_Par/MassFluxes/MassFlux9.exp','Exp_Par/MassFluxes/MassFlux10.exp',...
325- 'Exp_Par/MassFluxes/MassFlux11.exp','Exp_Par/MassFluxes/MassFlux12.exp',...
326- 'Exp_Par/MassFluxes/MassFlux13.exp'},...
327+ {'MassFluxes/MassFlux1.exp','MassFluxes/MassFlux2.exp',...
328+ 'MassFluxes/MassFlux3.exp','MassFluxes/MassFlux4.exp',...
329+ 'MassFluxes/MassFlux5.exp','MassFluxes/MassFlux6.exp',...
330+ 'MassFluxes/MassFlux7.exp','MassFluxes/MassFlux8.exp',...
331+ 'MassFluxes/MassFlux9.exp','MassFluxes/MassFlux10.exp',...
332+ 'MassFluxes/MassFlux11.exp','MassFluxes/MassFlux12.exp',...
333+ 'MassFluxes/MassFlux13.exp'},...
334 'expstyle',{'k-','k-','k-','k-','k-','k-','k-',...
335 'k-','k-','k-','k-','k-','k-'},'linewidth',2,...
336 'text',{'1','2','3','4','5','6','7',...
337@@ -32,7 +32,7 @@
338 if any(steps==2)
339 disp(' Step 2: compute cross overs from CRESIS');
340
341- md = loadmodel('../Data/PIG.Control_drag_default');
342+ md = loadmodel('../Pig/Models/PIG.Control_drag');
343
344 %load cross overs: CRESIS McCord Antarctica, 2009 (courtesy of John Paden)
345 load('../Data/CrossOvers2009.mat');
346@@ -44,7 +44,7 @@
347 pos=find(isnan(DeltaHH)); DeltaHH(pos)=0;
348
349 %filter out unrealistic error ranges
350- flags=ContourToNodes(md.mesh.x,md.mesh.y,'Exp_Par/ErrorContour.exp',1);
351+ flags=ContourToNodes(md.mesh.x,md.mesh.y,'ErrorContour.exp',1);
352 pos=find(~flags); DeltaHH(pos)=0;
353
354 %avoid large unrealistic values
355@@ -63,7 +63,7 @@
356 disp(' Step 3: sampling analysis');
357
358 %load model and cross over errors
359- md = loadmodel('../Data/PIG.Control_drag_default');
360+ md = loadmodel('../Pig/Models/PIG.Control_drag');
361 load -mat Models/PIG.CrossOvers
362
363 %partition the mesh
364@@ -122,7 +122,7 @@
365 'MassFlux11.exp',...
366 'MassFlux12.exp',...
367 'MassFlux13.exp'};
368- md.qmu.mass_flux_profile_directory='../Exp_Par/MassFluxes/';
369+ md.qmu.mass_flux_profile_directory='../MassFluxes/';
370
371 %% sampling analysis
372 md.qmu.method =dakota_method('nond_samp');
373@@ -151,7 +151,7 @@
374 disp(' Step 4: sensitivity analysis');
375
376 %load model
377- md = loadmodel('../Data/PIG.Control_drag_default');
378+ md = loadmodel('../Pig/Models/PIG.Control_drag');
379
380 %partition the mesh
381 md.qmu.numberofpartitions=10;
382@@ -196,7 +196,7 @@
383 'MassFlux11.exp',...
384 'MassFlux12.exp',...
385 'MassFlux13.exp'};
386- md.qmu.mass_flux_profile_directory='../Exp_Par/MassFluxes/';
387+ md.qmu.mass_flux_profile_directory='../MassFluxes/';
388
389 %method: local reliability
390 md.qmu.method =dakota_method('nond_l');
391@@ -267,7 +267,7 @@
392 sh=md.results.dakota.dresp_out(index).sens(21:30); sh=sh(md.qmu.partition+1)/1e12*60*60*24*365;
393
394 plotmodel(md,'data',sh,'data',sa,'data',sb,'expdisp#all',...
395- ['Exp_Par/MassFluxes/MassFlux' num2str(index) '.exp'],...
396+ ['MassFluxes/MassFlux' num2str(index) '.exp'],...
397 'expstyle#all','b-','linewidth#all',2,...
398 'nlines',3,'ncols',1, 'axis#all','image',...
399 'colorbar#all','on','colorbarfontsize#all',10,...
400@@ -280,7 +280,7 @@
401 ifh=importancefactors(md,'scaled_Thickness',['indexed_MassFlux_' num2str(index)]);
402
403 plotmodel(md,'data',ifh,'data',ifa,'data',ifb,'expdisp#all',...
404- ['Exp_Par/MassFluxes/MassFlux' num2str(index) '.exp'],...
405+ ['MassFluxes/MassFlux' num2str(index) '.exp'],...
406 'expstyle#all','b-','linewidth#all',2,'log#all',10,...
407 'nlines',3,'ncols',1, 'axis#all','image','caxis#all',[1e-10 1],...
408 'colorbar#all','on','colorbarfontsize#all',10,...
409Index: ../trunk-jpl/examples/Inversion/runme.m
410===================================================================
411--- ../trunk-jpl/examples/Inversion/runme.m (revision 18202)
412+++ ../trunk-jpl/examples/Inversion/runme.m (revision 18203)
413@@ -1,4 +1,4 @@
414-step=1;
415+step=3;
416 if step==1
417 %Generate observation
418 md = model;
419@@ -46,10 +46,10 @@
420 md.inversion.iscontrol = 1;
421 md.inversion.control_parameters = {'FrictionCoefficient'};
422 md.inversion.maxsteps = maxsteps;
423- md.inversion.dxmin=10^-6;
424+ md.inversion.dxmin=10^-6;
425 md.inversion.cost_functions = [103 501];
426 md.inversion.cost_functions_coefficients = ones(md.mesh.numberofvertices,2);
427- md.inversion.cost_functions_coefficients(:,2)=0;
428+ md.inversion.cost_functions_coefficients(:,2)=0;
429 md.inversion.min_parameters = 10^-5*ones(md.mesh.numberofvertices,1);
430 md.inversion.max_parameters = 100*ones(md.mesh.numberofvertices,1);
431
Note: See TracBrowser for help on using the repository browser.