Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp	(revision 14360)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp	(revision 14361)
@@ -15,3 +15,38 @@
 
 void	UpdateElementsTransient(Elements* elements, Parameters* parameters,IoModel* iomodel,int analysis_counter,int analysis_type){
+
+	int         isgl,migration_style;
+	int         i,numberofvertices;
+	IssmDouble  rho_ice,rho_water;
+	IssmDouble *phi   = NULL;
+
+	/*Fetch data needed*/
+	iomodel->Constant(&isgl,TransientIsgroundinglineEnum);
+	iomodel->Constant(&migration_style,GroundinglineMigrationEnum);
+
+	if(isgl==1 && migration_style==SubelementMigrationEnum){
+
+		/*get parameters and constants: */
+		parameters->FindParam(&rho_ice,MaterialsRhoIceEnum);
+		parameters->FindParam(&rho_water,MaterialsRhoWaterEnum);
+		iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
+		iomodel->FetchData(2,ThicknessEnum,BathymetryEnum);
+
+		/*Create phi vector */
+		phi=xNew<IssmDouble>(numberofvertices);
+		for (i=0;i<numberofvertices;i++){
+			if(iomodel->my_vertices[i]){
+				phi[i] = iomodel->Data(ThicknessEnum)[i] + rho_water/rho_ice * iomodel->Data(BathymetryEnum)[i];
+			}
+		}
+
+		/*Update elements: */
+		for(i=0;i<elements->Size();i++){
+			Element* element=dynamic_cast<Element*>(elements->GetObjectByOffset(i));
+			element->InputUpdateFromVector(phi,GLlevelsetEnum,VertexEnum);
+		}
+
+		/*Free ressources:*/
+		xDelete<IssmDouble>(phi);
+	}
 }
Index: /issm/trunk-jpl/src/m/classes/groundingline.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/groundingline.m	(revision 14360)
+++ /issm/trunk-jpl/src/m/classes/groundingline.m	(revision 14361)
@@ -29,5 +29,6 @@
 		function md = checkconsistency(obj,md,solution,analyses) % {{{
 
-			md = checkfield(md,'groundingline.migration','values',{'None' 'AgressiveMigration' 'SoftMigration'});
+			md = checkfield(md,'groundingline.migration','values',{'None' 'AgressiveMigration' 'SoftMigration' 'SubelementMigration'});
+
 
 			if ~strcmp(obj.migration,'None'),
@@ -42,4 +43,7 @@
 				if any(md.geometry.bathymetry(pos)-md.geometry.bed(pos)>10^-9),
 					md = checkmessage(md,['bathymetry superior to bed on floating ice!']);
+				end
+				if strcmp(obj.migration,'SubelementMigration') & md.mesh.dimension==3,
+					md = checkmessage(md,['SubelementMigration only implemented in 2d!']);
 				end
 			end
Index: /issm/trunk-jpl/src/m/classes/groundingline.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/groundingline.py	(revision 14360)
+++ /issm/trunk-jpl/src/m/classes/groundingline.py	(revision 14361)
@@ -48,5 +48,5 @@
 	def checkconsistency(self,md,solution,analyses):    # {{{
 
-		md = checkfield(md,'groundingline.migration','values',['None','AgressiveMigration','SoftMigration'])
+		md = checkfield(md,'groundingline.migration','values',['None','AgressiveMigration','SoftMigration','SubelementMigration'])
 
 		if not strcmp(self.migration,'None'):
@@ -59,4 +59,7 @@
 			if any(md.geometry.bathymetry[pos]-md.geometry.bed[pos]>10**-9):
 				md.checkmessage("bathymetry superior to bed on floating ice!")
+			if strcmp(self.migration,'SubelementMigration'):
+				if md.mesh.dimension==3:
+					md.checkmessage("SubelementMigration only implemented in 2d!")
 
 		return md
