Index: /issm/trunk/src/m/utils/Nightly/testscheckmisfit.m
===================================================================
--- /issm/trunk/src/m/utils/Nightly/testscheckmisfit.m	(revision 1020)
+++ /issm/trunk/src/m/utils/Nightly/testscheckmisfit.m	(revision 1020)
@@ -0,0 +1,17 @@
+function result=testscheckmisfit(misfit),
+%TESTSCHECKMISFIT- check the misfit requested 
+%
+%   This routine is used by nightly runs (runme.m and updatearchive.m).
+%   to be sure that the misfit resquested is consistent with the model type.
+%   It returns 1 of the misfit is consistent, 0 else.
+%   The misfit must be a string.
+%
+%   Usage:
+%      result=testscheckmisfit(misfit)
+%
+%   Example:
+%      result=testscheckmisfit('absolute')
+%
+%   See also: TESTSGETANALYSIS, TESTGETPACKAGE, TESTSCHECKSOLUTION
+
+result=ismember({misfit}{'absolute','relative','logarithmic'};
Index: /issm/trunk/src/m/utils/Nightly/testschecksolution.m
===================================================================
--- /issm/trunk/src/m/utils/Nightly/testschecksolution.m	(revision 1020)
+++ /issm/trunk/src/m/utils/Nightly/testschecksolution.m	(revision 1020)
@@ -0,0 +1,21 @@
+function result=testschecksolution(mdtype,solution),
+%TESTSCHECKSOLUTION - check the solution requested 
+%
+%   This routine is used by nightly runs (runme.m and updatearchive.m).
+%   to be sure that the solution resquested is consistent with the model type.
+%   It returns 1 of the solution is consistent, 0 else.
+%   The solution must be a string.
+%
+%   Usage:
+%      result=testschecksolution(mdtype,solution)
+%
+%   Example:
+%      result=testschecksolution(md.type,'prognostic')
+%
+%   See also: TESTSGETANALYSIS, TESTGETPACKAGE, TESTSCHECKMISFIT
+
+if strcmpi(mdtype,'2d')
+	result=ismember({solution}{'diagnostic','prognostic','transient'};
+elseif strcmpi(mdtype,'3d')
+	result=ismember({solution}{'diagnostic','prognostic','transient','thermalsteady','thermaltransient'};
+end
