Index: /issm/trunk/src/m/classes/model.m
===================================================================
--- /issm/trunk/src/m/classes/model.m	(revision 9077)
+++ /issm/trunk/src/m/classes/model.m	(revision 9078)
@@ -372,4 +372,17 @@
 			 end
 		 end% }}}
+		 function temp = template() % {{{
+
+			 %Get default fields
+			 md=model(0);
+			 modelprops=properties('model');
+
+			 %build output
+			 temp=struct();
+			 for i=1:length(modelprops),
+				 temp.(modelprops{i})=md.(modelprops{i});
+			 end
+
+		 end% }}}
 	 end
 	 methods
Index: /issm/trunk/src/m/model/marshall.m
===================================================================
--- /issm/trunk/src/m/model/marshall.m	(revision 9077)
+++ /issm/trunk/src/m/model/marshall.m	(revision 9078)
@@ -17,5 +17,5 @@
 
 %automatically marshall model md, using template information available from an empty model class.
-template=struct(model(0));
+template=model.template();
 fields=fieldnames(template);
 for i=1:length(fields),
