| 1 | %Start defining model parameters here
|
|---|
| 2 |
|
|---|
| 3 | %Geometry
|
|---|
| 4 | hmin=300.;
|
|---|
| 5 | hmax=1000.;
|
|---|
| 6 | ymin=min(md.mesh.y);
|
|---|
| 7 | ymax=max(md.mesh.y);
|
|---|
| 8 | xmin=min(md.mesh.x);
|
|---|
| 9 | xmax=max(md.mesh.x);
|
|---|
| 10 | md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin)+0.1*(hmin-hmax)*(md.mesh.x-xmin)/(xmax-xmin);
|
|---|
| 11 | md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
|
|---|
| 12 | bed_sheet=-md.materials.rho_ice/md.materials.rho_water*(hmax+(hmin-hmax)*(ymax/2-ymin)/(ymax-ymin));
|
|---|
| 13 | pos=find(md.mesh.y<=ymax/2.);
|
|---|
| 14 | md.geometry.base(pos)=bed_sheet;
|
|---|
| 15 | md.geometry.surface=md.geometry.base+md.geometry.thickness;
|
|---|
| 16 |
|
|---|
| 17 | %Initial velocity
|
|---|
| 18 | x = transpose(ncread('../Data/SquareSheetShelf.nc','x'));
|
|---|
| 19 | y = transpose(ncread('../Data/SquareSheetShelf.nc','y'));
|
|---|
| 20 | vx = transpose(ncread('../Data/SquareSheetShelf.nc','vx'));
|
|---|
| 21 | vy = transpose(ncread('../Data/SquareSheetShelf.nc','vy'));
|
|---|
| 22 | index = transpose(ncread('../Data/SquareSheetShelf.nc','index'));
|
|---|
| 23 | md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
|
|---|
| 24 | md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
|
|---|
| 25 | clear vx vy x y index;
|
|---|
| 26 | md.initialization.vz=zeros(md.mesh.numberofvertices,1);
|
|---|
| 27 | md.initialization.pressure=zeros(md.mesh.numberofvertices,1);
|
|---|
| 28 |
|
|---|
| 29 | %Materials
|
|---|
| 30 | md.initialization.temperature=(273.-20.)*ones(md.mesh.numberofvertices,1);
|
|---|
| 31 | md.materials.rheology_B=paterson(md.initialization.temperature);
|
|---|
| 32 | md.materials.rheology_n=3.*ones(md.mesh.numberofelements,1);
|
|---|
| 33 |
|
|---|
| 34 | %Accumulation and melting
|
|---|
| 35 | md.surfaceforcings.mass_balance=10.*ones(md.mesh.numberofvertices,1);
|
|---|
| 36 | md.basalforcings.melting_rate=5.*ones(md.mesh.numberofvertices,1);
|
|---|
| 37 |
|
|---|
| 38 | %Friction
|
|---|
| 39 | md.friction.coefficient=20.*ones(md.mesh.numberofvertices,1);
|
|---|
| 40 | md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
|
|---|
| 41 | md.friction.p=ones(md.mesh.numberofelements,1);
|
|---|
| 42 | md.friction.q=ones(md.mesh.numberofelements,1);
|
|---|
| 43 |
|
|---|
| 44 | %Numerical parameters
|
|---|
| 45 | md.stressbalance.viscosity_overshoot=0.0;
|
|---|
| 46 | md.masstransport.stabilization=1;
|
|---|
| 47 | md.thermal.stabilization=1;
|
|---|
| 48 | md.verbose=verbose(0);
|
|---|
| 49 | md.settings.waitonlock=30;
|
|---|
| 50 | md.stressbalance.restol=0.05;
|
|---|
| 51 | md.steadystate.reltol=0.05;
|
|---|
| 52 | md.stressbalance.reltol=0.05;
|
|---|
| 53 | md.stressbalance.abstol=NaN;
|
|---|
| 54 | md.timestepping.time_step=1.;
|
|---|
| 55 | md.timestepping.final_time=3.;
|
|---|
| 56 |
|
|---|
| 57 | %Deal with boundary conditions:
|
|---|
| 58 | md=SetMarineIceSheetBC(md,'../Exp/SquareFront.exp');
|
|---|
| 59 |
|
|---|
| 60 | %Change name so that no test have the same name
|
|---|
| 61 | A=dbstack;
|
|---|
| 62 | if (length(A)>2), md.miscellaneous.name=A(3).file(1:end-2); end
|
|---|