Index: /issm/trunk-jpl/src/m/classes/clusters/pfe.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/pfe.m	(revision 18786)
+++ /issm/trunk-jpl/src/m/classes/clusters/pfe.m	(revision 18787)
@@ -215,4 +215,35 @@
 			 end
 		 end %}}}
+		 function BuildOceanQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
+
+			 %compute number of processors
+			 cluster.np=cluster.numnodes*cluster.cpuspernode;
+
+			 %write queuing script 
+			 fid=fopen([modelname '.queue'],'w');
+			 fprintf(fid,'#PBS -S /bin/bash\n');
+			 fprintf(fid,'#PBS -l select=%i:ncpus=%i:model=%s\n',cluster.numnodes,cluster.cpuspernode,cluster.processor);
+			 fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
+			 fprintf(fid,'#PBS -q %s \n',cluster.queue);
+			 fprintf(fid,'#PBS -W group_list=%s\n',cluster.grouplist);
+			 fprintf(fid,'#PBS -m e\n');
+			 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+			 fprintf(fid,'#PBS -e %s.errlog \n\n',modelname);
+			 fprintf(fid,'. /usr/share/modules/init/bash\n\n');
+			 fprintf(fid,'module load comp-intel/2015.0.090\n');
+			 fprintf(fid,'module load test/mpt.2.11r8\n');
+			 fprintf(fid,'module load netcdf/4.0\n');
+			 fprintf(fid,'module load mpi-mvapich2/1.4.1/gcc\n');
+			 fprintf(fid,'module load gcc/4.4.4\n');
+			 fprintf(fid,'export PATH="$PATH:."\n');
+			 fprintf(fid,'export MPI_GROUP_MAX=64\n\n');
+			 fprintf(fid,'cd %s/%s/\n\n',cluster.executionpath,modelname);
+			 fprintf(fid,'mpiexec -np %i ./mitgcm\n',cluster.np); 
+		%	 if ~io_gather, %concatenate the output files:
+		%		 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
+		%	 end
+			 fclose(fid);
+
+		 end %}}}
 		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
 
