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

Last change on this file since 451 was 451, checked in by Mathieu Morlighem, 16 years ago

fixed cielo_parallel in tests + cpsmetics

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