Index: /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp	(revision 26545)
+++ /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp	(revision 26546)
@@ -12,8 +12,37 @@
 
 void LevelsetAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/
+	
+	/*intermediary: */
 	int finiteelement;
+	int         code,vector_layout;
+	IssmDouble *spcdata = NULL;
+	int         M,N;
+
+	/*Get finite element type for this analysis*/
 	iomodel->FindConstant(&finiteelement,"md.levelset.fe");
-	IoModelToDynamicConstraintsx(constraints,iomodel,"md.levelset.spclevelset",LevelsetAnalysisEnum,finiteelement);
-	//IoModelToConstraintsx(constraints,iomodel,"md.levelset.spclevelset",LevelsetAnalysisEnum,finiteelement);
+
+	/*First of, find the record for the enum, and get code  of data type: */
+	iomodel->SetFilePointerToData(&code, &vector_layout,"md.levelset.spclevelset");
+	if(code!=7)_error_("expecting a IssmDouble vector for constraints md.levelset.spclevelset");
+	if(vector_layout!=1)_error_("expecting a nodal vector for constraints md.levelset.spclevelset");
+
+	/*Fetch vector:*/
+	iomodel->FetchData(&spcdata,&M,&N,spc_name);
+
+	/*Call IoModelToConstraintsx*/
+	if(N>1){
+		/*If it is a time series, most likely we are forcing the ice front position and do not want to have a Dynamic Constraint*/
+		_assert_(M==iomodel->numberofvertices+1);
+		IoModelToConstraintsx(constraints,iomodel,spcdata,M,N,LevelsetAnalysisEnum,finite_element);
+	}
+	else{
+		/*This is not a time series, we probably have calving on, we need the levelset constraints to update as the levelset moves*/
+		_assert_(N==1);
+		_assert_(M==iomodel->numberofvertices);
+		IoModelToDynamicConstraintsx(constraints,iomodel,spcdata,M,N,LevelsetAnalysisEnum,finite_element);
+	}
+
+	/*Clean up*/
+	xDelete<IssmDouble>(spcdata);
 }
 /*}}}*/
