source: issm/trunk/test/Verification/IceSheetNoIceFrontM2d_16/updatearchive.m@ 125

Last change on this file since 125 was 124, checked in by Mathieu Morlighem, 17 years ago

moved test 1 to test 16

  • Property svn:executable set to *
File size: 2.1 KB
Line 
1% This file can be run to update the velocity archives of the test1.
2% This test deals with an icesheet without icefront for a 2d model. The geometry
3% is square. Just run this file in Matlab, with a properly setup Ice code.
4
5% The archive files will be saved in this directory but will not commited to ice1.
6% Just commit the result if you want to.
7
8%packages and solutions to be tested
9packages={'macayeal','ice','cielo_serial','cielo_parallel'};
10solutions={'diagnostic','prognostic'};
11
12%go through the solutions requested
13for i=1:length(packages),
14 package=packages{i};
15
16 for j=1:length(solutions),
17 solution=solutions{j};
18
19 %check package
20 if ~(strcmpi(package,'macayeal') | strcmpi(package,'ice') | strcmpi(package,'cielo_serial') | strcmpi(package,'cielo_parallel'));
21 error(['package: ' package ' in test: ' testname ' not supported yet']);
22 %check solution
23 elseif ~(strcmpi(solution,'diagnostic') | strcmpi(solution,'prognostic'));
24 error(['solution: ' solution ' in test: ' testname ' not supported yet']);
25 end
26 %check solution requested
27 if (~strcmpi(package,'ice') & strcmpi(solution,'prognostic')),
28 disp(sprintf(['\nsolution: ' solution ', with package: ' package ', in test: ' testname ', not supported yet.\n']));
29 continue
30 end
31
32 %initialize model
33 md=model;
34 md=mesh(md,'DomainOutline.exp',50000);
35 md=geography(md,'','');
36 md=parameterize(md,'Square.par');
37 md=setelementstype(md,'macayeal','all');
38 if strcmpi(package,'cielo_parallel'), md.cluster='wilkes'; end
39 if md.numberofgrids==388
40 load Velocities; md.vx=0.5*vx; md.vy=0.5*vy;
41 end
42
43 %compute solution
44 if strcmpi(package,'cielo_parallel') & strcmpi(solution,'diagnostic'),
45 md=solve(md,'diagnostic_horiz','cielo');
46 elseif strcmpi(package,'cielo_serial'),
47 eval(['md=solve(md,''' solution ''',''cielo'');']);
48 else
49 eval(['md=solve(md,''' solution ''',''' package ''');']);
50 end
51
52 %save new archive
53 if strcmpi(solution,'diagnostic'),
54 fieldtest=md.vel;
55 elseif strcmpi(solution,'prognostic'),
56 fieldtest=md.new_thickness';
57 end
58 eval(['Archive' package solution '=fieldtest;']);
59 eval(['save Archive' package solution ' Archive' package solution]);
60 end
61end
Note: See TracBrowser for help on using the repository browser.