Index: /issm/trunk/src/m/utils/Nightly/testsgetanalysis.m
===================================================================
--- /issm/trunk/src/m/utils/Nightly/testsgetanalysis.m	(revision 517)
+++ /issm/trunk/src/m/utils/Nightly/testsgetanalysis.m	(revision 517)
@@ -0,0 +1,37 @@
+function [analysis_type sub_analysis_type]=testsgetanalys(string),
+%TESTSGETANALYSIS - build the analysis type and sub analysis type from a string
+%
+%   This routine is used by nightly runs (runme.m and updatearchive.m).
+%   for an input string 'thermalsteady', it will output [thermal steady]
+%
+%   Usage:
+%      [analysis_type sub_analysis_type]=testsgetanalysis(string)
+%
+%   Example:
+%      [analysis_type sub_analysis_type]=testsgetanalysis('diagnostic');
+%
+%   See also: TESTSGETPACKAGE, TESTSGETFIELDS
+
+if strcmpi(string,'diagnostic'),
+	analysis_type='diagnostic';
+	sub_analysis_type='';
+
+elseif strcmpi(string,'prognostic'),
+	analysis_type='prognostic';
+	sub_analysis_type='';
+
+elseif strcmpi(string,'thermalsteady'),
+	analysis_type='thermal';
+	sub_analysis_type='steady';
+
+elseif strcmpi(string,'thermaltransient'),
+	analysis_type='thermal';
+	sub_analysis_type='transient';
+
+elseif strcmpi(string,'transient'),
+	analysis_type='transient';
+	sub_analysis_type='';
+
+else
+	error(['testsgetanalysis error message: solution '  string ' not supported yet']);
+end
Index: /issm/trunk/src/m/utils/Nightly/testsgetfields.m
===================================================================
--- /issm/trunk/src/m/utils/Nightly/testsgetfields.m	(revision 517)
+++ /issm/trunk/src/m/utils/Nightly/testsgetfields.m	(revision 517)
@@ -0,0 +1,40 @@
+function fields=testsgetfields(mdtype,string),
+%TESTSGETfields - build the fields to be checked from a string
+%
+%   This routine is used by nightly runs (runme.m and updatearchive.m).
+%   for an input string 'prognostic', it will output 'cielo'
+%
+%   Usage:
+%      fields=testsgetfields(mdtype,string)
+%
+%   Example:
+%      fields=testsgetfields(md.type,'diagnostic')
+%
+%   See also: TESTSGETANALYSIS, TESTGETPACKAGE
+
+if strcmpi(string,'diagnostic'),
+	if strcmpi(mdtype,'3d')
+		fields={'vy','vz'};
+	else
+		fields={'vel'};
+	end
+
+elseif strcmpi(string,'thermalsteady'),
+	fields={'temperature','melting'};
+
+elseif strcmpi(string,'thermaltransient'),
+	fields={'thermaltransient_results(end).temperature','thermaltransient_results(end).melting'};
+
+elseif strcmpi(string,'prognostic'),
+	fields={'new_thickness'};
+
+elseif strcmpi(string,'transient'), 
+	if strcmpi(mdtype,'3d')
+		fields={'transient_results(end).vy','transient_results(end).vz','transient_results(end).temperature','transient_results(end).melting','transient_results(end).thickness'};
+	else
+		fields={'transient_results(end).vel','transient_results(end).thickness'};
+	end
+
+else
+	error(['testsgetfields error message: solution '  string ' not supported yet']);
+end
Index: /issm/trunk/src/m/utils/Nightly/testsgetpackage.m
===================================================================
--- /issm/trunk/src/m/utils/Nightly/testsgetpackage.m	(revision 517)
+++ /issm/trunk/src/m/utils/Nightly/testsgetpackage.m	(revision 517)
@@ -0,0 +1,31 @@
+function [md package]=testsgetpackage(md,string),
+%TESTSGETPACKAGE - build the package from a string
+%
+%   This routine is used by nightly runs (runme.m and updatearchive.m).
+%   for an input string 'cielo_serial', it will output 'cielo'
+%
+%   Usage:
+%      [md package]=testsgetpackage(md,string)
+%
+%   Example:
+%      [md package]=testsgetpackage(md,'cielo_serial')
+%
+%   See also: TESTSGETANALYSIS, TESTSGETFIELDS
+
+if strcmpi(string,'ice'),
+	package='ice';
+
+elseif strcmpi(string,'macayal'),
+	package='macayeal';
+
+elseif strcmpi(string,'cielo_serial'),
+	package='cielo';
+	md.cluster='none';
+
+elseif strcmpi(string,'cielo_parallel'),
+	package='cielo';
+	md.cluster='wilkes';
+
+else
+	error(['testsgetpackage error message: package '  package ' not supported yet']);
+end
