Changeset 5516
- Timestamp:
- 08/23/10 14:02:06 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/test/NightlyRun/test1105.m
r5098 r5516 1 1 %This test is a test from the ISMP-HOM Intercomparison project 2 2 %Pattyn and Payne 2006 3 printingflag=true; 3 4 4 5 L_list={5000,10000,20000,40000,80000,160000}; 5 6 results={}; 7 minvx=[]; 8 maxvx=[]; 6 9 7 10 for i=1:length(L_list), 8 L= 3*L_list{i}; %in m (3 times the desired lenght for BC problems)9 nx= 60; %number of nodes in x direction10 ny= 60;11 L=L_list{i}; %in m (3 times the desired lenght for BC problems) 12 nx=30; %number of nodes in x direction 13 ny=30; 11 14 md=model; 12 15 md=squaremesh(md,L,L,nx,ny); 13 16 md=geography(md,'',''); %ice sheet test 14 17 md=parameterize(md,'../Par/ISMIPC.par'); 15 md=extrude(md,6,1); 18 md=extrude(md,10,1); 19 md.verbose=4; 16 20 17 21 md=setelementstype(md,'pattyn','all'); 18 22 19 23 %Create MPCs to have periodic boundary conditions 20 %md.spcvelocity=zeros(md.numberofgrids,6);24 md.spcvelocity=zeros(md.numberofgrids,6); 21 25 22 %posx=find(md.x==0);23 %posx2=find(md.x==L);26 posx=find(md.x==0 & md.y~=0 & md.y~=L); 27 posx2=find(md.x==L & md.y~=0 & md.y~=L); 24 28 25 %posy=find(md.y==0 & md.x~=0 & md.x~=L); %Don't take the same grids two times26 %posy2=find(md.y==L & md.x~=0 & md.x~=L);29 posy=find(md.y==0 & md.x~=0 & md.x~=L); %Don't take the same grids two times 30 posy2=find(md.y==L & md.x~=0 & md.x~=L); 27 31 28 %md.penalties=[posx,posx2;posy,posy2]; 32 md.penalties=[posx,posx2;posy,posy2]; 33 34 %Add spc on the corners 35 pos=find((md.x==0 | md.x==L) & (md.y==0 | md.y==L) & md.gridonbed); 36 md.spcvelocity(pos,1:2)=1; 37 if(L==5000), 38 md.spcvelocity(pos,4)=15.66; 39 md.spcvelocity(pos,5)=-0.1967; 40 elseif(L==10000), 41 md.spcvelocity(pos,4)=16.04; 42 md.spcvelocity(pos,5)=-0.1977; 43 elseif(L==20000), 44 md.spcvelocity(pos,4)=16.53; 45 md.spcvelocity(pos,5)=-1.27; 46 elseif(L==40000), 47 md.spcvelocity(pos,4)=17.23; 48 md.spcvelocity(pos,5)=-3.17; 49 elseif(L==80000), 50 md.spcvelocity(pos,4)=16.68; 51 md.spcvelocity(pos,5)=-2.69; 52 elseif(L==160000), 53 md.spcvelocity(pos,4)=16.03; 54 md.spcvelocity(pos,5)=-1.27; 55 end 56 57 %Spc the bed at zero for vz 58 pos=find(md.gridonbed); 59 md.spcvelocity(pos,3)=1; 29 60 30 61 %Compute the diagnostic … … 36 67 vz=PatchToVec(md.results.DiagnosticSolution.Vz); 37 68 results{i}=md.results.DiagnosticSolution; 69 minvx(i)=min(vx(end-md.numberofgrids2d+1:end)); 70 maxvx(i)=max(vx(end-md.numberofgrids2d+1:end)); 38 71 39 plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers) 72 %Now plot vx, vy, vz and vx on a cross section 73 plotmodel(md,'data',vx,'layer#all',md.numlayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',2) 74 if printingflag, 75 set(gcf,'Color','w') 76 printmodel(['ismipcpattynvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 77 system(['mv ismipcpattynvx' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']); 78 end 79 plotmodel(md,'data',vy,'layer#all',md.numlayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3) 80 if printingflag, 81 set(gcf,'Color','w') 82 printmodel(['ismipcpattynvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 83 system(['mv ismipcpattynvy' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']); 84 end 85 plotmodel(md,'data',vz,'layer#all',md.numlayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',4) 86 if printingflag, 87 set(gcf,'Color','w') 88 printmodel(['ismipcpattynvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 89 system(['mv ismipcpattynvz' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']); 90 end 91 92 if(L==5000), 93 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.numlayers,... 94 'resolution',[10 10],'ylim',[0 20],'xlim',[0 5000],'title','','xlabel','','figure',5) 95 elseif(L==10000), 96 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.numlayers,... 97 'resolution',[10 10],'ylim',[13 18],'xlim',[0 10000],'title','','xlabel','') 98 elseif(L==20000), 99 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.numlayers,... 100 'resolution',[10 10],'ylim',[14 22],'xlim',[0 20000],'title','','xlabel','') 101 elseif(L==40000), 102 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.numlayers,... 103 'resolution',[10 10],'ylim',[10 40],'xlim',[0 40000],'title','','xlabel','') 104 elseif(L==80000), 105 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.numlayers,... 106 'resolution',[10 10],'ylim',[0 80],'xlim',[0 80000],'title','','xlabel','') 107 elseif(L==160000), 108 plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.numlayers,... 109 'resolution',[10 10],'ylim',[0 200],'xlim',[0 160000],'title','','xlabel','') 110 end 111 if printingflag, 112 set(gcf,'Color','w') 113 printmodel(['ismipcpattynvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 114 system(['mv ismipcpattynvxsec' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']); 115 end 40 116 end 41 117 118 %Now plot the min and max values of vx for each size of the square 119 plot([5 10 20 40 80 160],minvx);ylim([4 18]) 120 if printingflag, 121 set(gcf,'Color','w') 122 printmodel('ismipcpattynminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 123 system(['mv ismipcpattynminvx.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']); 124 end 125 plot([5 10 20 40 80 160],maxvx);ylim([0 200]) 126 if printingflag, 127 set(gcf,'Color','w') 128 printmodel('ismipcpattynmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 129 system(['mv ismipcpattynmaxvx.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestC ']); 130 end 42 131 %Fields and tolerances to track changes 43 132 field_names ={...
Note:
See TracChangeset
for help on using the changeset viewer.