Index: /issm/trunk-jpl/src/m/plot/plot_overlay.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_overlay.js	(revision 20196)
+++ /issm/trunk-jpl/src/m/plot/plot_overlay.js	(revision 20197)
@@ -24,6 +24,7 @@
 	var is2d = meshresults[4]; 
 	var isplanet = meshresults[5];
+	var is3d = (md.mesh.classname() == 'mesh3dsurface');	//use is2d/isplanet once verified to work with mesh3dsurface
 	
-	if (md.geometry.surface) {
+	if (!is3d && md.geometry.surface) {
 		z = md.geometry.surface;
 	}
@@ -49,5 +50,5 @@
 	node["shader"] = gl["shaders"][node["shaderName"]]["program"];
 	node["scale"] = [scale, scale, scale*options.getfieldvalue('heightscale',1)];
-	node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmax) / (-1 / scale)];
+	node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (2 / scale)];
 	node["modelMatrix"] = recalculateModelMatrix(node);
 	node["texture"] = initTexture(gl,options.getfieldvalue('image'));
Index: /issm/trunk-jpl/src/m/plot/plot_unit.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_unit.js	(revision 20196)
+++ /issm/trunk-jpl/src/m/plot/plot_unit.js	(revision 20197)
@@ -26,4 +26,5 @@
 	var is2d = meshresults[4]; 
 	var isplanet = meshresults[5];
+	var is3d = (md.mesh.classname() == 'mesh3dsurface');	//use is2d/isplanet once verified to work with mesh3dsurface
 	
 	var	dataresults = processdata(md,data,options);
@@ -31,5 +32,5 @@
 	var	datatype = dataresults[1];
 	
-	if (md.geometry.surface) {
+	if (!is3d && md.geometry.surface) {
 		z = md.geometry.surface;
 	}
@@ -56,7 +57,7 @@
 	node["shader"] = gl["shaders"][node["shaderName"]]["program"];
 	node["scale"] = [scale, scale, scale*options.getfieldvalue('heightscale',1)];
-	node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmax) / (-1 / scale)];
+	node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (-2 / scale)];
 	node["modelMatrix"] = recalculateModelMatrix(node);
-	node["alpha"] = options.getfieldvalue('alpha',.6);
+	node["alpha"] = options.getfieldvalue('alpha',0.9);
 	node["overlay"] = options.getfieldvalue('overlay','off') == 'on';
 	node["drawOrder"] = 0;
@@ -65,4 +66,6 @@
 	node["maskColor"] = options.getfieldvalue('innermaskcolor',[0.0,0.0,1.0,1.0]);
 	node["enabled"] = options.getfieldvalue('nodata','off') == 'off';
+	
+	console.log(node["translation"]);
 	
 	switch(datatype){
@@ -92,8 +95,12 @@
 				vertices.itemSize = 3;
 				texcoords.itemSize = 2;
+				var height = vec3.create();
+				var heightscale = options.getfieldvalue('heightscale',1);
 				for(var i = 0; i < x.length; i++){
-					vertices[vertices.length] = x[i];
-					vertices[vertices.length] = y[i];
-					vertices[vertices.length] = z[i];
+					vec3.normalize(height, vec3.fromValues(x[i], y[i], z[i])); //fix to use normalized earth radius instead of radius+ height
+					vec3.scale(height, height, heightscale);
+					vertices[vertices.length] = x[i] + height[0];
+					vertices[vertices.length] = y[i] + height[1];
+					vertices[vertices.length] = z[i] + height[2];
 
 					texcoords[texcoords.length] = 0.5;
