source: issm/trunk/test/Verification/IceSheetNoIceFrontP3d_18/updatearchive.m@ 297

Last change on this file since 297 was 297, checked in by seroussi, 16 years ago

added cielo serial archive fortest 18

  • Property svn:executable set to *
File size: 3.0 KB
Line 
1% This file can be run to update the velocity archives of the test1.
2% This test deals with an icesheet with icefront for a 3d 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','thermalsteady','thermaltransient','prognostic','transient'};
11
12%go through the solutions requested
13testname='IceSheetNoIceFrontP3d_18';
14for i=1:length(packages),
15 package=packages{i};
16
17 for j=1:length(solutions),
18 solution=solutions{j};
19
20 %check package
21 if ~(strcmpi(package,'macayeal') | strcmpi(package,'ice') | strcmpi(package,'cielo_serial') | strcmpi(package,'cielo_parallel'));
22 error(['package: ' package ' in test: ' testname ' not supported yet']);
23 %check solution
24 elseif ~(strcmpi(solution,'diagnostic') | strcmpi(solution,'thermalsteady') | strcmpi(solution,'thermaltransient') |...
25 strcmpi(solution,'prognostic') | strcmpi(solution,'transient'));
26 error(['solution: ' solution ' in test: ' testname ' not supported yet']);
27 end
28 %check solution requested
29 if (~(strcmpi(package,'ice') | (strcmpi(package,'cielo_serial') & strcmpi(solution,'diagnostic'))) | strcmpi(solution,'transient')),
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',100000);
37 md=geography(md,'','');
38 md=parameterize(md,'Square.par');
39 md=extrude(md,8,4);
40 md=setelementstype(md,'pattyn','all');
41 if strcmpi(package,'cielo_parallel'), md.cluster='wilkes'; end
42 if md.numberofgrids==832
43 load Velocities; md.vx=0.8*vx; md.vy=0.8*vy; md.vz=0.8*vz; md.temperature=temperature-1; md.pressure=pressure;
44 end
45
46 %compute solution
47 if strcmpi(package,'cielo_parallel') & strcmpi(solution,'diagnostic'),
48 md=solve(md,'diagnostic_horiz','cielo');
49 elseif strcmpi(package,'cielo_serial'),
50 eval(['md=solve(md,''' solution ''',''cielo'');']);
51 else
52 eval(['md=solve(md,''' solution ''',''' package ''');']);
53 end
54
55 %compute field to be checked
56 if strcmpi(solution,'diagnostic'),
57 fields={'vy','vz'};
58 elseif strcmpi(solution,'thermalsteady'),
59 fields={'temperature','melting'};
60 elseif strcmpi(solution,'thermaltransient'),
61 fields={'thermaltransient_results(end).temperature','thermaltransient_results(end).melting'};
62 elseif strcmpi(solution,'prognostic'),
63 fields={'new_thickness'};
64 elseif strcmpi(solution,'transient'),
65 fields={'transient_results(end).vy','transient_results(end).vz','transient_results(end).temperature','transient_results(end).melting','transient_results(end).thickness'};
66 end
67
68 %save new archive
69 for k=1:length(fields),
70 field=fields{k};
71 eval(['Archive' package solution '_field' num2str(k) '=md.' field ';']);
72 end
73 eval(['save Archive' package solution ' Archive' package solution '_field*']);
74 end
75end
Note: See TracBrowser for help on using the repository browser.