[23438] | 1 | %Test Name: SquareSheetShelfSteaEnthalpyHO3dDakotaSampNeff
|
---|
[25174] | 2 |
|
---|
| 3 | % TODO:
|
---|
[25176] | 4 | % - Figure out why test fails intermittently on Mac with "Index exceeds array
|
---|
| 5 | % bounds."
|
---|
[25174] | 6 | %
|
---|
| 7 |
|
---|
[23438] | 8 | md=triangle(model(),'../Exp/Square.exp',150000.);
|
---|
| 9 | md=setmask(md,'../Exp/SquareShelf.exp','');
|
---|
| 10 | md=parameterize(md,'../Par/SquareSheetShelf.par');
|
---|
| 11 | md=extrude(md,3,2.);
|
---|
| 12 | md=setflowequation(md,'HO','all');
|
---|
| 13 | md.cluster=generic('name',oshostname(),'np',3);
|
---|
| 14 | md.timestepping.time_step=0.;
|
---|
| 15 | md.thermal.isenthalpy=1;
|
---|
| 16 | md.thermal.isdynamicbasalspc=1;
|
---|
| 17 | md.initialization.waterfraction=zeros(md.mesh.numberofvertices,1);
|
---|
| 18 | md.initialization.watercolumn=zeros(md.mesh.numberofvertices,1);
|
---|
| 19 |
|
---|
| 20 | md.friction.coupling=3;
|
---|
| 21 | md.friction.effective_pressure=md.materials.rho_ice*md.constants.g*md.geometry.thickness+md.materials.rho_water*md.constants.g*md.geometry.base;
|
---|
| 22 |
|
---|
| 23 | %dakota version
|
---|
[25165] | 24 | version=IssmConfig('_DAKOTA_VERSION_');
|
---|
| 25 | version=version(1:3);
|
---|
| 26 | version=str2num(version);
|
---|
[23438] | 27 |
|
---|
[24836] | 28 | %partitioning
|
---|
[25005] | 29 | npart=10;
|
---|
| 30 | partition=partitioner(md,'package','chaco','npart',npart,'weighting','on')-1;
|
---|
[24836] | 31 | md.qmu.isdakota=1;
|
---|
| 32 |
|
---|
[23438] | 33 | %variables
|
---|
[24836] | 34 | md.qmu.variables.neff=normal_uncertain('descriptor','scaled_FrictionEffectivePressure',...
|
---|
[25005] | 35 | 'mean',ones(npart,1),...
|
---|
| 36 | 'stddev',.05*ones(npart,1),...
|
---|
| 37 | 'partition',partition);
|
---|
[24870] | 38 | md.qmu.variables.geoflux=normal_uncertain('descriptor','scaled_BasalforcingsGeothermalflux',...
|
---|
[25005] | 39 | 'mean',ones(npart,1),...
|
---|
| 40 | 'stddev',.05*ones(npart,1),...
|
---|
| 41 | 'partition',partition);
|
---|
[23438] | 42 |
|
---|
| 43 | %responses
|
---|
[24839] | 44 | md.qmu.responses.MaxVel=response_function('descriptor','MaxVel');
|
---|
| 45 | md.qmu.responses.MassFlux1=response_function('descriptor','indexed_MassFlux_1');
|
---|
| 46 | md.qmu.responses.MassFlux2=response_function('descriptor','indexed_MassFlux_2');
|
---|
| 47 | md.qmu.responses.MassFlux3=response_function('descriptor','indexed_MassFlux_3');
|
---|
| 48 | md.qmu.responses.MassFlux4=response_function('descriptor','indexed_MassFlux_4');
|
---|
| 49 | md.qmu.responses.MassFlux5=response_function('descriptor','indexed_MassFlux_5');
|
---|
| 50 | md.qmu.responses.MassFlux6=response_function('descriptor','indexed_MassFlux_6');
|
---|
| 51 | md.qmu.responses.MassFlux7=response_function('descriptor','indexed_MassFlux_7');
|
---|
[23438] | 52 |
|
---|
| 53 | %mass flux profiles
|
---|
| 54 | 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'};
|
---|
| 55 | md.qmu.mass_flux_profile_directory=pwd;
|
---|
| 56 |
|
---|
| 57 | md.qmu.method =dakota_method('nond_samp');
|
---|
| 58 | md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),...
|
---|
| 59 | 'seed',1234,...
|
---|
| 60 | 'samples',20,...
|
---|
| 61 | 'sample_type','random');
|
---|
| 62 |
|
---|
| 63 | %% a variety of parameters
|
---|
| 64 | md.qmu.params.direct=true;
|
---|
| 65 | md.qmu.params.analysis_components='';
|
---|
| 66 | md.qmu.params.tabular_graphics_data=true;
|
---|
| 67 |
|
---|
| 68 | if version>=6,
|
---|
| 69 | md.qmu.params.analysis_driver='matlab';
|
---|
| 70 | md.qmu.params.evaluation_scheduling='master';
|
---|
| 71 | md.qmu.params.processors_per_evaluation=2;
|
---|
| 72 | else
|
---|
[23865] | 73 | md.qmu.params.analysis_driver='stressbalance';
|
---|
[23438] | 74 | md.qmu.params.evaluation_concurrency=1;
|
---|
| 75 | end
|
---|
| 76 |
|
---|
| 77 |
|
---|
| 78 | md.stressbalance.reltol=10^-5; %tighten for qmu analyses
|
---|
| 79 |
|
---|
| 80 | md=solve(md,'Steadystate','overwrite','y');
|
---|
| 81 |
|
---|
| 82 | %Fields and tolerances to track changes
|
---|
| 83 | md.qmu.results=md.results.dakota;
|
---|
| 84 |
|
---|
| 85 | %we put all the mean and stdev data in the montecarlo field, which we will use to test for success.
|
---|
| 86 | md.results.dakota.montecarlo=[];
|
---|
| 87 | for i=1:8,
|
---|
| 88 | md.results.dakota.montecarlo=[md.results.dakota.montecarlo md.results.dakota.dresp_out(i).mean];
|
---|
| 89 | end
|
---|
| 90 | for i=1:8,
|
---|
| 91 | md.results.dakota.montecarlo=[md.results.dakota.montecarlo md.results.dakota.dresp_out(i).stddev];
|
---|
| 92 | end
|
---|
| 93 | field_names ={'montecarlo'};
|
---|
[23445] | 94 | field_tolerances={2e-10};
|
---|
[23438] | 95 | field_values={...
|
---|
| 96 | md.results.dakota.montecarlo,...
|
---|
| 97 | };
|
---|
| 98 |
|
---|