Index: /issm/trunk-jpl/src/m/mech/basalstress.m
===================================================================
--- /issm/trunk-jpl/src/m/mech/basalstress.m	(revision 22541)
+++ /issm/trunk-jpl/src/m/mech/basalstress.m	(revision 22542)
@@ -19,5 +19,5 @@
 
 %compute basal drag
-bx=(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.base)).^r.*(md.friction.coefficient).^2.*ubx.^s;
-by=(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.base)).^r.*(md.friction.coefficient).^2.*uby.^s;
-b=(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.base)).^r.*(md.friction.coefficient).^2.*ub.^s;
+bx = - (md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.base)).^r.*(md.friction.coefficient).^2.*ubx.^s;
+by = - (md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.base)).^r.*(md.friction.coefficient).^2.*uby.^s;
+b  = sqrt(bx.^2+by.^2);
