Changeset 6286
- Timestamp:
- 10/14/10 09:27:49 (14 years ago)
- Location:
- issm/trunk/src/m/model
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/SectionValues.m
r5900 r6286 82 82 83 83 %Interpolation of data on specified points 84 data_interp=InterpFromMeshToMesh2d(md.elements,md.x,md.y,data,X,Y); 84 %data_interp=InterpFromMeshToMesh2d(md.elements,md.x,md.y,data,X,Y); 85 data_interp=griddata(md.x,md.y,data,X,Y); 85 86 86 87 %Compute index -
issm/trunk/src/m/model/mechanicalproperties.m
r5433 r6286 48 48 %compute viscosity 49 49 nu=zeros(numberofelements,1); 50 B_bar=md. B(index)*summation/3;51 power=(md. n-1)./(2*md.n);50 B_bar=md.rheology_B(index)*summation/3; 51 power=(md.rheology_n-1)./(2*md.rheology_n); 52 52 second_inv=(ux.^2+vy.^2+((uy+vx).^2)/4+ux.*vy); 53 53 %some corrections -
issm/trunk/src/m/model/plot/applyoptions.m
r6187 r6286 191 191 else 192 192 %do nothing 193 193 194 end 194 195 -
issm/trunk/src/m/model/plot/plot_manager.m
r6167 r6286 105 105 plot_segments(md,options,subplotwidth,i,data) 106 106 return 107 108 case 'quiver' 109 plot_quiver(md,options,nlines,ncols,i); 110 return 111 107 112 case {'strainrate_tensor','strainrate','strainrate_principal','strainrate_principalaxis1','strainrate_principalaxis2','strainrate_principalaxis3',... 108 113 'stress_tensor','stress','stress_principal','stress_principalaxis1','stress_principalaxis2','stress_principalaxis3',... -
issm/trunk/src/m/model/plot/plot_quiver.m
r2754 r6286 1 function plot_quiver( x,y,u,v,options),1 function plot_quiver(md,options,nlines,ncols,index); 2 2 %PLOT_QUIVER - quiver plot with colors 3 3 % … … 10 10 % plot_quiver(md.x,md.y,md.vx,md.vy,options); 11 11 12 %prepare plot 13 subplot(nlines,ncols,index); 14 hold on 15 16 fields=getfieldvalue(options,'quiver_field',{'vx','vy'}); 17 18 %call fields vx and vy, for ease of use 19 if ischar(fields{1}), vx=md.(fields{1}); else vx=fields{1}; end 20 if ischar(fields{2}), vy=md.(fields{2}); else vy=fields{2}; end 21 12 22 %process fields 13 [quivers,palette]=quiver_process( x,y,u,v,options);23 [quivers,palette]=quiver_process(md.x,md.y,vx,vy,options); 14 24 15 25 %loop over the number of colors … … 25 35 %take care of colorbar 26 36 quiver_colorbar(quivers,options); 37 38 39 %apply options 40 options=addfielddefault(options,'title','Quiver plot.'); 41 options=addfielddefault(options,'colorbar',1); 42 applyoptions(md,[],options); -
issm/trunk/src/m/model/plot/plot_riftpenetration.m
r4330 r6286 58 58 plot(x(md.rifts(i).tips(2)),y(md.rifts(i).tips(2)),'g*'); 59 59 end 60 if isp1 & isp2 61 legend([h1,h2,p1,p2],'mesh boundaries','rift tips',' rifts closing','rifts opening') 62 elseif isp1 63 legend([h1,h2,p1],'mesh boundaries','rift tips',' rifts closing') 64 elseif isp2 65 legend([h1,h2,p2],'mesh boundaries','rift tips','rifts opening') 66 else 67 legend([h1,h2],'mesh boundaries','rift tips') 60 if strcmpi(getfieldvalue(options,'legend','on'),'on'), 61 if isp1 & isp2 62 l=legend([h1,h2,p1,p2],'mesh boundaries','crack tips','faults','rifts'); 63 elseif isp1 64 l=legend([h1,h2,p1],'mesh boundaries','crack tips','faults'); 65 elseif isp2 66 l=legend([h1,h2,p2],'mesh boundaries','crack tips','rifts'); 67 else 68 l=legend([h1,h2],'mesh boundaries','crack tips'); 69 end 70 set(l,'Location',getfieldvalue(options,'legend_location','NorthEast')); 68 71 end 69 72 else … … 73 76 74 77 %apply options 75 options=addfielddefault(options,'title','Rift Penetration');78 options=addfielddefault(options,'title','Rift/Fault location'); 76 79 options=addfielddefault(options,'colorbar',0); 77 80 applyoptions(md,[],options); -
issm/trunk/src/m/model/plot/plot_riftrelvel.m
r5163 r6286 65 65 segments=md.rifts(i).segments; 66 66 for j=1:size(segments,1), 67 plot(x(segments(j,1:2)),y(segments(j,1:2)),' b-');67 plot(x(segments(j,1:2)),y(segments(j,1:2)),'k-'); 68 68 end 69 69 … … 76 76 penetration=(vx2-vx1)*normal(1)+(vy2-vy1)*normal(2); 77 77 %if penetration is negative, plot in black, positive, plot in red;: ie: if rift is closing, black, if rift is opening, red. 78 if(penetration>0),79 p2=plot(x(penaltypairs(j,1)) ,y(penaltypairs(j,1)),'*'); set(p2,'Color',[140 140 140]/255);80 isp2=1;81 else82 p1=plot(x(penaltypairs(j,1)) ,y(penaltypairs(j,1)),'k*');83 isp1=1;84 end78 %if(penetration>0), 79 % p2=plot(x(penaltypairs(j,1)) ,y(penaltypairs(j,1)),'*'); set(p2,'Color',[140 140 140]/255); 80 % isp2=1; 81 %else 82 % p1=plot(x(penaltypairs(j,1)) ,y(penaltypairs(j,1)),'k*'); 83 % isp1=1; 84 %end 85 85 end 86 86 87 87 %point out the tips 88 h2=plot(x(md.rifts(i).tips(1)),y(md.rifts(i).tips(1)),'g*');89 plot(x(md.rifts(i).tips(2)),y(md.rifts(i).tips(2)),'g*');90 segments=md.rifts(i).segments(:,1:2);88 %h2=plot(x(md.rifts(i).tips(1)),y(md.rifts(i).tips(1)),'g*'); 89 %plot(x(md.rifts(i).tips(2)),y(md.rifts(i).tips(2)),'g*'); 90 %segments=md.rifts(i).segments(:,1:2); 91 91 end 92 92 %legend 93 if isp1 & isp2 94 legend([h1,h2,p1,p2],'mesh boundaries','rift tips',' rifts closing','rifts opening') 95 elseif isp1 96 legend([h1,h2,p1],'mesh boundaries','rift tips',' rifts closing') 97 elseif isp2 98 legend([h1,h2,p2],'mesh boundaries','rift tips','rifts opening') 99 else 100 legend([h1,h2],'mesh boundaries','rift tips') 93 if strcmpi(getfieldvalue(options,'legend','on'),'on'), 94 if isp1 & isp2 95 l=legend([h1,h2,p1,p2],'mesh boundaries','crack tips','faults','rifts'); 96 elseif isp1 97 l=legend([h1,h2,p1],'mesh boundaries','crack tips','faults'); 98 elseif isp2 99 l=legend([h1,h2,p2],'mesh boundaries','crack tips','rifts'); 100 else 101 l=legend([h1,h2],'mesh boundaries','crack tips'); 102 end 103 set(l,'Location',getfieldvalue(options,'legend_location','NorthEast')); 101 104 end 102 105 hold off 106 107 103 108 104 109 %apply options 105 110 quiver_colorbar(quivers,options); 106 111 options=changefieldvalue(options,'colorbar',2); 107 options=addfielddefault(options,'title','Rift Relative Velocities');112 options=addfielddefault(options,'title','Rift/Fault Relative Velocity'); 108 113 applyoptions(md,[],options); -
issm/trunk/src/m/model/plot/plotdoc.m
r6187 r6286 50 50 disp(' - ''qmustddev'': plot of stddev distribution in sampling analysis with scaled response. needs option qmudata for descriptor'); 51 51 disp(' - ''part_hist'': partitioning node and area histogram'); 52 disp(' - ''quiver'': quiver plot. specify quiver fields. ''quiver_field'',{''vx'',''vy''} (default) or ''quiver_field'',{field1,field2}'); 52 53 53 54 disp(' ''alloptions'': apply the options to all subplots if ''on'''); … … 125 126 disp(' ''wrapping'': repeat ''n'' times the colormap (''n'' must be an integer)'); 126 127 disp(' ''unit'': by default, in m, otherwise, ''km'' is available'); 128 disp(' ''legend_position'': by default, ''NorthEasth'''); 127 129 disp(' ''qmudata'': data for qmu plots.'); 128 130 disp(' {dresp1 ,dresp2 ,hmin,hmax,hnint} or {samp,desc,mu,sigma,hmin,hmax,hnint}'); -
issm/trunk/src/m/model/plot/quiver_colorbar.m
r3202 r6286 34 34 if exist(options,'colorbartitle'), 35 35 backup=gca; 36 axes(hcb);lab= ylabel(getfieldvalue(options,'colorbartitle'));37 set(lab,'Rotation',getfieldvalue(options,'colorbartitlerotation', -90));36 axes(hcb);lab=title(getfieldvalue(options,'colorbartitle')); 37 set(lab,'Rotation',getfieldvalue(options,'colorbartitlerotation',0)); 38 38 set(lab,'VerticalAlignment','bottom'); 39 39 axes(backup); -
issm/trunk/src/m/model/radarpower.m
r6088 r6286 21 21 y0=min(ylim); 22 22 y1=max(ylim); 23 24 %Get path to gdal binaries25 path_gdal=[ISSM_TIER '/externalpackages/gdal/install/bin/'];26 27 %Was gdal compiled?28 if ~exist([path_gdal 'gdal_translate']),29 error(['radarpower error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' ISSM_TIER '/externalpackages/gdal to use this routine.']);30 end31 23 32 24 %the geotiff image is either 200m or 1km accuracy. … … 64 56 %Name of image 65 57 inputname='./temp.tif'; 66 system([path_gdal 'gdal_translate -quiet -projwin ' num2str(x0) ' ' num2str(y1) ' ' num2str(x1) ' ' num2str(y0) ' ' geotiff_name ' ' inputname ]);58 eval(['!gdal_translate -quiet -projwin ' num2str(x0) ' ' num2str(y1) ' ' num2str(x1) ' ' num2str(y0) ' ' geotiff_name ' ' inputname ]); 67 59 68 60 %Read in temp.tif:
Note:
See TracChangeset
for help on using the changeset viewer.