Index: /issm/trunk-jpl/src/c/modules/SurfaceMassBalancex/SurfaceMassBalancex.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/SurfaceMassBalancex/SurfaceMassBalancex.cpp	(revision 27966)
+++ /issm/trunk-jpl/src/c/modules/SurfaceMassBalancex/SurfaceMassBalancex.cpp	(revision 27967)
@@ -67,5 +67,4 @@
 			}
 
-			smb[v]=smb[v]/1000*rho_water/rho_ice;      // SMB in m/y ice
 		}  //end of the loop over the vertices
 
Index: /issm/trunk-jpl/src/m/classes/SMBgradients.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBgradients.m	(revision 27966)
+++ /issm/trunk-jpl/src/m/classes/SMBgradients.m	(revision 27967)
@@ -47,4 +47,7 @@
 				md = checkfield(md,'fieldname','smb.href','timeseries',1,'NaN',1,'Inf',1);
 				md = checkfield(md,'fieldname','smb.smbref','timeseries',1,'NaN',1,'Inf',1);
+				if max(max(abs(md.smb.smbref(1:end-1,:))))<1
+              disp('!!! Warning: SMBgradients now expects smbref to be in m/yr ice eq. instead of mm/yr water eq.');
+            end
 				md = checkfield(md,'fieldname','smb.b_pos','timeseries',1,'NaN',1,'Inf',1);
 				md = checkfield(md,'fieldname','smb.b_neg','timeseries',1,'NaN',1,'Inf',1);
@@ -59,5 +62,5 @@
 			disp(sprintf('\n   SMB gradients parameters:'));
 			fielddisplay(self,'href',' reference elevation from which deviation is used to calculate SMB adjustment in smb gradients method [m]');
-			fielddisplay(self,'smbref',' reference smb from which deviation is calculated in smb gradients method [mm/yr water equiv]');
+			fielddisplay(self,'smbref',' reference smb from which deviation is calculated in smb gradients method [m/yr ice equiv]');
 			fielddisplay(self,'b_pos',' slope of hs - smb regression line for accumulation regime required if smb gradients is activated');
 			fielddisplay(self,'b_neg',' slope of hs - smb regression line for ablation regime required if smb gradients is activated');
Index: /issm/trunk-jpl/test/NightlyRun/test328.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test328.m	(revision 27966)
+++ /issm/trunk-jpl/test/NightlyRun/test328.m	(revision 27967)
@@ -5,8 +5,8 @@
 md=setflowequation(md,'SSA','all');
 md.smb = SMBgradients();
-md.smb.b_pos=-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y;
-md.smb.b_neg=250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y;
+md.smb.b_pos=(-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y) / 1000. * md.materials.rho_freshwater / md.materials.rho_ice;
+md.smb.b_neg=(250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y) / 1000. * md.materials.rho_freshwater / md.materials.rho_ice;
 md.smb.href=md.geometry.surface;
-md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y;
+md.smb.smbref= (1000. - 0.001*md.mesh.x - 0.005*md.mesh.y) / 1000. * md.materials.rho_freshwater / md.materials.rho_ice;
 md.transient.requested_outputs={'default','TotalSmb'};
 md.cluster=generic('name',oshostname(),'np',3);
Index: /issm/trunk-jpl/test/NightlyRun/test329.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test329.m	(revision 27966)
+++ /issm/trunk-jpl/test/NightlyRun/test329.m	(revision 27967)
@@ -6,8 +6,8 @@
 md=setflowequation(md,'HO','all');
 md.smb = SMBgradients();
-md.smb.b_pos=-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y;
-md.smb.b_neg=250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y;
+md.smb.b_pos=(-100. + 0.00005*md.mesh.x - 0.0001*md.mesh.y) / 1000. * md.materials.rho_freshwater / md.materials.rho_ice;
+md.smb.b_neg=(250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y) / 1000. * md.materials.rho_freshwater / md.materials.rho_ice;
 md.smb.href=md.geometry.surface;
-md.smb.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y;
+md.smb.smbref= (1000. - 0.001*md.mesh.x - 0.005*md.mesh.y) / 1000. * md.materials.rho_freshwater / md.materials.rho_ice;
 md.transient.requested_outputs={'default','TotalSmb'};
 md.cluster=generic('name',oshostname(),'np',3);
