basevert

PURPOSE ^

BASEVERT - computes the basal vertical velcities

SYNOPSIS ^

function wb=basevert(md)

DESCRIPTION ^

BASEVERT - computes the basal vertical velcities

   This routine computes the basal vertical velocities of ice shelves
   for 2d models only using the following formula:
   wb=rho_ice/rho_water*div(thickness*vel_horiz)+vel_horiz.grad(base)

   Usage:
      wb=basevert(md);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function wb=basevert(md)
0002 %BASEVERT - computes the basal vertical velcities
0003 %
0004 %   This routine computes the basal vertical velocities of ice shelves
0005 %   for 2d models only using the following formula:
0006 %   wb=rho_ice/rho_water*div(thickness*vel_horiz)+vel_horiz.grad(base)
0007 %
0008 %   Usage:
0009 %      wb=basevert(md);
0010 
0011 alpha=zeros(md.numberofelements,3);
0012 beta=zeros(md.numberofelements,3);
0013 gamma=zeros(md.numberofelements,3);
0014 
0015 for n=1:md.numberofelements
0016     X=inv([md.x(md.elements(n,:)) md.y(md.elements(n,:)) ones(3,1)]);
0017     alpha(n,:)=X(1,:);
0018     beta(n,:)=X(2,:);
0019     gamma(n,:)=X(3,:);
0020 end
0021 
0022 hu=md.thickness.*md.vx;
0023 hv=md.thickness.*md.vy;
0024 
0025 summation=[1;1;1];
0026 hux=(hu(md.elements).*alpha)*summation;
0027 hvy=(hv(md.elements).*beta)*summation;
0028 
0029 uelem=md.vx(md.elements)*summation/3;
0030 velem=md.vy(md.elements)*summation/3;
0031 
0032 dbdx=(md.bed(md.elements).*alpha)*summation;
0033 dbdy=(md.bed(md.elements).*beta)*summation;
0034 
0035 wb=-md.rho_ice/md.rho_water*(hux+hvy)+uelem.*dbdx+velem.*dbdy;

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003