source: issm/trunk-jpl/src/m/plot/plot_basaldrag.m@ 13730

Last change on this file since 13730 was 13730, checked in by Mathieu Morlighem, 12 years ago

CHG: per matlab's request, removed all unnecessary semicolon

File size: 1.5 KB
RevLine 
[13730]1function plot_basaldrag(md,options,width,i,type)
[2439]2
[1]3%PLOT_BASALDRAG - plot basal drag
4%
5% Usage:
[2439]6% plot_basaldrag(md,options,width,i,type);
[1]7%
8% See also: PLOTMODEL
9
10%check layer
[9719]11if md.mesh.dimension==3,
[2439]12 if getfieldvalue(options,'layer',1)~=1;
[1]13 disp('plot_basaldrag warning: basal drag is displayed in the lower layer')
[2439]14 changefieldvalue(options,'layer',1);
[1]15 end
16end
17
18%compute exponents
[9610]19s=averaging(md,1./md.friction.p,0);
20r=averaging(md,md.friction.q./md.friction.p,0);
[1]21
22%compute horizontal velocity
[27]23if strcmpi(type,'basal_drag')
[9684]24 ub=sqrt(md.initialization.vx.^2+md.initialization.vy.^2)/md.constants.yts;
[27]25elseif strcmpi(type,'basal_dragx')
[9684]26 ub=md.initialization.vx/md.constants.yts;
[27]27elseif strcmpi(type,'basal_dragy')
[9684]28 ub=md.initialization.vy/md.constants.yts;
[27]29end
[1]30
31%compute basal drag
[9691]32drag=(max(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed),0)).^r.*(md.friction.coefficient).^2.*ub.^s/1000;
[1]33
[27]34%Figure out if this is a Section plot
[2439]35if exist(options,'sectionvalue')
36 plot_section(md,drag,options,width,i);
[27]37 return;
38else
[1]39
[27]40 %process data and model
[8472]41 [x y z elements is2d isplanet]=processmesh(md,[],options);
[4330]42 [basal_drag datatype]=processdata(md,drag,options);
[1]43
[27]44 %plot basaldrag
45 subplot(width,width,i);
[8472]46 plot_unit(x,y,z,elements,basal_drag,is2d,isplanet,datatype,options);
[1]47
[27]48 %apply options
[2439]49 options=addfielddefault(options,'title','Basal drag [kPa]');
50 options=addfielddefault(options,'view',2);
51 applyoptions(md,basal_drag,options);
[1]52
[27]53end
Note: See TracBrowser for help on using the repository browser.