[13975] | 1 | md=triangle(model(),'../Exp/Square.exp',150000.);
|
---|
[9641] | 2 | md=setmask(md,'../Exp/SquareShelf.exp','');
|
---|
[5118] | 3 | md=parameterize(md,'../Par/SquareSheetShelf.par');
|
---|
[16137] | 4 | md=setflowequation(md,'SSA','all');
|
---|
[8589] | 5 | md.cluster=generic('name',oshostname(),'np',3);
|
---|
[9636] | 6 | md.materials.rho_ice=10^7; %involved in the mass flux, make it easy
|
---|
[9691] | 7 | md.geometry.thickness(:)=1; %make it easy
|
---|
[5118] | 8 |
|
---|
| 9 | %constrain all velocities to 1 m/yr, in the y-direction
|
---|
[16137] | 10 | md.stressbalance.spcvx(:)=0;
|
---|
| 11 | md.stressbalance.spcvy(:)=1;
|
---|
| 12 | md.stressbalance.spcvz(:)=0;
|
---|
[5118] | 13 |
|
---|
| 14 | %Dakota options
|
---|
[9652] | 15 | md.qmu.variables.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,0.01);
|
---|
[5118] | 16 |
|
---|
[9652] | 17 | md.qmu.responses.MaxVel=response_function('MaxVel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 18 | md.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]);
|
---|
| 19 | md.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]);
|
---|
| 20 | md.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]);
|
---|
| 21 | md.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]);
|
---|
| 22 | md.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]);
|
---|
| 23 | md.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] | 24 | md.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] | 27 | md.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] | 28 | md.qmu.mass_flux_profile_directory=pwd;
|
---|
[5118] | 29 |
|
---|
| 30 |
|
---|
| 31 | %% nond_sampling study
|
---|
| 32 |
|
---|
[9652] | 33 | md.qmu.method =dakota_method('nond_samp');
|
---|
| 34 | md.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] | 40 | md.qmu.params.evaluation_concurrency=1;
|
---|
| 41 | md.qmu.params.analysis_driver='';
|
---|
| 42 | md.qmu.params.analysis_components='';
|
---|
[5118] | 43 |
|
---|
| 44 | %partitioning
|
---|
[9652] | 45 | md.qmu.numberofpartitions=20;
|
---|
[9672] | 46 | md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on');
|
---|
[9652] | 47 | md.qmu.partition=md.qmu.partition-1;
|
---|
| 48 | md.qmu.isdakota=1;
|
---|
[5118] | 49 |
|
---|
[16137] | 50 | md.stressbalance.reltol=10^-5; %tighten for qmu analyses
|
---|
[5118] | 51 |
|
---|
[16137] | 52 | md=solve(md,StressbalanceSolutionEnum(),'overwrite','y');
|
---|
[5118] | 53 |
|
---|
| 54 | %Fields and tolerances to track changes
|
---|
[13021] | 55 | md.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.
|
---|
| 62 | md.results.dakota.montecarlo=[];
|
---|
[11176] | 63 | for i=1:8,
|
---|
[5118] | 64 | md.results.dakota.montecarlo=[md.results.dakota.montecarlo md.results.dakota.dresp_out(i).mean];
|
---|
| 65 | end
|
---|
[11176] | 66 | for i=1:8,
|
---|
[5118] | 67 | md.results.dakota.montecarlo=[md.results.dakota.montecarlo md.results.dakota.dresp_out(i).stddev];
|
---|
| 68 | end
|
---|
| 69 | field_names ={'montecarlo'};
|
---|
| 70 | field_tolerances={1e-11};
|
---|
| 71 | field_values={...
|
---|
| 72 | md.results.dakota.montecarlo,...
|
---|
| 73 | };
|
---|