Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 24749)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 24750)
@@ -1084,5 +1084,5 @@
 	else this->hnodes = NULL;
 	this->hvertices->configure(verticesin);
-	this->hmaterial->configure(materialsin);
+	if(this->hmaterial) this->hmaterial->configure(materialsin);
 
 	/*Now, go pick up the objects inside the hooks: */
@@ -1090,5 +1090,5 @@
 	else this->nodes=NULL;
 	this->vertices = (Vertex**)this->hvertices->deliverp();
-	this->material = (Material*)this->hmaterial->delivers();
+	if(this->hmaterial)this->material = (Material*)this->hmaterial->delivers();
 
 	/*point parameters to real dataset: */
Index: /issm/trunk-jpl/src/c/classes/IoModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 24749)
+++ /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 24750)
@@ -644,4 +644,5 @@
 					if(strcmp(record_name,"md.hydrology.model")==0) integer = IoCodeToEnumHydrology(integer);
 					if(strcmp(record_name,"md.materials.type")==0) integer = IoCodeToEnumMaterials(integer);
+					if(strcmp(record_name,"md.materials.nature")==0) integer = IoCodeToEnumNature(integer);
 					if(strcmp(record_name,"md.timestepping.type")==0) integer = IoCodeToEnumTimestepping(integer);
 					if(strcmp(record_name,"md.amr.type")==0) integer = IoCodeToEnumAmr(integer);
Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp	(revision 24749)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp	(revision 24750)
@@ -171,5 +171,5 @@
 			//make sure materials that are not tied to elements come last:  for now, only Matlitho qualifies.
 			for(int i=0;i<nnat;i++){ 
-				if (IoCodeToEnumMaterials(nature[i])==MatlithoEnum){
+				if (IoCodeToEnumNature(nature[i])==MatlithoEnum){
 					int temp=nature[nnat-1];
 					nature[nnat-1]=nature[i];
@@ -180,5 +180,5 @@
 			//go through list of materials, and create them: 
 			for(int i=0;i<nnat;i++){ 
-				switch(IoCodeToEnumMaterials(nature[i])){ //{{{
+				switch(IoCodeToEnumNature(nature[i])){ //{{{
 					case MaticeEnum:
 						iomodel->FetchDataToInput(inputs2,elements,"md.materials.rheology_B",MaterialsRheologyBEnum);
@@ -199,4 +199,36 @@
 						materials->AddObject(new Matlitho(materials->Size()+1,iomodel));
 						iomodel->DeleteData(9,"md.materials.radius","md.materials.viscosity","md.materials.lame_lambda","md.materials.lame_mu","md.materials.burgers_viscosity","md.materials.burgers_mu","md.materials.isburgers","md.materials.issolid","md.materials.density");
+						break;
+
+					case MathydroEnum:
+						{
+							/*If we don't have any materials pointed to by elements (meaning, if we are running only litho or hydro), 
+							 * then we need to zero out the hmaterial pointers inside the elements dataset so that it won't error out 
+							 * during configuration: */
+							bool isice=false;
+							for (int j=0;j<nnat;j++){
+								if((IoCodeToEnumNature(nature[i])==MaticeEnum)||
+										(IoCodeToEnumNature(nature[i])==MatenhancediceEnum)||
+										(IoCodeToEnumNature(nature[i])==MatestarEnum)||
+										(IoCodeToEnumNature(nature[i])==MatdamageiceEnum)){
+									isice=true; break; }
+							}
+							if (!isice){
+								/*go through elements, and zero the hmaterials pointers: */
+								for(int j=0;j<elements->Size();j++){
+									Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(j));
+									switch(element->ObjectEnum()){
+										case TriaEnum: 
+											{
+												Tria* tria= xDynamicCast<Tria*>(element);
+												tria->hmaterial=NULL;
+											}
+											break;
+										default: 
+											_error_("Not implemented yet");
+									}
+								}
+							}
+						}
 						break;
 
@@ -252,5 +284,5 @@
 
 					default:
-						_error_("Materials "<<EnumToStringx(IoCodeToEnumMaterials(nature[i]))<<" not supported");
+						_error_("Materials nature type "<<EnumToStringx(IoCodeToEnumNature(nature[i]))<<" not supported");
 
 				} //}}}
Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 24749)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 24750)
@@ -341,5 +341,5 @@
 			iomodel->FetchData(&nature,&nnat,&dummy,"md.materials.nature");
 			for(int i=0;i<nnat;i++){
-				switch(IoCodeToEnumMaterials(nature[i])){
+				switch(IoCodeToEnumNature(nature[i])){
 					case MatlithoEnum:
 						break;
@@ -374,4 +374,9 @@
 						parameters->AddObject(iomodel->CopyConstantObject("md.materials.earth_density",MaterialsEarthDensityEnum));
 						break;
+					case MathydroEnum:
+						parameters->AddObject(iomodel->CopyConstantObject("md.materials.rho_ice",MaterialsRhoIceEnum));
+						parameters->AddObject(iomodel->CopyConstantObject("md.materials.rho_water",MaterialsRhoSeawaterEnum));
+						parameters->AddObject(iomodel->CopyConstantObject("md.materials.earth_density",MaterialsEarthDensityEnum));
+						break;
 				}
 			}
Index: /issm/trunk-jpl/src/c/shared/Enum/Enum.vim
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/Enum.vim	(revision 24749)
+++ /issm/trunk-jpl/src/c/shared/Enum/Enum.vim	(revision 24750)
@@ -1150,4 +1150,5 @@
 syn keyword cConstant MaticeEnum
 syn keyword cConstant MatlithoEnum
+syn keyword cConstant MathydroEnum
 syn keyword cConstant MatrixParamEnum
 syn keyword cConstant MaxAbsVxEnum
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 24749)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 24750)
@@ -1150,4 +1150,5 @@
 	MaticeEnum,
 	MatlithoEnum,
+	MathydroEnum,
 	MatrixParamEnum,
 	MaxAbsVxEnum,
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 24749)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 24750)
@@ -1152,4 +1152,5 @@
 		case MaticeEnum : return "Matice";
 		case MatlithoEnum : return "Matlitho";
+		case MathydroEnum : return "Mathydro";
 		case MatrixParamEnum : return "MatrixParam";
 		case MaxAbsVxEnum : return "MaxAbsVx";
Index: /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 24749)
+++ /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 24750)
@@ -1179,4 +1179,5 @@
 	      else if (strcmp(name,"Matice")==0) return MaticeEnum;
 	      else if (strcmp(name,"Matlitho")==0) return MatlithoEnum;
+	      else if (strcmp(name,"Mathydro")==0) return MathydroEnum;
 	      else if (strcmp(name,"MatrixParam")==0) return MatrixParamEnum;
 	      else if (strcmp(name,"MaxAbsVx")==0) return MaxAbsVxEnum;
@@ -1243,9 +1244,9 @@
 	      else if (strcmp(name,"ProfilingCurrentFlops")==0) return ProfilingCurrentFlopsEnum;
 	      else if (strcmp(name,"ProfilingCurrentMem")==0) return ProfilingCurrentMemEnum;
-	      else if (strcmp(name,"ProfilingSolutionTime")==0) return ProfilingSolutionTimeEnum;
          else stage=11;
    }
    if(stage==11){
-	      if (strcmp(name,"Regionaloutput")==0) return RegionaloutputEnum;
+	      if (strcmp(name,"ProfilingSolutionTime")==0) return ProfilingSolutionTimeEnum;
+	      else if (strcmp(name,"Regionaloutput")==0) return RegionaloutputEnum;
 	      else if (strcmp(name,"Regular")==0) return RegularEnum;
 	      else if (strcmp(name,"RecoveryAnalysis")==0) return RecoveryAnalysisEnum;
Index: /issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.cpp	(revision 24749)
+++ /issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.cpp	(revision 24750)
@@ -262,7 +262,18 @@
 		case 3: return MaticeEnum;
 		case 4: return MatenhancediceEnum;
-		case 5: return MatlithoEnum;
-		case 6: return MaterialsEnum;
+		case 5: return MaterialsEnum;
 		default: _error_("Marshalled materials code \""<<enum_in<<"\" not supported yet");
+	}
+}/*}}}*/
+int IoCodeToEnumNature(int enum_in){/*{{{*/
+	switch(enum_in){
+		case 1: return MatdamageiceEnum;
+		case 2: return MatestarEnum;
+		case 3: return MaticeEnum;
+		case 4: return MatenhancediceEnum;
+		case 5: return MaterialsEnum;
+		case 6: return MatlithoEnum;
+		case 7: return MathydroEnum;
+		default: _error_("Marshalled materials nature code \""<<enum_in<<"\" not supported yet");
 	}
 }/*}}}*/
Index: /issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.h	(revision 24749)
+++ /issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.h	(revision 24750)
@@ -10,4 +10,5 @@
 int IoCodeToEnumHydrology(int enum_in);
 int IoCodeToEnumMaterials(int enum_in);
+int IoCodeToEnumNature(int enum_in);
 int IoCodeToEnumTimestepping(int enum_in);
 int IoCodeToEnumAmr(int enum_in);
Index: /issm/trunk-jpl/src/m/classes/materials.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/materials.m	(revision 24749)
+++ /issm/trunk-jpl/src/m/classes/materials.m	(revision 24750)
@@ -19,6 +19,6 @@
 			%check this is acceptable: 
 			for i=1:length(self.nature),
-				if ~(strcmpi(self.nature{i},'litho') | strcmpi(self.nature{i},'ice')), 
-					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'')');
+				if ~(strcmpi(self.nature{i},'litho') | strcmpi(self.nature{i},'ice') | strcmpi(self.nature{i},'hydro')), 
+					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'' or ''hydro'')');
 				end
 			end
@@ -55,6 +55,10 @@
 					self.addprop('density');
 					self.addprop('issolid');
-				otherwise
-					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'')');
+				case 'hydro'
+					self.addprop('rho_ice');
+					self.addprop('rho_water');
+					self.addprop('earth_density');
+				otherwise
+					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'' or ''hydro'')');
 				end
 			end
@@ -126,6 +130,15 @@
 					self.issolid=[1;1]; % is layer solid or liquid.
 
-				otherwise
-					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'')');
+				case 'hydro'
+					%ice density (kg/m^3)
+					self.rho_ice=917.;
+
+					%ocean water density (kg/m^3)
+					self.rho_water=1023.;
+					%SLR
+					self.earth_density= 5512;  % average density of the Earth, (kg/m^3)
+
+				otherwise
+					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'' or ''hydro'')');
 				end
 			end
@@ -166,6 +179,12 @@
 					fielddisplay(self,'density','array describing each layer''s density (numlayers) [kg/m^3]');
 					fielddisplay(self,'issolid','array describing whether the layer is solid or liquid (default 1) (numlayers)');
-				otherwise
-					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'')');
+				case 'hydro'
+					disp(sprintf('   \nHydro:'));
+					fielddisplay(self,'rho_ice','ice density [kg/m^3]');
+					fielddisplay(self,'rho_water','ocean water density [kg/m^3]');
+					fielddisplay(self,'earth_density','Mantle density [kg/m^-3]');
+
+				otherwise
+					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'' or ''hydro'')');
 				end
 			end
@@ -209,6 +228,12 @@
 							error(['Fluid layers detected at layers #', num2str(ind'), ', but having 2 or more adjacent fluid layers is not supported yet. Consider merging them.'])
 					end
-				otherwise
-					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'')');
+
+				case 'hydro'
+					md = checkfield(md,'fieldname','materials.rho_ice','>',0);
+					md = checkfield(md,'fieldname','materials.rho_water','>',0);
+					md = checkfield(md,'fieldname','materials.earth_density','>',0,'numel',1);
+
+				otherwise
+					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'' or ''hydro'')');
 				end
 			end
@@ -218,6 +243,6 @@
 
 			%1: MatdamageiceEnum 2: MatestarEnum 3: MaticeEnum 4: MatenhancediceEnum 5: MaterialsEnum 
-			WriteData(fid,prefix,'name','md.materials.type','data',6,'format','Integer');
 			WriteData(fid,prefix,'name','md.materials.nature','data',naturetointeger(self.nature),'format','IntMat','mattype',3);
+			WriteData(fid,prefix,'name','md.materials.type','data',5,'format','Integer'); %DANGER, this can evolve if you have classes. 
 
 			for i=1:length(self.nature),
@@ -251,6 +276,11 @@
 					WriteData(fid,prefix,'object',self,'class','materials','fieldname','burgers_viscosity','format','DoubleMat','mattype',3); 
 					WriteData(fid,prefix,'object',self,'class','materials','fieldname','burgers_mu','format','DoubleMat','mattype',3); 
-				otherwise
-					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'')');
+				case 'hydro'
+					WriteData(fid,prefix,'object',self,'class','materials','fieldname','rho_ice','format','Double');
+					WriteData(fid,prefix,'object',self,'class','materials','fieldname','rho_water','format','Double');
+					WriteData(fid,prefix,'object',self,'class','materials','fieldname','earth_density','format','Double');
+
+				otherwise
+					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'' or ''hydro'')');
 				end
 			end
@@ -299,6 +329,12 @@
 					writejsdouble(fid,[modelname '.materials.burgers_viscosity'],self.burgers_viscosity); 
 					writejsdouble(fid,[modelname '.materials.burgers_mu'],self.burgers_mu); 
-				otherwise
-					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'')');
+
+				case 'hydro'
+					writejsdouble(fid,[modelname '.materials.rho_ice'],self.rho_ice);
+					writejsdouble(fid,[modelname '.materials.rho_water'],self.rho_water);
+					writejsdouble(fid,[modelname '.materials.earth_density'],self.earth_density);
+
+				otherwise
+					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'' or ''hydro'')');
 				end
 			end
@@ -313,5 +349,5 @@
 			for i=1:length(strnat),
 				switch strnat{i},
-				case 'damageice'
+					case 'damageice'
 					intnat(i)=1; 
 				case 'estar'
@@ -321,9 +357,13 @@
 				case 'enhancedice'
 					intnat(i)=4; 
-				case 'litho'
-					intnat(i)=5;
-				otherwise
-					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'')');
-				end
-			end
-		end % }}}
+				%case 'materials' %this case will never happen, kept to ensure equivalent of codes between IoCodeToMaterialsEnumm and IoCodeToNatureEnum
+				%	intnat(i)=5; 
+				case 'litho'
+					intnat(i)=6;
+				case 'hydro'
+					intnat(i)=7;
+				otherwise
+					error('materials constructor error message: nature of the material not supported yet! (''ice'' or ''litho'' or ''hydro'')');
+				end
+			end
+		end % }}}
Index: /issm/trunk-jpl/test/NightlyRun/test2002.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test2002.m	(revision 24749)
+++ /issm/trunk-jpl/test/NightlyRun/test2002.m	(revision 24750)
@@ -54,15 +54,9 @@
 md.slr.ocean_area_scaling=0;
 
-%geometry
-di=md.materials.rho_ice/md.materials.rho_water;
-md.geometry.thickness=ones(md.mesh.numberofvertices,1);
-md.geometry.surface=(1-di)*zeros(md.mesh.numberofvertices,1);
-md.geometry.base=md.geometry.surface-md.geometry.thickness;
-md.geometry.bed=md.geometry.base;
+%Geometry for the bed, arbitrary: 
+md.geometry.bed=-ones(md.mesh.numberofvertices,1);
 
-%materials
-md.initialization.temperature=273.25*ones(md.mesh.numberofvertices,1);
-md.materials.rheology_B=paterson(md.initialization.temperature);
-md.materials.rheology_n=3*ones(md.mesh.numberofelements,1);
+%Materials: 
+md.materials=materials('hydro');
 
 %New stuff
