source: issm/trunk/test/NightlyRun/test417.m@ 13395

Last change on this file since 13395 was 13395, checked in by Mathieu Morlighem, 12 years ago

merged trunk-jpl and trunk for revision 13393

File size: 3.1 KB
Line 
1md=triangle(model,'../Exp/Square.exp',150000);
2md=setmask(md,'../Exp/SquareShelf.exp','');
3md=parameterize(md,'../Par/SquareSheetShelf.par');
4md=setflowequation(md,'macayeal','all');
5md.cluster=generic('name',oshostname(),'np',3);
6md.materials.rho_ice=10^7; %involved in the mass flux, make it easy
7md.geometry.thickness(:)=1; %make it easy
8
9%constrain all velocities to 1 m/yr, in the y-direction
10md.diagnostic.spcvx(:)=0;
11md.diagnostic.spcvy(:)=1;
12md.diagnostic.spcvz(:)=0;
13
14%Dakota options
15md.qmu.variables.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,0.01);
16
17md.qmu.responses.MaxVel=response_function('MaxVel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
18md.qmu.responses.MassFlux1=response_function('indexed_MassFlux_1',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
19md.qmu.responses.MassFlux2=response_function('indexed_MassFlux_2',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
20md.qmu.responses.MassFlux3=response_function('indexed_MassFlux_3',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
21md.qmu.responses.MassFlux4=response_function('indexed_MassFlux_4',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
22md.qmu.responses.MassFlux5=response_function('indexed_MassFlux_5',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
23md.qmu.responses.MassFlux6=response_function('indexed_MassFlux_6',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
24md.qmu.responses.MassFlux7=response_function('indexed_MassFlux_7',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
25
26%mass flux profiles
27md.qmu.mass_flux_profiles={'../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp','../Exp/Square.exp'};
28md.qmu.mass_flux_profile_directory=pwd;
29
30
31%% nond_sampling study
32
33md.qmu.method =dakota_method('nond_samp');
34md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),...
35'seed',1234,...
36'samples',20,...
37'sample_type','lhs');
38
39%% a variety of parameters
40md.qmu.params.evaluation_concurrency=1;
41md.qmu.params.analysis_driver='';
42md.qmu.params.analysis_components='';
43
44%partitioning
45md.qmu.numberofpartitions=20;
46md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on');
47md.qmu.partition=md.qmu.partition-1;
48md.qmu.isdakota=1;
49
50md.diagnostic.reltol=10^-5; %tighten for qmu analyses
51
52md=solve(md,DiagnosticSolutionEnum,'overwrite','y');
53
54%Fields and tolerances to track changes
55md.qmu.results=md.results.dakota;
56
57%ok, mass flux of 3 profiles should be -3 Gt/yr -3 Gt/yr and the sum, which is -6 Gt/yr
58%we recover those mass fluxes through the mean of the response.
59%also, we recover the max velo, which should be 1m/yr.
60%we put all that data in the montecarlo field, which we will use to test for success.
61%also, check that the stddev are 0.
62md.results.dakota.montecarlo=[];
63for i=1:8,
64 md.results.dakota.montecarlo=[md.results.dakota.montecarlo md.results.dakota.dresp_out(i).mean];
65end
66for i=1:8,
67 md.results.dakota.montecarlo=[md.results.dakota.montecarlo md.results.dakota.dresp_out(i).stddev];
68end
69field_names ={'montecarlo'};
70field_tolerances={1e-11};
71field_values={...
72 md.results.dakota.montecarlo,...
73 };
Note: See TracBrowser for help on using the repository browser.