Changeset 900
- Timestamp:
- 06/11/09 13:19:18 (15 years ago)
- Location:
- issm/trunk/test/Validation
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/test/Validation/EISMINT/Diagnostic1/Square.par
r899 r900 1 2 1 %Ok, start defining model parameters here 3 2 4 %material parameters 5 md.g=9.81; 6 md.rho_ice=917; 7 md.rho_water=1028; 8 di=md.rho_ice/md.rho_water; 9 md.yts=365*24*3600; 10 md.heatcapacity=2009; 11 md.thermalconductivity=2.2; %W/mK 12 md.beta=9.8*10^-8; 3 disp(' creating thickness'); 4 ymin=min(md.y); 5 ymax=max(md.y); 6 md.thickness=500*ones(md.numberofgrids,1); 7 md.firn_layer=0*ones(md.numberofgrids,1); 8 md.bed=-di*md.thickness; 9 md.surface=md.bed+md.thickness; 13 10 14 %Solution parameters 15 %parallelization 16 md.cluster='none'; 17 md.np=2; 18 md.time=1; 19 md.exclusive=0; 11 disp(' creating drag'); 12 md.drag_type=2; %0 none 1 plastic 2 viscous 13 md.drag=200*ones(md.numberofgrids,1); %q=1. 14 %Take care of iceshelves: no basal drag 15 pos=find(md.elementoniceshelf); 16 md.drag(md.elements(pos,:))=0; 17 md.p=ones(md.numberofelements,1); 18 md.q=ones(md.numberofelements,1); 20 19 21 %statics 22 md.lowmem=1; 23 md.eps_rel=0.01; 24 md.eps_abs=10; 25 md.penalty_offset=3; 26 md.penalty_melting=10^7; 27 if md.numberofgrids<1000000, 28 md.sparsity=.001; 29 else 30 md.sparsity=.0001; 31 end 20 disp(' creating temperature'); 21 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 32 22 33 %dynamics 34 md.dt=1*md.yts; %1 year 35 md.ndt=md.dt*10; 36 md.artificial_diffusivity=1; 23 disp(' creating flow law paramter'); 24 md.B=1.7687*10^8*ones(md.numberofgrids,1); 25 md.n=3*ones(md.numberofelements,1); 37 26 38 %control 39 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/year 46 md.epsvel=eps; 27 disp(' creating accumulation rates'); 28 md.accumulation=0.2*ones(md.numberofgrids,1); %0.2m/a 29 md.melting=0*ones(md.numberofgrids,1); %0m/a 47 30 48 49 disp(' creating thickness'); 50 ymin=min(md.y); 51 ymax=max(md.y); 52 md.thickness=500*ones(md.numberofgrids,1); 53 md.firn_layer=0*ones(md.numberofgrids,1); 54 md.bed=-di*md.thickness; 55 md.surface=md.bed+md.thickness; 56 57 disp(' creating velocities'); 58 md.vx_obs=zeros(md.numberofgrids,1); 59 md.vy_obs=zeros(md.numberofgrids,1); 60 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 61 62 disp(' creating drag'); 63 md.drag_type=2; %0 none 1 plastic 2 viscous 64 md.drag=200*ones(md.numberofgrids,1); %q=1. 65 %Take care of iceshelves: no basal drag 66 pos=find(md.elementoniceshelf); 67 md.drag(md.elements(pos,:))=0; 68 md.p=ones(md.numberofelements,1); 69 md.q=ones(md.numberofelements,1); 70 71 disp(' creating temperature'); 72 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 73 74 disp(' creating flow law paramter'); 75 %md.B=paterson(md.observed_temperature); 76 md.B=1.7687*10^8*ones(md.numberofgrids,1); 77 md.n=3*ones(md.numberofelements,1); 78 79 disp(' creating accumulation rates'); 80 md.accumulation=0.2*ones(md.numberofgrids,1); %10m/a 81 md.melting=0*ones(md.numberofgrids,1); %1m/a 82 83 %Deal with boundary conditions: 84 85 disp(' boundary conditions for diagnostic model: '); 86 %Build gridonicefront, array of boundary grids belonging to the icefront: 87 gridinsideicefront=ContourToMesh(md.elements,md.x,md.y,expread('Front.exp',1),'node',2); 88 gridonicefront=double(md.gridonboundary & gridinsideicefront); 89 90 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 91 pos=find(md.gridonboundary & ~gridonicefront);md.gridondirichlet_diag(pos)=1; 92 md.dirichletvalues_diag=zeros(md.numberofgrids,2); 93 94 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 95 md.segmentonneumann_diag=md.segments(pos,:); 96 md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure) 97 98 disp(' boundary conditions for prognostic model: '); 99 md.gridondirichlet_prog=zeros(md.numberofgrids,1); 100 md.dirichletvalues_prog=zeros(md.numberofgrids,1); 101 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 102 md.segmentonneumann_prog=md.segments(pos,:); 103 md.neumannvalues_prog=zeros(size(md.segmentonneumann_prog,1),1); 104 md.neumannvalues_prog(:)=NaN; %free radiation 105 106 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 107 md.segmentonneumann_prog2=md.segments(pos,:); 108 md.neumannvalues_prog2=zeros(size(md.segmentonneumann_prog2,1),1); 109 md.neumannvalues_prog2(:)=NaN; %free radiation 110 111 disp(' boundary conditions for thermal model: '); 112 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 113 md.dirichletvalues_thermal=md.observed_temperature; 114 md.geothermalflux=zeros(md.numberofgrids,1); 115 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=50*10^-3; %50 mW/m^2 116 117 118 119 120 % Some Cielo code, ignore. 121 if strcmp(md.cluster,'yes') 122 ServerDisconnect; 123 end 31 disp(' boundary conditions '); 32 md=SetMarineIceSheetBC(md,'Front.exp'); -
issm/trunk/test/Validation/EISMINT/Diagnostic2/Square.par
r899 r900 1 2 1 %Ok, start defining model parameters here 3 2 4 %material parameters 5 md.g=9.81; 6 md.rho_ice=917; 7 md.rho_water=1028; 8 di=md.rho_ice/md.rho_water; 9 md.yts=365*24*3600; 10 md.heatcapacity=2009; 11 md.thermalconductivity=2.2; %W/mK 12 md.beta=9.8*10^-8; 3 disp(' creating thickness'); 4 ymin=min(md.y); 5 ymax=max(md.y); 6 md.thickness=500*ones(md.numberofgrids,1); 7 md.firn_layer=0*ones(md.numberofgrids,1); 8 md.bed=-di*md.thickness; 9 md.surface=md.bed+md.thickness; 13 10 14 %Solution parameters 15 %parallelization 16 md.cluster='none'; 17 md.np=2; 18 md.time=1; 19 md.exclusive=0; 11 disp(' creating drag'); 12 md.drag_type=2; %0 none 1 plastic 2 viscous 13 md.drag=200*ones(md.numberofgrids,1); %q=1. 14 %Take care of iceshelves: no basal drag 15 pos=find(md.elementoniceshelf); 16 md.drag(md.elements(pos,:))=0; 17 md.p=ones(md.numberofelements,1); 18 md.q=ones(md.numberofelements,1); 20 19 21 %statics 22 md.lowmem=1; 23 md.eps_rel=0.01; 24 md.eps_abs=10; 25 md.penalty_offset=3; 26 md.penalty_melting=10^7; 27 if md.numberofgrids<1000000, 28 md.sparsity=.001; 29 else 30 md.sparsity=.0001; 31 end 20 disp(' creating temperature'); 21 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 32 22 33 %dynamics 34 md.dt=1*md.yts; %1 year 35 md.ndt=md.dt*10; 36 md.artificial_diffusivity=1; 23 disp(' creating flow law paramter'); 24 md.B=1.7687*10^8*ones(md.numberofgrids,1); 25 md.n=3*ones(md.numberofelements,1); 37 26 38 %control 39 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/year 46 md.epsvel=eps; 27 disp(' creating accumulation rates'); 28 md.accumulation=0.2*ones(md.numberofgrids,1); %0.2m/a 29 md.melting=0*ones(md.numberofgrids,1); %0m/a 47 30 48 49 disp(' creating thickness'); 50 ymin=min(md.y); 51 ymax=max(md.y); 52 md.thickness=500*ones(md.numberofgrids,1); 53 md.firn_layer=0*ones(md.numberofgrids,1); 54 md.bed=-di*md.thickness; 55 md.surface=md.bed+md.thickness; 56 57 disp(' creating velocities'); 58 md.vx_obs=zeros(md.numberofgrids,1); 59 md.vy_obs=zeros(md.numberofgrids,1); 60 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 61 62 disp(' creating drag'); 63 md.drag_type=2; %0 none 1 plastic 2 viscous 64 md.drag=200*ones(md.numberofgrids,1); %q=1. 65 %Take care of iceshelves: no basal drag 66 pos=find(md.elementoniceshelf); 67 md.drag(md.elements(pos,:))=0; 68 md.p=ones(md.numberofelements,1); 69 md.q=ones(md.numberofelements,1); 70 71 disp(' creating temperature'); 72 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 73 74 disp(' creating flow law paramter'); 75 %md.B=paterson(md.observed_temperature); 76 md.B=1.7687*10^8*ones(md.numberofgrids,1); 77 md.n=3*ones(md.numberofelements,1); 78 79 disp(' creating accumulation rates'); 80 md.accumulation=0.2*ones(md.numberofgrids,1); %10m/a 81 md.melting=0*ones(md.numberofgrids,1); %1m/a 82 83 %Deal with boundary conditions: 84 85 disp(' boundary conditions for diagnostic model: '); 86 %Build gridonicefront, array of boundary grids belonging to the icefront: 87 gridinsideicefront=ContourToMesh(md.elements,md.x,md.y,expread('Front.exp',1),'node',2); 88 gridonicefront=double(md.gridonboundary & gridinsideicefront); 89 90 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 91 pos=find(md.gridonboundary & ~gridonicefront);md.gridondirichlet_diag(pos)=1; 92 md.dirichletvalues_diag=zeros(md.numberofgrids,2); 93 94 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 95 md.segmentonneumann_diag=md.segments(pos,:); 96 md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure) 97 98 disp(' boundary conditions for prognostic model: '); 99 md.gridondirichlet_prog=zeros(md.numberofgrids,1); 100 md.dirichletvalues_prog=zeros(md.numberofgrids,1); 101 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 102 pos=find(md.y==max(md.y)); %grids on the upper boundary condition 103 md.dirichletvalues_diag(pos,2)=400*(((md.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.x(pos)-100000)/25000).^2); 104 105 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 106 md.segmentonneumann_prog2=md.segments(pos,:); 107 md.neumannvalues_prog2=zeros(size(md.segmentonneumann_prog2,1),1); 108 md.neumannvalues_prog2(:)=NaN; %free radiation 109 110 disp(' boundary conditions for thermal model: '); 111 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 112 md.dirichletvalues_thermal=md.observed_temperature; 113 md.geothermalflux=zeros(md.numberofgrids,1); 114 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=50*10^-3; %50 mW/m^2 115 116 117 118 119 % Some Cielo code, ignore. 120 if strcmp(md.cluster,'yes') 121 ServerDisconnect; 122 end 31 disp(' boundary conditions '); 32 md=SetMarineIceSheetBC(md,'Front.exp'); 33 pos=find(md.y==max(md.y)); %grids on the upper boundary condition 34 md.dirichletvalues_diag(pos,2)=400*(((md.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.x(pos)-100000)/25000).^2); -
issm/trunk/test/Validation/EISMINT/MassConservation/Square.par
r899 r900 1 2 1 %Ok, start defining model parameters here 3 2 4 %material parameters 5 md.g=9.81; 6 md.rho_ice=917; 7 md.rho_water=1028; 8 di=md.rho_ice/md.rho_water; 9 md.yts=365*24*3600; 10 md.heatcapacity=2009; 11 md.thermalconductivity=2.2; %W/mK 12 md.beta=9.8*10^-8; 3 disp(' creating thickness'); 4 ymin=min(md.y); 5 ymax=max(md.y); 6 md.thickness=500*ones(md.numberofgrids,1); 7 md.firn_layer=0*ones(md.numberofgrids,1); 8 md.bed=-di*md.thickness; 9 md.surface=md.bed+md.thickness; 13 10 14 %Solution parameters 15 %parallelization 16 md.cluster='none'; 17 md.np=2; 18 md.time=1; 19 md.exclusive=0; 11 disp(' creating drag'); 12 md.drag_type=2; %0 none 1 plastic 2 viscous 13 md.drag=200*ones(md.numberofgrids,1); %q=1. 14 %Take care of iceshelves: no basal drag 15 pos=find(md.elementoniceshelf); 16 md.drag(md.elements(pos,:))=0; 17 md.p=ones(md.numberofelements,1); 18 md.q=ones(md.numberofelements,1); 20 19 21 %statics 22 md.lowmem=1; 23 md.eps_rel=0.01; 24 md.eps_abs=10; 25 md.penalty_offset=3; 26 md.penalty_melting=10^7; 27 if md.numberofgrids<1000000, 28 md.sparsity=.001; 29 else 30 md.sparsity=.0001; 31 end 20 disp(' creating temperature'); 21 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 32 22 33 %dynamics 34 md.dt=1*md.yts; %1 year 35 md.ndt=md.dt*10; 36 md.artificial_diffusivity=1;23 disp(' creating flow law paramter'); 24 %md.B=paterson(md.observed_temperature); 25 md.B=1.7687*10^8*ones(md.numberofgrids,1); 26 md.n=3*ones(md.numberofelements,1); 37 27 38 %control 39 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/year 46 md.epsvel=eps; 28 disp(' creating accumulation rates'); 29 md.accumulation=0.0*ones(md.numberofgrids,1); %0m/a 30 md.melting=0*ones(md.numberofgrids,1); %0m/a 47 31 32 disp(' boundary conditions '); 33 md=SetMarineIceSheetBC(md,'Front.exp'); 48 34 49 disp(' creating thickness'); 50 ymin=min(md.y); 51 ymax=max(md.y); 52 md.thickness=500*ones(md.numberofgrids,1); 53 md.firn_layer=0*ones(md.numberofgrids,1); 54 md.bed=-di*md.thickness; 55 md.surface=md.bed+md.thickness; 35 %analytical test 36 pos=find(md.y==200000); %grids on the upper boundary condition 37 md.gridondirichlet_diag=ones(md.numberofgrids,1); 38 md.dirichletvalues_diag(:,1)=0; 39 md.dirichletvalues_diag(:,2)=-400; 56 40 57 disp(' creating velocities'); 58 md.vx_obs=zeros(md.numberofgrids,1); 59 md.vy_obs=zeros(md.numberofgrids,1); 60 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 61 62 disp(' creating drag'); 63 md.drag_type=2; %0 none 1 plastic 2 viscous 64 md.drag=200*ones(md.numberofgrids,1); %q=1. 65 %Take care of iceshelves: no basal drag 66 pos=find(md.elementoniceshelf); 67 md.drag(md.elements(pos,:))=0; 68 md.p=ones(md.numberofelements,1); 69 md.q=ones(md.numberofelements,1); 70 71 disp(' creating temperature'); 72 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 73 74 disp(' creating flow law paramter'); 75 %md.B=paterson(md.observed_temperature); 76 md.B=1.7687*10^8*ones(md.numberofgrids,1); 77 md.n=3*ones(md.numberofelements,1); 78 79 disp(' creating accumulation rates'); 80 md.accumulation=0.0*ones(md.numberofgrids,1); %10m/a 81 md.melting=0*ones(md.numberofgrids,1); %1m/a 82 83 %Deal with boundary conditions: 84 85 disp(' boundary conditions for diagnostic model: '); 86 %Build gridonicefront, array of boundary grids belonging to the icefront: 87 gridinsideicefront=ContourToMesh(md.elements,md.x,md.y,expread('Front.exp',1),'node',2); 88 gridonicefront=double(md.gridonboundary & gridinsideicefront); 89 90 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 91 pos=find(md.gridonboundary & ~gridonicefront);md.gridondirichlet_diag(pos)=1; 92 md.dirichletvalues_diag=zeros(md.numberofgrids,2); 93 94 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 95 md.segmentonneumann_diag=md.segments(pos,:); 96 md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure) 97 98 %analytical test 99 pos=find(md.y==200000); %grids on the upper boundary condition 100 md.gridondirichlet_diag=ones(md.numberofgrids,1); 101 md.dirichletvalues_diag(:,1)=0; 102 md.dirichletvalues_diag(:,2)=-400; 103 104 disp(' boundary conditions for prognostic model: '); 105 md.gridondirichlet_prog=zeros(md.numberofgrids,1); 106 md.dirichletvalues_prog=zeros(md.numberofgrids,1); 107 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 108 md.segmentonneumann_prog=md.segments(pos,:); 109 md.neumannvalues_prog=zeros(size(md.segmentonneumann_prog,1),1); 110 md.neumannvalues_prog(:)=NaN; %free radiation 111 112 %analytical test 113 pos=find(md.y==200000); %grids on the upper boundary condition 114 md.gridondirichlet_prog(pos)=1; 115 md.dirichletvalues_prog(pos)=500; 116 117 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 118 md.segmentonneumann_prog2=md.segments(pos,:); 119 md.neumannvalues_prog2=zeros(size(md.segmentonneumann_prog2,1),1); 120 md.neumannvalues_prog2(:)=NaN; %free radiation 121 122 disp(' boundary conditions for thermal model: '); 123 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 124 md.dirichletvalues_thermal=md.observed_temperature; 125 md.geothermalflux=zeros(md.numberofgrids,1); 126 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=50*10^-3; %50 mW/m^2 127 128 129 130 131 % Some Cielo code, ignore. 132 if strcmp(md.cluster,'yes') 133 ServerDisconnect; 134 end 41 %analytical test 42 pos=find(md.y==200000); %grids on the upper boundary condition 43 md.gridondirichlet_prog(pos)=1; 44 md.dirichletvalues_prog(pos)=500; -
issm/trunk/test/Validation/EISMINT/Transient/Square.par
r899 r900 1 2 1 %Ok, start defining model parameters here 3 2 4 %material parameters 5 md.g=9.81; 6 md.rho_ice=917; 7 md.rho_water=1028; 8 di=md.rho_ice/md.rho_water; 9 md.yts=365*24*3600; 10 md.heatcapacity=2009; 11 md.thermalconductivity=2.2; %W/mK 12 md.beta=9.8*10^-8; 3 disp(' creating thickness'); 4 ymin=min(md.y); 5 ymax=max(md.y); 6 md.thickness=500*ones(md.numberofgrids,1); 7 md.firn_layer=0*ones(md.numberofgrids,1); 8 md.bed=-di*md.thickness; 9 md.surface=md.bed+md.thickness; 13 10 14 %Solution parameters 15 %parallelization 16 md.cluster='none'; 17 md.np=2; 18 md.time=1; 19 md.exclusive=0; 11 disp(' creating drag'); 12 md.drag_type=2; %0 none 1 plastic 2 viscous 13 md.drag=200*ones(md.numberofgrids,1); %q=1. 14 %Take care of iceshelves: no basal drag 15 pos=find(md.elementoniceshelf); 16 md.drag(md.elements(pos,:))=0; 17 md.p=ones(md.numberofelements,1); 18 md.q=ones(md.numberofelements,1); 20 19 21 %statics 22 md.lowmem=1; 23 md.eps_rel=0.01; 24 md.eps_abs=10; 25 md.penalty_offset=3; 26 md.penalty_melting=10^7; 27 if md.numberofgrids<1000000, 28 md.sparsity=.001; 29 else 30 md.sparsity=.0001; 31 end 20 disp(' creating temperature'); 21 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 32 22 33 %dynamics 34 md.dt=1*md.yts; %1 year 35 md.ndt=md.dt*10; 36 md.artificial_diffusivity=1; 23 disp(' creating flow law paramter'); 24 md.B=1.7687*10^8*ones(md.numberofgrids,1); 25 md.n=3*ones(md.numberofelements,1); 37 26 38 %control 39 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/year 46 md.epsvel=eps; 27 disp(' creating accumulation rates'); 28 md.accumulation=0.2*ones(md.numberofgrids,1); %0.2m/a 29 md.melting=0*ones(md.numberofgrids,1); %0m/a 47 30 31 disp(' boundary conditions '); 32 md=SetMarineIceSheetBC(md,'Front.exp'); 48 33 49 disp(' creating thickness'); 50 ymin=min(md.y); 51 ymax=max(md.y); 52 md.thickness=500*ones(md.numberofgrids,1); 53 md.firn_layer=0*ones(md.numberofgrids,1); 54 md.bed=-di*md.thickness; 55 md.surface=md.bed+md.thickness; 34 disp(' boundary conditions for prognostic model: '); 35 md.gridondirichlet_prog=zeros(md.numberofgrids,1); 36 md.dirichletvalues_prog=zeros(md.numberofgrids,1); 56 37 57 disp(' creating velocities'); 58 md.vx_obs=zeros(md.numberofgrids,1); 59 md.vy_obs=zeros(md.numberofgrids,1); 60 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 61 62 disp(' creating drag'); 63 md.drag_type=2; %0 none 1 plastic 2 viscous 64 md.drag=200*ones(md.numberofgrids,1); %q=1. 65 %Take care of iceshelves: no basal drag 66 pos=find(md.elementoniceshelf); 67 md.drag(md.elements(pos,:))=0; 68 md.p=ones(md.numberofelements,1); 69 md.q=ones(md.numberofelements,1); 38 pos=find(md.y==max(md.y)); %grids on the upper boundary condition 39 md.dirichletvalues_diag(pos,2)=400*(((md.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.x(pos)-100000)/25000).^2); 40 md.neumannvalues_prog=zeros(size(md.segmentonneumann_prog,1),1); 41 md.neumannvalues_prog(:)=NaN; %free radiation 70 42 71 disp(' creating temperature'); 72 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 73 74 disp(' creating flow law paramter'); 75 %md.B=paterson(md.observed_temperature); 76 md.B=1.7687*10^8*ones(md.numberofgrids,1); 77 md.n=3*ones(md.numberofelements,1); 78 79 disp(' creating accumulation rates'); 80 md.accumulation=0.2*ones(md.numberofgrids,1); %10m/a 81 md.melting=0*ones(md.numberofgrids,1); %1m/a 82 83 %Deal with boundary conditions: 84 85 disp(' boundary conditions for diagnostic model: '); 86 %Build gridonicefront, array of boundary grids belonging to the icefront: 87 gridinsideicefront=ContourToMesh(md.elements,md.x,md.y,expread('Front.exp',1),'node',2); 88 gridonicefront=double(md.gridonboundary & gridinsideicefront); 89 90 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 91 pos=find(md.gridonboundary & ~gridonicefront);md.gridondirichlet_diag(pos)=1; 92 md.dirichletvalues_diag=zeros(md.numberofgrids,2); 93 94 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 95 md.segmentonneumann_diag=md.segments(pos,:); 96 md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure) 97 98 disp(' boundary conditions for prognostic model: '); 99 md.gridondirichlet_prog=zeros(md.numberofgrids,1); 100 md.dirichletvalues_prog=zeros(md.numberofgrids,1); 101 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 102 pos=find(md.y==max(md.y)); %grids on the upper boundary condition 103 md.dirichletvalues_diag(pos,2)=400*(((md.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.x(pos)-100000)/25000).^2); 104 md.neumannvalues_prog=zeros(size(md.segmentonneumann_prog,1),1); 105 md.neumannvalues_prog(:)=NaN; %free radiation 106 107 pos=find(md.y==max(md.y)); %grids on the upper boundary condition 108 md.gridondirichlet_prog(pos)=1; 109 md.dirichletvalues_prog(pos)=500; 110 111 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 112 md.segmentonneumann_prog2=md.segments(pos,:); 113 md.neumannvalues_prog2=zeros(size(md.segmentonneumann_prog2,1),1); 114 md.neumannvalues_prog2(:)=NaN; %free radiation 115 116 disp(' boundary conditions for thermal model: '); 117 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 118 md.dirichletvalues_thermal=md.observed_temperature; 119 md.geothermalflux=zeros(md.numberofgrids,1); 120 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=50*10^-3; %50 mW/m^2 121 122 123 124 125 % Some Cielo code, ignore. 126 if strcmp(md.cluster,'yes') 127 ServerDisconnect; 128 end 43 pos=find(md.y==max(md.y)); %grids on the upper boundary condition 44 md.gridondirichlet_prog(pos)=1; 45 md.dirichletvalues_prog(pos)=500; -
issm/trunk/test/Validation/ThermalTests/Melting/Square.par
r544 r900 1 1 %Ok, start defining model parameters here 2 2 3 4 3 %parallelization 4 md.cluster='none'; 5 5 6 7 8 9 10 11 6 disp(' creating thickness'); 7 h=1000; 8 md.thickness=h*ones(md.numberofgrids,1); 9 md.firn_layer=10*ones(md.numberofgrids,1); 10 md.bed=-1000*ones(md.numberofgrids,1); 11 md.surface=md.bed+md.thickness; 12 12 13 disp(' creating velocities'); 14 md.vx_obs=zeros(md.numberofgrids,1); 15 md.vy_obs=zeros(md.numberofgrids,1); 16 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 17 18 disp(' creating drag'); 19 md.drag_type=2; %0 none 1 plastic 2 viscous 20 md.drag=200*ones(md.numberofgrids,1); %q=1. 21 %Take care of iceshelves: no basal drag 22 pos=find(md.elementoniceshelf); 23 md.drag(md.elements(pos,:))=0; 24 md.p=ones(md.numberofelements,1); 25 md.q=ones(md.numberofelements,1); 13 disp(' creating velocities'); 14 md.vx_obs=zeros(md.numberofgrids,1); 15 md.vy_obs=zeros(md.numberofgrids,1); 16 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 26 17 27 disp(' creating temperatures'); 28 md.observed_temperature=273.15*ones(md.numberofgrids,1); 18 disp(' creating drag'); 19 md.drag_type=2; %0 none 1 plastic 2 viscous 20 md.drag=200*ones(md.numberofgrids,1); %q=1. 21 %Take care of iceshelves: no basal drag 22 pos=find(md.elementoniceshelf); 23 md.drag(md.elements(pos,:))=0; 24 md.p=ones(md.numberofelements,1); 25 md.q=ones(md.numberofelements,1); 29 26 30 disp(' creating flow law paramter'); 31 md.B=paterson(md.observed_temperature); 32 md.n=3*ones(md.numberofelements,1); 33 34 disp(' creating accumulation rates'); 35 md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a 36 md.melting=0*ones(md.numberofgrids,1)/md.yts; %1m/a 27 disp(' creating temperatures'); 28 md.observed_temperature=273.15*ones(md.numberofgrids,1); 37 29 38 %Deal with boundary conditions: 39 40 disp(' boundary conditions for diagnostic model'); 41 md=SetIceShelfBC(md,'Front.exp'); 42 43 disp(' boundary conditions for thermal model'); 44 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 45 md.dirichletvalues_thermal=md.observed_temperature; 46 md.geothermalflux=zeros(md.numberofgrids,1); 47 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=1*10^-3; %1 mW/m^2 30 disp(' creating flow law paramter'); 31 md.B=paterson(md.observed_temperature); 32 md.n=3*ones(md.numberofelements,1); 33 34 disp(' creating accumulation rates'); 35 md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a 36 md.melting=0*ones(md.numberofgrids,1)/md.yts; %1m/a 37 38 %Deal with boundary conditions: 39 40 disp(' boundary conditions for diagnostic model'); 41 md=SetIceShelfBC(md,'Front.exp'); 42 43 disp(' boundary conditions for thermal model'); 44 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 45 md.dirichletvalues_thermal=md.observed_temperature; 46 md.geothermalflux=zeros(md.numberofgrids,1); 47 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=1*10^-3; %1 mW/m^2 -
issm/trunk/test/Validation/ThermalTests/Simpleadvection/Square.par
r514 r900 1 1 %Ok, start defining model parameters here 2 2 3 4 3 %parallelization 4 md.cluster='none'; 5 5 6 7 8 9 10 11 6 disp(' creating thickness'); 7 h=1000; 8 md.thickness=h*ones(md.numberofgrids,1); 9 md.firn_layer=10*ones(md.numberofgrids,1); 10 md.bed=-1000*ones(md.numberofgrids,1); 11 md.surface=md.bed+md.thickness; 12 12 13 disp(' creating velocities'); 14 md.vx_obs=zeros(md.numberofgrids,1); 15 md.vy_obs=zeros(md.numberofgrids,1); 16 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 17 18 disp(' creating drag'); 19 md.drag_type=2; %0 none 1 plastic 2 viscous 20 md.drag=200*ones(md.numberofgrids,1); %q=1. 21 %Take care of iceshelves: no basal drag 22 pos=find(md.elementoniceshelf); 23 md.drag(md.elements(pos,:))=0; 24 md.p=ones(md.numberofelements,1); 25 md.q=ones(md.numberofelements,1); 13 disp(' creating velocities'); 14 md.vx_obs=zeros(md.numberofgrids,1); 15 md.vy_obs=zeros(md.numberofgrids,1); 16 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 26 17 27 disp(' creating temperatures'); 28 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 18 disp(' creating drag'); 19 md.drag_type=2; %0 none 1 plastic 2 viscous 20 md.drag=200*ones(md.numberofgrids,1); %q=1. 21 %Take care of iceshelves: no basal drag 22 pos=find(md.elementoniceshelf); 23 md.drag(md.elements(pos,:))=0; 24 md.p=ones(md.numberofelements,1); 25 md.q=ones(md.numberofelements,1); 29 26 30 disp(' creating flow law paramter'); 31 md.B=paterson(md.observed_temperature); 32 md.n=3*ones(md.numberofelements,1); 33 34 disp(' creating accumulation rates'); 35 md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a 36 md.melting=0*ones(md.numberofgrids,1)/md.yts; %1m/a 27 disp(' creating temperatures'); 28 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 37 29 38 %Deal with boundary conditions: 39 40 disp(' boundary conditions for diagnostic model'); 41 md=SetIceShelfBC(md,'Front.exp'); 42 43 disp(' boundary conditions for thermal model'); 44 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 45 md.dirichletvalues_thermal=md.observed_temperature; 46 md.geothermalflux=zeros(md.numberofgrids,1); 47 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=50*10^-3; %50 mW/m^2 30 disp(' creating flow law paramter'); 31 md.B=paterson(md.observed_temperature); 32 md.n=3*ones(md.numberofelements,1); 33 34 disp(' creating accumulation rates'); 35 md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a 36 md.melting=0*ones(md.numberofgrids,1)/md.yts; %1m/a 37 38 %Deal with boundary conditions: 39 40 disp(' boundary conditions for diagnostic model'); 41 md=SetIceShelfBC(md,'Front.exp'); 42 43 disp(' boundary conditions for thermal model'); 44 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 45 md.dirichletvalues_thermal=md.observed_temperature; 46 md.geothermalflux=zeros(md.numberofgrids,1); 47 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=50*10^-3; %50 mW/m^2 -
issm/trunk/test/Validation/ThermalTests/Simplegeothermalflux/Square.par
r515 r900 1 1 %Ok, start defining model parameters here 2 2 3 4 3 %parallelization 4 md.cluster='none'; 5 5 6 7 8 9 10 11 6 disp(' creating thickness'); 7 h=1000; 8 md.thickness=h*ones(md.numberofgrids,1); 9 md.firn_layer=10*ones(md.numberofgrids,1); 10 md.bed=zeros(md.numberofgrids,1); 11 md.surface=md.thickness; 12 12 13 disp(' creating velocities'); 14 md.vx_obs=zeros(md.numberofgrids,1); 15 md.vy_obs=zeros(md.numberofgrids,1); 16 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 17 18 disp(' creating drag'); 19 md.drag_type=2; %0 none 1 plastic 2 viscous 20 md.drag=200*ones(md.numberofgrids,1); %q=1. 21 %Take care of iceshelves: no basal drag 22 pos=find(md.elementoniceshelf); 23 md.drag(md.elements(pos,:))=0; 24 md.p=ones(md.numberofelements,1); 25 md.q=ones(md.numberofelements,1); 13 disp(' creating velocities'); 14 md.vx_obs=zeros(md.numberofgrids,1); 15 md.vy_obs=zeros(md.numberofgrids,1); 16 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 26 17 27 disp(' creating temperatures'); 28 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 18 disp(' creating drag'); 19 md.drag_type=2; %0 none 1 plastic 2 viscous 20 md.drag=200*ones(md.numberofgrids,1); %q=1. 21 %Take care of iceshelves: no basal drag 22 pos=find(md.elementoniceshelf); 23 md.drag(md.elements(pos,:))=0; 24 md.p=ones(md.numberofelements,1); 25 md.q=ones(md.numberofelements,1); 29 26 30 disp(' creating flow law paramter'); 31 md.B=paterson(md.observed_temperature); 32 md.n=3*ones(md.numberofelements,1); 33 34 disp(' creating accumulation rates'); 35 md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a 36 md.melting=0*ones(md.numberofgrids,1)/md.yts; %1m/a 27 disp(' creating temperatures'); 28 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 37 29 38 %Deal with boundary conditions: 39 40 disp(' boundary conditions for diagnostic model'); 41 md=SetIceShelfBC(md,'Front.exp'); 42 43 disp(' boundary conditions for thermal model'); 44 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 45 md.dirichletvalues_thermal=md.observed_temperature; 46 md.geothermalflux=zeros(md.numberofgrids,1); 47 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=0.1; %100 mW/m^2 30 disp(' creating flow law paramter'); 31 md.B=paterson(md.observed_temperature); 32 md.n=3*ones(md.numberofelements,1); 33 34 disp(' creating accumulation rates'); 35 md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a 36 md.melting=0*ones(md.numberofgrids,1)/md.yts; %1m/a 37 38 %Deal with boundary conditions: 39 40 disp(' boundary conditions for diagnostic model'); 41 md=SetIceShelfBC(md,'Front.exp'); 42 43 disp(' boundary conditions for thermal model'); 44 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 45 md.dirichletvalues_thermal=md.observed_temperature; 46 md.geothermalflux=zeros(md.numberofgrids,1); 47 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=0.1; %100 mW/m^2
Note:
See TracChangeset
for help on using the changeset viewer.