Index: /issm/trunk/src/m/classes/@modellist/display.m
===================================================================
--- /issm/trunk/src/m/classes/@modellist/display.m	(revision 2912)
+++ /issm/trunk/src/m/classes/@modellist/display.m	(revision 2912)
@@ -0,0 +1,16 @@
+function display(mds)
+%DISPLAY - display the fields of a model list
+%
+%   echo function for 'modellist' class
+	
+disp(sprintf('\n%s = \n',inputname(1)));
+
+%name
+if isempty(mds.name), disp(sprintf('   Name:      N/A')); else disp(sprintf('   Name:      %s',mds.name)); end
+disp(sprintf('   Number of models: %i',size(mds.models,1)));
+if isempty(mds.cluster), disp(sprintf('   Cluster:      N/A')); else disp(sprintf('   Cluster:   %s',mds.cluster)); end
+if isempty(mds.queue), disp(sprintf('   Queue:      N/A')); else disp(sprintf('   Queue:     %s',mds.queue)); end
+if isempty(mds.time), disp(sprintf('   Time:      N/A')); else disp(sprintf('   Time:      %i',mds.time)); end
+if ~isnan(mds.np),
+	disp(sprintf('   np:        %i',mds.np));
+end
Index: /issm/trunk/src/m/classes/@modellist/get.m
===================================================================
--- /issm/trunk/src/m/classes/@modellist/get.m	(revision 2912)
+++ /issm/trunk/src/m/classes/@modellist/get.m	(revision 2912)
@@ -0,0 +1,22 @@
+function val = get(a, propName)
+%GET - gets model propertie from a specified object ans returns the value
+% 
+%   Usage:
+%      val = get(a, propName)
+
+switch propName
+case 'numberofelements'
+	val = a.numberofelements;
+case 'numberofgrids'
+	val = a.numberofgrids;
+case 'elements' 
+	val = a.elements;
+case 'x' 
+	val = a.x;
+case 'y' 
+	val = a.y;
+case 'z' 
+	val = a.z;
+otherwise
+	error(['get error message: ' propName,' is not a valid model property'])
+end
Index: /issm/trunk/src/m/classes/@modellist/modellist.m
===================================================================
--- /issm/trunk/src/m/classes/@modellist/modellist.m	(revision 2912)
+++ /issm/trunk/src/m/classes/@modellist/modellist.m	(revision 2912)
@@ -0,0 +1,67 @@
+function mds = modellist(varargin)
+%MODEL - constructor for a list of models
+%
+%   Usage:
+%      mds = modellist(varargin)
+
+switch nargin
+
+case 0
+
+	% if no input arguments, create a default object
+	mds.models=cell(0,1);
+
+	%fields:
+	mds.name='';
+	mds.cluster='';
+	mds.queue='';
+	mds.time=0;
+	mds.np=0;
+	
+	%output
+	mds=class(mds,'modellist');
+
+	%set default parameters
+	mds=setdefaultparameters(mds);
+
+case 1
+
+	%If single argument of class model, we have a copy constructor. 
+	if (isa(varargin{1},'modellist'))
+		mds = varargin{1};
+	elseif (isa(varargin{1},'cell'))
+		celllist=varargin{1};
+		
+		%user gave us a list of models, plug them in mds.models, and do some set up
+		mds=modellist;
+
+		%check on size of cell list: 
+		if (size(celllist,2)~=1),
+			error('modellist constructor error message: list of models should be a cell list of column size 1');
+		end
+
+		%check that only models are in the celllist: 
+		for i=1:size(celllist,1),
+			md=celllist{i};
+			if ~isa(md,'model')
+				error(['modellist constructor error message: element ' num2str(i) ' of cell list is not a model!']);
+			end
+		end
+
+		%initialize
+		mds.models=celllist;
+
+		%set some default parameters: 
+		if size(celllist,1),
+			%pick up 1st model for default parameters
+			mds.cluster=mds.models{1}.cluster;
+			mds.name=mds.models{1}.name;
+			mds.queue=mds.models{1}.queue;
+			mds.time=mds.models{1}.time;
+		end
+	else
+		error('model constructor error message: copy constructor called on a non ''model'' class object');
+	end 
+otherwise
+	error('model constructor error message: 0 of 1 argument only in input.');
+end
Index: /issm/trunk/src/m/classes/@modellist/setdefaultparameters.m
===================================================================
--- /issm/trunk/src/m/classes/@modellist/setdefaultparameters.m	(revision 2912)
+++ /issm/trunk/src/m/classes/@modellist/setdefaultparameters.m	(revision 2912)
@@ -0,0 +1,18 @@
+function mds=setdefaultparameters(mds);
+%SETDEFAULTPARAMETERS - plug default parameters onto model list
+%
+%   Although the model parameterization should be done in
+%   the parameter file, some parameters are initialized here
+%   with a default value.
+%   These default values can be changed if necessary.
+%
+%   Usage:
+%      mds=setdefaultparameters(mds);
+
+
+%cluster settings
+mds.name='none';
+mds.cluster='none';
+mds.queue='none';
+mds.time=0;
+mds.np=NaN;
Index: /issm/trunk/src/m/classes/@modellist/solve.m
===================================================================
--- /issm/trunk/src/m/classes/@modellist/solve.m	(revision 2912)
+++ /issm/trunk/src/m/classes/@modellist/solve.m	(revision 2912)
@@ -0,0 +1,73 @@
+function mds=solve(mds,varargin)
+%SOLVE - apply solution sequence for  a list of models. Used in batch mode.
+%
+%   Usage:
+%      mds=solve(mds,varargin)
+%      where varargin is a lit of paired arguments. 
+%      arguments can be: 'analysis_type': 'diagnostic','thermal','prognostic','transient'
+%      arguments can be: 'sub_analysis_type': 'transient','steady','' (default if empty = 'steady')
+%
+%   Examples:
+%      mds=solve(mds,'analysis_type','diagnostic');
+%      mds=solve(mds,'analysis_type','thermal','sub_analysis_type','transient');
+%      mds=solve(mds,'analysis_type','thermal','sub_analysis_type','steady');
+%      mds=solve(mds,'analysis_type','thermal');
+
+%recover options
+options=pairoptions(varargin{:});
+
+%add default options
+options=process_solve_options(options);
+
+%length of list
+nummodels=length(mds.models);
+
+%name of queue: to make it unique, add a time stamp
+name=[mds.name '-' datestr(now,1) '-' datestr(now,'HH-MM-SS') ];
+
+%name of cluster will be first name of list
+cluster=mds.cluster;
+
+%Figure out parameters for this particular cluster
+cluster_rc_location=which('cluster.rc');
+[codepath,executionpath]=ClusterParameters(cluster,cluster_rc_location);
+
+%solve in batch mode: 
+for i=1:nummodels,
+
+	%model
+	md=mds.models{i};
+	
+	%recover some fields
+	md.analysis_type=options.analysis_type;
+	md.sub_analysis_type=options.sub_analysis_type;
+
+	md.name=[name '-' num2str(i) 'vs' num2str(nummodels)];
+	md.time=mds.time;
+	md.queue=mds.queue;
+	md.cluster=mds.cluster;
+	if ~isnan(mds.np),
+		md.np=mds.np;
+	end
+
+	%call solve in batch mode:
+	md=solve(md,varargin{:},'batch','yes','directory',name);
+
+	%feed back
+	mds.models{i}=md;
+end
+
+%now, tar all the files and then erase them.
+eval(['!find -iname ''' name '-*'' > file_list.txt']);
+!tar zcvf ModelList.tar.gz --files-from file_list.txt
+!rm -rf *.bin *.queue file_list.txt
+
+%still have to build a launching script.
+BuildMultipleQueueingScript(cluster,name,executionpath,codepath);
+
+%launch jobs on remote cluster
+LaunchMultipleQueueJob(cluster,name,executionpath);
+
+%erase files: 
+delete([name '.queue']);
+delete('ModelList.tar.gz');
Index: /issm/trunk/src/m/classes/@modellist/subsasgn.m
===================================================================
--- /issm/trunk/src/m/classes/@modellist/subsasgn.m	(revision 2912)
+++ /issm/trunk/src/m/classes/@modellist/subsasgn.m	(revision 2912)
@@ -0,0 +1,12 @@
+function mds = subsasgn(mds,index,val)
+%SUBSASGN - handle indexed assignments to list of model objects
+%
+%   the first argument is the object, the second argument a structure array
+%   the third one is the value
+%
+%   Usage:
+%      mds = subsasgn(mds,index,val)
+%
+%   See also SUBSREF
+
+mds=builtin('subsasgn',mds,index,val);
Index: /issm/trunk/src/m/classes/@modellist/subsref.m
===================================================================
--- /issm/trunk/src/m/classes/@modellist/subsref.m	(revision 2912)
+++ /issm/trunk/src/m/classes/@modellist/subsref.m	(revision 2912)
@@ -0,0 +1,10 @@
+function result = subsref(mds,index)
+%SUBSREF - handle indexed references to list of model objects
+%
+%   the first argument is the object and the second one a structure array
+%   Usage:
+%      result = subsref(mds,index)
+% 
+%   See also SUBSASGN
+	
+result=builtin('subsref',mds,index);
Index: /issm/trunk/src/m/classes/public/process_solve_options.m
===================================================================
--- /issm/trunk/src/m/classes/public/process_solve_options.m	(revision 2911)
+++ /issm/trunk/src/m/classes/public/process_solve_options.m	(revision 2912)
@@ -15,4 +15,7 @@
 %batch mode for launching jobs.
 outoptions.batch=getfieldvalue(options,'batch','no');
+
+%directory 
+outoptions.directory=getfieldvalue(options,'directory','');
 
 %check solution type is supported
Index: /issm/trunk/src/m/classes/public/queue/BuildMultipleQueueingScriptgemini.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/BuildMultipleQueueingScriptgemini.m	(revision 2911)
+++ /issm/trunk/src/m/classes/public/queue/BuildMultipleQueueingScriptgemini.m	(revision 2912)
@@ -14,7 +14,9 @@
 fprintf(fid,'#!/bin/sh\n');
 fprintf(fid,'cd %s\n',executionpath);
-fprintf(fid,'rm -rf %s_*vs*\n',name);
+fprintf(fid,'mkdir %s\n',name);
+fprintf(fid,'cd %s\n',name);
+fprintf(fid,'mv ../ModelList.tar.gz ./\n');
 fprintf(fid,'tar -zxvf ModelList.tar.gz\n');
-fprintf(fid,'foreach i (%s_*vs*.queue)\n',name);
+fprintf(fid,'foreach i (%s-*vs*.queue)\n',name);
 fprintf(fid,'qsub $i\n');
 fprintf(fid,'end\n');
Index: /issm/trunk/src/m/classes/public/queue/LaunchMultipleQueueJobgemini.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/LaunchMultipleQueueJobgemini.m	(revision 2911)
+++ /issm/trunk/src/m/classes/public/queue/LaunchMultipleQueueJobgemini.m	(revision 2912)
@@ -17,5 +17,5 @@
 %upload both files to cluster
 disp('uploading input file,  queueing script and variables script');
-system(['scp ModelList.tar.gz ' name '.queue '  cluster ':' executionpath]);
+eval(['!scp ModelList.tar.gz ' name '.queue '  cluster ':' executionpath]);
 
 disp('launching solution sequence on remote cluster');
Index: /issm/trunk/src/m/classes/public/solveparallel.m
===================================================================
--- /issm/trunk/src/m/classes/public/solveparallel.m	(revision 2911)
+++ /issm/trunk/src/m/classes/public/solveparallel.m	(revision 2912)
@@ -5,4 +5,5 @@
 %      md=solveparallel(md);
 
+
 %Get cluster.rc location
 cluster_rc_location=which('cluster.rc');
@@ -10,4 +11,7 @@
 %Figure out parameters for this particular cluster
 [codepath,executionpath]=ClusterParameters(md.cluster,cluster_rc_location);
+
+%Append name of directory if specified in options: 
+executionpath=[executionpath '/' options.directory];
 
 %Marshall model data into a binary file.
Index: /issm/trunk/src/m/utils/Model/loadmodellist.m
===================================================================
--- /issm/trunk/src/m/utils/Model/loadmodellist.m	(revision 2912)
+++ /issm/trunk/src/m/utils/Model/loadmodellist.m	(revision 2912)
@@ -0,0 +1,50 @@
+function varargout=loadmodellist(path)
+%LOADMODELLIST- load a model using built-in load module
+%
+%   check that modellist prototype has not changed. if so, adapt to new modellist prototype.
+%
+%   Usage:
+%      mds=loadmodellist(path)
+%      loadmodellist path
+
+%check nargout
+if nargout>1,
+	error('loadmodellist usage error: mds=loadmodellist(path)');
+end
+%check existence
+if ~exist(path)
+	error(['loadmodellist error message: file ' path ' does not exist']);
+end
+
+%check that the file is readable
+[stat,mess]=fileattrib(path);
+if( stat==0 | mess.UserRead~=1),
+	error(['loadmodellist error message: file ' path ' is not readable (permission dinied).']);
+end
+
+%check number of variables
+if length(whos('-file',path))>1,
+	error(['loadmodellist error message: file ' path ' contains several variables. Only one model should be present.']);
+end
+
+try,
+	struc=load(path,'-mat');
+
+	%get name of model variable
+	fieldname=char(fieldnames(struc));
+	mds=eval(['struc.' fieldname]);
+	if ~strcmpi(class(mds),'model'),
+		mds2=modellist;
+		mds2=structtomodel(mds2,mds);
+		mds=mds2;
+		clear mds2;
+	end
+	if nargout,
+		varargout{1}=mds;
+	else
+		assignin('caller',fieldname,mds);
+	end
+catch me
+	disp(getReport(me))
+	error(['could not load model ' path]);
+end
Index: /issm/trunk/src/m/utils/Plot/basinzoom.m
===================================================================
--- /issm/trunk/src/m/utils/Plot/basinzoom.m	(revision 2911)
+++ /issm/trunk/src/m/utils/Plot/basinzoom.m	(revision 2912)
@@ -1,3 +1,3 @@
-function varargout=basinzoom(region,unitmultiplier)
+function varargout=basinzoom(region,varargin)
 %ANTZOOM - zoom on a basin in Antarctica or Greenland.
 %
@@ -11,4 +11,12 @@
 %Initialize regions
 available_regions=InitializeRegionInfo();
+
+%recover unitmultiplier if available
+if nargin==2,
+	unitmultiplier=varargin{1};
+else
+	unitmultiplier=NaN;
+end
+
 
 %Check arguments
@@ -119,5 +127,6 @@
 	regions=AddAvailableRegion(regions,'icestreams',-1.2274*10^6,-.137*10^6,-1.1172*10^6,-.138*10^6);
 	regions=AddAvailableRegion(regions,'icestreamE',2.2*10^6,2.7*10^6,0,5*10^5);
-	regions=AddAvailableRegion(regions,'jakobshavn',-4.6*10^5,-3*10^5,-2.3*10^6,-2.2*10^6);
+	regions=AddAvailableRegion(regions,'jks',-2.4*10^5,-.8*10^5,-2.3*10^6,-2.2*10^6);
+	regions=AddAvailableRegion(regions,'jakobshavn',-2.4*10^5,-.8*10^5,-2.3*10^6,-2.2*10^6);
 	regions=AddAvailableRegion(regions,'larseniceshelf',-2.3855*10^6,-1.9649*10^6,0.9498*10^6,1.2996*10^6);
 	regions=AddAvailableRegion(regions,'mcmurdo',1.3750*10^5,4.8255*10^5,-1.4569*10^6,-1.1119*10^6);
@@ -126,4 +135,6 @@
 	regions=AddAvailableRegion(regions,'peninsula',-2.7617*10^6,-1.2831*10^6,.4492*10^6,1.6940*10^6);
 	regions=AddAvailableRegion(regions,'pennelcoast',3*10^5,6*10^5,-2.1*10^6,-1.85*10^6); 
+	regions=AddAvailableRegion(regions,'petermann',-3.8*10^5,-.9*10^5,-1.1*10^6,-.88*10^6); 
+	regions=AddAvailableRegion(regions,'pet',-3.8*10^5,-.9*10^5,-1.1*10^6,-.88*10^6); 
 	regions=AddAvailableRegion(regions,'pig',-1.72*10^6,-1.45*10^6,-3.5*10^5,.5*10^5);
 	regions=AddAvailableRegion(regions,'ronneiceshelf',-1.5*10^6,-.7*10^6,1*10^5,9.3*10^5);
