Changeset 3510
- Timestamp:
- 04/12/10 08:46:50 (15 years ago)
- Location:
- issm/trunk/examples/Bumps/Bump2_bed
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/examples/Bumps/Bump2_bed/Square.par
r1 r3510 1 1 2 2 %Ok, start defining model parameters here 3 4 %material parameters5 md.g=9.8;6 md.rho_ice=917;7 md.rho_water=1023;8 di=md.rho_ice/md.rho_water;9 md.yts=365*24*3600;10 md.heatcapacity=2009;11 md.thermalconductivity=2.2; %W/mK12 md.beta=9.8*10^-8;13 14 %Solution parameters15 3 %parallelization 16 md.cluster= 'none';17 md.np= 2;4 md.cluster=oshostname; 5 md.np=8; 18 6 md.time=1; 19 md.exclusive=0;20 7 21 8 %statics 22 md.lowmem=1;23 9 md.eps_rel=0.01; 24 10 md.eps_abs=10; %m/yr 25 md.penalty_offset=4;26 md.penalty_melting=10^7;27 if md.numberofgrids<1000000,28 md.sparsity=.001;29 else30 md.sparsity=.0001;31 end32 33 %dynamics34 md.dt=1*md.yts; %1 year35 md.ndt=md.dt*10;36 md.artificial_diffusivity=1;37 38 %control39 md.control_type={'drag'}; %'drag', 'B'40 md.nsteps=5;41 md.tolx=10^-4;42 md.maxiter=20;43 md.optscal=10;44 md.fit='logarithmic'; %'absolute','relative','logarithmic'45 md.meanvel=1000/md.yts; %1000 meters/year46 md.epsvel=eps;47 48 11 49 12 disp(' creating thickness'); 50 hmin=500; 51 hmax=500; 52 ymin=min(md.y); 53 ymax=max(md.y); 54 md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin); 13 md.thickness=500*ones(md.numberofgrids,1); 55 14 md.firn_layer=10*ones(md.numberofgrids,1); 56 md.bed=- di*md.thickness-50; %*10^(-4)*min(0,md.y-900000);;15 md.bed=-md.rho_ice/md.rho_water*md.thickness+5; 57 16 58 17 md.surface=md.bed+md.thickness; 59 18 60 19 %Add bumps to the ice sheet : 61 pos=find(sqrt((md.x-500000).^2+(md.y-500000).^2)<100000); %for a cicular bump 62 md.bed(pos)=md.bed(pos)+150*cos(pi/200000*(sqrt((md.y(pos)-500000).^2+(md.x(pos)-500000).^2))); %for a circular bump 20 radius= 500000; 21 center=[500000 500000]; 22 height=150; 23 pos=find(sqrt((md.x-center(1)).^2+(md.y-center(2)).^2)<radius); %for a cicular bump 24 md.bed(pos)=md.bed(pos)+height*cos(pi/(2*radius)*(sqrt((md.y(pos)-center(1)).^2+(md.x(pos)-center(2)).^2))); %for a circular bump 63 25 64 26 %Change the thickness to follow the new bed 27 %height=-15; 28 %md.surface(pos)=md.surface(pos)+height*cos(pi/(2*radius)*(sqrt((md.y(pos)-center(1)).^2+(md.x(pos)-center(2)).^2))); %for a circular bump 65 29 md.thickness=md.surface-md.bed; 66 30 67 31 disp(' creating velocities'); 68 md.vx_obs= zeros(md.numberofgrids,1);69 md.vy_obs= zeros(md.numberofgrids,1);32 md.vx_obs= 0*ones(md.numberofgrids,1); 33 md.vy_obs=100*ones(md.numberofgrids,1); 70 34 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 71 35 … … 73 37 md.drag_type=2; %0 none 1 plastic 2 viscous 74 38 md.drag=10*ones(md.numberofgrids,1); %q=1. 75 %Take care of iceshelves: no basal drag76 39 pos=find(md.elementoniceshelf); 77 40 md.drag(md.elements(pos,:))=0; … … 86 49 md.n=3*ones(md.numberofelements,1); 87 50 88 disp(' creating accumulation rates');89 md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a90 md.melting=0*ones(md.numberofgrids,1)/md.yts; %1m/a91 92 51 %Deal with boundary conditions: 93 94 disp(' boundary conditions for diagnostic model: '); 95 %Build gridonicefront, array of boundary grids belonging to the icefront: 96 gridinsideicefront=ArgusContourToMesh(md.elements,md.x,md.y,expread('Front.exp',1),'node',2); 97 gridonicefront=double(md.gridonboundary & gridinsideicefront); 98 99 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 100 pos=find(md.gridonboundary & ~gridonicefront);md.gridondirichlet_diag(pos)=1; 101 md.dirichletvalues_diag=100*ones(md.numberofgrids,2)*[0,0;0,1]; 102 103 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 104 md.segmentonneumann_diag=md.segments(pos,:); 105 md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure) 106 107 disp(' boundary conditions for prognostic model: '); 108 md.gridondirichlet_prog=zeros(md.numberofgrids,1); 109 md.dirichletvalues_prog=zeros(md.numberofgrids,1); 110 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 111 md.segmentonneumann_prog=md.segments(pos,:); 112 md.neumannvalues_prog=zeros(size(md.segmentonneumann_prog,1),1); 113 md.neumannvalues_prog(:)=NaN; %free radiation 114 115 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 116 md.segmentonneumann_prog2=md.segments(pos,:); 117 md.neumannvalues_prog2=zeros(size(md.segmentonneumann_prog2,1),1); 118 md.neumannvalues_prog2(:)=NaN; %free radiation 119 120 disp(' boundary conditions for thermal model: '); 121 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 122 md.dirichletvalues_thermal=md.observed_temperature; 123 md.geothermalflux=zeros(md.numberofgrids,1); 124 125 126 % Some Cielo code, ignore. 127 if strcmp(md.cluster,'yes') 128 ServerDisconnect; 129 end 52 md=SetIceShelfBC(md,'Front.exp'); 53 md.verbose=10; -
issm/trunk/examples/Bumps/Bump2_bed/runme.m
r1 r3510 8 8 % Create macayeal model; 9 9 10 mdm=model; 11 mdm=mesh(mdm,'DomainOutline.exp',150000); 10 mdm=mesh(model,'DomainOutline.exp',150000); 12 11 mdm=geography(mdm,'',''); 13 12 mdm=parameterize(mdm,'Square.par'); … … 16 15 17 16 %Compute solution with Ice model 18 mdm=solve(mdm,'diagnostic','ice'); 17 mdm.cluster=oshostname; 18 mdm=solve(mdm,'analysis_type','diagnostic'); 19 19 20 20 save modelmacayeal mdm … … 22 22 % Create pattyn model; 23 23 24 mdp=model; 25 mdp=mesh(mdp,'DomainOutline.exp',150000); 24 mdp=mesh(model,'DomainOutline.exp',150000); 26 25 mdp=geography(mdp,'',''); 27 26 mdp=parameterize(mdp,'Square.par'); … … 30 29 31 30 %Compute solution with Ice model 32 mdp=solve(mdp,' diagnostic','ice');31 mdp=solve(mdp,'analysis_type','diagnostic'); 33 32 34 33 save modelpattyn mdp … … 36 35 % Create stokes model; 37 36 38 mds=model; 39 mds=mesh(mds,'DomainOutline.exp',150000); 37 mds=mesh(model,'DomainOutline.exp',150000); 40 38 mds=geography(mds,'',''); 41 39 mds=parameterize(mds,'Square.par'); … … 44 42 45 43 %Compute solution with Ice model 46 mds=solve(mds,' diagnostic','ice');44 mds=solve(mds,'analysis_type','diagnostic'); 47 45 48 46 save modelstokes mds
Note:
See TracChangeset
for help on using the changeset viewer.