Index: ../trunk-jpl/test/MITgcm/build.sh
===================================================================
--- ../trunk-jpl/test/MITgcm/build.sh	(revision 0)
+++ ../trunk-jpl/test/MITgcm/build.sh	(revision 18544)
@@ -0,0 +1,35 @@
+#!/bin/bash
+#This script compiles and links MITgcm
+
+#recover hostname and model path:
+hostname="$1"
+modelpath="$2"
+
+if [ -e ~/.bashrc ]; then
+	source ~/.bashrc
+fi
+
+# Clean up build directory
+cd $modelpath
+if [ ! -d "build" ]; then mkdir build; fi
+\rm -f build/*
+
+# Get MITgcm code, if needed
+if [ ! -d "$SLR_DIR/components/mitgcm/install" ]; then
+   cd $modelpath/../MITgcm
+   source install.sh
+   cd $modelpath
+fi
+
+#create MITgcm makefile and code links for this run
+cd build
+if [ ! -f Makefile ]; then
+
+	if [ $hostname == "pleiades" ]; then 
+		$SLR_DIR/components/mitgcm/install/tools/genmake2 -of $SLR_DIR/models/ice-ocean/configs/linux_amd64_gfortran+mpi_ice_nas -mo ../code -rd $SLR_DIR/components/mitgcm/install
+	else
+		$modelpath/../MITgcm/install/tools/genmake2 -mpi -mo $modelpath/../MITgcm/code -rd $modelpath/../MITgcm/install
+	fi
+    make depend
+fi
+make -j 8

Property changes on: ../trunk-jpl/test/MITgcm/build.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: ../trunk-jpl/test/NightlyRun/test4001.m
===================================================================
--- ../trunk-jpl/test/NightlyRun/test4001.m	(revision 18543)
+++ ../trunk-jpl/test/NightlyRun/test4001.m	(revision 18544)
@@ -9,7 +9,7 @@
 org=organizer('repository','Models/','prefix','IceOcean.2013#','steps',steps);
 
 presentdirectory=pwd; 
-addpath([pwd '/../MITgcm/tools']);
+addpath(recursivepath([pwd '/../MITgcm']));
 
 % {{{ Parameters: 
 if perform(org,'Parameters'),
@@ -22,31 +22,31 @@
 	ygOrigin=-80; %origin of latitude
 	dLong=.25; %longitude grid spacing
 	dLat=.05; %latitude grid spacing
-        delZ=30; %thickness of vertical levels
+	delZ=30; %thickness of vertical levels
 	icefront_position_ratio=.75; 
 	ice_thickness=100;
 	rho_ice=917;
 	rho_water=1028.14;
 	di=rho_ice/rho_water;
-        
-        % MITgcm initial and lateral boundary conditions
-        iniSalt  = 34.4; % initial salinity (PSU)
-        iniTheta = -1.9; % initial potential temperature (deg C)
-        obcSalt  = 34.4; % open boundary salinity (PSU)
-        obcTheta =  1.0; % open boundary potential temperature (deg C)
-        mlDepth  = 120.; % mixed layer depth (m)
-        mlSalt   = 33.4; % open boundary salinity (PSU)
-        mlTheta  = -1.9; % open boundary potential temperature (deg C)
-        obcUvel  = -0.1; % open boundary velocity (m/s)        
 
+	% MITgcm initial and lateral boundary conditions
+	iniSalt  = 34.4; % initial salinity (PSU)
+	iniTheta = -1.9; % initial potential temperature (deg C)
+	obcSalt  = 34.4; % open boundary salinity (PSU)
+	obcTheta =  1.0; % open boundary potential temperature (deg C)
+	mlDepth  = 120.; % mixed layer depth (m)
+	mlSalt   = 33.4; % open boundary salinity (PSU)
+	mlTheta  = -1.9; % open boundary potential temperature (deg C)
+	obcUvel  = -0.1; % open boundary velocity (m/s)        
+
 	MITgcmDeltaT=600; % MITgcm time step in seconds
 	y2s=31536000; % year to seconds conversion, i.e., seconds per year
 
 	% start_time, final_time, and time_step
 	start_time=0; % in decimal years
 	time_step=1/12; % coupling interval in decimal years
-        async_step_MITgcm_multiplier=1/30; % used to reduce run time for MItgcm
-        
+	async_step_MITgcm_multiplier=1/30; % used to reduce run time for MItgcm
+
 	% bedrock/bathymetry
 	hmax=1000;
 	trough_depth=200;
@@ -54,15 +54,14 @@
 	sea_level=1095;
 
 	% issm settings:
-	higherorder=0;
 	numlayers=10;
 
 	savedata(org, Nx, Ny, nPx, nPy, Nz, dLong, dLat, delZ, xgOrigin, ...
-                 ygOrigin, icefront_position_ratio, ice_thickness, rho_ice, ...
-                 rho_water, di, hmax, trough_depth, deltah, sea_level, ...
-                 iniSalt, iniTheta, obcSalt, obcTheta, mlDepth, mlSalt, ...
-                 mlTheta, obcUvel, start_time, time_step, MITgcmDeltaT, y2s,...
-                 higherorder,numlayers,async_step_MITgcm_multiplier);
+		ygOrigin, icefront_position_ratio, ice_thickness, rho_ice, ...
+		rho_water, di, hmax, trough_depth, deltah, sea_level, ...
+		iniSalt, iniTheta, obcSalt, obcTheta, mlDepth, mlSalt, ...
+		mlTheta, obcUvel, start_time, time_step, MITgcmDeltaT, y2s,...
+		numlayers,async_step_MITgcm_multiplier);
 end
 % }}}
 % {{{ Bathymetry: 
@@ -166,7 +165,7 @@
     fclose(fidi);
     fclose(fido);
 
-	system('./build_mitgcm.sh generic');
+	 system(['../MITgcm/build.sh generic ' pwd]);
 end
 % }}}
 % {{{ RunUncoupledMITgcm: 
@@ -176,8 +175,8 @@
     loaddata(org,'Parameters');
     loaddata(org,'Bathymetry');
     loaddata(org,'IceSheetGeometry');
-    endtime = round(MITgcmDeltaT * ...
-     floor(time_step*y2s*async_step_MITgcm_multiplier/MITgcmDeltaT));
+	 endtime = round(MITgcmDeltaT * ...
+		 floor(time_step*y2s*async_step_MITgcm_multiplier/MITgcmDeltaT));
 
     % {{{ prepare MITgcm 
     % rename previous run directory and create new one
@@ -534,27 +533,6 @@
 	savemodel(org,md);
 end
 % }}}
-% {{{ Extrude: 
-if perform(org,'Extrude'),
-	
-	loaddata(org,'Parameters');
-	loaddata(org,'ParameterizeIce');
-
-	if higherorder,
-		md=extrude(md,numlayers,3);
-		md=setflowequation(md,'HO','all');
-
-		%water needs to be spc'd: 
-		pos=find(md.mask.ice_levelset>0); 
-		md.stressbalance.spcvx(pos)=0;
-		md.stressbalance.spcvy(pos)=0;
-		md.stressbalance.spcvz(pos)=0;
-		md.masstransport.spcthickness(pos)=0;
-	end
-
-	savemodel(org,md);
-end
-% }}}
 % {{{ RunUncoupledISSM: 
 if perform(org,'RunUncoupledISSM'),
 	
@@ -597,8 +575,11 @@
             !\mv run run.old
         end
         !\mkdir run
+		  disp('-------------- file: test4001.m line: 578'); 
         !\cp ../MITgcm/build/mitgcmuv run
+		  disp('-------------- file: test4001.m line: 580'); 
         !\cp ../MITgcm/input/* run
+		  disp('-------------- file: test4001.m line: 582'); 
 
         %load data: 
         loaddata(org,'Parameters');
