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
RevLine 
[11014]1md=triangle(model,'../Exp/Square.exp',150000);
[9641]2md=setmask(md,'../Exp/SquareShelf.exp','');
[5118]3md=parameterize(md,'../Par/SquareSheetShelf.par');
[9664]4md=setflowequation(md,'macayeal','all');
[8589]5md.cluster=generic('name',oshostname(),'np',3);
[9636]6md.materials.rho_ice=10^7; %involved in the mass flux, make it easy
[9691]7md.geometry.thickness(:)=1; %make it easy
[5118]8
9%constrain all velocities to 1 m/yr, in the y-direction
[9679]10md.diagnostic.spcvx(:)=0;
11md.diagnostic.spcvy(:)=1;
12md.diagnostic.spcvz(:)=0;
[5118]13
14%Dakota options
[9652]15md.qmu.variables.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,0.01);
[5118]16
[9652]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]);
[11176]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]);
[5118]25
26%mass flux profiles
[11176]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'};
[9652]28md.qmu.mass_flux_profile_directory=pwd;
[5118]29
30
31%% nond_sampling study
32
[9652]33md.qmu.method =dakota_method('nond_samp');
34md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),...
[5118]35'seed',1234,...
36'samples',20,...
37'sample_type','lhs');
38
39%% a variety of parameters
[9652]40md.qmu.params.evaluation_concurrency=1;
41md.qmu.params.analysis_driver='';
42md.qmu.params.analysis_components='';
[5118]43
44%partitioning
[9652]45md.qmu.numberofpartitions=20;
[9672]46md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on');
[9652]47md.qmu.partition=md.qmu.partition-1;
48md.qmu.isdakota=1;
[5118]49
[9679]50md.diagnostic.reltol=10^-5; %tighten for qmu analyses
[5118]51
[8295]52md=solve(md,DiagnosticSolutionEnum,'overwrite','y');
[5118]53
54%Fields and tolerances to track changes
[13021]55md.qmu.results=md.results.dakota;
[5118]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=[];
[11176]63for i=1:8,
[5118]64 md.results.dakota.montecarlo=[md.results.dakota.montecarlo md.results.dakota.dresp_out(i).mean];
65end
[11176]66for i=1:8,
[5118]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.