Index: /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
===================================================================
--- /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 9690)
+++ /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 9691)
@@ -136,4 +136,9 @@
 	DiagnosticNumRequestedOutputsEnum,
 	DiagnosticViscosityOvershootEnum,
+	GeometryHydrostaticRatioEnum,
+	ThicknessEnum,
+	BedEnum,
+	BathymetryEnum,
+	SurfaceEnum,
 	/*}}}*/
 	/*Datasets {{{1*/
@@ -281,6 +286,4 @@
 	AdjointzEnum,
 	AdjointpEnum,
-	BedEnum,
-	BathymetryEnum,
 	BedSlopeXEnum,
 	BedSlopeYEnum,
@@ -317,5 +320,4 @@
 	SegmentOnIceShelfEnum,
 	SurfaceAreaEnum,
-	SurfaceEnum,
 	SurfaceSlopeXEnum,
 	SurfaceSlopeYEnum,
@@ -323,6 +325,4 @@
 	TemperaturePicardEnum,
 	TemperatureOldEnum,
-	ThicknessEnum,
-	ThicknessCoeffEnum,
 	TypeEnum,
 	VelEnum,
Index: /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp
===================================================================
--- /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 9690)
+++ /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 9691)
@@ -140,4 +140,9 @@
 		case DiagnosticNumRequestedOutputsEnum : return "DiagnosticNumRequestedOutputs";
 		case DiagnosticViscosityOvershootEnum : return "DiagnosticViscosityOvershoot";
+		case GeometryHydrostaticRatioEnum : return "GeometryHydrostaticRatio";
+		case ThicknessEnum : return "Thickness";
+		case BedEnum : return "Bed";
+		case BathymetryEnum : return "Bathymetry";
+		case SurfaceEnum : return "Surface";
 		case ConstraintsEnum : return "Constraints";
 		case ElementsEnum : return "Elements";
@@ -248,6 +253,4 @@
 		case AdjointzEnum : return "Adjointz";
 		case AdjointpEnum : return "Adjointp";
-		case BedEnum : return "Bed";
-		case BathymetryEnum : return "Bathymetry";
 		case BedSlopeXEnum : return "BedSlopeX";
 		case BedSlopeYEnum : return "BedSlopeY";
@@ -284,5 +287,4 @@
 		case SegmentOnIceShelfEnum : return "SegmentOnIceShelf";
 		case SurfaceAreaEnum : return "SurfaceArea";
-		case SurfaceEnum : return "Surface";
 		case SurfaceSlopeXEnum : return "SurfaceSlopeX";
 		case SurfaceSlopeYEnum : return "SurfaceSlopeY";
@@ -290,6 +292,4 @@
 		case TemperaturePicardEnum : return "TemperaturePicard";
 		case TemperatureOldEnum : return "TemperatureOld";
-		case ThicknessEnum : return "Thickness";
-		case ThicknessCoeffEnum : return "ThicknessCoeff";
 		case TypeEnum : return "Type";
 		case VelEnum : return "Vel";
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 9690)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 9691)
@@ -49,5 +49,5 @@
 	/*Create inputs: */
 	iomodel->FetchDataToInput(elements,ThicknessEnum);
-	iomodel->FetchDataToInput(elements,ThicknessCoeffEnum);
+	iomodel->FetchDataToInput(elements,GeometryHydrostaticRatioEnum);
 	iomodel->FetchDataToInput(elements,SurfaceEnum);
 	iomodel->FetchDataToInput(elements,BedEnum);
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp	(revision 9690)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp	(revision 9691)
@@ -40,5 +40,5 @@
 	
 	iomodel->FetchDataToInput(elements,ThicknessEnum);
-	iomodel->FetchDataToInput(elements,ThicknessCoeffEnum);
+	iomodel->FetchDataToInput(elements,GeometryHydrostaticRatioEnum);
 	
 	/*Free data: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp	(revision 9690)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp	(revision 9691)
@@ -40,5 +40,5 @@
 
 	iomodel->FetchDataToInput(elements,ThicknessEnum);
-	iomodel->FetchDataToInput(elements,ThicknessCoeffEnum);
+	iomodel->FetchDataToInput(elements,GeometryHydrostaticRatioEnum);
 	iomodel->FetchDataToInput(elements,SurfaceEnum);
 	iomodel->FetchDataToInput(elements,BedEnum);
Index: /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp
===================================================================
--- /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 9690)
+++ /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 9691)
@@ -138,4 +138,9 @@
 	else if (strcmp(name,"DiagnosticNumRequestedOutputs")==0) return DiagnosticNumRequestedOutputsEnum;
 	else if (strcmp(name,"DiagnosticViscosityOvershoot")==0) return DiagnosticViscosityOvershootEnum;
+	else if (strcmp(name,"GeometryHydrostaticRatio")==0) return GeometryHydrostaticRatioEnum;
+	else if (strcmp(name,"Thickness")==0) return ThicknessEnum;
+	else if (strcmp(name,"Bed")==0) return BedEnum;
+	else if (strcmp(name,"Bathymetry")==0) return BathymetryEnum;
+	else if (strcmp(name,"Surface")==0) return SurfaceEnum;
 	else if (strcmp(name,"Constraints")==0) return ConstraintsEnum;
 	else if (strcmp(name,"Elements")==0) return ElementsEnum;
@@ -246,6 +251,4 @@
 	else if (strcmp(name,"Adjointz")==0) return AdjointzEnum;
 	else if (strcmp(name,"Adjointp")==0) return AdjointpEnum;
-	else if (strcmp(name,"Bed")==0) return BedEnum;
-	else if (strcmp(name,"Bathymetry")==0) return BathymetryEnum;
 	else if (strcmp(name,"BedSlopeX")==0) return BedSlopeXEnum;
 	else if (strcmp(name,"BedSlopeY")==0) return BedSlopeYEnum;
@@ -282,5 +285,4 @@
 	else if (strcmp(name,"SegmentOnIceShelf")==0) return SegmentOnIceShelfEnum;
 	else if (strcmp(name,"SurfaceArea")==0) return SurfaceAreaEnum;
-	else if (strcmp(name,"Surface")==0) return SurfaceEnum;
 	else if (strcmp(name,"SurfaceSlopeX")==0) return SurfaceSlopeXEnum;
 	else if (strcmp(name,"SurfaceSlopeY")==0) return SurfaceSlopeYEnum;
@@ -288,6 +290,4 @@
 	else if (strcmp(name,"TemperaturePicard")==0) return TemperaturePicardEnum;
 	else if (strcmp(name,"TemperatureOld")==0) return TemperatureOldEnum;
-	else if (strcmp(name,"Thickness")==0) return ThicknessEnum;
-	else if (strcmp(name,"ThicknessCoeff")==0) return ThicknessCoeffEnum;
 	else if (strcmp(name,"Type")==0) return TypeEnum;
 	else if (strcmp(name,"Vel")==0) return VelEnum;
Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 9690)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 9691)
@@ -6485,5 +6485,5 @@
 					double  thickness[6];
 					double  thickness_init[6];
-					double  thickness_coeff[6];
+					double  hydrostatic_ratio[6];
 					double  surface[6];
 					double  bed[6];
@@ -6491,5 +6491,5 @@
 					/*retrieve inputs: */
 					GetParameterListOnVertices(&thickness_init[0],ThicknessEnum);
-					GetParameterListOnVertices(&thickness_coeff[0],ThicknessCoeffEnum);
+					GetParameterListOnVertices(&hydrostatic_ratio[0],GeometryHydrostaticRatioEnum);
 					GetParameterListOnVertices(&bed[0],BedEnum);
 					GetParameterListOnVertices(&surface[0],SurfaceEnum);
@@ -6510,6 +6510,6 @@
 						for (j=0; j<6; j++) {
 						/*  for observed/interpolated/hydrostatic thickness, remove scaling from any hydrostatic thickness  */
-							if     (thickness_coeff[j] >= 0.)
-								thickness[j]=values[j]-(values[j]/thickness_init[j]-1.)*thickness_coeff[j]*surface[j]/(1.-di);
+							if     (hydrostatic_ratio[j] >= 0.)
+								thickness[j]=values[j]-(values[j]/thickness_init[j]-1.)*hydrostatic_ratio[j]*surface[j]/(1.-di);
 						/*  for minimum thickness, don't scale  */
 							else
@@ -6531,5 +6531,5 @@
 						for (j=0; j<6; j++) {
 						/*  for observed thickness, use scaled value  */
-							if     (thickness_coeff[j] >= 0.)
+							if(hydrostatic_ratio[j] >= 0.)
 								thickness[j]=values[j];
 						/*  for minimum thickness, don't scale  */
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 9690)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 9691)
@@ -3777,5 +3777,5 @@
 					double  thickness[3];
 					double  thickness_init[3];
-					double  thickness_coeff[3];
+					double  hydrostatic_ratio[3];
 					double  surface[3];
 					double  bed[3];
@@ -3783,5 +3783,5 @@
 					/*retrieve inputs: */
 					GetParameterListOnVertices(&thickness_init[0],ThicknessEnum);
-					GetParameterListOnVertices(&thickness_coeff[0],ThicknessCoeffEnum);
+					GetParameterListOnVertices(&hydrostatic_ratio[0],GeometryHydrostaticRatioEnum);
 					GetParameterListOnVertices(&bed[0],BedEnum);
 					GetParameterListOnVertices(&surface[0],SurfaceEnum);
@@ -3802,6 +3802,6 @@
 						for (j=0; j<3; j++) {
 						/*  for observed/interpolated/hydrostatic thickness, remove scaling from any hydrostatic thickness  */
-							if     (thickness_coeff[j] >= 0.)
-								thickness[j]=values[j]-(values[j]/thickness_init[j]-1.)*thickness_coeff[j]*surface[j]/(1.-di);
+							if     (hydrostatic_ratio[j] >= 0.)
+								thickness[j]=values[j]-(values[j]/thickness_init[j]-1.)*hydrostatic_ratio[j]*surface[j]/(1.-di);
 						/*  for minimum thickness, don't scale  */
 							else
@@ -3823,5 +3823,5 @@
 						for (j=0; j<3; j++) {
 						/*  for observed thickness, use scaled value  */
-							if     (thickness_coeff[j] >= 0.)
+							if (hydrostatic_ratio[j] >= 0.)
 								thickness[j]=values[j];
 						/*  for minimum thickness, don't scale  */
Index: /issm/trunk/src/m/classes/geometry.m
===================================================================
--- /issm/trunk/src/m/classes/geometry.m	(revision 9691)
+++ /issm/trunk/src/m/classes/geometry.m	(revision 9691)
@@ -0,0 +1,41 @@
+%GEOMETRY class definition
+%
+%   Usage:
+%      geometry=geometry();
+
+classdef geometry
+	properties (SetAccess=public) 
+		surface           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1,'enum',SurfaceEnum);
+		thickness         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1,'enum',ThicknessEnum);
+		bed               = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1,'enum',BedEnum);
+		bathymetry        = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1,'enum',BathymetryEnum);
+		hydrostatic_ratio = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+	end
+	methods
+		function obj = geometry(varargin) % {{{
+			switch nargin
+				case 0
+					obj=setdefaultparameters(obj);
+				case 1
+					in=varargin{1};
+					if (isa(in,'numeric') & in==0),
+						% requesting templates do nothing
+					else
+						error('constructor not supported');
+					end 
+				otherwise
+					error('constructor not supported');
+			end
+		end % }}}
+		function obj = setdefaultparameters(obj) % {{{
+
+			%first, use the defaults provided by the properties definition above. 
+			fieldnames=fields(obj);
+			for i=1:length(fieldnames),
+				fieldname=fieldnames{i};
+				obj.(fieldname)=obj.(fieldname).default;
+			end
+
+		end % }}}
+	end
+end
Index: /issm/trunk/src/m/classes/model/model.m
===================================================================
--- /issm/trunk/src/m/classes/model/model.m	(revision 9690)
+++ /issm/trunk/src/m/classes/model/model.m	(revision 9691)
@@ -38,4 +38,5 @@
 		 diagnostic       = modelfield('default',0,'marshall',true);
 		 initialization   = modelfield('default',0,'marshall',true);
+		 geometry         = modelfield('default',0,'marshall',true);
 
 		 %FIXME: all other fields should belong to other classes
@@ -86,13 +87,4 @@
 		 extractednodes    = modelfield('default',NaN,'marshall',false);
 		 extractedelements = modelfield('default',NaN,'marshall',false);
-
-		 %Materials parameters
-
-		 %Geometrical parameters
-		 surface           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 thickness         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 thickness_coeff   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 bed               = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 bathymetry        = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
 
 		 %Boundary conditions
@@ -351,4 +343,8 @@
 			 if isfield(structmd,'waterfraction'), md.initialization.waterfraction=structmd.waterfraction; end
 			 if isfield(structmd,'watercolumn'), md.initialization.watercolumn=structmd.watercolumn; end
+			 if isfield(structmd,'surface'), md.geometry.surface=structmd.surface; end
+			 if isfield(structmd,'bed'), md.geometry.bed=structmd.bed; end
+			 if isfield(structmd,'bathymetry'), md.geometry.bathymetry=structmd.bathymetry; end
+			 if isfield(structmd,'thickness_coeff'), md.geometry.hydrostatic_ratio=structmd.thickness_coeff; end
 
 			 %Field changes
@@ -478,6 +474,7 @@
 			 md.inversion        = inversion;
 			 md.transient        = transient;
-			 md.diagnostic       =diagnostic;
-			 md.initialization   =initialization;
+			 md.diagnostic       = diagnostic;
+			 md.initialization   = initialization;
+			 md.geometry         = geometry;
 
 			 %Solver parameters
Index: /issm/trunk/src/m/enum/GeometryHydrostaticRatioEnum.m
===================================================================
--- /issm/trunk/src/m/enum/GeometryHydrostaticRatioEnum.m	(revision 9691)
+++ /issm/trunk/src/m/enum/GeometryHydrostaticRatioEnum.m	(revision 9691)
@@ -0,0 +1,11 @@
+function macro=GeometryHydrostaticRatioEnum()
+%GEOMETRYHYDROSTATICRATIOENUM - Enum of GeometryHydrostaticRatio
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
+%            Please read src/c/EnumDefinitions/README for more information
+%
+%   Usage:
+%      macro=GeometryHydrostaticRatioEnum()
+
+macro=StringToEnum('GeometryHydrostaticRatio');
Index: /issm/trunk/src/m/model/DepthAverage.m
===================================================================
--- /issm/trunk/src/m/model/DepthAverage.m	(revision 9690)
+++ /issm/trunk/src/m/model/DepthAverage.m	(revision 9691)
@@ -19,5 +19,5 @@
 		vector_average=vector_average+(project2d(md,vector,i)+project2d(md,vector,i+1))/2.*(project2d(md,md.z,i+1)-project2d(md,md.z,i));
 	end
-	vector_average=vector_average./project2d(md,md.thickness,1);
+	vector_average=vector_average./project2d(md,md.geometry.thickness,1);
 
 %element data
@@ -27,5 +27,5 @@
 		vector_average=vector_average+project2d(md,vector,i).*(project2d(md,md.z,i+1)-project2d(md,md.z,i));
 	end
-	vector_average=vector_average./project2d(md,md.thickness,1);
+	vector_average=vector_average./project2d(md,md.geometry.thickness,1);
 
 else
Index: /issm/trunk/src/m/model/SectionValues.m
===================================================================
--- /issm/trunk/src/m/model/SectionValues.m	(revision 9690)
+++ /issm/trunk/src/m/model/SectionValues.m	(revision 9691)
@@ -94,9 +94,9 @@
 	%Get bed and surface for each 2d point, offset to make sure that it is inside the glacier system
 	offset=10^-3;
-	bed=InterpFromMeshToMesh2d(md.elements2d,md.x2d,md.y2d,project2d(md,md.bed,1),X,Y)+offset;
-	surface=InterpFromMeshToMesh2d(md.elements2d,md.x2d,md.y2d,project2d(md,md.surface,1),X,Y)-offset;
+	bed=InterpFromMeshToMesh2d(md.elements2d,md.x2d,md.y2d,project2d(md,md.geometry.bed,1),X,Y)+offset;
+	surface=InterpFromMeshToMesh2d(md.elements2d,md.x2d,md.y2d,project2d(md,md.geometry.surface,1),X,Y)-offset;
 
 	%Some useful parameters
-	layers=ceil(mean(md.thickness)/res_v);
+	layers=ceil(mean(md.geometry.thickness)/res_v);
 	nodesperlayer=numberofnodes;
 	nodestot=nodesperlayer*layers;
Index: /issm/trunk/src/m/model/ThicknessCorrection.m
===================================================================
--- /issm/trunk/src/m/model/ThicknessCorrection.m	(revision 9690)
+++ /issm/trunk/src/m/model/ThicknessCorrection.m	(revision 9691)
@@ -18,7 +18,7 @@
 
 %initialize thickness with the observations, and get hydrostatic thickness from the dem
-thickness=md.thickness;
-thickness_hydro=md.surface/(1-md.materials.rho_ice/md.materials.rho_water);
-thickness_coeff=zeros(size(md.thickness));
+thickness=md.geometry.thickness;
+thickness_hydro=md.geometry.surface/(1-md.materials.rho_ice/md.materials.rho_water);
+hydrostatic_ratio=zeros(size(md.geometry.thickness));
 
 %get nodes on ice sheet and on ice shelf
@@ -53,5 +53,5 @@
 
 		%if d > 15km, hydrostatic equilibrium
-		thickness_coeff(pos_shelf(i))=1;
+		hydrostatic_ratio(pos_shelf(i))=1;
 		thickness(pos_shelf(i))=thickness_hydro(pos_shelf(i));
 
@@ -59,6 +59,6 @@
 
 		%else: quadratic combination of hydrostatic equilibrium and observations
-		thickness_coeff(pos_shelf(i))=(d/distance)^2;
-		thickness(pos_shelf(i))=(1-thickness_coeff(pos_shelf(i)))*thickness(pos_shelf(i))+thickness_coeff(pos_shelf(i))*thickness_hydro(pos_shelf(i));
+		hydrostatic_ratio(pos_shelf(i))=(d/distance)^2;
+		thickness(pos_shelf(i))=(1-hydrostatic_ratio(pos_shelf(i)))*thickness(pos_shelf(i))+hydrostatic_ratio(pos_shelf(i))*thickness_hydro(pos_shelf(i));
 
 	end
@@ -70,8 +70,8 @@
 pos=find(isnan(thickness) | (thickness<=0));
 thickness(pos)=minth;
-thickness_coeff(pos)=-1;
+hydrostatic_ratio(pos)=-1;
 
 %change bed to take into account the changes in thickness
-md.thickness=thickness;
-md.thickness_coeff=thickness_coeff;
-md.bed=md.surface-md.thickness;
+md.geometry.thickness=thickness;
+md.geometry.hydrostatic_ratio=hydrostatic_ratio;
+md.geometry.bed=md.geometry.surface-md.geometry.thickness;
Index: /issm/trunk/src/m/model/bamg.m
===================================================================
--- /issm/trunk/src/m/model/bamg.m	(revision 9690)
+++ /issm/trunk/src/m/model/bamg.m	(revision 9691)
@@ -46,5 +46,5 @@
 %   Examples:
 %      md=bamg(md,'domain','DomainOutline.exp','hmax',3000);
-%      md=bamg(md,'field',[md.inversion.vel_obs md.thickness],'hmax',20000,'hmin',1000);
+%      md=bamg(md,'field',[md.inversion.vel_obs md.geometry.thickness],'hmax',20000,'hmin',1000);
 %      md=bamg(md,'metric',A,'hmin',1000,'hmax',20000,'gradation',3,'anisomax',1);
 
Index: /issm/trunk/src/m/model/basalstress.m
===================================================================
--- /issm/trunk/src/m/model/basalstress.m	(revision 9690)
+++ /issm/trunk/src/m/model/basalstress.m	(revision 9691)
@@ -18,5 +18,5 @@
 
 %compute basal drag
-bx=(md.constants.g*(md.materials.rho_ice*md.thickness+md.materials.rho_water*md.bed)).^r.*(md.friction.coefficient).^2.*ubx.^s;
-by=(md.constants.g*(md.materials.rho_ice*md.thickness+md.materials.rho_water*md.bed)).^r.*(md.friction.coefficient).^2.*uby.^s;
-b=(md.constants.g*(md.materials.rho_ice*md.thickness+md.materials.rho_water*md.bed)).^r.*(md.friction.coefficient).^2.*ub.^s;
+bx=(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed)).^r.*(md.friction.coefficient).^2.*ubx.^s;
+by=(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed)).^r.*(md.friction.coefficient).^2.*uby.^s;
+b=(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed)).^r.*(md.friction.coefficient).^2.*ub.^s;
Index: /issm/trunk/src/m/model/basevert.m
===================================================================
--- /issm/trunk/src/m/model/basevert.m	(revision 9690)
+++ /issm/trunk/src/m/model/basevert.m	(revision 9691)
@@ -20,6 +20,6 @@
 end
 
-hu=md.thickness.*md.initialization.vx;
-hv=md.thickness.*md.initialization.vy;
+hu=md.geometry.thickness.*md.initialization.vx;
+hv=md.geometry.thickness.*md.initialization.vy;
 
 summation=[1;1;1];
@@ -30,6 +30,6 @@
 velem=md.initialization.vy(md.elements)*summation/3;
 
-dbdx=(md.bed(md.elements).*alpha)*summation;
-dbdy=(md.bed(md.elements).*beta)*summation;
+dbdx=(md.geometry.bed(md.elements).*alpha)*summation;
+dbdy=(md.geometry.bed(md.elements).*beta)*summation;
 
 wb=-md.materials.rho_ice/md.materials.rho_water*(hux+hvy)+uelem.*dbdx+velem.*dbdy;
Index: /issm/trunk/src/m/model/bedslope.m
===================================================================
--- /issm/trunk/src/m/model/bedslope.m	(revision 9690)
+++ /issm/trunk/src/m/model/bedslope.m	(revision 9691)
@@ -22,6 +22,6 @@
 
 summation=[1;1;1];
-bx=(md.bed(index).*alpha)*summation;
-by=(md.bed(index).*beta)*summation;
+bx=(md.geometry.bed(index).*alpha)*summation;
+by=(md.geometry.bed(index).*beta)*summation;
 b=sqrt(bx.^2+by.^2);
 
Index: /issm/trunk/src/m/model/collapse.m
===================================================================
--- /issm/trunk/src/m/model/collapse.m	(revision 9690)
+++ /issm/trunk/src/m/model/collapse.m	(revision 9691)
@@ -80,7 +80,7 @@
 
 %parameters
-md.surface=project2d(md,md.surface,1);
-md.thickness=project2d(md,md.thickness,1);
-md.bed=project2d(md,md.bed,1);
+md.geometry.surface=project2d(md,md.geometry.surface,1);
+md.geometry.thickness=project2d(md,md.geometry.thickness,1);
+md.geometry.bed=project2d(md,md.geometry.bed,1);
 md.nodeonboundary=project2d(md,md.nodeonboundary,1);
 md.mask.elementonfloatingice=project2d(md,md.mask.elementonfloatingice,1);
Index: /issm/trunk/src/m/model/contourmassbalance.m
===================================================================
--- /issm/trunk/src/m/model/contourmassbalance.m	(revision 9690)
+++ /issm/trunk/src/m/model/contourmassbalance.m	(revision 9691)
@@ -30,5 +30,5 @@
 vx=mean(md.initialization.vx(segments(:,1:end-1)),2);
 vy=mean(md.initialization.vy(segments(:,1:end-1)),2);
-H=mean(md.thickness(segments(:,1:end-1)),2);
+H=mean(md.geometry.thickness(segments(:,1:end-1)),2);
 nx=cos(atan2((x(segments(:,1))-x(segments(:,2))) , (y(segments(:,2))-y(segments(:,1)))));
 ny=sin(atan2((x(segments(:,1))-x(segments(:,2))) , (y(segments(:,2))-y(segments(:,1)))));
Index: /issm/trunk/src/m/model/drivingstress.m
===================================================================
--- /issm/trunk/src/m/model/drivingstress.m	(revision 9690)
+++ /issm/trunk/src/m/model/drivingstress.m	(revision 9691)
@@ -12,5 +12,5 @@
 
 %Average thickness over elements
-thickness_bar=(md.thickness(md.elements(:,1))+md.thickness(md.elements(:,2))+md.thickness(md.elements(:,3)))/3;
+thickness_bar=(md.geometry.thickness(md.elements(:,1))+md.geometry.thickness(md.elements(:,2))+md.geometry.thickness(md.elements(:,3)))/3;
 
 px=md.materials.rho_ice*md.constants.g*thickness_bar.*sx;
Index: /issm/trunk/src/m/model/effectivepressure.m
===================================================================
--- /issm/trunk/src/m/model/effectivepressure.m	(revision 9690)
+++ /issm/trunk/src/m/model/effectivepressure.m	(revision 9691)
@@ -8,5 +8,5 @@
 %      Neff=effectivepressure(md)
 
-Neff=md.materials.rho_ice*md.constants.g*md.thickness+md.materials.rho_ice*md.constants.g*md.bed;
+Neff=md.materials.rho_ice*md.constants.g*md.geometry.thickness+md.materials.rho_ice*md.constants.g*md.geometry.bed;
 pos=find(Neff<0);
 Neff(pos)=0;
Index: /issm/trunk/src/m/model/extrude.m
===================================================================
--- /issm/trunk/src/m/model/extrude.m	(revision 9690)
+++ /issm/trunk/src/m/model/extrude.m	(revision 9691)
@@ -67,6 +67,6 @@
 y3d=[];
 z3d=[];  %the lower node is on the bed
-thickness3d=md.thickness; %thickness and bed for these nodes
-bed3d=md.bed;
+thickness3d=md.geometry.thickness; %thickness and bed for these nodes
+bed3d=md.geometry.bed;
 
 %Create the new layers
@@ -197,9 +197,9 @@
 
 %parameters
-md.surface=project3d(md,'vector',md.surface,'type','node');
-md.thickness=project3d(md,'vector',md.thickness,'type','node');
-md.thickness_coeff=project3d(md,'vector',md.thickness_coeff,'type','node');
-md.bed=project3d(md,'vector',md.bed,'type','node');
-md.bathymetry=project3d(md,'vector',md.bathymetry,'type','node');
+md.geometry.surface=project3d(md,'vector',md.geometry.surface,'type','node');
+md.geometry.thickness=project3d(md,'vector',md.geometry.thickness,'type','node');
+md.geometry.hydrostatic_ratio=project3d(md,'vector',md.geometry.hydrostatic_ratio,'type','node');
+md.geometry.bed=project3d(md,'vector',md.geometry.bed,'type','node');
+md.geometry.bathymetry=project3d(md,'vector',md.geometry.bathymetry,'type','node');
 md.nodeonboundary=project3d(md,'vector',md.nodeonboundary,'type','node');
 md.mask.elementonfloatingice=project3d(md,'vector',md.mask.elementonfloatingice,'type','element');
@@ -213,5 +213,5 @@
 %Put lithostatic pressure is there is an existing pressure
 if ~isnan(md.initialization.pressure),
-	md.initialization.pressure=md.constants.g*md.materials.rho_ice*(md.surface-md.z);
+	md.initialization.pressure=md.constants.g*md.materials.rho_ice*(md.geometry.surface-md.z);
 end
 
Index: /issm/trunk/src/m/model/ismodelselfconsistent.m
===================================================================
--- /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 9690)
+++ /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 9691)
@@ -83,5 +83,5 @@
 %NO NAN {{{1
 fields={'numberofelements','numberofnodes','x','y','z','friction.coefficient','friction.p','friction.q',...
-	'materials.rho_ice','materials.rho_water','materials.rheology_B','mask.elementonfloatingice','surface','thickness','bed','constants.g','settings.lowmem','inversion.nsteps','inversion.maxiter_per_step',...
+	'materials.rho_ice','materials.rho_water','materials.rheology_B','mask.elementonfloatingice','geometry.surface','geometry.thickness','geometry.bed','constants.g','settings.lowmem','inversion.nsteps','inversion.maxiter_per_step',...
 	'diagnostic.restol','diagnostic.maxiter','materials.rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface','elementconnectivity'};
 checknan(md,fields);
@@ -89,5 +89,5 @@
 %FIELDS >= 0 {{{1
 fields={'numberofelements','numberofnodes','elements','friction.coefficient','friction.p','friction.q',...
-	'materials.rho_ice','materials.rho_water','materials.rheology_B','mask.elementonfloatingice','thickness','constants.g','diagnostic.restol','diagnostic.maxiter','diagnostic.reltol',...
+	'materials.rho_ice','materials.rho_water','materials.rheology_B','mask.elementonfloatingice','geometry.thickness','constants.g','diagnostic.restol','diagnostic.maxiter','diagnostic.reltol',...
 	'diagnostic.abstol','inversion.nsteps','inversion.maxiter_per_step',...
 	'settings.lowmem','materials.rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface'};
@@ -96,5 +96,5 @@
 %FIELDS > 0 {{{1
 fields={'numberofelements','numberofnodes','elements','friction.p',...
-	'materials.rho_ice','materials.rho_water','materials.rheology_B','thickness','constants.g','diagnostic.maxiter','diagnostic.restol','diagnostic.reltol','diagnostic.abstol','inversion.maxiter_per_step'};
+	'materials.rho_ice','materials.rho_water','materials.rheology_B','geometry.thickness','constants.g','diagnostic.maxiter','diagnostic.restol','diagnostic.reltol','diagnostic.abstol','inversion.maxiter_per_step'};
 checkgreaterstrict(md,fields,0);
 %}}}
@@ -104,5 +104,5 @@
 %}}}
 %SIZE NUMBEROFNODES {{{1
-fields={'x','y','z','materials.rheology_B','friction.coefficient','basalforcings.melting_rate','surface','thickness','bed','nodeonbed','nodeonsurface'};
+fields={'x','y','z','materials.rheology_B','friction.coefficient','basalforcings.melting_rate','geometry.surface','geometry.thickness','geometry.bed','nodeonbed','nodeonsurface'};
 checksize(md,fields,[md.numberofnodes 1]);
 %}}}
@@ -117,5 +117,5 @@
 %}}}
 %THICKNESS = SURFACE - BED {{{1
-if any((md.thickness-md.surface+md.bed)>tolerance),
+if any((md.geometry.thickness-md.geometry.surface+md.geometry.bed)>tolerance),
 	message(['model not consistent: model ' md.miscellaneous.name ' violates the equality thickness=surface-bed!']);
 end
@@ -128,13 +128,13 @@
 		message(['model ' md.miscellaneous.name ' requesting grounding line migration, but grounding line module only implemented for 2d models and parallel runs!']);
 	end
-	if isnan(md.bathymetry),
+	if isnan(md.geometry.bathymetry),
 		message(['model not consistent: model ' md.miscellaneous.name ' requesting grounding line migration, but bathymetry is absent!']);
 	end
 	pos=find(md.mask.vertexongroundedice); 
-	if any(md.bed(pos)-md.bathymetry(pos)),
+	if any(md.geometry.bed(pos)-md.geometry.bathymetry(pos)),
 		message(['model not consistent: model ' md.miscellaneous.name ' bathymetry not equal to bed on grounded ice !']);
 	end
 	pos=find(md.mask.vertexonfloatingice); 
-	if any(md.bathymetry(pos)-md.bed(pos)>tolerance),
+	if any(md.geometry.bathymetry(pos)-md.geometry.bed(pos)>tolerance),
 		message(['model not consistent: model ' md.miscellaneous.name ' bathymetry superior to bed on floating ice !']);
 	end
@@ -244,6 +244,6 @@
 
 	%DIRICHLET IF THICKNESS <= 0
-	if any(md.thickness<=0),
-		pos=find(md.thickness<=0);
+	if any(md.geometry.thickness<=0),
+		pos=find(md.geometry.thickness<=0);
 		if any(isnan(md.balancethickness.spcthickness(pos))),
 			message(['model not consistent: model ' md.miscellaneous.name ' has some nodes with 0 thickness']);
@@ -468,6 +468,6 @@
 			%DIRICHLET IF THICKNESS <= 0
 			%Check the size of prognostic.spcthickness 
-			if any(md.thickness<=0),
-				pos=find(md.thickness<=0);
+			if any(md.geometry.thickness<=0),
+				pos=find(md.geometry.thickness<=0);
 				if any(isnan(md.prognostic.spcthickness(pos))),
 					message(['model not consistent: model ' md.miscellaneous.name ' has some nodes with 0 thickness']);
Index: /issm/trunk/src/m/model/plot/plot_basaldrag.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_basaldrag.m	(revision 9690)
+++ /issm/trunk/src/m/model/plot/plot_basaldrag.m	(revision 9691)
@@ -30,5 +30,5 @@
 
 %compute basal drag
-drag=(max(md.constants.g*(md.materials.rho_ice*md.thickness+md.materials.rho_water*md.bed),0)).^r.*(md.friction.coefficient).^2.*ub.^s/1000;
+drag=(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;
 
 %Figure out if this is a Section plot
Index: /issm/trunk/src/m/model/sia.m
===================================================================
--- /issm/trunk/src/m/model/sia.m	(revision 9690)
+++ /issm/trunk/src/m/model/sia.m	(revision 9691)
@@ -17,5 +17,5 @@
 %Average thickness and B over all elements.
 summer=[1;1;1];
-hel=md.thickness(md.elements)*summer/3;
+hel=md.geometry.thickness(md.elements)*summer/3;
 Bel=md.B(md.elements)*summer/3;
 
Index: /issm/trunk/src/m/model/slope.m
===================================================================
--- /issm/trunk/src/m/model/slope.m	(revision 9690)
+++ /issm/trunk/src/m/model/slope.m	(revision 9691)
@@ -22,6 +22,6 @@
 
 summation=[1;1;1];
-sx=(md.surface(index).*alpha)*summation;
-sy=(md.surface(index).*beta)*summation;
+sx=(md.geometry.surface(index).*alpha)*summation;
+sy=(md.geometry.surface(index).*beta)*summation;
 s=sqrt(sx.^2+sy.^2);
 
Index: /issm/trunk/src/m/model/thicknessevolution.m
===================================================================
--- /issm/trunk/src/m/model/thicknessevolution.m	(revision 9690)
+++ /issm/trunk/src/m/model/thicknessevolution.m	(revision 9691)
@@ -14,5 +14,5 @@
 
 %load some variables 
-H=md.thickness;
+H=md.geometry.thickness;
 vx=md.initialization.vx;
 vy=md.initialization.vy;
Index: /issm/trunk/src/m/utils/Interp/FillHole.m
===================================================================
--- /issm/trunk/src/m/utils/Interp/FillHole.m	(revision 9690)
+++ /issm/trunk/src/m/utils/Interp/FillHole.m	(revision 9691)
@@ -6,5 +6,5 @@
 %
 %   Example:
-%      md.surface=FillHole(md.elements,x,md.y,md.surface)
+%      md.geometry.surface=FillHole(md.elements,x,md.y,md.geometry.surface)
 %
 
Index: /issm/trunk/src/m/utils/Interp/InterpFromFile.m
===================================================================
--- /issm/trunk/src/m/utils/Interp/InterpFromFile.m	(revision 9690)
+++ /issm/trunk/src/m/utils/Interp/InterpFromFile.m	(revision 9691)
@@ -19,5 +19,5 @@
 %
 %   Example:
-%      md.surface=InterpFromFile(md.x,md.y,'surfacefile.mat',0);
+%      md.geometry.surface=InterpFromFile(md.x,md.y,'surfacefile.mat',0);
 %
 %   See also: PLUGVELOCITIES, INTERPFROMGRID, INTERPFROMMESH2D, INTERPFROMMESH3D
Index: /issm/trunk/template
===================================================================
--- /issm/trunk/template	(revision 9690)
+++ /issm/trunk/template	(revision 9691)
@@ -43,22 +43,4 @@
 	  extractedelements
 }}}
-geometry {{{
-	  surface
-	  thickness
-	  bed
-	  bathymetry
-
-	  thickness_coeff -> rename hydrostatic_ratio (change ThicknessCorrection.m accordingly)
-}}}
-initialization{{{
-	vx
-	vy
-	vz
-	vel
-	pressure
-	temperature
-	watercolumn
-	waterfraction
-}}}
 
 %To be completed
Index: /issm/trunk/test/Miscellaneous/Bump/Bump.par
===================================================================
--- /issm/trunk/test/Miscellaneous/Bump/Bump.par	(revision 9690)
+++ /issm/trunk/test/Miscellaneous/Bump/Bump.par	(revision 9691)
@@ -7,9 +7,9 @@
 ymin=min(md.y);
 ymax=max(md.y);
-md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness+10;
-md.surface=md.bed+md.thickness;
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness+height*exp(-((md.x-50000).^2+(md.y-50000).^2)/(4000)^2)+10;
-md.thickness=md.surface-md.bed;
+md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+10;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+height*exp(-((md.x-50000).^2+(md.y-50000).^2)/(4000)^2)+10;
+md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
 md.drag_type=2; %0 none 1 plastic 2 viscous
Index: /issm/trunk/test/Miscellaneous/GJM_test1/SquareShelf.par
===================================================================
--- /issm/trunk/test/Miscellaneous/GJM_test1/SquareShelf.par	(revision 9690)
+++ /issm/trunk/test/Miscellaneous/GJM_test1/SquareShelf.par	(revision 9691)
@@ -6,7 +6,7 @@
 ymin=min(md.y);
 ymax=max(md.y);
-md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 %Materials
Index: /issm/trunk/test/Miscellaneous/connectivity/Square.par
===================================================================
--- /issm/trunk/test/Miscellaneous/connectivity/Square.par	(revision 9690)
+++ /issm/trunk/test/Miscellaneous/connectivity/Square.par	(revision 9691)
@@ -11,7 +11,7 @@
 ymin=min(md.y);
 ymax=max(md.y);
-md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 md.drag_type=2; %0 none 1 plastic 2 viscous
Index: /issm/trunk/test/NightlyRun/test111.m
===================================================================
--- /issm/trunk/test/NightlyRun/test111.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test111.m	(revision 9691)
@@ -6,5 +6,5 @@
 md.cluster=none;
 md.prognostic.stabilization=3;
-md.prognostic.spcthickness=md.thickness;
+md.prognostic.spcthickness=md.geometry.thickness;
 md=solve(md,PrognosticSolutionEnum);
 
Index: /issm/trunk/test/NightlyRun/test1110.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1110.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test1110.m	(revision 9691)
@@ -85,5 +85,5 @@
 	end
 
-	plotmodel(md,'data',PatchToVec(md.results.TransientSolution(end).Surface)-md.surface,'layer',md.numlayers,'sectionvalue','../Exp/ISMIP100000.exp','title','','xlabel','','ylabel','Surface (m)','linewidth',3,'grid','on','unit','km','ylim',[-30 50])
+	plotmodel(md,'data',PatchToVec(md.results.TransientSolution(end).Surface)-md.geometry.surface,'layer',md.numlayers,'sectionvalue','../Exp/ISMIP100000.exp','title','','xlabel','','ylabel','Surface (m)','linewidth',3,'grid','on','unit','km','ylim',[-30 50])
 	if printingflag, 
 		set(gcf,'Color','w')
@@ -124,5 +124,5 @@
 		PatchToVec(result.Vy),...
 		PatchToVec(result.Vz),...
-		PatchToVec(result.Surface)-md.surface,...
+		PatchToVec(result.Surface)-md.geometry.surface,...
 		};
 end
Index: /issm/trunk/test/NightlyRun/test112.m
===================================================================
--- /issm/trunk/test/NightlyRun/test112.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test112.m	(revision 9691)
@@ -6,5 +6,5 @@
 md.cluster=generic('name',oshostname(),'np',3);
 md.prognostic.stabilization=3;
-md.prognostic.spcthickness=md.thickness;
+md.prognostic.spcthickness=md.geometry.thickness;
 md=solve(md,PrognosticSolutionEnum);
 
Index: /issm/trunk/test/NightlyRun/test1205.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1205.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test1205.m	(revision 9691)
@@ -13,6 +13,6 @@
 %Calculation of the analytical 2d velocity field
 constant=0.3;
-vx_obs=constant/2*md.x.*(md.thickness).^-1;
-vy_obs=constant/2*md.y.*(md.thickness).^-1;
+vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
+vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
 vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
 
Index: /issm/trunk/test/NightlyRun/test1206.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1206.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test1206.m	(revision 9691)
@@ -13,6 +13,6 @@
 %Calculation of the analytical 2d velocity field
 constant=0.3;
-vx_obs=constant/2*md.x.*(md.thickness).^-1;
-vy_obs=constant/2*md.y.*(md.thickness).^-1;
+vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
+vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
 vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
 
Index: /issm/trunk/test/NightlyRun/test1207.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1207.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test1207.m	(revision 9691)
@@ -13,6 +13,6 @@
 %Calculation of the analytical 2d velocity field
 constant=0.3;
-vx_obs=constant/2*md.x.*(md.thickness).^-1;
-vy_obs=constant/2*md.y.*(md.thickness).^-1;
+vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
+vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
 vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
 
Index: /issm/trunk/test/NightlyRun/test1303.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1303.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test1303.m	(revision 9691)
@@ -18,5 +18,5 @@
 %d2T/dz2=0 T(bed)=10 T(surface)=0  => T=0*(z-bed)/thickness+10*(surface-z)/thickness
 %each layer of the 3d mesh must have a constant value
-md.initialization.temperature=10*(md.surface-md.z)./md.thickness;
+md.initialization.temperature=10*(md.geometry.surface-md.z)./md.geometry.thickness;
 
 %modeled  results
Index: /issm/trunk/test/NightlyRun/test1304.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1304.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test1304.m	(revision 9691)
@@ -19,5 +19,5 @@
 %the result is linear with depth and is equal to 0 on the upper surface (See BC)
 %d2T/dz2=0  -k*dT/dz(bed)=G  T(surface)=0  => T=-G/k*(z-surface)
-md.initialization.temperature=-0.1/md.thermalconductivity*(md.z-md.surface); %G=0.1 W/m2
+md.initialization.temperature=-0.1/md.thermalconductivity*(md.z-md.geometry.surface); %G=0.1 W/m2
 
 %modeled  results
Index: /issm/trunk/test/NightlyRun/test131.m
===================================================================
--- /issm/trunk/test/NightlyRun/test131.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test131.m	(revision 9691)
@@ -4,5 +4,5 @@
 %Add boundary conditions on thickness on the border
 pos=find(md.nodeonboundary);
-md.balancethickness.spcthickness(pos)=md.thickness(pos);
+md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
 md=setflowequation(md,'macayeal','all');
 md.cluster=none;
Index: /issm/trunk/test/NightlyRun/test132.m
===================================================================
--- /issm/trunk/test/NightlyRun/test132.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test132.m	(revision 9691)
@@ -4,5 +4,5 @@
 %Add boundary conditions on thickness on the border
 pos=find(md.nodeonboundary);
-md.balancethickness.spcthickness(pos)=md.thickness(pos);
+md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
 md=setflowequation(md,'macayeal','all');
 md.cluster=generic('name',oshostname(),'np',3);
Index: /issm/trunk/test/NightlyRun/test133.m
===================================================================
--- /issm/trunk/test/NightlyRun/test133.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test133.m	(revision 9691)
@@ -5,5 +5,5 @@
 %Add boundary conditions on thickness on the border
 pos=find(md.nodeonboundary);
-md.balancethickness.spcthickness(pos)=md.thickness(pos);
+md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
 md=setflowequation(md,'macayeal','all');
 md.cluster=none;
Index: /issm/trunk/test/NightlyRun/test134.m
===================================================================
--- /issm/trunk/test/NightlyRun/test134.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test134.m	(revision 9691)
@@ -5,5 +5,5 @@
 %Add boundary conditions on thickness on the border
 pos=find(md.nodeonboundary);
-md.balancethickness.spcthickness(pos)=md.thickness(pos);
+md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
 md=setflowequation(md,'macayeal','all');
 md.cluster=generic('name',oshostname(),'np',3);
Index: /issm/trunk/test/NightlyRun/test1501.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1501.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test1501.m	(revision 9691)
@@ -21,5 +21,5 @@
 for i=1:10
 	 md=solve(md,PrognosticSolutionEnum);
-	 md.surfaceforcings.mass_balance= md.surfaceforcings.mass_balance - (PatchToVec(md.results.PrognosticSolution.Thickness)-md.thickness);
+	 md.surfaceforcings.mass_balance= md.surfaceforcings.mass_balance - (PatchToVec(md.results.PrognosticSolution.Thickness)-md.geometry.thickness);
 end
 
Index: /issm/trunk/test/NightlyRun/test1502.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1502.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test1502.m	(revision 9691)
@@ -22,5 +22,5 @@
 for i=1:10
 	 md=solve(md,PrognosticSolutionEnum);
-	 md.surfaceforcings.mass_balance= md.surfaceforcings.mass_balance - (PatchToVec(md.results.PrognosticSolution.Thickness)-md.thickness);
+	 md.surfaceforcings.mass_balance= md.surfaceforcings.mass_balance - (PatchToVec(md.results.PrognosticSolution.Thickness)-md.geometry.thickness);
 end
 
Index: /issm/trunk/test/NightlyRun/test233.m
===================================================================
--- /issm/trunk/test/NightlyRun/test233.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test233.m	(revision 9691)
@@ -21,7 +21,7 @@
 
 h=1000;
-md.thickness=h*ones(md.numberofnodes,1);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=h*ones(md.numberofnodes,1);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 %Initial velocity and pressure
@@ -61,5 +61,5 @@
 
 %create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
-%ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.thickness./(4*md.materials.rheology_B)).^3;
+%ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3;
 %vy_c=ey_c.*md.y*md.constants.yts;
 
Index: /issm/trunk/test/NightlyRun/test234.m
===================================================================
--- /issm/trunk/test/NightlyRun/test234.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test234.m	(revision 9691)
@@ -21,7 +21,7 @@
 
 h=1000;
-md.thickness=h*ones(md.numberofnodes,1);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=h*ones(md.numberofnodes,1);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 %Initial velocity and pressure
@@ -61,5 +61,5 @@
 
 %create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
-%ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.thickness./(4*md.materials.rheology_B)).^3;
+%ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3;
 %vy_c=ey_c.*md.y*md.constants.yts;
 
Index: /issm/trunk/test/NightlyRun/test235.m
===================================================================
--- /issm/trunk/test/NightlyRun/test235.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test235.m	(revision 9691)
@@ -18,7 +18,7 @@
 
 h=1000;
-md.thickness=h*ones(md.numberofnodes,1);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=h*ones(md.numberofnodes,1);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 %Initial velocity and pressure
Index: /issm/trunk/test/NightlyRun/test236.m
===================================================================
--- /issm/trunk/test/NightlyRun/test236.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test236.m	(revision 9691)
@@ -18,7 +18,7 @@
 
 h=1000;
-md.thickness=h*ones(md.numberofnodes,1);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=h*ones(md.numberofnodes,1);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 %Initial velocity and pressure
Index: /issm/trunk/test/NightlyRun/test245.m
===================================================================
--- /issm/trunk/test/NightlyRun/test245.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test245.m	(revision 9691)
@@ -3,5 +3,5 @@
 md=parameterize(md,'../Par/SquareShelf.par');
 md=setflowequation(md,'macayeal','all');
-md.bed=md.bed+50; md.surface=md.surface+50;
+md.geometry.bed=md.geometry.bed+50; md.geometry.surface=md.geometry.surface+50;
 md.cluster=none;
 md.prognostic.hydrostatic_adjustment='Incremental';
Index: /issm/trunk/test/NightlyRun/test246.m
===================================================================
--- /issm/trunk/test/NightlyRun/test246.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test246.m	(revision 9691)
@@ -3,5 +3,5 @@
 md=parameterize(md,'../Par/SquareShelf.par');
 md=setflowequation(md,'macayeal','all');
-md.bed=md.bed+50; md.surface=md.surface+50;
+md.geometry.bed=md.geometry.bed+50; md.geometry.surface=md.geometry.surface+50;
 md.cluster=generic('name',oshostname(),'np',3);
 md.prognostic.hydrostatic_adjustment='Incremental';
Index: /issm/trunk/test/NightlyRun/test249.m
===================================================================
--- /issm/trunk/test/NightlyRun/test249.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test249.m	(revision 9691)
@@ -4,5 +4,5 @@
 md=extrude(md,3,1);
 md=setflowequation(md,'pattyn','all');
-md.bed=md.bed+50; md.surface=md.surface+50;
+md.geometry.bed=md.geometry.bed+50; md.geometry.surface=md.geometry.surface+50;
 md.cluster=none;
 md.prognostic.hydrostatic_adjustment='Incremental';
Index: /issm/trunk/test/NightlyRun/test250.m
===================================================================
--- /issm/trunk/test/NightlyRun/test250.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test250.m	(revision 9691)
@@ -4,5 +4,5 @@
 md=extrude(md,3,1);
 md=setflowequation(md,'pattyn','all');
-md.bed=md.bed+50; md.surface=md.surface+50;
+md.geometry.bed=md.geometry.bed+50; md.geometry.surface=md.geometry.surface+50;
 md.cluster=generic('name',oshostname(),'np',3);
 md.prognostic.hydrostatic_adjustment='Incremental';
Index: /issm/trunk/test/NightlyRun/test319.m
===================================================================
--- /issm/trunk/test/NightlyRun/test319.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test319.m	(revision 9691)
@@ -5,5 +5,5 @@
 md=setflowequation(md,'macayeal','all');
 md.prognostic.stabilization=3;
-md.prognostic.spcthickness=md.thickness;
+md.prognostic.spcthickness=md.geometry.thickness;
 md.cluster=none;
 md=solve(md,PrognosticSolutionEnum);
Index: /issm/trunk/test/NightlyRun/test320.m
===================================================================
--- /issm/trunk/test/NightlyRun/test320.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test320.m	(revision 9691)
@@ -5,5 +5,5 @@
 md=setflowequation(md,'macayeal','all');
 md.prognostic.stabilization=3;
-md.prognostic.spcthickness=md.thickness;
+md.prognostic.spcthickness=md.geometry.thickness;
 md.cluster=generic('name',oshostname(),'np',3);
 md=solve(md,PrognosticSolutionEnum);
Index: /issm/trunk/test/NightlyRun/test427.m
===================================================================
--- /issm/trunk/test/NightlyRun/test427.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test427.m	(revision 9691)
@@ -5,5 +5,5 @@
 md.cluster=none;
 md.materials.rho_ice=10^7; %involved in the mass flux, make it easy
-md.thickness(:)=1; %make it easy
+md.geometry.thickness(:)=1; %make it easy
 
 %constrain all velocities to 1 m/yr, in the y-direction
Index: /issm/trunk/test/NightlyRun/test428.m
===================================================================
--- /issm/trunk/test/NightlyRun/test428.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test428.m	(revision 9691)
@@ -5,5 +5,5 @@
 md.cluster=generic('name',oshostname(),'np',3);
 md.materials.rho_ice=10^7; %involved in the mass flux, make it easy
-md.thickness(:)=1; %make it easy
+md.geometry.thickness(:)=1; %make it easy
 
 %constrain all velocities to 1 m/yr, in the y-direction
Index: /issm/trunk/test/NightlyRun/test434.m
===================================================================
--- /issm/trunk/test/NightlyRun/test434.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test434.m	(revision 9691)
@@ -5,5 +5,5 @@
 md.cluster=generic('name',oshostname(),'np',3);
 md.materials.rho_ice=10^7; %involved in the mass flux, make it easy
-md.thickness(:)=1; %make it easy
+md.geometry.thickness(:)=1; %make it easy
 
 %constrain all velocities to 1 m/yr, in the y-direction
Index: /issm/trunk/test/NightlyRun/test446.m
===================================================================
--- /issm/trunk/test/NightlyRun/test446.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test446.m	(revision 9691)
@@ -26,17 +26,17 @@
 rad=sqrt((md.x).*md.x+(md.y).*md.y);
 pos=find(rad<200000);
-md.thickness(pos)=100;
-md.bed(pos)=-di*md.thickness(pos)-20;
-md.surface(pos)=md.bed(pos)+md.thickness(pos);
+md.geometry.thickness(pos)=100;
+md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
+md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
 
 pos=find(md.x<.2*1e6 & md.x>-.2*1e6 & md.y>0);
-md.thickness(pos)=100;
-md.bed(pos)=-di*md.thickness(pos)-20;
-md.surface(pos)=md.bed(pos)+md.thickness(pos);
+md.geometry.thickness(pos)=100;
+md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
+md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
 
 pos=find(md.x<.1*1e6 & md.x>-.1*1e6 & md.y<-.5*1e6 & md.y>-.6*1e6);
-md.thickness(pos)=100;
-md.bed(pos)=-di*md.thickness(pos)-20;
-md.surface(pos)=md.bed(pos)+md.thickness(pos);
+md.geometry.thickness(pos)=100;
+md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
+md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
 %}}}
 
Index: /issm/trunk/test/NightlyRun/test521.m
===================================================================
--- /issm/trunk/test/NightlyRun/test521.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test521.m	(revision 9691)
@@ -4,6 +4,6 @@
 
 %impose hydrostatic equilibrium (required by Stokes)
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 md=extrude(md,3,1);
 md=setflowequation(md,'stokes','all');
Index: /issm/trunk/test/NightlyRun/test522.m
===================================================================
--- /issm/trunk/test/NightlyRun/test522.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test522.m	(revision 9691)
@@ -4,6 +4,6 @@
 
 %impose hydrostatic equilibrium (required by Stokes)
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 md=extrude(md,3,1);
 md=setflowequation(md,'stokes','all');
Index: /issm/trunk/test/NightlyRun/test527.m
===================================================================
--- /issm/trunk/test/NightlyRun/test527.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test527.m	(revision 9691)
@@ -39,5 +39,5 @@
 
 %refine existing mesh 5
-md2=bamg(md,'field',[md.inversion.vy_obs md.thickness],'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'Hessiantype',1,'err',[10 100]); 
+md2=bamg(md,'field',[md.inversion.vy_obs md.geometry.thickness],'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'Hessiantype',1,'err',[10 100]); 
 x7=md2.x;
 y7=md2.y;
Index: /issm/trunk/test/NightlyRun/test603.m
===================================================================
--- /issm/trunk/test/NightlyRun/test603.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test603.m	(revision 9691)
@@ -5,5 +5,5 @@
 md=setflowequation(md,'macayeal','all');
 md.prognostic.stabilization=3;
-md.prognostic.spcthickness=md.thickness;
+md.prognostic.spcthickness=md.geometry.thickness;
 md.cluster=none;
 md=solve(md,PrognosticSolutionEnum);
Index: /issm/trunk/test/NightlyRun/test604.m
===================================================================
--- /issm/trunk/test/NightlyRun/test604.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test604.m	(revision 9691)
@@ -5,5 +5,5 @@
 md=setflowequation(md,'macayeal','all');
 md.prognostic.stabilization=3;
-md.prognostic.spcthickness=md.thickness;
+md.prognostic.spcthickness=md.geometry.thickness;
 md.cluster=generic('name',oshostname(),'np',3);
 md=solve(md,PrognosticSolutionEnum);
Index: /issm/trunk/test/NightlyRun/test621.m
===================================================================
--- /issm/trunk/test/NightlyRun/test621.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test621.m	(revision 9691)
@@ -9,5 +9,5 @@
 md.inversion.iscontrol=1;
 md.inversion.control_parameters={'BalancethicknessThickeningRate'};
-md.inversion.thickness_obs=md.thickness;
+md.inversion.thickness_obs=md.geometry.thickness;
 md.inversion.min_parameters=-50*ones(md.numberofnodes,1);
 md.inversion.max_parameters=50*ones(md.numberofnodes,1);
Index: /issm/trunk/test/NightlyRun/test622.m
===================================================================
--- /issm/trunk/test/NightlyRun/test622.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test622.m	(revision 9691)
@@ -9,5 +9,5 @@
 md.inversion.iscontrol=1;
 md.inversion.control_parameters={'BalancethicknessThickeningRate'};
-md.inversion.thickness_obs=md.thickness;
+md.inversion.thickness_obs=md.geometry.thickness;
 md.inversion.min_parameters=-50*ones(md.numberofnodes,1);
 md.inversion.max_parameters=50*ones(md.numberofnodes,1);
Index: /issm/trunk/test/NightlyRun/test623.m
===================================================================
--- /issm/trunk/test/NightlyRun/test623.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test623.m	(revision 9691)
@@ -10,5 +10,5 @@
 md.inversion.iscontrol=1;
 md.inversion.control_parameters={'BalancethicknessThickeningRate'};
-md.inversion.thickness_obs=md.thickness;
+md.inversion.thickness_obs=md.geometry.thickness;
 md.inversion.min_parameters=-50*ones(md.numberofnodes,1);
 md.inversion.max_parameters=50*ones(md.numberofnodes,1);
Index: /issm/trunk/test/NightlyRun/test624.m
===================================================================
--- /issm/trunk/test/NightlyRun/test624.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test624.m	(revision 9691)
@@ -10,5 +10,5 @@
 md.inversion.iscontrol=1;
 md.inversion.control_parameters={'BalancethicknessThickeningRate'};
-md.inversion.thickness_obs=md.thickness;
+md.inversion.thickness_obs=md.geometry.thickness;
 md.inversion.min_parameters=-50*ones(md.numberofnodes,1);
 md.inversion.max_parameters=50*ones(md.numberofnodes,1);
Index: /issm/trunk/test/NightlyRun/test625.m
===================================================================
--- /issm/trunk/test/NightlyRun/test625.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test625.m	(revision 9691)
@@ -8,10 +8,10 @@
 md=modelextract(md,md.mask.elementongroundedice);
 pos=find(md.nodeonboundary);
-md.balancethickness.spcthickness(pos)=md.thickness(pos);
+md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
 
 %control parameters
-md.inversion.thickness_obs=md.thickness;
+md.inversion.thickness_obs=md.geometry.thickness;
 md.inversion.iscontrol=1;
-md.inversion.thickness_obs=md.thickness;
+md.inversion.thickness_obs=md.geometry.thickness;
 md.inversion.nsteps=2;
 md.inversion.control_parameters={'Vx' 'Vy'};
Index: /issm/trunk/test/NightlyRun/test626.m
===================================================================
--- /issm/trunk/test/NightlyRun/test626.m	(revision 9690)
+++ /issm/trunk/test/NightlyRun/test626.m	(revision 9691)
@@ -8,10 +8,10 @@
 md=modelextract(md,md.mask.elementongroundedice);
 pos=find(md.nodeonboundary);
-md.balancethickness.spcthickness(pos)=md.thickness(pos);
+md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
 
 %control parameters
-md.inversion.thickness_obs=md.thickness;
+md.inversion.thickness_obs=md.geometry.thickness;
 md.inversion.iscontrol=1;
-md.inversion.thickness_obs=md.thickness;
+md.inversion.thickness_obs=md.geometry.thickness;
 md.inversion.nsteps=2;
 md.inversion.control_parameters={'Vx' 'Vy'};
Index: /issm/trunk/test/Par/79North.par
===================================================================
--- /issm/trunk/test/Par/79North.par	(revision 9690)
+++ /issm/trunk/test/Par/79North.par	(revision 9691)
@@ -5,7 +5,7 @@
 md.initialization.vx       =InterpFromMeshToMesh2d(index,x,y,vx,md.x,md.y);
 md.initialization.vy       =InterpFromMeshToMesh2d(index,x,y,vy,md.x,md.y);
-md.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.x,md.y);
-md.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.x,md.y);
-md.bed=md.surface-md.thickness;
+md.geometry.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.x,md.y);
+md.geometry.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.x,md.y);
+md.geometry.bed=md.geometry.surface-md.geometry.thickness;
 clear surface thickness vx vy x y index;
 
@@ -45,6 +45,6 @@
 md=SetMarineIceSheetBC(md);
 pos=find(md.nodeonboundary);
-md.balancethickness.spcthickness(pos)=md.thickness(pos);
-md.prognostic.spcthickness(pos)=md.thickness(pos);
+md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
+md.prognostic.spcthickness(pos)=md.geometry.thickness(pos);
 
 %Change name so that no test have the same name
Index: /issm/trunk/test/Par/ISMIPA.par
===================================================================
--- /issm/trunk/test/Par/ISMIPA.par	(revision 9690)
+++ /issm/trunk/test/Par/ISMIPA.par	(revision 9691)
@@ -2,7 +2,7 @@
 
 disp('      creating thickness');
-md.surface=-md.x*tan(0.5*pi/180);
-md.bed=md.surface-1000+500*sin(md.x*2*pi/max(md.x)).*sin(md.y*2*pi/max(md.x));
-md.thickness=md.surface-md.bed;
+md.geometry.surface=-md.x*tan(0.5*pi/180);
+md.geometry.bed=md.geometry.surface-1000+500*sin(md.x*2*pi/max(md.x)).*sin(md.y*2*pi/max(md.x));
+md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
 disp('      creating drag');
Index: /issm/trunk/test/Par/ISMIPB.par
===================================================================
--- /issm/trunk/test/Par/ISMIPB.par	(revision 9690)
+++ /issm/trunk/test/Par/ISMIPB.par	(revision 9691)
@@ -2,7 +2,7 @@
 
 disp('      creating thickness');
-md.surface=-md.x*tan(0.5*pi/180);
-md.bed=md.surface-1000+500*sin(md.x*2*pi/max(md.x));
-md.thickness=md.surface-md.bed;
+md.geometry.surface=-md.x*tan(0.5*pi/180);
+md.geometry.bed=md.geometry.surface-1000+500*sin(md.x*2*pi/max(md.x));
+md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
 disp('      creating drag');
Index: /issm/trunk/test/Par/ISMIPC.par
===================================================================
--- /issm/trunk/test/Par/ISMIPC.par	(revision 9690)
+++ /issm/trunk/test/Par/ISMIPC.par	(revision 9691)
@@ -2,10 +2,10 @@
 
 disp('      creating thickness');
-md.surface=2000-md.x*tan(0.1*pi/180); %to have z>0
-md.bed=md.surface-1000;
-md.thickness=md.surface-md.bed;
+md.geometry.surface=2000-md.x*tan(0.1*pi/180); %to have z>0
+md.geometry.bed=md.geometry.surface-1000;
+md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
 disp('      creating drag');
-%md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x/2)).*sin(md.y*2*pi/max(md.x/2)))./(md.constants.g*(md.materials.rho_ice*md.thickness+md.materials.rho_water*md.bed)));
+%md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x/2)).*sin(md.y*2*pi/max(md.x/2)))./(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed)));
 md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x)).*sin(md.y*2*pi/max(md.x))));
 %Take care of iceshelves: no basal drag
Index: /issm/trunk/test/Par/ISMIPD.par
===================================================================
--- /issm/trunk/test/Par/ISMIPD.par	(revision 9690)
+++ /issm/trunk/test/Par/ISMIPD.par	(revision 9691)
@@ -2,7 +2,7 @@
 
 disp('      creating thickness');
-md.surface=2000-md.x*tan(0.1*pi/180); %to have z>0
-md.bed=md.surface-1000;
-md.thickness=md.surface-md.bed;
+md.geometry.surface=2000-md.x*tan(0.1*pi/180); %to have z>0
+md.geometry.bed=md.geometry.surface-1000;
+md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
 disp('      creating drag');
Index: /issm/trunk/test/Par/ISMIPE.par
===================================================================
--- /issm/trunk/test/Par/ISMIPE.par	(revision 9690)
+++ /issm/trunk/test/Par/ISMIPE.par	(revision 9691)
@@ -4,6 +4,6 @@
 data=load('../Data/ISMIPE.data','-mat');
 data=data.data;
-md.surface=zeros(md.numberofnodes,1);
-md.bed=zeros(md.numberofnodes,1);
+md.geometry.surface=zeros(md.numberofnodes,1);
+md.geometry.bed=zeros(md.numberofnodes,1);
 for i=1:md.numberofnodes
 	y=md.y(i);
@@ -11,10 +11,10 @@
 	point2=min(point1+1,51);
 	coeff=(y-(point1-1)*100)/100;
-	md.bed(i)=(1-coeff)*data(point1,2)+coeff*data(point2,2);
-	md.surface(i)=(1-coeff)*data(point1,3)+coeff*data(point2,3);
+	md.geometry.bed(i)=(1-coeff)*data(point1,2)+coeff*data(point2,2);
+	md.geometry.surface(i)=(1-coeff)*data(point1,3)+coeff*data(point2,3);
 end
-md.thickness=md.surface-md.bed;
-md.thickness(find(~md.thickness))=0.01;
-md.bed=md.surface-md.thickness;
+md.geometry.thickness=md.geometry.surface-md.geometry.bed;
+md.geometry.thickness(find(~md.geometry.thickness))=0.01;
+md.geometry.bed=md.geometry.surface-md.geometry.thickness;
 
 disp('      creating drag');
Index: /issm/trunk/test/Par/ISMIPF.par
===================================================================
--- /issm/trunk/test/Par/ISMIPF.par	(revision 9690)
+++ /issm/trunk/test/Par/ISMIPF.par	(revision 9691)
@@ -3,8 +3,8 @@
 
 disp('      creating thickness');
-md.surface=-md.x*tan(3*pi/180);
-%md.bed=md.surface-1000;
-md.bed=md.surface-1000+100*exp(-((md.x-max(md.x)/2).^2+(md.y-max(md.y)/2).^2)/(10000^2));
-md.thickness=md.surface-md.bed;
+md.geometry.surface=-md.x*tan(3*pi/180);
+%md.geometry.bed=md.geometry.surface-1000;
+md.geometry.bed=md.geometry.surface-1000+100*exp(-((md.x-max(md.x)/2).^2+(md.y-max(md.y)/2).^2)/(10000^2));
+md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
 disp('      creating drag');
@@ -30,7 +30,7 @@
 pos=find(md.x==min(md.x) | md.x==max(md.x) | md.y==min(md.y) | md.y==max(md.y));
 md.balancethickness.spcthickness=NaN*ones(md.numberofnodes,1);
-md.balancethickness.spcthickness(pos)=md.thickness(pos);
+md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
 md.prognostic.spcthickness=NaN*ones(md.numberofnodes,1);
-md.prognostic.spcthickness(pos)=md.thickness(pos);
+md.prognostic.spcthickness(pos)=md.geometry.thickness(pos);
 md.thermal.spctemperature=255*ones(md.numberofnodes,1);
 md.basalforcings.geothermalflux=0.4*ones(md.numberofnodes,1);
Index: /issm/trunk/test/Par/Pig.par
===================================================================
--- /issm/trunk/test/Par/Pig.par	(revision 9690)
+++ /issm/trunk/test/Par/Pig.par	(revision 9691)
@@ -5,7 +5,7 @@
 md.inversion.vx_obs   =InterpFromMeshToMesh2d(index,x,y,vx_obs,md.x,md.y);
 md.inversion.vy_obs   =InterpFromMeshToMesh2d(index,x,y,vy_obs,md.x,md.y);
-md.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.x,md.y);
-md.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.x,md.y);
-md.bed=md.surface-md.thickness;
+md.geometry.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.x,md.y);
+md.geometry.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.x,md.y);
+md.geometry.bed=md.geometry.surface-md.geometry.thickness;
 clear surface thickness vx_obs vy_obs x y index;
 md.initialization.vx=md.inversion.vx_obs;
Index: /issm/trunk/test/Par/RoundSheetEISMINT.par
===================================================================
--- /issm/trunk/test/Par/RoundSheetEISMINT.par	(revision 9690)
+++ /issm/trunk/test/Par/RoundSheetEISMINT.par	(revision 9691)
@@ -1,7 +1,7 @@
 %Ok, start defining model parameters here
 disp('      creating thickness');
-md.thickness=10*ones(md.numberofnodes,1);
-md.bed=zeros(md.numberofnodes,1);
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=10*ones(md.numberofnodes,1);
+md.geometry.bed=zeros(md.numberofnodes,1);
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 disp('      creating drag');
@@ -29,6 +29,6 @@
 disp('      creating velocities');
 constant=0.3;
-md.inversion.vx_obs=constant/2*md.x.*(md.thickness).^-1;
-md.inversion.vy_obs=constant/2*md.y.*(md.thickness).^-1;
+md.inversion.vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
+md.inversion.vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
 md.inversion.vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
 md.initialization.vx=zeros(md.numberofnodes,1);
Index: /issm/trunk/test/Par/RoundSheetShelf.par
===================================================================
--- /issm/trunk/test/Par/RoundSheetShelf.par	(revision 9690)
+++ /issm/trunk/test/Par/RoundSheetShelf.par	(revision 9691)
@@ -10,26 +10,26 @@
 ymin=min(radius);
 ymax=max(radius);
-md.thickness=hmax+(hmin-hmax)*(radius-ymin)/(ymax-ymin);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
+md.geometry.thickness=hmax+(hmin-hmax)*(radius-ymin)/(ymax-ymin);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
 
 pos=find(md.mask.vertexongroundedice);
-md.bed(pos)=md.bed(pos)-300*(radius(pos)-(rad-shelfextent))/(rad-shelfextent);
-md.surface=md.bed+md.thickness;
+md.geometry.bed(pos)=md.geometry.bed(pos)-300*(radius(pos)-(rad-shelfextent))/(rad-shelfextent);
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 pos=find(radius<200000);
-md.thickness(pos)=100;
-md.bed(pos)=-di*md.thickness(pos)-20;
-md.surface(pos)=md.bed(pos)+md.thickness(pos);
+md.geometry.thickness(pos)=100;
+md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
+md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
 
 
 pos=find(md.x<.2*1e6 & md.x>-.2*1e6 & md.y>0);
-md.thickness(pos)=100;
-md.bed(pos)=-di*md.thickness(pos)-20;
-md.surface(pos)=md.bed(pos)+md.thickness(pos);
+md.geometry.thickness(pos)=100;
+md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
+md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
 
 pos=find(md.x<.1*1e6 & md.x>-.1*1e6 & md.y<-.5*1e6 & md.y>-.6*1e6);
-md.thickness(pos)=100;
-md.bed(pos)=-di*md.thickness(pos)-20;
-md.surface(pos)=md.bed(pos)+md.thickness(pos);
+md.geometry.thickness(pos)=100;
+md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
+md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
 
 %Initial velocity 
@@ -71,6 +71,6 @@
 %bathymetry and grounding line migration:
 md.groundingline.migration='AgressiveMigration';
-md.bathymetry=md.bed;
-pos=find(md.mask.vertexonfloatingice); md.bathymetry(pos)=md.bed(pos)-900;
+md.geometry.bathymetry=md.geometry.bed;
+pos=find(md.mask.vertexonfloatingice); md.geometry.bathymetry(pos)=md.geometry.bed(pos)-900;
 
 %Deal with boundary conditions:
Index: /issm/trunk/test/Par/RoundSheetStaticEISMINT.par
===================================================================
--- /issm/trunk/test/Par/RoundSheetStaticEISMINT.par	(revision 9690)
+++ /issm/trunk/test/Par/RoundSheetStaticEISMINT.par	(revision 9691)
@@ -4,7 +4,7 @@
 radius=(sqrt((md.x).^2+(md.y).^2));
 radiusmax=max(radius);
-md.thickness=hmin*ones(size(md.x,1),1)+hmax*(4*((1/2)^(4/3)*ones(size(md.x,1),1)-((radius)./(2*radiusmax)).^(4/3))).^(3/8);
-md.bed=0*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=hmin*ones(size(md.x,1),1)+hmax*(4*((1/2)^(4/3)*ones(size(md.x,1),1)-((radius)./(2*radiusmax)).^(4/3))).^(3/8);
+md.geometry.bed=0*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 disp('      creating drag');
@@ -34,6 +34,6 @@
 disp('      creating velocities');
 constant=0.3;
-md.inversion.vx_obs=constant/2*md.x.*(md.thickness).^-1;
-md.inversion.vy_obs=constant/2*md.y.*(md.thickness).^-1;
+md.inversion.vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
+md.inversion.vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
 md.inversion.vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
 md.initialization.vx=zeros(md.numberofnodes,1);
Index: /issm/trunk/test/Par/SquareEISMINT.par
===================================================================
--- /issm/trunk/test/Par/SquareEISMINT.par	(revision 9690)
+++ /issm/trunk/test/Par/SquareEISMINT.par	(revision 9691)
@@ -4,7 +4,7 @@
 ymin=min(md.y);
 ymax=max(md.y);
-md.thickness=500*ones(md.numberofnodes,1);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=500*ones(md.numberofnodes,1);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 disp('      creating drag');
Index: /issm/trunk/test/Par/SquareSheetConstrained.par
===================================================================
--- /issm/trunk/test/Par/SquareSheetConstrained.par	(revision 9690)
+++ /issm/trunk/test/Par/SquareSheetConstrained.par	(revision 9691)
@@ -6,7 +6,7 @@
 ymin=min(md.y);
 ymax=max(md.y);
-md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness+20;
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+20;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 %Initial velocity 
Index: /issm/trunk/test/Par/SquareSheetShelf.par
===================================================================
--- /issm/trunk/test/Par/SquareSheetShelf.par	(revision 9690)
+++ /issm/trunk/test/Par/SquareSheetShelf.par	(revision 9691)
@@ -6,10 +6,10 @@
 ymin=min(md.y);
 ymax=max(md.y);
-md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
+md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
 bed_sheet=-md.materials.rho_ice/md.materials.rho_water*(hmax+(hmin-hmax)*(ymax/2-ymin)/(ymax-ymin));
 pos=find(md.y<=ymax/2);
-md.bed(pos)=bed_sheet;
-md.surface=md.bed+md.thickness;
+md.geometry.bed(pos)=bed_sheet;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 %Initial velocity 
Index: /issm/trunk/test/Par/SquareShelf.par
===================================================================
--- /issm/trunk/test/Par/SquareShelf.par	(revision 9690)
+++ /issm/trunk/test/Par/SquareShelf.par	(revision 9691)
@@ -6,7 +6,7 @@
 ymin=min(md.y);
 ymax=max(md.y);
-md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 %Initial velocity and pressure
Index: /issm/trunk/test/Par/SquareShelfConstrained.par
===================================================================
--- /issm/trunk/test/Par/SquareShelfConstrained.par	(revision 9690)
+++ /issm/trunk/test/Par/SquareShelfConstrained.par	(revision 9691)
@@ -6,7 +6,7 @@
 ymin=min(md.y);
 ymax=max(md.y);
-md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
-md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 %Initial velocity 
Index: /issm/trunk/test/Par/SquareThermal.par
===================================================================
--- /issm/trunk/test/Par/SquareThermal.par	(revision 9690)
+++ /issm/trunk/test/Par/SquareThermal.par	(revision 9691)
@@ -5,7 +5,7 @@
 disp('      creating thickness');
 h=1000;
-md.thickness=h*ones(md.numberofnodes,1);
-md.bed=-1000*ones(md.numberofnodes,1);
-md.surface=md.bed+md.thickness;
+md.geometry.thickness=h*ones(md.numberofnodes,1);
+md.geometry.bed=-1000*ones(md.numberofnodes,1);
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
 
 disp('      creating velocities');
