Index: /issm/trunk-jpl/bin/plot_transient_movie.m
===================================================================
--- /issm/trunk-jpl/bin/plot_transient_movie.m	(revision 25192)
+++ /issm/trunk-jpl/bin/plot_transient_movie.m	(revision 25192)
@@ -0,0 +1,101 @@
+function plot_transient_movie(md,options,width,i)
+%PLOT_TRANSIENT_MOVIE - plot a transient result as a movie
+%   Usage:
+%      plot_transient_movie(md,options,width,i);
+%
+%   See also: PLOTMODEL, PLOT_UNIT, PLOT_MANAGER
+
+	%prepare subplot
+	subplot(width,width,i);
+
+	%xlim
+	if exist(options,'transient_movie_field'),
+		field=getfieldvalue(options,'transient_movie_field');
+	else
+		disp('List of available fields:');
+		F=fields(md.results.TransientSolution(1));
+		num = [];
+		for i=1:numel(F),
+			if ~strcmp(F{i},'time') & ...
+				~strcmp(F{i},'step') & ...
+				~strcmp(F{i},'errlog') & ...
+				~strcmp(F{i},'outlog') & ...
+				~strcmp(F{i},'MaxIterationConvergenceFlag') & ...
+				~strcmp(F{i},'SolutionType'),
+				disp(['   ' num2str(i) ': ' F{i} ]);
+				num = [num i];
+			end
+		end
+		choice=input(['please enter the field number? (between ' num2str(min(num)) ' and ' num2str(max(num)) ')  ']);
+		field =  F{choice};
+	end
+
+	results=md.results.TransientSolution;
+	%loop over the time steps
+	if exist(options,'transient_movie_limit'),
+		limit=getfieldvalue(options,'transient_movie_limit');
+		steps=[limit(1):limit(end)];
+	elseif exist(options,'transient_movie_steps'),
+		steps = getfieldvalue(options,'transient_movie_steps');
+	else
+		steps=1:length(results);
+	end
+
+	%calculate caxis
+	if ~exist(options,'caxis'),
+		range = [Inf -Inf];
+		for i=steps
+			[data datatype]=processdata(md,results(i).(field),options);
+			range(1) = min(range(1),min(data));
+			range(2) = max(range(2),max(data));
+		end
+		options=addfielddefault(options,'caxis',range);
+	end
+
+	%display movie
+	nstep=1;
+	deltat = getfieldvalue(options,'pause',.5);
+	for i=steps
+
+		if ~isempty(results(i).(field)),
+			%process data
+			[x y z elements is2d isplanet]=processmesh(md,results(i).(field),options);
+			[data datatype]=processdata(md,results(i).(field),options);
+
+			clf;
+			titlestring=[field ' at time ' num2str(results(i).time,'%7.2f') ' year'];
+			plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options)
+			apply_options_movie(md,options,titlestring);
+
+			if exist(options,'transient_movie_output'),
+				set(gcf,'Renderer','zbuffer','color','white'); %fixes a bug on Mac OS X (not needed in future Matlab version)
+				if nstep==1,
+					%initialize images and frame
+					frame=getframe(gcf);
+					[images,map]=rgb2ind(frame.cdata,256,'nodither');
+					images(1,1,1,length(steps))=0;
+				else
+					frame=getframe(gcf);
+					images(:,:,1,nstep) = rgb2ind(frame.cdata,map,'nodither');
+				end
+			else
+				pause(deltat)
+			end
+			nstep=nstep+1;
+		end
+	end
+
+	%output movie if requested.
+	if exist(options,'transient_movie_output'),
+		filename=getfieldvalue(options,'transient_movie_output');
+		imwrite(images,map,filename,'DelayTime',getfieldvalue(options,'transient_movie_time',2),'LoopCount',inf)
+	end
+
+end %function
+
+function apply_options_movie(md,options,titlestring)
+	%apply options
+	options=changefieldvalue(options,'title',titlestring);
+	options=addfielddefault(options,'colorbar',1);
+	applyoptions(md,[],options);
+end
Index: /issm/trunk-jpl/src/m/classes/clusters/hpc_simba.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/hpc_simba.m	(revision 25192)
+++ /issm/trunk-jpl/src/m/classes/clusters/hpc_simba.m	(revision 25192)
@@ -0,0 +1,182 @@
+%HPC class definition
+%
+%   Usage:
+%      cluster=hpc();
+%      cluster=hpc('np',3);
+%      cluster=hpc('np',3,'login','username');
+
+classdef hpc_simba
+    properties (SetAccess=public)  
+		 % {{{
+		 name='simba00'
+		 login='inwoo';
+		 numnodes=1;
+		 cpuspernode=36; 
+		 np=4;
+		 port=7777;
+		 queue='pub64';
+		 codepath='/home/DATA/externalpackagesissm/issm/trunk-jpl/bin';
+		 executionpath='/home/DATA/externalpackages/issm/trunk-jpl/execution/';
+		 interactive=0;
+	 end
+	 %}}}
+	 methods
+		 function cluster=hpc_simba(varargin) % {{{
+
+			 %initialize cluster using default settings if provided
+			 if (exist('hpc_settings')==2), hpc_settings; end
+
+			 %use provided options to change fields
+			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
+		 end
+		 %}}}
+		 function disp(cluster) % {{{
+			 %  display the object
+			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+			 disp(sprintf('    login: %s',cluster.login));
+			 disp(sprintf('    port: %i',cluster.port));
+			 disp(sprintf('    numnodes: %i',cluster.numnodes));
+			 disp(sprintf('    cpuspernode: %i',cluster.cpuspernode));
+			 disp(sprintf('    np: %i',cluster.cpuspernode*cluster.numnodes));
+			 disp(sprintf('    queue: %s',cluster.queue));
+			 disp(sprintf('    codepath: %s',cluster.codepath));
+			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+			 disp(sprintf('    interactive: %i',cluster.interactive));
+		 end
+		 %}}}
+		 %function numprocs=np(cluster) % {{{
+		%	 %compute number of processors
+		%	 numprocs=cluster.numnodes*cluster.cpuspernode;
+		% end
+		 %}}}
+		 function md = checkconsistency(cluster,md,solution,analyses) % {{{
+
+			 available_queues={'pub64','free64','free48','free*,pub64','free*'};
+			 queue_requirements_time=[Inf Inf Inf Inf Inf];
+			 queue_requirements_np=[64 64 48 48 48];
+
+			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,1)
+
+			 %Miscelaneous
+			 if isempty(cluster.login), md = checkmessage(md,'login empty'); end
+			 if isempty(cluster.codepath), md = checkmessage(md,'codepath empty'); end
+			 if isempty(cluster.executionpath), md = checkmessage(md,'executionpath empty'); end
+
+		 end
+		 %}}}
+		 function BuildKrigingQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
+
+			 if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end
+			 if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
+
+			 %write queuing script 
+			 fid=fopen([modelname '.queue'],'w');
+			 fprintf(fid,'#!/bin/bash\n');
+			 fprintf(fid,'#$ -N %s\n',modelname);
+			 fprintf(fid,'#$ -q %s \n',cluster.queue);
+			 fprintf(fid,'#$ -pe one-node-mpi 2-64\n');
+			 fprintf(fid,'#$ -R y\n');
+			 fprintf(fid,'#$ -m beas\n');
+			 fprintf(fid,'#$ -o %s.outlog \n',modelname);
+			 fprintf(fid,'#$ -e %s.errlog \n\n',modelname);
+			 fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME
+			 fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');       %FIXME
+			 fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,modelname);
+			 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s\n',cluster.np,cluster.codepath,[cluster.executionpath '/' modelname],modelname);
+			 if ~io_gather, %concatenate the output files:
+				 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
+			 end
+			 fclose(fid);
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,dirname,modelname,solution,io_gather,isvalgrind,isgprof,isdakota,isoceancoupling) % {{{
+
+			 if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end
+			 if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
+
+			 %write queuing script 
+			 fid=fopen([modelname '.queue'],'w');
+			 if 0
+				 fprintf(fid,'#!/bin/bash\n');
+				 fprintf(fid,'#$ -N %s\n',modelname);
+				 fprintf(fid,'#$ -q %s \n',cluster.queue);
+				 fprintf(fid,'#$ -pe one-node-mpi 2-64\n');
+				 fprintf(fid,'#$ -R y\n');
+				 %fprintf(fid,'#$ -m beas\n');
+				 fprintf(fid,'#$ -o %s.outlog \n',modelname);
+				 fprintf(fid,'#$ -e %s.errlog \n\n',modelname);
+			 else % FIXME : This script for SIMBA-Kopri 
+				 fprintf(fid,'#!/bin/bash\n');
+				 %fprintf(fid,'#PBS -q workq\n');
+				 fprintf(fid,'#PBS -N %s\n',modelname);
+				 %fprintf(fid,'#PBS -l nodes=simba01:ppn=%d\n',...
+				%	 ceil(cluster.np/cluster.cpuspernode), cluster.np);
+				 fprintf(fid,'#PBS -l nodes=simba01:ppn=%d\n',...
+					cluster.np);
+				 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+				 fprintf(fid,'#PBS -e %s.errlog \n\n',modelname);
+				 fprintf(fid,'\n');
+			 end
+			 fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME
+			 fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');       %FIXME
+			 fprintf(fid,'\n');
+			 fprintf(fid,'module load intel18/impi-18\n');
+			 fprintf(fid,'\n');
+			 fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,dirname);
+			 fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,solution,[cluster.executionpath '/' dirname],modelname);
+			 if ~io_gather, %concatenate the output files:
+				 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
+			 end
+			 fclose(fid);
+
+			 %in interactive mode, create a run file, and errlog and outlog file
+			 if cluster.interactive,
+				 fid=fopen([modelname '.run'],'w');
+				 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,solution,[cluster.executionpath '/' dirname],modelname);
+				 if ~io_gather, %concatenate the output files:
+					 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
+				 end
+				 fclose(fid);
+				 fid=fopen([modelname '.errlog'],'w');
+				 fclose(fid);
+				 fid=fopen([modelname '.outlog'],'w');
+				 fclose(fid);
+			 end
+		 end %}}}
+		 function UploadQueueJob(cluster,modelname,dirname,filelist)% {{{
+
+			 %compress the files into one zip.
+			 compressstring=['tar -zcf ' dirname '.tar.gz '];
+			 for i=1:numel(filelist),
+				 compressstring = [compressstring ' ' filelist{i}];
+			 end
+			 if cluster.interactive,
+				 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
+			 end
+			 system(compressstring);
+
+			 disp('uploading input file and queueing script');
+			 issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
+
+		 end %}}}
+		 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart,batch)% {{{
+
+			 disp('launching solution sequence on remote cluster');
+			 if ~isempty(restart)
+				 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && hostname && qsub ' modelname '.queue '];
+			 else
+				 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
+					 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && hostname && qsub ' modelname '.queue '];
+			 end
+			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
+		 end %}}}
+		 function Download(cluster,dirname,filelist)% {{{
+
+			 %copy files from cluster to current directory
+			 directory=[cluster.executionpath '/' dirname '/'];
+			 issmscpin(cluster.name,cluster.login,cluster.port,directory,filelist);
+
+		 end %}}}
+	end
+end
Index: /issm/trunk-jpl/src/m/parameterization/killberg.m
===================================================================
--- /issm/trunk-jpl/src/m/parameterization/killberg.m	(revision 25191)
+++ /issm/trunk-jpl/src/m/parameterization/killberg.m	(revision 25192)
@@ -58,3 +58,4 @@
 else
 	disp('No iceberg found!');
+	ice_levelset = md.mask.ice_levelset;
 end
