Index: /issm/trunk/etc/cluster.rc
===================================================================
--- /issm/trunk/etc/cluster.rc	(revision 3145)
+++ /issm/trunk/etc/cluster.rc	(revision 3146)
@@ -26,4 +26,5 @@
 cluster_executionpath=/work00/edw/larour/Execution
 cluster_login=larour
+cluster_port=0
 
 cluster_name=mustang
@@ -31,4 +32,5 @@
 cluster_executionpath=/proj/ice/larour/Testing_ice/Execution
 cluster_login=larour
+cluster_port=0
 
 cluster_name=metro
@@ -36,4 +38,5 @@
 cluster_executionpath=/home/larour/Testing/Execution
 cluster_login=larour
+cluster_port=0
 
 cluster_name=wilkes
@@ -41,4 +44,5 @@
 cluster_executionpath=/u/astrid-r1b/larour/Testing/Execution
 cluster_login=larour
+cluster_port=0
 
 cluster_name=astrid
@@ -46,4 +50,5 @@
 cluster_executionpath=/u/astrid-r1b/larour/Testing/Execution
 cluster_login=larour
+cluster_port=0
 
 cluster_name=larsen
@@ -51,4 +56,5 @@
 cluster_executionpath=/u/astrid-r1b/larour/Testing/Execution
 cluster_login=larour
+cluster_port=0
 
 cluster_name=gemini
@@ -56,4 +62,5 @@
 cluster_executionpath=/workg/edw/larour/Testing/Execution
 cluster_login=larour
+cluster_port=0
 
 cluster_name=castor
@@ -61,4 +68,5 @@
 cluster_executionpath=/workc/edw/larour/Testing/Execution
 cluster_login=larour
+cluster_port=0
 
 cluster_name=greenplanet
@@ -66,4 +74,5 @@
 cluster_executionpath=/home/elarour/Testing/Execution
 cluster_login=larour
+cluster_port=0
 
 cluster_name=pollux
@@ -71,4 +80,5 @@
 cluster_executionpath=/workp/edw/larour/Testing/Execution
 cluster_login=larour
+cluster_port=0
 
 cluster_name=pfe
@@ -76,4 +86,5 @@
 cluster_executionpath=/nobackup/elarour/Testing
 cluster_login=elarour
+cluster_port=1025
 
 cluster_name=mearas
@@ -81,4 +92,5 @@
 cluster_executionpath=/proj/ice/larour/Testing/Execution
 cluster_login=larour
+cluster_port=0
 
 
Index: /issm/trunk/src/m/classes/public/queue/BuildQueueingScriptGeneric.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/BuildQueueingScriptGeneric.m	(revision 3145)
+++ /issm/trunk/src/m/classes/public/queue/BuildQueueingScriptGeneric.m	(revision 3146)
@@ -24,3 +24,4 @@
 end
 
+
 fclose(fid);
Index: /issm/trunk/src/m/classes/public/queue/ClusterLaunchCommand.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/ClusterLaunchCommand.m	(revision 3146)
+++ /issm/trunk/src/m/classes/public/queue/ClusterLaunchCommand.m	(revision 3146)
@@ -0,0 +1,24 @@
+function command=ClusterLaunchCommand(cluster,name,executionpath)
+%CLUSTERLAUNCHCOMMAND: build command to launch job on cluster
+%
+%    Usage: command=ClusterLaunchCommand(cluster,executionpath)
+
+
+%if cluster is current hostname, just source queue file
+if strcmpi(oshostname(),cluster),
+	command=['cd ' executionpath ' && source ' name '.queue '];
+else
+	if strcmpi(cluster,'cosmos'),
+		command=['cd ' executionpath ' && qsub -S/bin/sh ' name '.queue '];
+	elseif strcmpi(cluster,'gemini'),
+		command=['cd ' executionpath ' && qsub ' name '.queue '];
+	elseif strcmpi(cluster,'pollux'),
+		command=['cd ' executionpath ' && qsub ' name '.queue '];
+	elseif strcmpi(cluster,'castor'),
+		command=['cd ' executionpath ' && qsub ' name '.queue '];
+	elseif strcmpi(cluster,'pfe'),
+		command=['cd ' executionpath ' && qsub ' name '.queue '];
+	else
+		error('ClusterLaunchCommand error message: unknown cluster command');
+	end
+end
Index: /issm/trunk/src/m/classes/public/queue/ClusterParameters.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/ClusterParameters.m	(revision 3146)
+++ /issm/trunk/src/m/classes/public/queue/ClusterParameters.m	(revision 3146)
@@ -0,0 +1,115 @@
+function [cluster_codepath cluster_executionpath cluster_login cluster_port]=ClusterParameters(cluster_name,cluster_rc_location)
+%CLUSTERPARAMETERS - from cluster_name, find out cluster parameters in cluster.rc file
+%
+%   This function reads through the cluster_rc_location file  for cluster settings (name,  
+%   code location, execution directory) used to run parallel solution sequences
+%
+%   Usage:
+%      [cluster_codepath cluster_executionpath cluster_login ]=ClusterParameters(cluster_name,cluster_rc_location)
+
+lines_per_cluster=5;
+
+%open cluster.rc file
+
+fid=fopen(cluster_rc_location);
+if fid==-1,
+	error('Could not find cluster.rc file in delivery directory');
+end
+
+found=0;
+
+%Read first line and check it starts with begin. 
+line=fgetl(fid);
+if ~strcmp(line,'begin'),
+	error('cluster.rc file in delivery directory should always start with the begin statement');
+end
+
+%Read until we find the end statement. 
+while 1
+	line=fgetl(fid);
+	
+	%Check for 'end' statement
+	if strcmp(line,'end'),
+		break;
+	end 
+	%Check for end of file
+	if ~ischar(line),
+		error('cluster.rc file in delivery directory should end with an end statement');
+	end
+	%Ignore empty lines
+	if length(line)==0,
+		continue;
+	end
+	%Ignore comments
+	if strcmp(line(1),'#'),
+		continue
+	end
+
+	%Handle cluster name: 
+	if length(line)>12,
+		if strcmp(line(1:12),'cluster_name'),
+			%ok, the next 3 lines deal with one cluster settings.
+			%check if this is the cluster we are looking for.
+			splittedstring=strsplit(line,'=');
+			this_cluster_name=splittedstring{2};
+			if strcmp(this_cluster_name,cluster_name),
+
+				%Get next line for cluster code path
+				line=fgetl(fid);
+				splittedstring=strsplit(line,'=');
+				descriptor=splittedstring{1};
+				value=splittedstring{2};
+				if ~strcmp(descriptor,'cluster_codepath'),
+					error('cluster settings in cluster.rc don''t follow the correct syntax');
+				end
+				cluster_codepath=value;
+				found=1;
+				
+				
+				%Get next line for cluster execution path
+				line=fgetl(fid);
+				splittedstring=strsplit(line,'=');
+				descriptor=splittedstring{1};
+				value=splittedstring{2};
+				if ~strcmp(descriptor,'cluster_executionpath'),
+					error('cluster settings in cluster.rc don''t follow the correct syntax');
+				end
+				cluster_executionpath=value;
+
+				%Get next line for cluster loging name
+				line=fgetl(fid);
+				splittedstring=strsplit(line,'=');
+				descriptor=splittedstring{1};
+				value=splittedstring{2};
+				if ~strcmp(descriptor,'cluster_login'),
+					error('cluster settings in cluster.rc don''t follow the correct syntax');
+				end
+				cluster_login=value;
+
+				%Get next line for cluster port
+				line=fgetl(fid);
+				splittedstring=strsplit(line,'=');
+				descriptor=splittedstring{1};
+				value=splittedstring{2};
+				if ~strcmp(descriptor,'cluster_port'),
+					error('cluster settings in cluster.rc don''t follow the correct syntax');
+				end
+				cluster_port=str2num(value);
+			else
+				%Wrong cluster name, skip next lines_per_cluster lines and continue;
+				for i=1:lines_per_cluster,
+					line=fgetl(fid);
+				end
+				continue;
+			end
+		end
+	end
+end
+
+fclose(fid);
+
+if found==0,
+	error(['ClusterParameters error message: could not find setting for cluster ' cluster_name ' in cluster.rc file']);
+end
+
+end %close of function
Index: /issm/trunk/src/m/classes/public/queue/LaunchQueueJob.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/LaunchQueueJob.m	(revision 3145)
+++ /issm/trunk/src/m/classes/public/queue/LaunchQueueJob.m	(revision 3146)
@@ -1,21 +1,40 @@
-function md=LaunchQueueJob(md,executionpath,options,login)
-%LAUNCHQUEUEJOB - ...
+function md=LaunchQueueJob(md,executionpath,login,port,options)
+%LAUNCHQUEUEJOB- Launch queue script for cluster
 %
 %   Usage:
-%      LaunchQueueJob(md,executionpath)
+%      md=LaunchQueueJob(md,executionpath,launchcommand,login,port,options)
 
-%First try and figure out if there is a special script for thie particular cluster
-function_name=['LaunchQueueJob' md.cluster];
 
-%some specific treatment of identical cluster, gemini, castor and pollux
-if strcmpi(md.cluster,'castor') || strcmpi(md.cluster,'pollux'),
-	function_name='LaunchQueueJobgemini';
+%first, check we have the binary file and the queueing script
+if ~exist([ md.name '.bin'],'file'),
+	error('LaunchQueueJobcosmos error message: Binary input file missing, cannot go forward');
 end
 
-if exist(function_name,'file'),
-	%Call this function:
-	eval(['md=' function_name '(md,executionpath,options,login);']);
+if ~exist([ md.name '.queue'],'file'),
+	error('LaunchQueueJobcosmos error message: queueing script missing, cannot go forward');
+end
+
+if md.qmu_analysis,
+	if ~exist([ md.name '.qmu.in'],'file'),
+		error('LaunchQueueJobcosmos error message: missing dakota input file, cannot go forward');
+	end
+end
+
+if ~strcmpi(options.batch,'yes'),
+	
+	%what files are we sending?
+	packages={[md.name '.bin'],[md.name '.queue']};
+	if md.qmu_analysis,
+		packages{end+1}=[md.name '.qmu.in'];
+	end
+
+	disp('uploading input file and queueing script');
+	issmscpout(md.cluster,executionpath,login,port,packages);
+
+	disp('launching solution sequence on remote cluster');
+	issmssh(md.cluster,login,port,ClusterLaunchCommand(md.cluster,md.name,executionpath));
+
 else
-	%Call the generic LaunchQueueJob:
-	md=LaunchQueueJobGeneric(md,executionpath,options,login);
+	disp('batch mode requested: not launching job interactively');
+	disp('launch solution sequence on remote cluster by hand');
 end
Index: sm/trunk/src/m/classes/public/queue/LaunchQueueJobGeneric.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/LaunchQueueJobGeneric.m	(revision 3145)
+++ 	(revision )
@@ -1,34 +1,0 @@
-function md=LaunchQueueJobGeneric(md,executionpath,options,login)
-%LAUNCHQUEUEJOBGENERIC - Generic routine to launch queueing job
-%
-%   Usage:
-%      LaunchQueueJobGeneric(md,executionpath)
-
-%first, check we have the binary file and the queueing script
-if ~exist([ md.name '.bin'],'file'),
-	error('LaunchQueueJobGeneric error message: Binary input file missing, cannot go forward');
-end
-
-if ~exist([ md.name '.queue'],'file'),
-	error('LaunchQueueJobGeneric error message: queueing script issing, cannot go forward');
-end
-
-if ~strcmpi(options.batch,'yes'),
-
-	%what files are we sending?
-	packages={[md.name '.bin'],[md.name '.queue']};
-	if md.qmu_analysis,
-		packages{end+1}=[md.name '.qmu.in'];
-	end
-
-	disp('uploading input file and queueing script');
-	scpout(md.cluster,executionpath,packages);
-	
-	disp('launching solution sequence on remote cluster');
-	issmssh(md.cluster,login,['cd ' executionpath ' && source ' md.name '.queue ']);
-
-else
-	disp('batch mode requested: not launching job interactively');
-	disp(['launch solution sequence by copying files ' md.name '.bin' ',' md.name '.queue and ' md.name '.qmu.in, onto remote cluster ' md.cluster]);
-	disp(['   then log int ' md.cluster ' and source queue file ' md.name '.queue']);
-end
Index: sm/trunk/src/m/classes/public/queue/LaunchQueueJobcosmos.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/LaunchQueueJobcosmos.m	(revision 3145)
+++ 	(revision )
@@ -1,32 +1,0 @@
-function md=LaunchQueueJobcosmos(md,executionpath,options,login)
-%LAUNCHQUEUEJOBCOSMOS- Launch queue script for Cosmos cluster
-%
-%   Usage:
-%      LaunchQueueJobcosmos(md,executionpath)
-
-%first, check we have the binary file and the queueing script
-if ~exist([ md.name '.bin'],'file'),
-	error('LaunchQueueJobcosmos error message: Binary input file missing, cannot go forward');
-end
-
-if ~exist([ md.name '.queue'],'file'),
-	error('LaunchQueueJobcosmos error message: queueing script issing, cannot go forward');
-end
-
-%jpload both files to cluster
-if ~strcmpi(options.batch,'yes'),
-	disp('uploading input file,  queueing script and variables script');
-	if md.qmu_analysis, 
-		system(['scp ' md.name '.bin' ' ' md.name '.queue '  md.name '.qmu.in ' md.cluster ':' executionpath]);
-	else
-		system(['scp ' md.name '.bin' ' ' md.name '.queue '  md.cluster ':' executionpath]);
-	end
-
-	disp('launching solution sequence on remote cluster');
-	issmssh(md.cluster,login,['"cd ' executionpath ' && qsub -S/bin/sh ' md.name '.queue "']);
-else
-	disp('batch mode requested: not launching job interactively');
-
-	%new gemini cannot launch across cluster using ssh
-	disp(['launch solution sequence on remote cluster by logging into it and typing qsub -S/bin/sh ' md.name '.queue']);
-end
Index: sm/trunk/src/m/classes/public/queue/LaunchQueueJobgemini.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/LaunchQueueJobgemini.m	(revision 3145)
+++ 	(revision )
@@ -1,32 +1,0 @@
-function md=LaunchQueueJobgemini(md,executionpath,options,login)
-%LAUNCHQUEUEJOBGEMINI - Launch queueing script on Gemini cluster
-%
-%   Usage:
-%      LaunchQueueJobgemini(md,executionpath)
-
-%first, check we have the binary file and the queueing script
-if ~exist([ md.name '.bin'],'file'),
-	error('LaunchQueueJobgemini error message: Binary input file missing, cannot go forward');
-end
-
-if ~exist([ md.name '.queue'],'file'),
-	error('LaunchQueueJobgemini error message: queueing script issing, cannot go forward');
-end
-
-%jpload both files to cluster
-if ~strcmpi(options.batch,'yes'),
-	disp('uploading input file,  queueing script and variables script');
-	if md.qmu_analysis, 
-		system(['scp ' md.name '.bin' ' ' md.name '.queue '  md.name '.qmu.in ' md.cluster ':' executionpath]);
-	else
-		system(['scp ' md.name '.bin' ' ' md.name '.queue '  md.cluster ':' executionpath]);
-	end
-	
-	disp('launching solution sequence on remote cluster');
-	issmssh(md.cluster,login,['"cd ' executionpath ' && qsub ' md.name '.queue "']);
-else
-	disp('batch mode requested: not launching job interactively');
-
-	%new gemini cannot launch across cluster using ssh
-	disp(['launch solution sequence on remote cluster by logging into it and typing qsub < ' md.name '.queue']);
-end
Index: sm/trunk/src/m/classes/public/queue/LaunchQueueJobgreenplanet.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/LaunchQueueJobgreenplanet.m	(revision 3145)
+++ 	(revision )
@@ -1,29 +1,0 @@
-function md=LaunchQueueJobgreenplanet(md,executionpath,options,login)
-%LAUNCHQUEUEJOBGEMINI - ...
-%
-%   Usage:
-%      LaunchQueueJobgreenplanet(md,executionpath)
-
-%first, check we have the binary file and the queueing script
-if ~exist([ md.name '.bin'],'file'),
-	error('LaunchQueueJobgreenplanet error message: Binary input file missing, cannot go forward');
-end
-
-if ~exist([ md.name '.queue'],'file'),
-	error('LaunchQueueJobgreenplanet error message: queueing script issing, cannot go forward');
-end
-
-%jpload both files to cluster
-if ~strcmpi(options.batch,'yes'),
-	disp('uploading input file,  queueing script and variables script');
-	if md.qmu_analysis, 
-		system(['scp -P 1025 -o HostKeyAlias=huey.jpl.nasa.gov ' md.name '.bin' ' ' md.name '.queue '  md.name '.qmu.in elarour@localhost:' executionpath]);
-	else
-		system(['scp -P 1025 -o HostKeyAlias=huey.jpl.nasa.gov ' md.name '.bin' ' ' md.name '.queue elarour@localhost:' executionpath ]);
-	end
-else
-	disp('batch mode requested: not launching job interactively');
-end
-
-%new greenplanet cannot launch across cluster using ssh
-disp(['launch solution sequence on remote cluster by logging into it and typing qsub < ' md.name '.queue']);
Index: sm/trunk/src/m/classes/public/queue/LaunchQueueJobpfe.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/LaunchQueueJobpfe.m	(revision 3145)
+++ 	(revision )
@@ -1,32 +1,0 @@
-function md=LaunchQueueJobpfe(md,executionpath,options,login)
-%LAUNCHQUEUEJOBPFE - Launch queueing script on Gemini cluster
-%
-%   Usage:
-%      LaunchQueueJobpfe(md,executionpath)
-
-%first, check we have the binary file and the queueing script
-if ~exist([ md.name '.bin'],'file'),
-	error('LaunchQueueJobpfe error message: Binary input file missing, cannot go forward');
-end
-
-if ~exist([ md.name '.queue'],'file'),
-	error('LaunchQueueJobpfe error message: queueing script issing, cannot go forward');
-end
-
-%jpload both files to cluster
-if ~strcmpi(options.batch,'yes'),
-	disp('uploading input file,  queueing script and variables script');
-	if md.qmu_analysis, 
-		system(['scp ' md.name '.bin' ' ' md.name '.queue '  md.name '.qmu.in ' login '@' md.cluster ':' executionpath]);
-	else
-		system(['scp ' md.name '.bin' ' ' md.name '.queue '  login '@' md.cluster ':' executionpath]);
-	end
-	
-	disp('launching solution sequence on remote cluster');
-	issmssh(md.cluster,login,['"cd ' executionpath ' && qsub ' md.name '.queue "']);
-else
-	disp('batch mode requested: not launching job interactively');
-
-	%new pfe cannot launch across cluster using ssh
-	disp(['launch solution sequence on remote cluster by logging into it and typing qsub < ' md.name '.queue']);
-end
Index: /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobGeneric.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobGeneric.m	(revision 3146)
+++ /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobGeneric.m	(revision 3146)
@@ -0,0 +1,34 @@
+function md=LaunchQueueJobGeneric(md,executionpath,options,login,port)
+%LAUNCHQUEUEJOBGENERIC - Generic routine to launch queueing job
+%
+%   Usage:
+%      LaunchQueueJobGeneric(md,executionpath)
+
+%first, check we have the binary file and the queueing script
+if ~exist([ md.name '.bin'],'file'),
+	error('LaunchQueueJobGeneric error message: Binary input file missing, cannot go forward');
+end
+
+if ~exist([ md.name '.queue'],'file'),
+	error('LaunchQueueJobGeneric error message: queueing script issing, cannot go forward');
+end
+
+if ~strcmpi(options.batch,'yes'),
+
+	%what files are we sending?
+	packages={[md.name '.bin'],[md.name '.queue']};
+	if md.qmu_analysis,
+		packages{end+1}=[md.name '.qmu.in'];
+	end
+
+	disp('uploading input file and queueing script');
+	scpout(md.cluster,executionpath,packages);
+	
+	disp('launching solution sequence on remote cluster');
+	issmssh(md.cluster,login,port,['cd ' executionpath ' && source ' md.name '.queue ']);
+
+else
+	disp('batch mode requested: not launching job interactively');
+	disp(['launch solution sequence by copying files ' md.name '.bin' ',' md.name '.queue and ' md.name '.qmu.in, onto remote cluster ' md.cluster]);
+	disp(['   then log int ' md.cluster ' and source queue file ' md.name '.queue']);
+end
Index: /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobcosmos.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobcosmos.m	(revision 3146)
+++ /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobcosmos.m	(revision 3146)
@@ -0,0 +1,32 @@
+function md=LaunchQueueJobcosmos(md,executionpath,options,login)
+%LAUNCHQUEUEJOBCOSMOS- Launch queue script for Cosmos cluster
+%
+%   Usage:
+%      LaunchQueueJobcosmos(md,executionpath)
+
+%first, check we have the binary file and the queueing script
+if ~exist([ md.name '.bin'],'file'),
+	error('LaunchQueueJobcosmos error message: Binary input file missing, cannot go forward');
+end
+
+if ~exist([ md.name '.queue'],'file'),
+	error('LaunchQueueJobcosmos error message: queueing script issing, cannot go forward');
+end
+
+%jpload both files to cluster
+if ~strcmpi(options.batch,'yes'),
+	disp('uploading input file,  queueing script and variables script');
+	if md.qmu_analysis, 
+		system(['scp ' md.name '.bin' ' ' md.name '.queue '  md.name '.qmu.in ' md.cluster ':' executionpath]);
+	else
+		system(['scp ' md.name '.bin' ' ' md.name '.queue '  md.cluster ':' executionpath]);
+	end
+
+	disp('launching solution sequence on remote cluster');
+	issmssh(md.cluster,login,['"cd ' executionpath ' && qsub -S/bin/sh ' md.name '.queue "']);
+else
+	disp('batch mode requested: not launching job interactively');
+
+	%new gemini cannot launch across cluster using ssh
+	disp(['launch solution sequence on remote cluster by logging into it and typing qsub -S/bin/sh ' md.name '.queue']);
+end
Index: /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobgemini.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobgemini.m	(revision 3146)
+++ /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobgemini.m	(revision 3146)
@@ -0,0 +1,32 @@
+function md=LaunchQueueJobgemini(md,executionpath,options,login)
+%LAUNCHQUEUEJOBGEMINI - Launch queueing script on Gemini cluster
+%
+%   Usage:
+%      LaunchQueueJobgemini(md,executionpath)
+
+%first, check we have the binary file and the queueing script
+if ~exist([ md.name '.bin'],'file'),
+	error('LaunchQueueJobgemini error message: Binary input file missing, cannot go forward');
+end
+
+if ~exist([ md.name '.queue'],'file'),
+	error('LaunchQueueJobgemini error message: queueing script issing, cannot go forward');
+end
+
+%jpload both files to cluster
+if ~strcmpi(options.batch,'yes'),
+	disp('uploading input file,  queueing script and variables script');
+	if md.qmu_analysis, 
+		system(['scp ' md.name '.bin' ' ' md.name '.queue '  md.name '.qmu.in ' md.cluster ':' executionpath]);
+	else
+		system(['scp ' md.name '.bin' ' ' md.name '.queue '  md.cluster ':' executionpath]);
+	end
+	
+	disp('launching solution sequence on remote cluster');
+	issmssh(md.cluster,login,['"cd ' executionpath ' && qsub ' md.name '.queue "']);
+else
+	disp('batch mode requested: not launching job interactively');
+
+	%new gemini cannot launch across cluster using ssh
+	disp(['launch solution sequence on remote cluster by logging into it and typing qsub < ' md.name '.queue']);
+end
Index: /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobgreenplanet.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobgreenplanet.m	(revision 3146)
+++ /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobgreenplanet.m	(revision 3146)
@@ -0,0 +1,29 @@
+function md=LaunchQueueJobgreenplanet(md,executionpath,options,login)
+%LAUNCHQUEUEJOBGEMINI - ...
+%
+%   Usage:
+%      LaunchQueueJobgreenplanet(md,executionpath)
+
+%first, check we have the binary file and the queueing script
+if ~exist([ md.name '.bin'],'file'),
+	error('LaunchQueueJobgreenplanet error message: Binary input file missing, cannot go forward');
+end
+
+if ~exist([ md.name '.queue'],'file'),
+	error('LaunchQueueJobgreenplanet error message: queueing script issing, cannot go forward');
+end
+
+%jpload both files to cluster
+if ~strcmpi(options.batch,'yes'),
+	disp('uploading input file,  queueing script and variables script');
+	if md.qmu_analysis, 
+		system(['scp -P 1025 -o HostKeyAlias=huey.jpl.nasa.gov ' md.name '.bin' ' ' md.name '.queue '  md.name '.qmu.in elarour@localhost:' executionpath]);
+	else
+		system(['scp -P 1025 -o HostKeyAlias=huey.jpl.nasa.gov ' md.name '.bin' ' ' md.name '.queue elarour@localhost:' executionpath ]);
+	end
+else
+	disp('batch mode requested: not launching job interactively');
+end
+
+%new greenplanet cannot launch across cluster using ssh
+disp(['launch solution sequence on remote cluster by logging into it and typing qsub < ' md.name '.queue']);
Index: /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobpfe.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobpfe.m	(revision 3146)
+++ /issm/trunk/src/m/classes/public/queue/old/LaunchQueueJobpfe.m	(revision 3146)
@@ -0,0 +1,32 @@
+function md=LaunchQueueJobpfe(md,executionpath,options,login)
+%LAUNCHQUEUEJOBPFE - Launch queueing script on Gemini cluster
+%
+%   Usage:
+%      LaunchQueueJobpfe(md,executionpath)
+
+%first, check we have the binary file and the queueing script
+if ~exist([ md.name '.bin'],'file'),
+	error('LaunchQueueJobpfe error message: Binary input file missing, cannot go forward');
+end
+
+if ~exist([ md.name '.queue'],'file'),
+	error('LaunchQueueJobpfe error message: queueing script issing, cannot go forward');
+end
+
+%jpload both files to cluster
+if ~strcmpi(options.batch,'yes'),
+	disp('uploading input file,  queueing script and variables script');
+	if md.qmu_analysis, 
+		system(['scp ' md.name '.bin' ' ' md.name '.queue '  md.name '.qmu.in ' login '@' md.cluster ':' executionpath]);
+	else
+		system(['scp ' md.name '.bin' ' ' md.name '.queue '  login '@' md.cluster ':' executionpath]);
+	end
+	
+	disp('launching solution sequence on remote cluster');
+	issmssh(md.cluster,login,['"cd ' executionpath ' && qsub ' md.name '.queue "']);
+else
+	disp('batch mode requested: not launching job interactively');
+
+	%new pfe cannot launch across cluster using ssh
+	disp(['launch solution sequence on remote cluster by logging into it and typing qsub < ' md.name '.queue']);
+end
