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

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

Minor

  • Property svn:executable set to *
File size: 2.2 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'};
11solutions={'prognostic'};
12
13%go through the solutions requested
14testname='IceSheetNoIceFrontM2d_16';
15for i=1:length(packages),
16 package=packages{i};
17
18 for j=1:length(solutions),
19 solution=solutions{j};
20
21 %check package
22 if ~(strcmpi(package,'macayeal') | strcmpi(package,'ice') | strcmpi(package,'cielo_serial') | strcmpi(package,'cielo_parallel'));
23 error(['package: ' package ' in test: ' testname ' not supported yet']);
24 %check solution
25 elseif ~(strcmpi(solution,'diagnostic') | strcmpi(solution,'prognostic'));
26 error(['solution: ' solution ' in test: ' testname ' not supported yet']);
27 end
28 %check solution requested
29 if (~strcmpi(package,'ice') & strcmpi(solution,'prognostic')),
30 disp(sprintf(['\nsolution: ' solution ', with package: ' package ', in test: ' testname ', not supported yet.\n']));
31 continue
32 end
33
34 %initialize model
35 md=model;
36 md=mesh(md,'DomainOutline.exp',50000);
37 md=geography(md,'','');
38 md=parameterize(md,'Square.par');
39 md=setelementstype(md,'macayeal','all');
40 if strcmpi(package,'cielo_parallel'), md.cluster='wilkes'; end
41 if md.numberofgrids==388
42 load Velocities; md.vx=0.5*vx; md.vy=0.5*vy;
43 end
44
45 %compute solution
46 if strcmpi(package,'cielo_parallel') & strcmpi(solution,'diagnostic'),
47 md=solve(md,'diagnostic_horiz','cielo');
48 elseif strcmpi(package,'cielo_serial'),
49 eval(['md=solve(md,''' solution ''',''cielo'');']);
50 else
51 eval(['md=solve(md,''' solution ''',''' package ''');']);
52 end
53
54 %save new archive
55 if strcmpi(solution,'diagnostic'),
56 fieldtest=md.vel;
57 elseif strcmpi(solution,'prognostic'),
58 fieldtest=md.new_thickness';
59 end
60 eval(['Archive' package solution '=fieldtest;']);
61 eval(['save Archive' package solution ' Archive' package solution]);
62 end
63end
Note: See TracBrowser for help on using the repository browser.