Index: /issm/trunk-jpl/src/m/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/m/Makefile.am	(revision 21944)
+++ /issm/trunk-jpl/src/m/Makefile.am	(revision 21945)
@@ -83,4 +83,5 @@
 js_scripts =  ${ISSM_DIR}/src/m/array/arrayoperations.js \
 				${ISSM_DIR}/src/m/boundaryconditions/SetIceShelfBC.js \
+				${ISSM_DIR}/src/m/classes/amr.js \
 				${ISSM_DIR}/src/m/classes/autodiff.js \
 				${ISSM_DIR}/src/m/classes/balancethickness.js \
Index: /issm/trunk-jpl/src/m/classes/friction.js
===================================================================
--- /issm/trunk-jpl/src/m/classes/friction.js	(revision 21944)
+++ /issm/trunk-jpl/src/m/classes/friction.js	(revision 21945)
@@ -14,11 +14,23 @@
 		fielddisplay(this,'p','p exponent');
 		fielddisplay(this,'q','q exponent');
+		fielddisplay(this,'coupling','Coupling flag: 0 for default, 1 for forcing(provide md.friction.effective_pressure)  and 2 for coupled(not implemented yet)');
 	} // }}}
-    this.extrude = function(md) {//{{{
-        this.coefficient = project3d(md, 'vector', this.coefficient, 'type', 'node', 'layer', 1);
-        this.p = project3d(md, 'vector', this.p, 'type', 'element');
-        this.q = project3d(md, 'vector', this.q, 'type', 'element');
-        return this;
-    }//}}}
+	this.extrude = function(md) {//{{{
+		this.coefficient = project3d(md, 'vector', this.coefficient, 'type', 'node', 'layer', 1);
+		this.p = project3d(md, 'vector', this.p, 'type', 'element');
+		this.q = project3d(md, 'vector', this.q, 'type', 'element');
+		switch (this.coupling) {
+			case 0:
+			case 1:
+				this.effective_pressure=project3d(md, 'vector', this.effective_pressure, 'type', 'node', 'layer', 1);
+				break;
+			case 2:
+				console.error('not implemented yet');
+				break;
+			default:	
+				console.error('not supported yet');
+		}
+		return this;
+	}//}}}
 	this.classname= function (){// {{{
 		return "friction";
@@ -33,4 +45,16 @@
 			md = checkfield(md,'fieldname','friction.q','NaN',1,'Inf',1,'size',[md.mesh.numberofelements ,1]);
 			md = checkfield(md,'fieldname','friction.p','NaN',1,'Inf',1,'size',[md.mesh.numberofelements ,1]);
+			md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0, 1, 2]);
+			switch (this.coupling) {
+				case 0:
+				case 1:
+					md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1);
+					break;
+				case 2:
+					console.error('not implemented yet');
+					break;
+				default:	
+					console.error('not supported yet');
+			}
 
 		} // }}}
@@ -43,4 +67,16 @@
 			WriteData(fid,prefix,'object',this,'fieldname','p','format','DoubleMat','mattype',2);
 			WriteData(fid,prefix,'object',this,'fieldname','q','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'class','friction','object',this,'fieldname','coupling','format','Integer');
+			switch (this.coupling) {
+				case 0:
+				case 1:
+					WriteData(fid,prefix,'class','friction','object',this,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
+					break;
+				case 2:
+					console.error('not implemented yet');
+					break;
+				default:
+					console.error('not supported yet');		
+			}
 			
 
@@ -53,4 +89,6 @@
 	this.p           = NaN;
 	this.q           = NaN;
+	this.coupling    = 0;
+	this.effective_pressure = NaN;
 	this.setdefaultparameters();
 	//}}}
Index: /issm/trunk-jpl/src/m/classes/model.js
===================================================================
--- /issm/trunk-jpl/src/m/classes/model.js	(revision 21944)
+++ /issm/trunk-jpl/src/m/classes/model.js	(revision 21945)
@@ -38,4 +38,5 @@
 			console.log(sprintf("//19s: //-22s -- //s","calving"         ,"[1x1 " + typeof(this.calving) + "]","parameters for calving"));
 			console.log(sprintf("//19s: //-22s -- //s","gia"             ,"[1x1 " + typeof(this.gia) + "]","parameters for gia solution"));
+			console.log(sprintf("//19s: //-22s -- //s","esa"             ,"[1x1 " + typeof(this.esa) + "]","parameters for elastic adjustment solution"));
 			console.log(sprintf("//19s: //-22s -- //s","autodiff"        ,"[1x1 " + typeof(this.autodiff) + "]","automatic differentiation parameters"));
 			console.log(sprintf("//19s: //-22s -- //s","inversion"       ,"[1x1 " + typeof(this.inversion) + "]","parameters for inverse methods"));
@@ -77,11 +78,12 @@
 			this.steadystate      = new steadystate();
 			this.trans            = new trans();
-			this.levelset		  = new levelset();
+			this.levelset         = new levelset();
 			this.calving          = new calving();
 			this.gia              = new giaivins();
+			this.esa              = new esa();
 			this.autodiff         = new autodiff();
 			this.inversion        = new inversion();
 			this.qmu              = new qmu();
-			this.amr					 = new amr();
+			this.amr              = new amr();
 			this.radaroverlay     = new radaroverlay();
 			this.results          = {};
@@ -610,9 +612,10 @@
 		this.calving          = 0;
 		this.gia              = 0;
+		this.esa              = 0;
 
 		this.autodiff         = 0;
 		this.inversion        = 0;
 		this.qmu              = 0;
-		this.amr					 = 0;
+		this.amr              = 0;
 
 		this.results          = 0;
Index: /issm/trunk-jpl/src/m/classes/trans.js
===================================================================
--- /issm/trunk-jpl/src/m/classes/trans.js	(revision 21944)
+++ /issm/trunk-jpl/src/m/classes/trans.js	(revision 21945)
@@ -15,4 +15,5 @@
 		this.isgroundingline   = 0;
 		this.isgia             = 0;
+		this.isesa             = 0;
 		this.isdamageevolution = 0;
 		this.ismovingfront     = 0;
@@ -36,4 +37,5 @@
 		fielddisplay(this,'isgroundingline','indicates whether a groundingline migration is used in the transient');
 		fielddisplay(this,'isgia','indicates whether a postglacial rebound model is used in the transient');
+		fielddisplay(this,'isesa','indicates whether an elastic adjustment model is used in the transient');
 		fielddisplay(this,'isdamageevolution','indicates whether damage evolution is used in the transient');
 		fielddisplay(this,'ismovingfront','indicates whether a moving front capability is used in the transient');
@@ -60,4 +62,5 @@
 			checkfield(md,'fieldname','trans.isgroundingline','numel',[1],'values',[0, 1]);
 			checkfield(md,'fieldname','trans.isgia','numel',[1],'values',[0, 1]);
+			checkfield(md,'fieldname','trans.isesa','numel',[1],'values',[0, 1]);
 			checkfield(md,'fieldname','trans.isdamageevolution','numel',[1],'values',[0, 1]);
 			checkfield(md,'fieldname','trans.ismovingfront','numel',[1],'values',[0, 1]);
@@ -77,4 +80,5 @@
 			WriteData(fid,prefix,'object',this,'fieldname','isgroundingline','format','Boolean');
 			WriteData(fid,prefix,'object',this,'fieldname','isgia','format','Boolean');
+			WriteData(fid,prefix,'object',this,'fieldname','isesa','format','Boolean');
 			WriteData(fid,prefix,'object',this,'fieldname','isdamageevolution','format','Boolean');
 			WriteData(fid,prefix,'object',this,'fieldname','ishydrology','format','Boolean');
@@ -110,4 +114,5 @@
 	this.isgroundingline   = 0;
 	this.isgia             = 0;
+	this.isesa             = 0;
 	this.isdamageevolution = 0;
 	this.ismovingfront     = 0;
