Index: /issm/trunk-jpl/src/m/classes/qmu.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/qmu.m	(revision 25085)
+++ /issm/trunk-jpl/src/m/classes/qmu.m	(revision 25086)
@@ -105,4 +105,36 @@
 			end
 
+			%go through variables, and check that we have normal uncertains first, then uniform uncertains 
+			%and finally histogram_bin_uncertain. Indeed, dakota will order them this way, and when we send 
+			%partitions for scaled variables, they better show up in the order dakota is feeding them to us 
+			%in InputUpdateFromDakotax!
+			fv=fieldnames(self.variables); classlist={};
+			for i=1:length(fv),
+				classlist{i}=class(self.variables.(fv{i}));
+			end
+			classlist
+			n=0; u=0; h=0;
+			for i=1:length(classlist),
+				if strcmpi(classlist{i},'normal_uncertain')
+					if (u~=0 | h~=0),
+						error('normal_uncertain variables should be declared before uniform and histogram_bin uncertain variables');
+					else
+						n=1;
+					end
+				end
+				if strcmpi(classlist{i},'uniform_uncertain')
+					if  (h~=0),
+						error('uniform_uncertain variables should be declared before histogram_bin uncertain variables');
+					else
+						u=1;
+					end
+				end
+				if strcmpi(classlist{i},'histogram_bin_uncertain')
+					h=1;
+				end
+
+			end
+
+
 		end % }}}
 		function disp(self) % {{{
