[25217] | 1 | %Test Name: EarthSlr
|
---|
| 2 |
|
---|
| 3 | %mesh earth:
|
---|
| 4 | md=model;
|
---|
| 5 | md.mesh=gmshplanet('radius',6.371012*10^3,'resolution',700.); %500 km resolution mesh
|
---|
| 6 | md.cluster.np=4
|
---|
| 7 |
|
---|
| 8 | %parameterize slr solution:
|
---|
| 9 | %slr loading: {{{
|
---|
| 10 | nt=10;
|
---|
| 11 | md.slr.deltathickness=zeros(md.mesh.numberofelements+1,nt);
|
---|
| 12 | md.slr.deltathickness(end,:)=2001:1:2001+nt-1;
|
---|
| 13 | md.slr.sealevel=zeros(md.mesh.numberofvertices,1);
|
---|
| 14 | md.dsl.global_average_thermosteric_sea_level_change=[0;0];
|
---|
| 15 | md.dsl.sea_surface_height_change_above_geoid=zeros(md.mesh.numberofvertices+1,1);
|
---|
| 16 | md.dsl.sea_water_pressure_change_at_sea_floor=zeros(md.mesh.numberofvertices+1,1);
|
---|
| 17 |
|
---|
| 18 | %antarctica
|
---|
| 19 | late=sum(md.mesh.lat(md.mesh.elements),2)/3;
|
---|
| 20 | longe=sum(md.mesh.long(md.mesh.elements),2)/3;
|
---|
| 21 | posa=find(late <-80);
|
---|
| 22 | md.slr.deltathickness(posa,:)=-100;
|
---|
| 23 |
|
---|
| 24 | %greenland
|
---|
| 25 | posg=find(late > 70 & late < 80 & longe>-60 & longe<-30);
|
---|
| 26 | md.slr.deltathickness(posg,:)=-100;
|
---|
| 27 |
|
---|
| 28 | %elastic loading from love numbers:
|
---|
| 29 | nlov=101;
|
---|
| 30 | md.slr.love_h = love_numbers('h','CM'); md.slr.love_h(nlov+1:end)=[];
|
---|
| 31 | md.slr.love_k = love_numbers('k','CM'); md.slr.love_k(nlov+1:end)=[];
|
---|
| 32 | md.slr.love_l = love_numbers('l','CM'); md.slr.love_l(nlov+1:end)=[];
|
---|
| 33 |
|
---|
| 34 | %}}}
|
---|
| 35 | %mask: {{{
|
---|
| 36 | mask=gmtmask(md.mesh.lat,md.mesh.long);
|
---|
| 37 | icemask=ones(md.mesh.numberofvertices,1);
|
---|
| 38 | pos=find(mask==0); icemask(pos)=-1;
|
---|
| 39 | pos=find(sum(mask(md.mesh.elements),2)<3); icemask(md.mesh.elements(pos,:))=-1;
|
---|
| 40 | md.mask.ice_levelset=icemask;
|
---|
| 41 | md.mask.ocean_levelset=-icemask;
|
---|
| 42 |
|
---|
| 43 | %make sure that the elements that have loads are fully grounded:
|
---|
| 44 | pos=find(sum(md.slr.deltathickness(1:end-1,:),2));
|
---|
| 45 | md.mask.ocean_levelset(md.mesh.elements(pos,:))=1;
|
---|
| 46 |
|
---|
| 47 | %make sure wherever there is an ice load, that the mask is set to ice:
|
---|
| 48 | md.mask.ice_levelset(md.mesh.elements(pos,:))=-1;
|
---|
| 49 | % }}}
|
---|
| 50 |
|
---|
| 51 | md.slr.ocean_area_scaling=0;
|
---|
| 52 |
|
---|
| 53 | %Geometry for the bed, arbitrary:
|
---|
| 54 | md.geometry.bed=-ones(md.mesh.numberofvertices,1);
|
---|
| 55 |
|
---|
| 56 | %Materials:
|
---|
| 57 | md.materials=materials('hydro');
|
---|
| 58 |
|
---|
| 59 | %New stuff
|
---|
| 60 | md.slr.spcthickness = NaN(md.mesh.numberofvertices,1);
|
---|
| 61 | md.slr.Ngia = zeros(md.mesh.numberofvertices,1);
|
---|
| 62 | md.slr.Ugia = zeros(md.mesh.numberofvertices,1);
|
---|
| 63 | md.slr.hydro_rate = zeros(md.mesh.numberofvertices,1);
|
---|
| 64 |
|
---|
| 65 | %Miscellaneous
|
---|
| 66 | md.miscellaneous.name='test2002';
|
---|
| 67 |
|
---|
| 68 | %Solution parameters
|
---|
| 69 | md.slr.reltol=NaN;
|
---|
| 70 | md.slr.abstol=1e-3;
|
---|
| 71 | md.slr.geodetic=1;
|
---|
| 72 |
|
---|
| 73 | % max number of iteration reverted back to 10 (i.e., the original default value)
|
---|
| 74 | md.slr.maxiter=10;
|
---|
| 75 |
|
---|
| 76 | %Uncertainty Quantification%{{{
|
---|
| 77 |
|
---|
| 78 | %partitioning
|
---|
| 79 | npart=2;
|
---|
| 80 | partition=-ones(md.mesh.numberofelements,1);
|
---|
| 81 | partition(posg)=0;
|
---|
| 82 | partition(posa)=1;
|
---|
| 83 |
|
---|
| 84 | %variables:
|
---|
| 85 | md.qmu.variables.deltathickness=normal_uncertain('descriptor','scaled_SealevelriseDeltathickness',...
|
---|
| 86 | 'mean',ones(npart,nt),...
|
---|
| 87 | 'stddev',.2*ones(npart,nt),...
|
---|
| 88 | 'partition',partition,'nsteps',nt);
|
---|
| 89 |
|
---|
| 90 | md.qmu.correlation_matrix=zeros(npart*nt,npart*nt);
|
---|
| 91 | for i=1:npart,
|
---|
| 92 | for j=1:nt,
|
---|
| 93 | indi=(i-1)*nt+j;
|
---|
| 94 | for k=1:npart,
|
---|
| 95 | for l=1:nt,
|
---|
| 96 | indj=(k-1)*nt+l;
|
---|
| 97 | if i~=k,
|
---|
| 98 | md.qmu.correlation_matrix(indi,indj)=0;
|
---|
| 99 | else
|
---|
| 100 | %same partition:
|
---|
| 101 | if j==l,
|
---|
| 102 | md.qmu.correlation_matrix(indi,indj)=1;
|
---|
| 103 | else
|
---|
| 104 | if i==1,
|
---|
| 105 | md.qmu.correlation_matrix(indi,indj)=.2;
|
---|
| 106 | else
|
---|
| 107 | md.qmu.correlation_matrix(indi,indj)=.5;
|
---|
| 108 | end
|
---|
| 109 | end
|
---|
| 110 | end
|
---|
| 111 | end
|
---|
| 112 | end
|
---|
| 113 | end
|
---|
| 114 | end
|
---|
| 115 |
|
---|
| 116 |
|
---|
| 117 | %responses
|
---|
| 118 | md.qmu.responses.sealevel1=response_function('descriptor','Outputdefinition1');
|
---|
| 119 | md.qmu.responses.sealevel2=response_function('descriptor','Outputdefinition2');
|
---|
| 120 | md.qmu.responses.sealevel3=response_function('descriptor','Outputdefinition3');
|
---|
| 121 | md.qmu.responses.sealevel4=response_function('descriptor','Outputdefinition4');
|
---|
| 122 | md.qmu.responses.sealevel5=response_function('descriptor','Outputdefinition5');
|
---|
| 123 | md.qmu.responses.sealevel6=response_function('descriptor','Outputdefinition6');
|
---|
| 124 | md.qmu.responses.sealevel7=response_function('descriptor','Outputdefinition7');
|
---|
| 125 | md.qmu.responses.sealevel8=response_function('descriptor','Outputdefinition8');
|
---|
| 126 | md.qmu.responses.sealevel8=response_function('descriptor','Outputdefinition9');
|
---|
| 127 | md.qmu.responses.sealevel10=response_function('descriptor','Outputdefinition10');
|
---|
| 128 |
|
---|
| 129 | %output definitions:
|
---|
| 130 | for i=1:10,
|
---|
| 131 | if i==1,
|
---|
| 132 | md.outputdefinition.definitions={nodalvalue('name','SNode','definitionstring','Outputdefinition1', ...
|
---|
| 133 | 'model_string','Sealevel','node',i)};
|
---|
| 134 | else
|
---|
| 135 | md.outputdefinition.definitions{end+1}=nodalvalue('name','SNode','definitionstring',['Outputdefinition' num2str(i)], ...
|
---|
| 136 | 'model_string','Sealevel','node',i);
|
---|
| 137 | end
|
---|
| 138 | end
|
---|
| 139 | %algorithm:
|
---|
| 140 | md.qmu.method =dakota_method('nond_samp');
|
---|
| 141 | md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),...
|
---|
| 142 | 'seed',1234,...
|
---|
| 143 | 'samples',40,...
|
---|
| 144 | 'sample_type','lhs');
|
---|
| 145 |
|
---|
| 146 | %parameters
|
---|
| 147 | md.qmu.params.direct=true;
|
---|
| 148 | md.qmu.params.interval_type='forward';
|
---|
| 149 | md.qmu.params.analysis_driver='matlab';
|
---|
| 150 | md.qmu.params.evaluation_scheduling='master';
|
---|
| 151 | md.qmu.params.processors_per_evaluation=3;
|
---|
| 152 | md.qmu.params.tabular_graphics_data=true;
|
---|
| 153 | %}}}
|
---|
| 154 | md.qmu.isdakota=1;
|
---|
| 155 | md.qmu.output=1;
|
---|
| 156 |
|
---|
| 157 | %transient:
|
---|
| 158 | md.timestepping.start_time=2000;
|
---|
| 159 | md.timestepping.time_step=1;
|
---|
| 160 | md.timestepping.interp_forcings=0;
|
---|
| 161 | md.timestepping.final_time=2011;
|
---|
| 162 | md.transient.issmb=0;
|
---|
| 163 | md.transient.ismasstransport=0;
|
---|
| 164 | md.transient.isstressbalance=0;
|
---|
| 165 | md.transient.isthermal=0;
|
---|
| 166 | md.transient.isslr=1;
|
---|
| 167 | md.slr.requested_outputs= {'default',...
|
---|
| 168 | 'SealevelriseDeltathickness','Sealevel','SealevelRSLRate','SealevelriseCumDeltathickness',...
|
---|
| 169 | 'SealevelNEsaRate', 'SealevelUEsaRate', 'SealevelNGiaRate', 'SealevelUGiaRate',...
|
---|
| 170 | 'SealevelEustaticMask','SealevelEustaticOceanMask'};
|
---|
| 171 |
|
---|
| 172 | %hack:
|
---|
| 173 | md.geometry.thickness=ones(md.mesh.numberofvertices,1);
|
---|
| 174 | md.geometry.base=-ones(md.mesh.numberofvertices,1);
|
---|
| 175 | md.geometry.surface=zeros(md.mesh.numberofvertices,1);
|
---|
| 176 |
|
---|
| 177 | %eustatic + rigid + elastic + rotation run:
|
---|
| 178 | md.verbose=verbose('0');
|
---|
| 179 | md.verbose.qmu=1;
|
---|
| 180 | md.slr.rigid=1; md.slr.elastic=1; md.slr.rotation=1;
|
---|
| 181 | md=solve(md,'tr');
|
---|
| 182 |
|
---|