Changeset 14134
- Timestamp:
- 12/11/12 15:25:15 (12 years ago)
- Location:
- issm/trunk-jpl/test
- Files:
-
- 14 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/python_skipped_tests.txt
r14107 r14134 24 24 propagate into the sixth digit of the thickness, which is enough to fail NR. 25 25 26 test1109,test1110 27 Ugly crashes in solver, but same behavior as Matlab. 28 -
issm/trunk-jpl/test/NightlyRun/test1101.m
r13671 r14134 1 %This test is a test from the ISMP-HOM Intercomparison project 1 %This test is a test from the ISMP-HOM Intercomparison project. 2 2 %Pattyn and Payne 2006 3 3 printingflag=false; 4 4 5 L_list={5000 ,10000,20000,40000,80000,160000};5 L_list={5000.,10000.,20000.,40000.,80000.,160000.}; 6 6 results={}; 7 7 minvx=[]; … … 26 26 27 27 pos=find(md.mesh.vertexonbed); 28 md.diagnostic.spcvx(pos)=0 ;29 md.diagnostic.spcvy(pos)=0 ;28 md.diagnostic.spcvx(pos)=0.; 29 md.diagnostic.spcvy(pos)=0.; 30 30 31 31 %Create MPCs to have periodic boundary conditions 32 posx=find(md.mesh.x==0 );32 posx=find(md.mesh.x==0.); 33 33 posx2=find(md.mesh.x==max(md.mesh.x)); 34 34 35 posy=find(md.mesh.y==0 & md.mesh.x~=0& md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times36 posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));35 posy=find(md.mesh.y==0. & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times 36 posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x)); 37 37 38 38 md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2]; … … 55 55 set(gcf,'Color','w') 56 56 printmodel(['ismipapattynvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 57 system(['mv ismipapattynvx' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 57 system(['mv ismipapattynvx' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 58 58 end 59 59 plotmodel(md,'data',vy,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km') … … 61 61 set(gcf,'Color','w') 62 62 printmodel(['ismipapattynvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 63 system(['mv ismipapattynvy' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 63 system(['mv ismipapattynvy' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 64 64 end 65 65 plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km') … … 67 67 set(gcf,'Color','w') 68 68 printmodel(['ismipapattynvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 69 system(['mv ismipapattynvz' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 69 system(['mv ismipapattynvz' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 70 70 end 71 71 72 if(L==5000 ),72 if(L==5000.), 73 73 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.mesh.numberoflayers,... 74 74 'resolution',[10 10],'ylim',[10 18],'xlim',[0 5000],'title','','xlabel','') 75 elseif(L==10000 ),75 elseif(L==10000.), 76 76 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.mesh.numberoflayers,... 77 77 'resolution',[10 10],'ylim',[10 30],'xlim',[0 10000],'title','','xlabel','') 78 elseif(L==20000 ),78 elseif(L==20000.), 79 79 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.mesh.numberoflayers,... 80 80 'resolution',[10 10],'ylim',[0 50],'xlim',[0 20000],'title','','xlabel','') 81 elseif(L==40000 ),81 elseif(L==40000.), 82 82 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.mesh.numberoflayers,... 83 83 'resolution',[10 10],'ylim',[0 80],'xlim',[0 40000],'title','','xlabel','') 84 elseif(L==80000 ),84 elseif(L==80000.), 85 85 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.mesh.numberoflayers,... 86 86 'resolution',[10 10],'ylim',[0 100],'xlim',[0 80000],'title','','xlabel','') 87 elseif(L==160000 ),87 elseif(L==160000.), 88 88 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.mesh.numberoflayers,... 89 89 'resolution',[10 10],'ylim',[0 120],'xlim',[0 160000],'title','','xlabel','') … … 92 92 set(gcf,'Color','w') 93 93 printmodel(['ismipapattynvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 94 system(['mv ismipapattynvxsec' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 94 system(['mv ismipapattynvxsec' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 95 95 end 96 96 end … … 101 101 set(gcf,'Color','w') 102 102 printmodel('ismipapattynminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 103 system(['mv ismipapattynminvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 103 system(['mv ismipapattynminvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 104 104 end 105 105 plot([5 10 20 40 80 160],maxvx);ylim([0 120]);xlim([0 160]) … … 107 107 set(gcf,'Color','w') 108 108 printmodel('ismipapattynmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 109 system(['mv ismipapattynmaxvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 109 system(['mv ismipapattynmaxvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 110 110 end 111 111 112 %Fields and tolerances to track changes 112 field_names ={ 113 field_names ={... 113 114 'Vx5km','Vy5km','Vz5km',... 114 115 'Vx10km','Vy10km','Vz10km',... -
issm/trunk-jpl/test/NightlyRun/test1102.m
r13671 r14134 1 %This test is a test from the ISMP-HOM Intercomparison project 1 %This test is a test from the ISMP-HOM Intercomparison project. 2 2 %Pattyn and Payne 2006 3 3 printingflag=false; 4 4 5 L_list={5000 ,10000,20000,40000,80000,160000};5 L_list={5000.,10000.,20000.,40000.,80000.,160000.}; 6 6 results={}; 7 7 minvx=[]; … … 17 17 18 18 % %Find elements at the corner and extract model 19 % posnodes=find((md.mesh.x==0 | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0| md.mesh.y==max(md.mesh.y)));19 % posnodes=find((md.mesh.x==0. | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0. | md.mesh.y==max(md.mesh.y))); 20 20 % [a,b]=find(ismember(md.mesh.elements,posnodes)); 21 21 % elements=ones(md.mesh.numberofelements,1); … … 29 29 %Create dirichlet on the bed only 30 30 pos=find(md.mesh.vertexonbed); 31 md.diagnostic.spcvx(pos)=0 ;32 md.diagnostic.spcvy(pos)=0 ;33 md.diagnostic.spcvz(pos)=0 ;31 md.diagnostic.spcvx(pos)=0.; 32 md.diagnostic.spcvy(pos)=0.; 33 md.diagnostic.spcvz(pos)=0.; 34 34 35 %Create MPCs to have periodic boundary conditions36 %posx=find(md.mesh.x==0);37 %posx2=find(md.mesh.x==max(md.mesh.x));38 %posx=find(md.mesh.x==0 & md.mesh.y~=0& md.mesh.y~=max(md.mesh.y) & ~md.mesh.vertexonbed);39 %posx2=find(md.mesh.x==max(md.mesh.x) & md.mesh.y~=0& md.mesh.y~=max(md.mesh.y) & ~md.mesh.vertexonbed);35 % %Create MPCs to have periodic boundary conditions 36 % posx=find(md.mesh.x==0.); 37 % posx2=find(md.mesh.x==max(md.mesh.x)); 38 % posx=find(md.mesh.x==0. & md.mesh.y~=0. & md.mesh.y~=max(md.mesh.y) & ~md.mesh.vertexonbed); 39 % posx2=find(md.mesh.x==max(md.mesh.x) & md.mesh.y~=0. & md.mesh.y~=max(md.mesh.y) & ~md.mesh.vertexonbed); 40 40 41 %posy=find(md.mesh.y==0 & md.mesh.x~=0& md.mesh.x~=max(md.mesh.x) & ~md.mesh.vertexonbed); %Don't take the same nodes two times42 %posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0& md.mesh.x~=max(md.mesh.x) & ~md.mesh.vertexonbed);41 % posy=find(md.mesh.y==0. & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x) & ~md.mesh.vertexonbed); %Don't take the same nodes two times 42 % posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x) & ~md.mesh.vertexonbed); 43 43 44 %md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];44 % md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2]; 45 45 46 46 %Compute the diagnostic 47 47 md.diagnostic.abstol=NaN; 48 48 md.diagnostic.reltol=NaN; 49 md.diagnostic.restol=1 ;49 md.diagnostic.restol=1.; 50 50 md.cluster=generic('name',oshostname(),'np',8); 51 51 md=solve(md,DiagnosticSolutionEnum()); … … 62 62 %Now plot vx, vy, vz and vx on a cross section 63 63 plotmodel(md,'data',vx,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',2) 64 if printingflag, 64 if printingflag, 65 65 set(gcf,'Color','w') 66 66 printmodel(['ismipastokesvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 67 system(['mv ismipastokesvx' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 67 system(['mv ismipastokesvx' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 68 68 end 69 69 plotmodel(md,'data',vy,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3) 70 if printingflag, 70 if printingflag, 71 71 set(gcf,'Color','w') 72 72 printmodel(['ismipastokesvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 73 system(['mv ismipastokesvy' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 73 system(['mv ismipastokesvy' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 74 74 end 75 75 plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',4) 76 if printingflag, 76 if printingflag, 77 77 set(gcf,'Color','w') 78 78 printmodel(['ismipastokesvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 79 system(['mv ismipastokesvz' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 79 system(['mv ismipastokesvz' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 80 80 end 81 81 82 if(L==5000 ),82 if(L==5000.), 83 83 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.mesh.numberoflayers,... 84 84 'resolution',[10 10],'ylim',[10 18],'xlim',[0 5000],'title','','xlabel','') 85 elseif(L==10000 ),85 elseif(L==10000.), 86 86 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.mesh.numberoflayers,... 87 87 'resolution',[10 10],'ylim',[10 30],'xlim',[0 10000],'title','','xlabel','') 88 elseif(L==20000 ),88 elseif(L==20000.), 89 89 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.mesh.numberoflayers,... 90 90 'resolution',[10 10],'ylim',[0 50],'xlim',[0 20000],'title','','xlabel','') 91 elseif(L==40000 ),91 elseif(L==40000.), 92 92 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.mesh.numberoflayers,... 93 93 'resolution',[10 10],'ylim',[0 80],'xlim',[0 40000],'title','','xlabel','') 94 elseif(L==80000 ),94 elseif(L==80000.), 95 95 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.mesh.numberoflayers,... 96 96 'resolution',[10 10],'ylim',[0 100],'xlim',[0 80000],'title','','xlabel','') 97 elseif(L==160000 ),97 elseif(L==160000.), 98 98 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.mesh.numberoflayers,... 99 99 'resolution',[10 10],'ylim',[0 120],'xlim',[0 160000],'title','','xlabel','') 100 100 end 101 if printingflag, 101 if printingflag, 102 102 set(gcf,'Color','w') 103 103 printmodel(['ismipastokesvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 104 system(['mv ismipastokesvxsec' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 104 system(['mv ismipastokesvxsec' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 105 105 end 106 106 end … … 108 108 %Now plot the min and max values of vx for each size of the square 109 109 plot([5 10 20 40 80 160],minvx);ylim([0 18]) 110 if printingflag, 110 if printingflag, 111 111 set(gcf,'Color','w') 112 112 printmodel('ismipastokesminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 113 system(['mv ismipastokesminvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 113 system(['mv ismipastokesminvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 114 114 end 115 115 plot([5 10 20 40 80 160],maxvx);ylim([0 120]) 116 if printingflag, 116 if printingflag, 117 117 set(gcf,'Color','w') 118 118 printmodel('ismipastokesmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 119 system(['mv ismipastokesmaxvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA 119 system(['mv ismipastokesmaxvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestA']); 120 120 end 121 121 122 %Fields and tolerances to track changes 122 123 field_names ={... … … 127 128 'Vx80km','Vy80km','Vz80km',... 128 129 'Vx160km','Vy160km','Vz160km' 129 } 130 }; 130 131 field_tolerances={... 131 132 1e-12,1e-12,1e-12,... -
issm/trunk-jpl/test/NightlyRun/test1103.m
r13671 r14134 1 %This test is a test from the ISMP-HOM Intercomparison project 1 %This test is a test from the ISMP-HOM Intercomparison project. 2 2 %Pattyn and Payne 2006 3 3 printingflag=false; 4 4 5 L_list={5000 ,10000,20000,40000,80000,160000};5 L_list={5000.,10000.,20000.,40000.,80000.,160000.}; 6 6 results={}; 7 minvx=[]; 8 maxvx=[]; 7 9 8 10 for i=1:length(L_list), … … 23 25 md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1); 24 26 pos=find(md.mesh.vertexonbed); 25 md.diagnostic.spcvx(pos)=0 ;26 md.diagnostic.spcvy(pos)=0 ;27 md.diagnostic.spcvx(pos)=0.; 28 md.diagnostic.spcvy(pos)=0.; 27 29 28 30 %Create MPCs to have periodic boundary conditions 29 posx=find(md.mesh.x==0 );31 posx=find(md.mesh.x==0.); 30 32 posx2=find(md.mesh.x==max(md.mesh.x)); 31 33 32 posy=find(md.mesh.y==0 & md.mesh.x~=0& md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times33 posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));34 posy=find(md.mesh.y==0. & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times 35 posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x)); 34 36 35 37 md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2]; … … 49 51 %Now plot vx, vy, vz and vx on a cross section 50 52 plotmodel(md,'data',vx,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km') 51 if printingflag, 53 if printingflag, 52 54 set(gcf,'Color','w') 53 55 printmodel(['ismipbpattynvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 54 system(['mv ismipbpattynvx' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestB 56 system(['mv ismipbpattynvx' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestB']); 55 57 end 56 58 plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km') 57 if printingflag, 59 if printingflag, 58 60 set(gcf,'Color','w') 59 61 printmodel(['ismipbpattynvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 60 system(['mv ismipbpattynvz' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestB 62 system(['mv ismipbpattynvz' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestB']); 61 63 end 62 64 63 if(L==5000 ),65 if(L==5000.), 64 66 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.mesh.numberoflayers,... 65 67 'resolution',[10 10],'ylim',[6 16],'xlim',[0 5000],'title','','xlabel','') 66 elseif(L==10000 ),68 elseif(L==10000.), 67 69 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.mesh.numberoflayers,... 68 70 'resolution',[10 10],'ylim',[0 40],'xlim',[0 10000],'title','','xlabel','') 69 elseif(L==20000 ),71 elseif(L==20000.), 70 72 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.mesh.numberoflayers,... 71 73 'resolution',[10 10],'ylim',[0 60],'xlim',[0 20000],'title','','xlabel','') 72 elseif(L==40000 ),74 elseif(L==40000.), 73 75 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.mesh.numberoflayers,... 74 76 'resolution',[10 10],'ylim',[0 100],'xlim',[0 40000],'title','','xlabel','') 75 elseif(L==80000 ),77 elseif(L==80000.), 76 78 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.mesh.numberoflayers,... 77 79 'resolution',[10 10],'ylim',[0 120],'xlim',[0 80000],'title','','xlabel','') 78 elseif(L==160000 ),80 elseif(L==160000.), 79 81 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.mesh.numberoflayers,... 80 82 'resolution',[10 10],'ylim',[0 120],'xlim',[0 160000],'title','','xlabel','') 81 83 end 82 if printingflag, 84 if printingflag, 83 85 set(gcf,'Color','w') 84 86 printmodel(['ismipbpattynvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 85 system(['mv ismipbpattynvxsec' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestB 87 system(['mv ismipbpattynvxsec' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestB']); 86 88 end 87 89 end … … 89 91 %Now plot the min and max values of vx for each size of the square 90 92 plot([5 10 20 40 80 160],minvx);ylim([0 14]);xlim([0 160]) 91 if printingflag, 93 if printingflag, 92 94 set(gcf,'Color','w') 93 95 printmodel('ismipbpattynminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 94 system(['mv ismipbpattynminvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestB 96 system(['mv ismipbpattynminvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestB']); 95 97 end 96 98 plot([5 10 20 40 80 160],maxvx);ylim([0 120]);xlim([0 160]) 97 if printingflag, 99 if printingflag, 98 100 set(gcf,'Color','w') 99 101 printmodel('ismipbpattynmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 100 system(['mv ismipbpattynmaxvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestB 102 system(['mv ismipbpattynmaxvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestB']); 101 103 end 104 102 105 %Fields and tolerances to track changes 103 106 field_names ={... -
issm/trunk-jpl/test/NightlyRun/test1104.m
r13671 r14134 1 %This test is a test from the ISMP-HOM Intercomparison project 1 %This test is a test from the ISMP-HOM Intercomparison project. 2 2 %Pattyn and Payne 2006 3 3 4 L_list={5000 ,10000,20000,40000,80000,160000};4 L_list={5000.,10000.,20000.,40000.,80000.,160000.}; 5 5 results={}; 6 6 … … 22 22 23 23 pos=find(md.mesh.vertexonbed); 24 md.diagnostic.spcvx(pos)=0 ;25 md.diagnostic.spcvy(pos)=0 ;24 md.diagnostic.spcvx(pos)=0.; 25 md.diagnostic.spcvy(pos)=0.; 26 26 27 27 %Create MPCs to have periodic boundary conditions 28 posx=find(md.mesh.x==0 );28 posx=find(md.mesh.x==0.); 29 29 posx2=find(md.mesh.x==max(md.mesh.x)); 30 30 31 posy=find(md.mesh.y==0 & md.mesh.x~=0& md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times32 posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));31 posy=find(md.mesh.y==0. & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times 32 posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x)); 33 33 34 34 md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2]; … … 38 38 md.cluster=generic('name',oshostname(),'np',8); 39 39 md=solve(md,DiagnosticSolutionEnum()); 40 pos=find(md.mesh.x==0 | md.mesh.y==0| md.mesh.x==max(md.mesh.x) | md.mesh.y==max(md.mesh.y));40 pos=find(md.mesh.x==0. | md.mesh.y==0. | md.mesh.x==max(md.mesh.x) | md.mesh.y==max(md.mesh.y)); 41 41 md.diagnostic.spcvx(pos)=md.results.DiagnosticSolution.Vx(pos); 42 42 md.diagnostic.spcvy(pos)=md.results.DiagnosticSolution.Vy(pos); -
issm/trunk-jpl/test/NightlyRun/test1105.m
r13671 r14134 1 %This test is a test from the ISMP-HOM Intercomparison project 1 %This test is a test from the ISMP-HOM Intercomparison project. 2 2 %Pattyn and Payne 2006 3 3 printingflag=false; 4 4 5 L_list={5000 ,10000,20000,40000,80000,160000};5 L_list={5000.,10000.,20000.,40000.,80000.,160000.}; 6 6 results={}; 7 7 minvx=[]; … … 9 9 10 10 for i=1:length(L_list), 11 L=L_list{i}; %in m (3 times the desired leng htfor BC problems)11 L=L_list{i}; %in m (3 times the desired length for BC problems) 12 12 nx=30; %number of nodes in x direction 13 13 ny=30; … … 18 18 md=extrude(md,10,1.); 19 19 20 md=setflowequation(md,'pattyn','all'); 20 md=setflowequation(md,'pattyn','all'); 21 21 22 22 %Create MPCs to have periodic boundary conditions … … 25 25 md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1); 26 26 27 posx=find(md.mesh.x==0 & md.mesh.y~=0& md.mesh.y~=L);28 posx2=find(md.mesh.x==L & md.mesh.y~=0 & md.mesh.y~=L);27 posx=find(md.mesh.x==0. & md.mesh.y~=0. & md.mesh.y~=L); 28 posx2=find(md.mesh.x==L & md.mesh.y~=0. & md.mesh.y~=L); 29 29 30 posy=find(md.mesh.y==0 & md.mesh.x~=0& md.mesh.x~=L); %Don't take the same nodes two times31 posy2=find(md.mesh.y==L & md.mesh.x~=0 & md.mesh.x~=L);30 posy=find(md.mesh.y==0. & md.mesh.x~=0. & md.mesh.x~=L); %Don't take the same nodes two times 31 posy2=find(md.mesh.y==L & md.mesh.x~=0. & md.mesh.x~=L); 32 32 33 33 md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2]; 34 34 35 35 %Add spc on the corners 36 pos=find((md.mesh.x==0 | md.mesh.x==L) & (md.mesh.y==0| md.mesh.y==L) & md.mesh.vertexonbed);37 md.diagnostic.spcvx(pos)=0 ;38 md.diagnostic.spcvy(pos)=0 ;39 if(L==5000 ),36 pos=find((md.mesh.x==0. | md.mesh.x==L) & (md.mesh.y==0. | md.mesh.y==L) & md.mesh.vertexonbed); 37 md.diagnostic.spcvx(pos)=0.; 38 md.diagnostic.spcvy(pos)=0.; 39 if(L==5000.), 40 40 md.diagnostic.spcvx(pos)=15.66; 41 41 md.diagnostic.spcvy(pos)=-0.1967; 42 elseif(L==10000 ),42 elseif(L==10000.), 43 43 md.diagnostic.spcvx(pos)=16.04; 44 44 md.diagnostic.spcvy(pos)=-0.1977; 45 elseif(L==20000 ),45 elseif(L==20000.), 46 46 md.diagnostic.spcvx(pos)=16.53; 47 47 md.diagnostic.spcvy(pos)=-1.27; 48 elseif(L==40000 ),48 elseif(L==40000.), 49 49 md.diagnostic.spcvx(pos)=17.23; 50 50 md.diagnostic.spcvy(pos)=-3.17; 51 elseif(L==80000 ),51 elseif(L==80000.), 52 52 md.diagnostic.spcvx(pos)=16.68; 53 53 md.diagnostic.spcvy(pos)=-2.69; 54 elseif(L==160000 ),54 elseif(L==160000.), 55 55 md.diagnostic.spcvx(pos)=16.03; 56 56 md.diagnostic.spcvy(pos)=-1.27; … … 59 59 %Spc the bed at zero for vz 60 60 pos=find(md.mesh.vertexonbed); 61 md.diagnostic.spcvz(pos)=0 ;61 md.diagnostic.spcvz(pos)=0.; 62 62 63 63 %Compute the diagnostic … … 75 75 %Now plot vx, vy, vz and vx on a cross section 76 76 plotmodel(md,'data',vx,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',2) 77 if printingflag, 77 if printingflag, 78 78 set(gcf,'Color','w') 79 79 printmodel(['ismipcpattynvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 80 system(['mv ismipcpattynvx' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC 80 system(['mv ismipcpattynvx' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC']); 81 81 end 82 82 plotmodel(md,'data',vy,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3) 83 if printingflag, 83 if printingflag, 84 84 set(gcf,'Color','w') 85 85 printmodel(['ismipcpattynvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 86 system(['mv ismipcpattynvy' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC 86 system(['mv ismipcpattynvy' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC']); 87 87 end 88 88 plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',4) 89 if printingflag, 89 if printingflag, 90 90 set(gcf,'Color','w') 91 91 printmodel(['ismipcpattynvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 92 system(['mv ismipcpattynvz' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC 92 system(['mv ismipcpattynvz' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC']); 93 93 end 94 94 95 if(L==5000 ),95 if(L==5000.), 96 96 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.mesh.numberoflayers,... 97 97 'resolution',[10 10],'ylim',[0 20],'xlim',[0 5000],'title','','xlabel','','figure',5) 98 elseif(L==10000 ),98 elseif(L==10000.), 99 99 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.mesh.numberoflayers,... 100 100 'resolution',[10 10],'ylim',[13 18],'xlim',[0 10000],'title','','xlabel','') 101 elseif(L==20000 ),101 elseif(L==20000.), 102 102 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.mesh.numberoflayers,... 103 103 'resolution',[10 10],'ylim',[14 22],'xlim',[0 20000],'title','','xlabel','') 104 elseif(L==40000 ),104 elseif(L==40000.), 105 105 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.mesh.numberoflayers,... 106 106 'resolution',[10 10],'ylim',[10 40],'xlim',[0 40000],'title','','xlabel','') 107 elseif(L==80000 ),107 elseif(L==80000.), 108 108 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.mesh.numberoflayers,... 109 109 'resolution',[10 10],'ylim',[0 80],'xlim',[0 80000],'title','','xlabel','') 110 elseif(L==160000 ),110 elseif(L==160000.), 111 111 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.mesh.numberoflayers,... 112 112 'resolution',[10 10],'ylim',[0 200],'xlim',[0 160000],'title','','xlabel','') 113 113 end 114 if printingflag, 114 if printingflag, 115 115 set(gcf,'Color','w') 116 116 printmodel(['ismipcpattynvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 117 system(['mv ismipcpattynvxsec' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC 117 system(['mv ismipcpattynvxsec' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC']); 118 118 end 119 119 end … … 121 121 %Now plot the min and max values of vx for each size of the square 122 122 plot([5 10 20 40 80 160],minvx);ylim([4 18]);xlim([0 160]) 123 if printingflag, 123 if printingflag, 124 124 set(gcf,'Color','w') 125 125 printmodel('ismipcpattynminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 126 system(['mv ismipcpattynminvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC 126 system(['mv ismipcpattynminvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC']); 127 127 end 128 128 plot([5 10 20 40 80 160],maxvx);ylim([0 200]); xlim([0 160]) 129 if printingflag, 129 if printingflag, 130 130 set(gcf,'Color','w') 131 131 printmodel('ismipcpattynmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 132 system(['mv ismipcpattynmaxvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC 132 system(['mv ismipcpattynmaxvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestC']); 133 133 end 134 134 135 %Fields and tolerances to track changes 135 136 field_names ={... -
issm/trunk-jpl/test/NightlyRun/test1106.m
r13671 r14134 1 %This test is a test from the ISMP-HOM Intercomparison project 1 %This test is a test from the ISMP-HOM Intercomparison project. 2 2 %Pattyn and Payne 2006 3 3 4 L_list={5000 ,10000,20000,40000,80000,160000};4 L_list={5000.,10000.,20000.,40000.,80000.,160000.}; 5 5 results={}; 6 6 … … 10 10 md=setmask(md,'',''); %ice sheet test 11 11 md=parameterize(md,'../Par/ISMIPC.par'); 12 md.friction.coefficient=sqrt(md.constants.yts.*(1000 +1000*sin(md.mesh.x*2*pi/L).*sin(md.mesh.y*2*pi/L)));12 md.friction.coefficient=sqrt(md.constants.yts.*(1000.+1000.*sin(md.mesh.x*2.*pi/L).*sin(md.mesh.y*2.*pi/L))); 13 13 md=extrude(md,10,1.); 14 14 15 15 %Add spc on the borders 16 pos=find( (md.mesh.x==0 | md.mesh.x==max(md.mesh.x) | md.mesh.y==0 | md.mesh.y==max(md.mesh.y)));17 md.diagnostic.spcvx(pos)=0 ;18 md.diagnostic.spcvy(pos)=0 ;19 if(L==5000 ),16 pos=find(md.mesh.x==0. | md.mesh.x==max(md.mesh.x) | md.mesh.y==0. | md.mesh.y==max(md.mesh.y)); 17 md.diagnostic.spcvx(pos)=0.; 18 md.diagnostic.spcvy(pos)=0.; 19 if(L==5000.), 20 20 md.diagnostic.spcvx(pos)=15.66; 21 21 md.diagnostic.spcvy(pos)=-0.1967; 22 elseif(L==10000 ),22 elseif(L==10000.), 23 23 md.diagnostic.spcvx(pos)=16.04; 24 24 md.diagnostic.spcvy(pos)=-0.1977; 25 elseif(L==20000 ),25 elseif(L==20000.), 26 26 md.diagnostic.spcvx(pos)=16.53; 27 27 md.diagnostic.spcvy(pos)=-1.27; 28 elseif(L==40000 ),28 elseif(L==40000.), 29 29 md.diagnostic.spcvx(pos)=17.23; 30 30 md.diagnostic.spcvy(pos)=-3.17; 31 elseif(L==80000 ),31 elseif(L==80000.), 32 32 md.diagnostic.spcvx(pos)=16.68; 33 33 md.diagnostic.spcvy(pos)=-2.69; 34 elseif(L==160000 ),34 elseif(L==160000.), 35 35 md.diagnostic.spcvx(pos)=16.03; 36 36 md.diagnostic.spcvy(pos)=-1.27; 37 37 end 38 38 39 md=setflowequation(md,'stokes','all'); 39 md=setflowequation(md,'stokes','all'); 40 40 41 41 %Compute the diagnostic -
issm/trunk-jpl/test/NightlyRun/test1107.m
r13671 r14134 1 %This test is a test from the ISMP-HOM Intercomparison project 1 %This test is a test from the ISMP-HOM Intercomparison project. 2 2 %Pattyn and Payne 2006 3 3 printingflag=false; 4 4 5 L_list={5000 ,10000,20000,40000,80000,160000};5 L_list={5000.,10000.,20000.,40000.,80000.,160000.}; 6 6 results={}; 7 7 minvx=[]; … … 26 26 27 27 %Create MPCs to have periodic boundary conditions 28 posx=find(md.mesh.x==0 & ~(md.mesh.y==0& md.mesh.vertexonbed) & ~(md.mesh.y==L & md.mesh.vertexonbed));29 posx2=find(md.mesh.x==max(md.mesh.x) & ~(md.mesh.y==0 & md.mesh.vertexonbed) & ~(md.mesh.y==L & md.mesh.vertexonbed));28 posx=find(md.mesh.x==0. & ~(md.mesh.y==0. & md.mesh.vertexonbed) & ~(md.mesh.y==L & md.mesh.vertexonbed)); 29 posx2=find(md.mesh.x==max(md.mesh.x) & ~(md.mesh.y==0. & md.mesh.vertexonbed) & ~(md.mesh.y==L & md.mesh.vertexonbed)); 30 30 31 posy=find(md.mesh.y==0 & md.mesh.x~=0& md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times32 posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));31 posy=find(md.mesh.y==0. & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times 32 posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x)); 33 33 34 34 md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2]; 35 35 36 36 %Add spc on the corners 37 pos=find((md.mesh.x==0 | md.mesh.x==L) & (md.mesh.y==0| md.mesh.y==L) & md.mesh.vertexonbed);38 md.diagnostic.spcvy(:)=0 ;39 md.diagnostic.spcvx(pos)=0 ;40 if(L==5000 ),37 pos=find((md.mesh.x==0. | md.mesh.x==L) & (md.mesh.y==0. | md.mesh.y==L) & md.mesh.vertexonbed); 38 md.diagnostic.spcvy(:)=0.; 39 md.diagnostic.spcvx(pos)=0.; 40 if(L==5000.), 41 41 md.diagnostic.spcvx(pos)=16.0912; 42 elseif(L==10000 ),42 elseif(L==10000.), 43 43 md.diagnostic.spcvx(pos)=16.52; 44 elseif(L==20000 ),44 elseif(L==20000.), 45 45 md.diagnostic.spcvx(pos)=17.77; 46 elseif(L==40000 ),46 elseif(L==40000.), 47 47 md.diagnostic.spcvx(pos)=19.88; 48 elseif(L==80000 ),48 elseif(L==80000.), 49 49 md.diagnostic.spcvx(pos)=18.65; 50 elseif(L==160000 ),50 elseif(L==160000.), 51 51 md.diagnostic.spcvx(pos)=16.91; 52 52 end … … 54 54 %Spc the bed at zero for vz 55 55 pos=find(md.mesh.vertexonbed); 56 md.diagnostic.spcvz(pos)=0 ;56 md.diagnostic.spcvz(pos)=0.; 57 57 58 58 %Compute the diagnostic … … 70 70 %Now plot vx, vy, vz and vx on a cross section 71 71 plotmodel(md,'data',vx,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',2) 72 if printingflag, 72 if printingflag, 73 73 set(gcf,'Color','w') 74 74 printmodel(['ismipdpattynvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 75 system(['mv ismipdpattynvx' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestD 75 system(['mv ismipdpattynvx' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestD']); 76 76 end 77 77 plotmodel(md,'data',vz,'layer#all',md.mesh.numberoflayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3) 78 if printingflag, 78 if printingflag, 79 79 set(gcf,'Color','w') 80 80 printmodel(['ismipdpattynvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 81 system(['mv ismipdpattynvz' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestD 81 system(['mv ismipdpattynvz' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestD']); 82 82 end 83 83 84 if(L==5000 ),84 if(L==5000.), 85 85 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.mesh.numberoflayers,... 86 86 'resolution',[10 10],'ylim',[0 20],'xlim',[0 5000],'title','','xlabel','','figure',4) 87 elseif(L==10000 ),87 elseif(L==10000.), 88 88 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.mesh.numberoflayers,... 89 89 'resolution',[10 10],'ylim',[0 20],'xlim',[0 10000],'title','','xlabel','','figure',4) 90 elseif(L==20000 ),90 elseif(L==20000.), 91 91 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.mesh.numberoflayers,... 92 92 'resolution',[10 10],'ylim',[0 30],'xlim',[0 20000],'title','','xlabel','','figure',4) 93 elseif(L==40000 ),93 elseif(L==40000.), 94 94 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.mesh.numberoflayers,... 95 95 'resolution',[10 10],'ylim',[10 60],'xlim',[0 40000],'title','','xlabel','','figure',4) 96 elseif(L==80000 ),96 elseif(L==80000.), 97 97 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.mesh.numberoflayers,... 98 98 'resolution',[10 10],'ylim',[0 200],'xlim',[0 80000],'title','','xlabel','','figure',4) 99 elseif(L==160000 ),99 elseif(L==160000.), 100 100 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.mesh.numberoflayers,... 101 101 'resolution',[10 10],'ylim',[0 400],'xlim',[0 160000],'title','','xlabel','','figure',4) 102 102 end 103 if printingflag, 103 if printingflag, 104 104 set(gcf,'Color','w') 105 105 printmodel(['ismipdpattynvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 106 system(['mv ismipdpattynvxsec' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestD 106 system(['mv ismipdpattynvxsec' num2str(L) '.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestD']); 107 107 end 108 108 end … … 110 110 %Now plot the min and max values of vx for each size of the square 111 111 plot([5 10 20 40 80 160],minvx);ylim([2 18]);xlim([0 160]) 112 if printingflag, 112 if printingflag, 113 113 set(gcf,'Color','w') 114 114 printmodel('ismipdpattynminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 115 system(['mv ismipdpattynminvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestD 115 system(['mv ismipdpattynminvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestD']); 116 116 end 117 117 plot([5 10 20 40 80 160],maxvx);ylim([0 300]);xlim([0 160]) 118 if printingflag, 118 if printingflag, 119 119 set(gcf,'Color','w') 120 120 printmodel('ismipdpattynmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 121 system(['mv ismipdpattynmaxvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestD 121 system(['mv ismipdpattynmaxvx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestD']); 122 122 end 123 123 124 %Fields and tolerances to track changes 124 125 field_names ={... -
issm/trunk-jpl/test/NightlyRun/test1108.m
r13671 r14134 1 %This test is a test from the ISMP-HOM Intercomparison project 1 %This test is a test from the ISMP-HOM Intercomparison project. 2 2 %Pattyn and Payne 2006 3 3 4 L_list={5000 ,10000,20000,40000,80000,160000};4 L_list={5000.,10000.,20000.,40000.,80000.,160000.}; 5 5 results={}; 6 6 … … 17 17 md=setflowequation(md,'pattyn','all'); 18 18 19 %We need one gr d on dirichlet: the 4 corners are set to zero19 %We need one grid on dirichlet: the 4 corners are set to zero 20 20 md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1); 21 21 md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1); 22 22 md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1); 23 23 24 pos=find(md.mesh.vertexonbed & (md.mesh.x==0 | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0| md.mesh.y==max(md.mesh.y)));25 md.diagnostic.spcvx(pos)=0 ;26 md.diagnostic.spcvy(pos)=0 ;27 md.diagnostic.spcvz(pos)=0 ;24 pos=find(md.mesh.vertexonbed & (md.mesh.x==0. | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0. | md.mesh.y==max(md.mesh.y))); 25 md.diagnostic.spcvx(pos)=0.; 26 md.diagnostic.spcvy(pos)=0.; 27 md.diagnostic.spcvz(pos)=0.; 28 28 29 29 %Create MPCs to have periodic boundary conditions 30 posx=find(md.mesh.x==0 );30 posx=find(md.mesh.x==0.); 31 31 posx2=find(md.mesh.x==max(md.mesh.x)); 32 32 33 posy=find(md.mesh.y==0 & md.mesh.x~=0& md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times34 posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));33 posy=find(md.mesh.y==0. & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times 34 posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0. & md.mesh.x~=max(md.mesh.x)); 35 35 36 36 md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2]; … … 47 47 md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1); 48 48 md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1); 49 pos=find(md.mesh.y==0 | md.mesh.x==0| md.mesh.x==max(md.mesh.x) | md.mesh.y==max(md.mesh.y)); %Don't take the same nodes two times49 pos=find(md.mesh.y==0. | md.mesh.x==0. | md.mesh.x==max(md.mesh.x) | md.mesh.y==max(md.mesh.y)); %Don't take the same nodes two times 50 50 md.diagnostic.spcvx(pos)=md.results.DiagnosticSolution.Vx(pos); 51 51 md.diagnostic.spcvy(pos)=md.results.DiagnosticSolution.Vy(pos); -
issm/trunk-jpl/test/NightlyRun/test1109.m
r13671 r14134 1 %This test is a test from the ISMP-HOM Intercomparison project 1 %This test is a test from the ISMP-HOM Intercomparison project. 2 2 %TestE 3 3 %Four tests to run: - Pattyn frozen … … 9 9 10 10 for i=1:4, 11 Lx=10 ; %in m12 Ly=5000 ; %in m11 Lx=10.; %in m 12 Ly=5000.; %in m 13 13 nx=3; %number of nodes in x direction 14 14 ny=51; … … 26 26 27 27 %Create MPCs to have periodic boundary conditions 28 posx=find(md.mesh.x==0 );28 posx=find(md.mesh.x==0.); 29 29 posx2=find(md.mesh.x==max(md.mesh.x)); 30 30 md.diagnostic.vertex_pairing=[posx,posx2]; … … 35 35 md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1); 36 36 md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1); 37 md.diagnostic.spcvx(pos)=0 ;38 md.diagnostic.spcvy(pos)=0 ;39 md.diagnostic.spcvz(pos)=0 ;37 md.diagnostic.spcvx(pos)=0.; 38 md.diagnostic.spcvy(pos)=0.; 39 md.diagnostic.spcvz(pos)=0.; 40 40 41 41 %Remove the spc where there is some sliding (case 3 and 4): … … 58 58 if i==1, 59 59 plotmodel(md,'data',vy,'ylim',[-10 80],'layer',md.mesh.numberoflayers,'sectionvalue','../Exp/ISMIPE.exp','resolution',[10 10],'title','','xlabel','') 60 if printingflag, 60 if printingflag, 61 61 set(gcf,'Color','w') 62 62 printmodel('ismipepattynvxfrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 63 system(['mv ismipepattynvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestE 63 system(['mv ismipepattynvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestE']); 64 64 end 65 65 elseif i==2, 66 66 plotmodel(md,'data',vy,'ylim',[-10 80],'layer',md.mesh.numberoflayers,'sectionvalue','../Exp/ISMIPE.exp','resolution',[10 10],'title','','xlabel','') 67 if printingflag, 67 if printingflag, 68 68 set(gcf,'Color','w') 69 69 printmodel('ismipestokesvxfrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 70 system(['mv ismipestokesvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestE 70 system(['mv ismipestokesvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestE']); 71 71 end 72 72 elseif i==3, 73 73 plotmodel(md,'data',vy,'ylim',[-50 200],'layer',md.mesh.numberoflayers,'sectionvalue','../Exp/ISMIPE.exp','resolution',[10 10],'title','','xlabel','') 74 if printingflag, 74 if printingflag, 75 75 set(gcf,'Color','w') 76 76 printmodel('ismipepattynvxsliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 77 system(['mv ismipepattynvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestE 77 system(['mv ismipepattynvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestE']); 78 78 end 79 79 elseif i==4, 80 80 plotmodel(md,'data',vy,'ylim',[-50 200],'layer',md.mesh.numberoflayers,'sectionvalue','../Exp/ISMIPE.exp','resolution',[10 10],'title','','xlabel','') 81 if printingflag, 81 if printingflag, 82 82 set(gcf,'Color','w') 83 83 printmodel('ismipestokesvxsliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 84 system(['mv ismipestokesvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestE 84 system(['mv ismipestokesvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestE']); 85 85 end 86 86 end 87 87 end 88 88 89 %Fields and tolerances to track changes 89 field_names ={ 90 field_names ={... 90 91 'VyPattynSliding','VzPattynSliding',... 91 92 'VxStokesSliding','VyStokesSliding','VzStokesSliding',... -
issm/trunk-jpl/test/NightlyRun/test1110.m
r13671 r14134 1 %This test is a test from the ISMP-HOM Intercomparison project 1 %This test is a test from the ISMP-HOM Intercomparison project. 2 2 %TestF 3 3 printingflag=false; 4 results={}; 4 5 5 6 for i=1:4, 6 L=100000 ; %in m7 L=100000.; %in m 7 8 nx=30; %numberof nodes in x direction 8 9 ny=30; 9 10 md=model(); 10 11 md=squaremesh(md,L,L,nx,ny); 11 %md=triangle(md,'../Exp/SquareISMIP.exp',5500.);12 % md=triangle(md,'../Exp/SquareISMIP.exp',5500.); 12 13 md=setmask(md,'',''); %ice sheet test 13 14 md=parameterize(md,'../Par/ISMIPF.par'); … … 26 27 %Create dirichlet on the bed if no slip 27 28 pos=find(md.mesh.vertexonbed); 28 md.diagnostic.spcvx(pos)=0 ;29 md.diagnostic.spcvy(pos)=0 ;30 md.diagnostic.spcvz(pos)=0 ;29 md.diagnostic.spcvx(pos)=0.; 30 md.diagnostic.spcvy(pos)=0.; 31 md.diagnostic.spcvz(pos)=0.; 31 32 else 32 pos=find(md.mesh.vertexonbed & (md.mesh.x==0 | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0| md.mesh.y==max(md.mesh.y)));33 md.diagnostic.spcvx(pos)=100 ; %because we need a dirichlet somewhere34 md.diagnostic.spcvy(pos)=0 ;35 md.diagnostic.spcvz(pos)=0 ;33 pos=find(md.mesh.vertexonbed & (md.mesh.x==0. | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0. | md.mesh.y==max(md.mesh.y))); 34 md.diagnostic.spcvx(pos)=100.; %because we need a dirichlet somewhere 35 md.diagnostic.spcvy(pos)=0.; 36 md.diagnostic.spcvz(pos)=0.; 36 37 end 37 38 pos=find(~md.mesh.vertexonbed); 38 md.thermal.spctemperature(pos)=255 ;39 md.thermal.spctemperature(pos)=255.; 39 40 40 41 %Create MPCs to have periodic boundary conditions 41 posx=find(md.mesh.x==0 );42 posx=find(md.mesh.x==0.); 42 43 posx2=find(md.mesh.x==max(md.mesh.x)); 43 44 44 posy=find(md.mesh.y==0 );45 posy=find(md.mesh.y==0.); 45 46 posy2=find(md.mesh.y==max(md.mesh.y)); 46 47 … … 48 49 md.prognostic.vertex_pairing=[posx,posx2;posy,posy2]; 49 50 50 md.timestepping.time_step=3 ;51 md.timestepping.final_time=300 ;51 md.timestepping.time_step=3.; 52 md.timestepping.final_time=300.; 52 53 md.settings.output_frequency=50; 53 54 md.prognostic.stabilization=1; … … 68 69 plotmodel(md,'data',(md.results.TransientSolution(end).Vx),'layer',md.mesh.numberoflayers,'sectionvalue','../Exp/ISMIP100000.exp','title','','xlabel','','ylabel','Velocity (m/yr)','linewidth',3,'grid','on','unit','km','ylim',[185 200]) 69 70 end 70 if printingflag, 71 if printingflag, 71 72 set(gcf,'Color','w') 72 73 if i==1, 73 74 printmodel('ismipfpattynvxfrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 74 system(['mv ismipfpattynvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF 75 system(['mv ismipfpattynvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF']); 75 76 elseif i==2, 76 77 printmodel('ismipfpattynvxsliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 77 system(['mv ismipfpattynvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF 78 system(['mv ismipfpattynvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF']); 78 79 elseif i==3, 79 80 printmodel('ismipfstokesvxfrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 80 system(['mv ismipfstokesvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF 81 system(['mv ismipfstokesvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF']); 81 82 elseif i==4, 82 83 printmodel('ismipfstokesvxsliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 83 system(['mv ismipfstokesvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF 84 system(['mv ismipfstokesvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF']); 84 85 end 85 86 end 86 87 87 88 plotmodel(md,'data',(md.results.TransientSolution(end).Surface)-md.geometry.surface,'layer',md.mesh.numberoflayers,'sectionvalue','../Exp/ISMIP100000.exp','title','','xlabel','','ylabel','Surface (m)','linewidth',3,'grid','on','unit','km','ylim',[-30 50]) 88 if printingflag, 89 if printingflag, 89 90 set(gcf,'Color','w') 90 91 if i==1, 91 92 printmodel('ismipfpattyndeltasurfacefrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 92 system(['mv ismipfpattyndeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF 93 system(['mv ismipfpattyndeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF']); 93 94 elseif i==2, 94 95 printmodel('ismipfpattyndeltasurfacesliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 95 system(['mv ismipfpattyndeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF 96 system(['mv ismipfpattyndeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF']); 96 97 elseif i==3, 97 98 printmodel('ismipfstokesdeltasurfacefrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 98 system(['mv ismipfstokesdeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF 99 system(['mv ismipfstokesdeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF']); 99 100 elseif i==4, 100 101 printmodel('ismipfstokesdeltasurfacesliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 101 system(['mv ismipfstokesdeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF 102 system(['mv ismipfstokesdeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF']); 102 103 end 103 104 end … … 105 106 106 107 %Fields and tolerances to track changes 107 field_names ={ 108 field_names ={... 108 109 'VxPattynFrozen','VyPattynFrozen','VzPattynFrozen','SurfacePattynFrozen',... 109 110 'VxPattynSliding','VyPattynSliding','VzPattynSliding','SurfacePattynSliding',... -
issm/trunk-jpl/test/NightlyRun/test1201.m
r14107 r14134 1 %This test is a test from the EISMINT for Ice shelves Vincent Rommelaere 1996 1 %This test is a test from the EISMINT for Ice shelves Vincent Rommelaere 1996. 2 2 printingflag=false; 3 3 -
issm/trunk-jpl/test/NightlyRun/test1201.py
r14107 r14134 10 10 11 11 """ 12 This test is a test from the EISMINT for Ice shelves Vincent Rommelaere 1996 12 This test is a test from the EISMINT for Ice shelves Vincent Rommelaere 1996. 13 13 """ 14 14 -
issm/trunk-jpl/test/NightlyRun/test1202.m
r14107 r14134 1 %Test on the diagnostic model and the prognostic in 2d 1 %Test on the diagnostic model and the prognostic in 2d. 2 2 printingflag=false; 3 3 -
issm/trunk-jpl/test/NightlyRun/test1205.m
r13671 r14134 1 %The aim of this program is to compare a model with an analytical solution given in MacAyeal EISMINT : Lessons in Ice-Sheet Modeling 1 %The aim of this program is to compare a model with an analytical solution given in MacAyeal EISMINT : Lessons in Ice-Sheet Modeling. 2 2 printingflag=false; 3 3 4 4 numlayers=10; 5 resolution=30000 ;5 resolution=30000.; 6 6 7 7 %To begin with the numerical model 8 8 md=model(); 9 md=roundmesh(md,750000 ,resolution);9 md=roundmesh(md,750000.,resolution); 10 10 md=setmask(md,'',''); %We can not test iceshelves nor ice rises with this analytical solution 11 11 md=parameterize(md,'../Par/RoundSheetStaticEISMINT.par'); … … 13 13 %Calculation of the analytical 2d velocity field 14 14 constant=0.3; 15 vx_obs=constant/2 *md.mesh.x.*(md.geometry.thickness).^-1;16 vy_obs=constant/2 *md.mesh.y.*(md.geometry.thickness).^-1;17 vel_obs= (sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));15 vx_obs=constant/2.*md.mesh.x.*(md.geometry.thickness).^-1; 16 vy_obs=constant/2.*md.mesh.y.*(md.geometry.thickness).^-1; 17 vel_obs=sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2); 18 18 19 19 %We extrude the model to have a 3d model … … 23 23 %Spc the nodes on the bed 24 24 pos=find(md.mesh.vertexonbed); 25 md.diagnostic.spcvx(pos)=0 ;26 md.diagnostic.spcvy(pos)=0 ;27 md.diagnostic.spcvz(pos)=0 ;25 md.diagnostic.spcvx(pos)=0.; 26 md.diagnostic.spcvy(pos)=0.; 27 md.diagnostic.spcvz(pos)=0.; 28 28 29 29 %Now we can solve the problem … … 36 36 vel=zeros(md.mesh.numberofvertices2d,1); 37 37 38 node_vel=0;39 38 for i=1:md.mesh.numberofvertices2d 40 for j=1:(md.mesh.numberoflayers-1) 41 node_vel=node_vel+1/(2*(md.mesh.numberoflayers-1))*(sqrt(vx(i+j*md.mesh.numberofvertices2d,1).^2+... 42 vy(i+j*md.mesh.numberofvertices2d,1).^2)+... 39 node_vel=0.; 40 for j=1:md.mesh.numberoflayers-1 41 node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*... 42 (sqrt(vx(i+j*md.mesh.numberofvertices2d,1).^2+vy(i+j*md.mesh.numberofvertices2d,1).^2)+... 43 43 sqrt(vx(i+(j-1)*md.mesh.numberofvertices2d,1).^2+vy(i+(j-1)*md.mesh.numberofvertices2d,1).^2)); 44 44 end 45 45 vel(i,1)=node_vel; 46 node_vel=0;47 46 end 48 47 … … 82 81 caxis([0 100]); 83 82 84 if printingflag, 83 if printingflag, 85 84 set(gcf,'Color','w') 86 85 printmodel('hutterstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off'); … … 92 91 'Vx','Vy','Vel', ... 93 92 }; 94 field_tolerances={ ...93 field_tolerances={ ... 95 94 1e-13,1e-13,1e-13, ... 96 95 }; 97 field_values={ 96 field_values={ ... 98 97 vx,vy,vel, ... 99 98 }; -
issm/trunk-jpl/test/NightlyRun/test1206.m
r13671 r14134 1 %The aim of this program is to compare a model with an analytical solution given in MacAyeal EISMINT : Lessons in Ice-Sheet Modeling 1 %The aim of this program is to compare a model with an analytical solution given in MacAyeal EISMINT : Lessons in Ice-Sheet Modeling. 2 2 printingflag=false; 3 3 4 4 numlayers=10; 5 resolution=30000 ;5 resolution=30000.; 6 6 7 7 %To begin with the numerical model 8 8 md=model(); 9 md=roundmesh(md,750000 ,resolution);9 md=roundmesh(md,750000.,resolution); 10 10 md=setmask(md,'',''); %We can not test iceshelves nor ice rises with this analytical solution 11 11 md=parameterize(md,'../Par/RoundSheetStaticEISMINT.par'); … … 13 13 %Calculation of the analytical 2d velocity field 14 14 constant=0.3; 15 vx_obs=constant/2 *md.mesh.x.*(md.geometry.thickness).^-1;16 vy_obs=constant/2 *md.mesh.y.*(md.geometry.thickness).^-1;17 vel_obs= (sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));15 vx_obs=constant/2.*md.mesh.x.*(md.geometry.thickness).^-1; 16 vy_obs=constant/2.*md.mesh.y.*(md.geometry.thickness).^-1; 17 vel_obs=sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2); 18 18 19 19 %We extrude the model to have a 3d model … … 23 23 %Spc the nodes on the bed 24 24 pos=find(md.mesh.vertexonbed); 25 md.diagnostic.spcvx(pos)=0 ;26 md.diagnostic.spcvy(pos)=0 ;27 md.diagnostic.spcvz(pos)=0 ;25 md.diagnostic.spcvx(pos)=0.; 26 md.diagnostic.spcvy(pos)=0.; 27 md.diagnostic.spcvz(pos)=0.; 28 28 29 29 %Now we can solve the problem … … 36 36 vel=zeros(md.mesh.numberofvertices2d,1); 37 37 38 node_vel=0;39 38 for i=1:md.mesh.numberofvertices2d 40 for j=1:(md.mesh.numberoflayers-1) 41 node_vel=node_vel+1/(2*(md.mesh.numberoflayers-1))*(sqrt(vx(i+j*md.mesh.numberofvertices2d,1).^2+... 42 vy(i+j*md.mesh.numberofvertices2d,1).^2)+... 39 node_vel=0.; 40 for j=1:md.mesh.numberoflayers-1 41 node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*... 42 (sqrt(vx(i+j*md.mesh.numberofvertices2d,1).^2+vy(i+j*md.mesh.numberofvertices2d,1).^2)+... 43 43 sqrt(vx(i+(j-1)*md.mesh.numberofvertices2d,1).^2+vy(i+(j-1)*md.mesh.numberofvertices2d,1).^2)); 44 44 end 45 45 vel(i,1)=node_vel; 46 node_vel=0;47 46 end 48 47 … … 81 80 caxis([0 100]); 82 81 83 if printingflag, 82 if printingflag, 84 83 set(gcf,'Color','w') 85 84 printmodel('pattynstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off'); … … 91 90 'Vx','Vy','Vel', ... 92 91 }; 93 field_tolerances={ ...92 field_tolerances={ ... 94 93 1e-12,1e-12,1e-12, ... 95 94 }; 96 field_values={ 95 field_values={ ... 97 96 vx,vy,vel, ... 98 97 }; -
issm/trunk-jpl/test/NightlyRun/test1207.m
r13671 r14134 1 %The aim of this program is to compare a model with an analytical solution given in MacAyeal EISMINT : Lessons in Ice-Sheet Modeling 1 %The aim of this program is to compare a model with an analytical solution given in MacAyeal EISMINT : Lessons in Ice-Sheet Modeling. 2 2 printingflag=false; 3 3 4 4 numlayers=10; 5 resolution=30000 ;5 resolution=30000.; 6 6 7 7 %To begin with the numerical model 8 8 md=model(); 9 md=roundmesh(md,750000 ,resolution);9 md=roundmesh(md,750000.,resolution); 10 10 md=setmask(md,'',''); %We can not test iceshelves nor ice rises with this analytical solution 11 11 md=parameterize(md,'../Par/RoundSheetStaticEISMINT.par'); … … 13 13 %Calculation of the analytical 2d velocity field 14 14 constant=0.3; 15 vx_obs=constant/2 *md.mesh.x.*(md.geometry.thickness).^-1;16 vy_obs=constant/2 *md.mesh.y.*(md.geometry.thickness).^-1;17 vel_obs= (sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));15 vx_obs=constant/2.*md.mesh.x.*(md.geometry.thickness).^-1; 16 vy_obs=constant/2.*md.mesh.y.*(md.geometry.thickness).^-1; 17 vel_obs=sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2); 18 18 19 19 %We extrude the model to have a 3d model … … 23 23 %Spc the nodes on the bed 24 24 pos=find(md.mesh.vertexonbed); 25 md.diagnostic.spcvx(pos)=0 ;26 md.diagnostic.spcvy(pos)=0 ;27 md.diagnostic.spcvz(pos)=0 ;25 md.diagnostic.spcvx(pos)=0.; 26 md.diagnostic.spcvy(pos)=0.; 27 md.diagnostic.spcvz(pos)=0.; 28 28 29 29 %Now we can solve the problem … … 36 36 vel=zeros(md.mesh.numberofvertices2d,1); 37 37 38 node_vel=0;39 38 for i=1:md.mesh.numberofvertices2d 40 for j=1:(md.mesh.numberoflayers-1) 41 node_vel=node_vel+1/(2*(md.mesh.numberoflayers-1))*(sqrt(vx(i+j*md.mesh.numberofvertices2d,1).^2+... 42 vy(i+j*md.mesh.numberofvertices2d,1).^2)+... 39 node_vel=0.; 40 for j=1:md.mesh.numberoflayers-1 41 node_vel=node_vel+1./(2.*(md.mesh.numberoflayers-1))*... 42 (sqrt(vx(i+j*md.mesh.numberofvertices2d,1).^2+vy(i+j*md.mesh.numberofvertices2d,1).^2)+... 43 43 sqrt(vx(i+(j-1)*md.mesh.numberofvertices2d,1).^2+vy(i+(j-1)*md.mesh.numberofvertices2d,1).^2)); 44 44 end 45 45 vel(i,1)=node_vel; 46 node_vel=0;47 46 end 48 47 … … 81 80 caxis([0 100]); 82 81 83 if printingflag, 82 if printingflag, 84 83 set(gcf,'Color','w') 85 84 printmodel('stokesstatic','png','margin','on','marginsize',25,'frame','off','resolution',0.7,'hardcopy','off'); … … 91 90 'Vx','Vy','Vel', ... 92 91 }; 93 field_tolerances={ ...92 field_tolerances={ ... 94 93 1e-12,1e-12,1e-12, ... 95 94 }; 96 field_values={ 95 field_values={ ... 97 96 vx,vy,vel, ... 98 97 }; -
issm/trunk-jpl/test/Par/ISMIPA.par
r13137 r14134 2 2 3 3 disp(' creating thickness'); 4 md.geometry.surface=-md.mesh.x*tan(0.5*pi/180 );5 md.geometry.bed=md.geometry.surface-1000 +500*sin(md.mesh.x*2*pi/max(md.mesh.x)).*sin(md.mesh.y*2*pi/max(md.mesh.x));4 md.geometry.surface=-md.mesh.x*tan(0.5*pi/180.); 5 md.geometry.bed=md.geometry.surface-1000.+500.*sin(md.mesh.x*2.*pi/max(md.mesh.x)).*sin(md.mesh.y*2.*pi/max(md.mesh.x)); 6 6 md.geometry.thickness=md.geometry.surface-md.geometry.bed; 7 7 8 8 disp(' creating drag'); 9 md.friction.coefficient=200 *ones(md.mesh.numberofvertices,1); %q=1.9 md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1); %q=1. 10 10 %Take care of iceshelves: no basal drag 11 11 pos=find(md.mask.elementonfloatingice); 12 md.friction.coefficient(md.mesh.elements(pos,:))=0 ;12 md.friction.coefficient(md.mesh.elements(pos,:))=0.; 13 13 md.friction.p=ones(md.mesh.numberofelements,1); 14 14 md.friction.q=ones(md.mesh.numberofelements,1); 15 15 16 disp(' creating flow law param ter');16 disp(' creating flow law parameter'); 17 17 md.materials.rheology_B=6.8067*10^7*ones(md.mesh.numberofvertices,1); 18 md.materials.rheology_n=3 *ones(md.mesh.numberofelements,1);18 md.materials.rheology_n=3.*ones(md.mesh.numberofelements,1); 19 19 20 20 disp(' boundary conditions for diagnostic model'); 21 %Create node on boundary fi st (because we cannot use mesh)21 %Create node on boundary first (because we cannot use mesh) 22 22 md=SetIceSheetBC(md); -
issm/trunk-jpl/test/Par/ISMIPB.par
r13137 r14134 2 2 3 3 disp(' creating thickness'); 4 md.geometry.surface=-md.mesh.x*tan(0.5*pi/180 );5 md.geometry.bed=md.geometry.surface-1000 +500*sin(md.mesh.x*2*pi/max(md.mesh.x));4 md.geometry.surface=-md.mesh.x*tan(0.5*pi/180.); 5 md.geometry.bed=md.geometry.surface-1000.+500.*sin(md.mesh.x*2.*pi/max(md.mesh.x)); 6 6 md.geometry.thickness=md.geometry.surface-md.geometry.bed; 7 7 8 8 disp(' creating drag'); 9 md.friction.coefficient=200 *ones(md.mesh.numberofvertices,1); %q=1.9 md.friction.coefficient=200.*ones(md.mesh.numberofvertices,1); %q=1. 10 10 %Take care of iceshelves: no basal drag 11 11 pos=find(md.mask.elementonfloatingice); 12 md.friction.coefficient(md.mesh.elements(pos,:))=0 ;12 md.friction.coefficient(md.mesh.elements(pos,:))=0.; 13 13 md.friction.p=ones(md.mesh.numberofelements,1); 14 14 md.friction.q=ones(md.mesh.numberofelements,1); 15 15 16 disp(' creating flow law param ter');16 disp(' creating flow law parameter'); 17 17 md.materials.rheology_B=6.8067*10^7*ones(md.mesh.numberofvertices,1); 18 md.materials.rheology_n=3 *ones(md.mesh.numberofelements,1);18 md.materials.rheology_n=3.*ones(md.mesh.numberofelements,1); 19 19 20 20 disp(' boundary conditions for diagnostic model'); 21 %Create node on boundary fi st (because we cannot use mesh)21 %Create node on boundary first (because we cannot use mesh) 22 22 md=SetIceSheetBC(md); -
issm/trunk-jpl/test/Par/ISMIPC.par
r13137 r14134 2 2 3 3 disp(' creating thickness'); 4 md.geometry.surface=2000 -md.mesh.x*tan(0.1*pi/180); %to have z>05 md.geometry.bed=md.geometry.surface-1000 ;4 md.geometry.surface=2000.-md.mesh.x*tan(0.1*pi/180.); %to have z>0 5 md.geometry.bed=md.geometry.surface-1000.; 6 6 md.geometry.thickness=md.geometry.surface-md.geometry.bed; 7 7 8 8 disp(' creating drag'); 9 %md.friction.coefficient=sqrt(md.constants.yts.*(1000 +1000*sin(md.mesh.x*2*pi/max(md.mesh.x/2)).*sin(md.mesh.y*2*pi/max(md.mesh.x/2)))./(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed)));10 md.friction.coefficient=sqrt(md.constants.yts.*(1000 +1000*sin(md.mesh.x*2*pi/max(md.mesh.x)).*sin(md.mesh.y*2*pi/max(md.mesh.x))));9 %md.friction.coefficient=sqrt(md.constants.yts.*(1000.+1000.*sin(md.mesh.x*2.*pi/max(md.mesh.x/2.)).*sin(md.mesh.y*2.*pi/max(md.mesh.x/2.)))./(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed))); 10 md.friction.coefficient=sqrt(md.constants.yts.*(1000.+1000.*sin(md.mesh.x*2.*pi/max(md.mesh.x)).*sin(md.mesh.y*2.*pi/max(md.mesh.x)))); 11 11 %Take care of iceshelves: no basal drag 12 12 pos=find(md.mask.elementonfloatingice); 13 md.friction.coefficient(md.mesh.elements(pos,:))=0 ;13 md.friction.coefficient(md.mesh.elements(pos,:))=0.; 14 14 md.friction.p=ones(md.mesh.numberofelements,1); 15 15 md.friction.q=zeros(md.mesh.numberofelements,1); 16 16 17 disp(' creating flow law param ter');17 disp(' creating flow law parameter'); 18 18 md.materials.rheology_B=6.8067*10^7*ones(md.mesh.numberofvertices,1); 19 md.materials.rheology_n=3 *ones(md.mesh.numberofelements,1);19 md.materials.rheology_n=3.*ones(md.mesh.numberofelements,1); 20 20 21 disp(' boundary conditions for diagnostic model: 22 %Create node on boundary fi st (because wican not use mesh)21 disp(' boundary conditions for diagnostic model:'); 22 %Create node on boundary first (because we can not use mesh) 23 23 md=SetIceSheetBC(md); -
issm/trunk-jpl/test/Par/ISMIPD.par
r13137 r14134 2 2 3 3 disp(' creating thickness'); 4 md.geometry.surface=2000 -md.mesh.x*tan(0.1*pi/180); %to have z>05 md.geometry.bed=md.geometry.surface-1000 ;4 md.geometry.surface=2000.-md.mesh.x*tan(0.1*pi/180.); %to have z>0 5 md.geometry.bed=md.geometry.surface-1000.; 6 6 md.geometry.thickness=md.geometry.surface-md.geometry.bed; 7 7 8 8 disp(' creating drag'); 9 md.friction.coefficient=sqrt(md.constants.yts.*(1000 +1000*sin(md.mesh.x*2*pi/max(md.mesh.x))));9 md.friction.coefficient=sqrt(md.constants.yts.*(1000.+1000.*sin(md.mesh.x*2.*pi/max(md.mesh.x)))); 10 10 %Take care of iceshelves: no basal drag 11 11 pos=find(md.mask.elementonfloatingice); 12 md.friction.coefficient(md.mesh.elements(pos,:))=0 ;12 md.friction.coefficient(md.mesh.elements(pos,:))=0.; 13 13 md.friction.p=ones(md.mesh.numberofelements,1); 14 14 md.friction.q=zeros(md.mesh.numberofelements,1); 15 15 16 disp(' creating flow law param ter');16 disp(' creating flow law parameter'); 17 17 md.materials.rheology_B=6.8067*10^7*ones(md.mesh.numberofvertices,1); 18 md.materials.rheology_n=3 *ones(md.mesh.numberofelements,1);18 md.materials.rheology_n=3.*ones(md.mesh.numberofelements,1); 19 19 20 disp(' boundary conditions for diagnostic model: 21 %Create node on boundary fi st (because wican not use mesh)20 disp(' boundary conditions for diagnostic model:'); 21 %Create node on boundary first (because we can not use mesh) 22 22 md=SetIceSheetBC(md); -
issm/trunk-jpl/test/Par/ISMIPE.par
r13233 r14134 7 7 for i=1:md.mesh.numberofvertices 8 8 y=md.mesh.y(i); 9 point1=floor(y/100 )+1;10 point2=min(point1+1,51 );11 coeff=(y-(point1-1 )*100)/100;12 md.geometry.bed(i)=(1 -coeff)*data(point1,2)+coeff*data(point2,2);13 md.geometry.surface(i)=(1 -coeff)*data(point1,3)+coeff*data(point2,3);9 point1=floor(y/100.)+1.; 10 point2=min(point1+1,51.); 11 coeff=(y-(point1-1.)*100.)/100.; 12 md.geometry.bed(i)=(1.-coeff)*data(point1,2)+coeff*data(point2,2); 13 md.geometry.surface(i)=(1.-coeff)*data(point1,3)+coeff*data(point2,3); 14 14 end 15 15 md.geometry.thickness=md.geometry.surface-md.geometry.bed; … … 22 22 md.friction.q=ones(md.mesh.numberofelements,1); 23 23 24 disp(' creating flow law param ter');24 disp(' creating flow law parameter'); 25 25 md.materials.rheology_B=6.8067*10^7*ones(md.mesh.numberofvertices,1); 26 md.materials.rheology_n=3 *ones(md.mesh.numberofelements,1);26 md.materials.rheology_n=3.*ones(md.mesh.numberofelements,1); 27 27 28 disp(' boundary conditions for diagnostic model: 29 %Create node on boundary fi st (because wican not use mesh)28 disp(' boundary conditions for diagnostic model:'); 29 %Create node on boundary first (because we can not use mesh) 30 30 md=SetIceSheetBC(md); -
issm/trunk-jpl/test/Par/ISMIPF.par
r13137 r14134 3 3 4 4 disp(' creating thickness'); 5 md.geometry.surface=-md.mesh.x*tan(3 *pi/180);6 %md.geometry.bed=md.geometry.surface-1000 ;7 md.geometry.bed=md.geometry.surface-1000 +100*exp(-((md.mesh.x-max(md.mesh.x)/2).^2+(md.mesh.y-max(md.mesh.y)/2).^2)/(10000^2));5 md.geometry.surface=-md.mesh.x*tan(3.*pi/180.); 6 %md.geometry.bed=md.geometry.surface-1000.; 7 md.geometry.bed=md.geometry.surface-1000.+100.*exp(-((md.mesh.x-max(md.mesh.x)/2.).^2+(md.mesh.y-max(md.mesh.y)/2.).^2)/(10000.^2)); 8 8 md.geometry.thickness=md.geometry.surface-md.geometry.bed; 9 9 10 10 disp(' creating drag'); 11 md.friction.coefficient=sqrt(md.constants.yts/(2.140373*10^-7*1000 ))*ones(md.mesh.numberofvertices,1);11 md.friction.coefficient=sqrt(md.constants.yts/(2.140373*10^-7*1000.))*ones(md.mesh.numberofvertices,1); 12 12 md.friction.p=ones(md.mesh.numberofelements,1); 13 13 md.friction.q=zeros(md.mesh.numberofelements,1); 14 14 15 disp(' creating flow law param ter');15 disp(' creating flow law parameter'); 16 16 md.materials.rheology_B=1.4734*10^14*ones(md.mesh.numberofvertices,1); 17 md.materials.rheology_n=1 *ones(md.mesh.numberofelements,1);17 md.materials.rheology_n=1.*ones(md.mesh.numberofelements,1); 18 18 md.materials.rheology_law='None'; 19 19 20 20 disp(' boundary conditions for diagnostic model'); 21 %Create node on boundary fi st (because we cannot use mesh)21 %Create node on boundary first (because we cannot use mesh) 22 22 md=SetIceSheetBC(md); 23 md.diagnostic.spcvx=100 *ones(md.mesh.numberofvertices,1);23 md.diagnostic.spcvx=100.*ones(md.mesh.numberofvertices,1); 24 24 md.initialization.vx=zeros(md.mesh.numberofvertices,1); 25 25 md.initialization.vy=zeros(md.mesh.numberofvertices,1); … … 27 27 md.initialization.vel=zeros(md.mesh.numberofvertices,1); 28 28 md.initialization.pressure=zeros(md.mesh.numberofvertices,1); 29 md.initialization.temperature=255 *ones(md.mesh.numberofvertices,1);29 md.initialization.temperature=255.*ones(md.mesh.numberofvertices,1); 30 30 pos=find(md.mesh.x==min(md.mesh.x) | md.mesh.x==max(md.mesh.x) | md.mesh.y==min(md.mesh.y) | md.mesh.y==max(md.mesh.y)); 31 31 md.balancethickness.spcthickness=NaN*ones(md.mesh.numberofvertices,1); … … 33 33 md.prognostic.spcthickness=NaN*ones(md.mesh.numberofvertices,1); 34 34 md.prognostic.spcthickness(pos)=md.geometry.thickness(pos); 35 md.thermal.spctemperature=255 *ones(md.mesh.numberofvertices,1);35 md.thermal.spctemperature=255.*ones(md.mesh.numberofvertices,1); 36 36 md.basalforcings.geothermalflux=0.4*ones(md.mesh.numberofvertices,1); 37 37 … … 40 40 41 41 %Transient options 42 md.timestepping.time_step=1 ;43 md.timestepping.final_time=10 ;42 md.timestepping.time_step=1.; 43 md.timestepping.final_time=10.; 44 44 md.prognostic.stabilization=1; 45 45 md.thermal.stabilization=1;
Note:
See TracChangeset
for help on using the changeset viewer.