Index: /issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.cpp	(revision 24240)
@@ -549,5 +549,5 @@
 				D[1*dim+1]=h/2.0*fabs(vy);
 			}
-			else if(dim==3){ 
+			else if(dim==3){
 				element->ElementSizes(&hx,&hy,&hz);
 				vel=sqrt(vx*vx + vy*vy + vz*vz)+1.e-14;
@@ -665,7 +665,7 @@
 }/*}}}*/
 void           DamageEvolutionAnalysis::GetB(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
-	/*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 
+	/*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2.
 	 * For node i, Bi can be expressed in the actual coordinate system
-	 * by: 
+	 * by:
 	 *       Bi=[ N ]
 	 *          [ N ]
@@ -693,7 +693,7 @@
 }/*}}}*/
 void           DamageEvolutionAnalysis::GetBprime(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
-	/*Compute B'  matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2. 
+	/*Compute B'  matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2.
 	 * For node i, Bi' can be expressed in the actual coordinate system
-	 * by: 
+	 * by:
 	 *       Bi_prime=[ dN/dx ]
 	 *                [ dN/dy ]
Index: /issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp	(revision 24240)
@@ -414,5 +414,5 @@
 	element->VerticalSegmentIndicesBase(&pairindices,&numsegments);
 	IssmDouble* meltingrate_enthalpy = xNew<IssmDouble>(numsegments);
-	IssmDouble* heating = xNew<IssmDouble>(numsegments);	
+	IssmDouble* heating = xNew<IssmDouble>(numsegments);
 
 	numnodes=element->GetNumberOfNodes();
@@ -440,6 +440,6 @@
 				for(i=0;i<3;i++) vec_heatflux[i]=0.;
 				break;
-			case 1: case 2: case 3: 
-				// case 1 : cold, wet base: keep at pressure melting point 
+			case 1: case 2: case 3:
+				// case 1 : cold, wet base: keep at pressure melting point
 				// case 2: temperate, thin refreezing base: release spc
 				// case 3: temperate, thin melting base: set spc
@@ -478,5 +478,5 @@
 		nodeup   = pairindices[is*2+1];
 		if(dt!=0.){
-			if(watercolumns[nodedown]+meltingrate_enthalpy[is]*dt<0.){	// prevent too much freeze on			
+			if(watercolumns[nodedown]+meltingrate_enthalpy[is]*dt<0.){	// prevent too much freeze on
 				lambda = -watercolumns[nodedown]/(dt*meltingrate_enthalpy[is]); _assert_(lambda>=0.); _assert_(lambda<1.);
 				watercolumns[nodedown]=0.;
@@ -486,5 +486,5 @@
 			else{
 				basalmeltingrates[nodedown]=meltingrate_enthalpy[is];
-				watercolumns[nodedown]+=dt*meltingrate_enthalpy[is]; 
+				watercolumns[nodedown]+=dt*meltingrate_enthalpy[is];
 			}
 			if(watercolumns[nodedown]>watercolumnupperlimit) watercolumns[nodedown]=watercolumnupperlimit;
@@ -496,5 +496,5 @@
 			else
 				watercolumns[nodedown]+=meltingrate_enthalpy[is];
-		}	
+		}
 		basalmeltingrates[nodedown]*=rho_water/rho_ice; // convert meltingrate from water to ice equivalent
 		_assert_(watercolumns[nodedown]>=0.);
@@ -503,5 +503,5 @@
 	/*feed updated variables back into model*/
 	if(dt!=0.){
-		element->AddInput(enthalpy_enum,enthalpies,element->GetElementType()); 
+		element->AddInput(enthalpy_enum,enthalpies,element->GetElementType());
 		element->AddInput(WatercolumnEnum,watercolumns,element->GetElementType());
 	}
@@ -659,5 +659,5 @@
 			for(int i=0;i<3;i++) for(int j=0;j<3;j++) K[i][j] = D_scalar*K[i][j];
 
-			GetBAdvecprime(Bprime,element,xyz_list,gauss); 
+			GetBAdvecprime(Bprime,element,xyz_list,gauss);
 			TripleMultiply(Bprime,3,numnodes,1,
 						&K[0][0],3,3,0,
@@ -860,5 +860,5 @@
 			if(dt!=0.) scalar_sens=scalar_sens*dt;
 			for(i=0;i<numnodes;i++) pe->values[i]+=scalar_sens*basis[i];
-		}		
+		}
 
 		/* Build transient now */
@@ -977,7 +977,7 @@
 		switch (state) {
 			case 0: case 1: case 2: case 3:
-				// cold, dry base; cold, wet base; refreezing temperate base; thin temperate base: 
+				// cold, dry base; cold, wet base; refreezing temperate base; thin temperate base:
 				// Apply basal surface forcing.
-				// Interpolated values of enthalpy on gauss nodes may indicate cold base, 
+				// Interpolated values of enthalpy on gauss nodes may indicate cold base,
 				// although one node might have become temperate. So keep heat flux switched on.
 				geothermalflux_input->GetInputValue(&geothermalflux,gauss);
@@ -990,10 +990,10 @@
 				scalar=gauss->weight*Jdet*heatflux;
 				if(dt!=0.) scalar=dt*scalar;
-				for(i=0;i<numnodes;i++) 
+				for(i=0;i<numnodes;i++)
 					pe->values[i]+=scalar*basis[i];
 				break;
 			case 4:
 				// temperate, thick melting base: set grad H*n=0
-				for(i=0;i<numnodes;i++) 
+				for(i=0;i<numnodes;i++)
 					pe->values[i]+=0.;
 				break;
@@ -1132,5 +1132,5 @@
 		/* Check if ice in element */
 		if(!element->IsIceInElement()) continue;
-		if(!element->IsOnBase()) continue; 
+		if(!element->IsOnBase()) continue;
 
 		numnodes=element->GetNumberOfNodes();
@@ -1257,14 +1257,14 @@
 		else if(effectiveconductivity_averaging==1){
 			/* return harmonic mean (reciprocal avarage) of thermal conductivities, weighted by fraction of cold/temperate ice, cf Patankar 1980, pp44 */
-			kappa=kappa_c*kappa_t/(lambda*kappa_t+(1.-lambda)*kappa_c); 
+			kappa=kappa_c*kappa_t/(lambda*kappa_t+(1.-lambda)*kappa_c);
 		}
 		else if(effectiveconductivity_averaging==2){
 			/* return geometric mean (power law) of thermal conductivities, weighted by fraction of cold/temperate ice */
-			kappa=pow(kappa_c,lambda)*pow(kappa_t,1.-lambda); 
+			kappa=pow(kappa_c,lambda)*pow(kappa_t,1.-lambda);
 		}
 		else{
 			_error_("effectiveconductivity_averaging not supported yet");
 		}
-	}	
+	}
 
 	/*Clean up and return*/
@@ -1276,7 +1276,7 @@
 }/*}}}*/
 void           EnthalpyAnalysis::GetBAdvec(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
-	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1. 
+	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1.
 	 * For node i, Bi' can be expressed in the actual coordinate system
-	 * by: 
+	 * by:
 	 *       Bi_advec =[ h ]
 	 *                 [ h ]
@@ -1305,7 +1305,7 @@
 }/*}}}*/
 void           EnthalpyAnalysis::GetBAdvecprime(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
-	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1. 
+	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1.
 	 * For node i, Bi' can be expressed in the actual coordinate system
-	 * by: 
+	 * by:
 	 *       Biprime_advec=[ dh/dx ]
 	 *                     [ dh/dy ]
@@ -1356,5 +1356,5 @@
 	if(!element->IsIceInElement()) return;
 
-	/* Only update constraints at the base. 
+	/* Only update constraints at the base.
 	 * Floating ice is not affected by basal BC decision chart. */
 	if(!(element->IsOnBase()) || element->IsFloating()) return;
@@ -1396,9 +1396,9 @@
 				break;
 			case 1:
-				// cold, wet base: keep at pressure melting point 
+				// cold, wet base: keep at pressure melting point
 				vec_spc->SetValue(element->nodes[i]->Sid(),1.,INS_VAL);
 				break;
 			case 2:
-				// temperate, thin refreezing base: 
+				// temperate, thin refreezing base:
 				vec_spc->SetValue(element->nodes[i]->Sid(),1.,INS_VAL);
 				break;
@@ -1427,5 +1427,5 @@
 	if(!element->IsIceInElement()) return;
 
-	/* Only update constraints at the base. 
+	/* Only update constraints at the base.
 	 * Floating ice is not affected by basal BC decision chart.*/
 	if(!(element->IsOnBase()) || element->IsFloating()) return;
@@ -1469,5 +1469,5 @@
 				break;
 			case 1:
-				// cold, wet base: keep at pressure melting point 
+				// cold, wet base: keep at pressure melting point
 				vec_spc->SetValue(element->nodes[i]->Sid(),1.,INS_VAL);
 				break;
@@ -1497,7 +1497,7 @@
 }/*}}}*/
 void           EnthalpyAnalysis::GetBConduct(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
-	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1. 
+	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1.
 	 * For node i, Bi' can be expressed in the actual coordinate system
-	 * by: 
+	 * by:
 	 *       Bi_conduct=[ dh/dx ]
 	 *                  [ dh/dy ]
@@ -1659,7 +1659,7 @@
 				}
 			case LliboutryDuvalEnum:{
-				for(i=0;i<numnodes;i++) B[i]=LliboutryDuval(values[i],pressure[i],n[i],element->FindParam(MaterialsBetaEnum),element->FindParam(ConstantsReferencetemperatureEnum),element->FindParam(MaterialsHeatcapacityEnum),element->FindParam(MaterialsLatentheatEnum)); 
-				element->AddInput(MaterialsRheologyBEnum,&B[0],element->GetElementType()); 
-				break; 
+				for(i=0;i<numnodes;i++) B[i]=LliboutryDuval(values[i],pressure[i],n[i],element->FindParam(MaterialsBetaEnum),element->FindParam(ConstantsReferencetemperatureEnum),element->FindParam(MaterialsHeatcapacityEnum),element->FindParam(MaterialsLatentheatEnum));
+				element->AddInput(MaterialsRheologyBEnum,&B[0],element->GetElementType());
+				break;
 				}
 			default: _error_("Rheology law " << EnumToStringx(rheology_law) << " not supported yet");
Index: /issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp	(revision 24240)
@@ -61,7 +61,7 @@
 	iomodel->FetchDataToInput(elements,"md.geometry.base",BaseEnum);
 	iomodel->FetchDataToInput(elements,"md.mask.ice_levelset",MaskIceLevelsetEnum);
-	iomodel->FetchDataToInput(elements,"md.initialization.epl_head",EplHeadHydrostepEnum);
-	iomodel->FetchDataToInput(elements,"md.initialization.sediment_head",SedimentHeadHydrostepEnum);
-	iomodel->FetchDataToInput(elements,"md.initialization.epl_thickness",HydrologydcEplThicknessHydrostepEnum);
+	iomodel->FetchDataToInput(elements,"md.initialization.epl_head",EplHeadSubstepEnum);
+	iomodel->FetchDataToInput(elements,"md.initialization.sediment_head",SedimentHeadSubstepEnum);
+	iomodel->FetchDataToInput(elements,"md.initialization.epl_thickness",HydrologydcEplThicknessSubstepEnum);
 	iomodel->FetchDataToInput(elements,"md.hydrology.basal_moulin_input",HydrologydcBasalMoulinInputEnum);
 	if(iomodel->domaintype!=Domain2DhorizontalEnum){
@@ -223,13 +223,12 @@
 	/*Retrieve all inputs and parameters*/
 	basalelement->GetVerticesCoordinates(&xyz_list);
-	//basalelement->FindParam(&dt,TimesteppingTimeStepEnum);
-	basalelement ->FindParam(&dt,HydrologydtEnum);
-
-	Input* epl_thick_input = basalelement->GetInput(HydrologydcEplThicknessHydrostepEnum); _assert_(epl_thick_input);
-	Input* epl_head_input	= basalelement->GetInput(EplHeadHydrostepEnum);  _assert_(epl_head_input);
+	basalelement->FindParam(&dt,TimesteppingTimeStepEnum);
+
+	Input* epl_thick_input = basalelement->GetInput(HydrologydcEplThicknessSubstepEnum); _assert_(epl_thick_input);
+	Input* epl_head_input	= basalelement->GetInput(EplHeadSubstepEnum);  _assert_(epl_head_input);
 	Input* base_input			= basalelement->GetInput(BaseEnum); _assert_(base_input);
 
 	/* Start  looping on the number of gaussian points: */
-	Gauss* gauss					= basalelement->NewGauss(2);
+	Gauss* gauss = basalelement->NewGauss(2);
 	for(int ig=gauss->begin();ig<gauss->end();ig++){
 		gauss           ->GaussPoint(ig);
@@ -320,7 +319,7 @@
 	IssmDouble residual,connectivity;
 
-	IssmDouble		*xyz_list							= NULL;
-	Input*				 old_wh_input					= NULL;
-	Input*				 surface_runoff_input = NULL;
+	IssmDouble		*xyz_list				 = NULL;
+	Input*			 old_wh_input			 = NULL;
+	Input*			 surface_runoff_input = NULL;
 
 	/*Fetch number of nodes and dof for this finite element*/
@@ -334,11 +333,10 @@
 	/*Retrieve all inputs and parameters*/
 	basalelement->GetVerticesCoordinates(&xyz_list);
-	//basalelement->FindParam(&dt,TimesteppingTimeStepEnum);
-	basalelement ->FindParam(&dt,HydrologydtEnum);
+	basalelement->FindParam(&dt,TimesteppingTimeStepEnum);
 	basalelement ->FindParam(&smb_model,SmbEnum);
 
-	Input*	epl_thick_input			 = basalelement->GetInput(HydrologydcEplThicknessHydrostepEnum); _assert_(epl_thick_input);
-	Input*	sed_head_input			 = basalelement->GetInput(SedimentHeadHydrostepEnum); _assert_(sed_head_input);
-	Input*	epl_head_input			 = basalelement->GetInput(EplHeadHydrostepEnum); _assert_(epl_head_input);
+	Input*	epl_thick_input			 = basalelement->GetInput(HydrologydcEplThicknessSubstepEnum); _assert_(epl_thick_input);
+	Input*	sed_head_input			 = basalelement->GetInput(SedimentHeadSubstepEnum); _assert_(sed_head_input);
+	Input*	epl_head_input			 = basalelement->GetInput(EplHeadSubstepEnum); _assert_(epl_head_input);
 	Input*	basal_melt_input		 = basalelement->GetInput(BasalforcingsGroundediceMeltingRateEnum); _assert_(basal_melt_input);
 	Input*	residual_input			 = basalelement->GetInput(SedimentHeadResidualEnum); _assert_(residual_input);
@@ -353,5 +351,5 @@
 
 	/* Start  looping on the number of gaussian points: */
-	Gauss* gauss           = basalelement->NewGauss(2);
+	Gauss* gauss = basalelement->NewGauss(2);
 	for(int ig=gauss->begin();ig<gauss->end();ig++){
 		gauss->GaussPoint(ig);
@@ -383,5 +381,5 @@
 
 	/*	Add residual if necessary*/
-	gauss=basalelement->NewGauss();
+	gauss = basalelement->NewGauss();
 	for(int iv=0;iv<numvertices;iv++){
 		gauss->GaussVertex(iv);
@@ -401,5 +399,5 @@
 
 void HydrologyDCEfficientAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/
-	element->GetSolutionFromInputsOneDof(solution,EplHeadHydrostepEnum);
+	element->GetSolutionFromInputsOneDof(solution,EplHeadSubstepEnum);
 }/*}}}*/
 
@@ -443,5 +441,5 @@
 	}
 	/*Add input to the element: */
-	element->AddBasalInput(EplHeadHydrostepEnum,eplHeads,P1Enum);
+	element->AddBasalInput(EplHeadSubstepEnum,eplHeads,P1Enum);
 	/*Free ressources:*/
 	xDelete<IssmDouble>(eplHeads);
@@ -538,6 +536,5 @@
 		Input* 	active_element_input=element->GetInput(HydrologydcMaskEplactiveEltEnum); _assert_(active_element_input);
 		active_element_input->GetInputValue(&active_element);
-		//element->FindParam(&dt,TimesteppingTimeStepEnum);
-		element ->FindParam(&dt,HydrologydtEnum);
+		element->FindParam(&dt,TimesteppingTimeStepEnum);
 
 		/*For now, assuming just one way to compute EPL thickness*/
@@ -556,5 +553,5 @@
 		}
 
-		element->GetInputListOnVertices(&eplhead[0],EplHeadHydrostepEnum);
+		element->GetInputListOnVertices(&eplhead[0],EplHeadSubstepEnum);
 		element->GetInputListOnVertices(&epl_slopeX[0],EplHeadSlopeXEnum);
 		element->GetInputListOnVertices(&epl_slopeY[0],EplHeadSlopeYEnum);
@@ -593,5 +590,5 @@
 			}
 		}
-		element->AddInput(HydrologydcEplThicknessHydrostepEnum,thickness,element->GetElementType());
+		element->AddInput(HydrologydcEplThicknessSubstepEnum,thickness,element->GetElementType());
 		xDelete<IssmDouble>(thickness);
 		xDelete<IssmDouble>(eplhead);
@@ -670,7 +667,7 @@
 
 	basalelement-> GetInputListOnVertices(&old_active[0],HydrologydcMaskEplactiveNodeEnum);
-	basalelement-> GetInputListOnVertices(&epl_thickness[0],HydrologydcEplThicknessHydrostepEnum);
-	basalelement-> GetInputListOnVertices(&sedhead[0],SedimentHeadHydrostepEnum);
-	basalelement-> GetInputListOnVertices(&eplhead[0],EplHeadHydrostepEnum);
+	basalelement-> GetInputListOnVertices(&epl_thickness[0],HydrologydcEplThicknessSubstepEnum);
+	basalelement-> GetInputListOnVertices(&sedhead[0],SedimentHeadSubstepEnum);
+	basalelement-> GetInputListOnVertices(&eplhead[0],EplHeadSubstepEnum);
 	basalelement-> GetInputListOnVertices(&residual[0],SedimentHeadResidualEnum);
 	basalelement-> GetInputListOnVertices(&base[0],BaseEnum);
@@ -715,5 +712,5 @@
 		}
 	}
-	basalelement->AddInput(HydrologydcEplThicknessHydrostepEnum,epl_thickness,basalelement->GetElementType());
+	basalelement->AddInput(HydrologydcEplThicknessSubstepEnum,epl_thickness,basalelement->GetElementType());
 
 	if(domaintype!=Domain2DhorizontalEnum){
Index: /issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp	(revision 24240)
@@ -102,5 +102,5 @@
 	iomodel->FetchDataToInput(elements,"md.basalforcings.groundedice_melting_rate",BasalforcingsGroundediceMeltingRateEnum);
 	iomodel->FetchDataToInput(elements,"md.hydrology.basal_moulin_input",HydrologydcBasalMoulinInputEnum);
-	iomodel->FetchDataToInput(elements,"md.initialization.sediment_head",SedimentHeadHydrostepEnum);
+	iomodel->FetchDataToInput(elements,"md.initialization.sediment_head",SedimentHeadSubstepEnum);
 	iomodel->FetchDataToInput(elements,"md.hydrology.sediment_transmitivity",HydrologydcSedimentTransmitivityEnum);
 	iomodel->FetchDataToInput(elements,"md.hydrology.mask_thawed_node",HydrologydcMaskThawedNodeEnum);
@@ -111,5 +111,5 @@
 	if(isefficientlayer){
 		iomodel->FetchDataToInput(elements,"md.hydrology.mask_eplactive_node",HydrologydcMaskEplactiveNodeEnum);
-		iomodel->FetchDataToInput(elements,"md.initialization.epl_head",EplHeadHydrostepEnum);
+		iomodel->FetchDataToInput(elements,"md.initialization.epl_head",EplHeadSubstepEnum);
 	}
 
@@ -233,9 +233,8 @@
 	/*Retrieve all inputs and parameters*/
 	basalelement ->GetVerticesCoordinates(&xyz_list);
-	//basalelement ->FindParam(&dt,TimesteppingTimeStepEnum);
-	basalelement ->FindParam(&dt,HydrologydtEnum);
+	basalelement ->FindParam(&dt,TimesteppingTimeStepEnum);
 	basalelement ->FindParam(&isefficientlayer,HydrologydcIsefficientlayerEnum);
 	Input* SedTrans_input = basalelement->GetInput(HydrologydcSedimentTransmitivityEnum); _assert_(SedTrans_input);
-	Input* sed_head_input = basalelement->GetInput(SedimentHeadHydrostepEnum);
+	Input* sed_head_input = basalelement->GetInput(SedimentHeadSubstepEnum);
 	Input* base_input     = basalelement->GetInput(BaseEnum);
 	Input* old_wh_input = basalelement->GetInput(SedimentHeadOldEnum);                  _assert_(old_wh_input);
@@ -340,4 +339,5 @@
 	bool       active_element,isefficientlayer;
 	int        smb_model;
+	int        smbsubstepping;
 	IssmDouble dt,scalar,sediment_storing;
 	IssmDouble water_head,sediment_transmitivity;
@@ -348,5 +348,6 @@
 	Input*      active_element_input = NULL;
 	Input*      old_wh_input         = NULL;
-	Input*      surface_runoff_input = NULL;
+	Input*      dummy_input          = NULL;
+	TransientInput*  surface_runoff_input          = NULL;
 
 	/*Fetch number of nodes and dof for this finite element*/
@@ -359,14 +360,17 @@
 	/*Retrieve all inputs and parameters*/
 	basalelement->GetVerticesCoordinates(&xyz_list);
-	//basalelement->FindParam(&dt,TimesteppingTimeStepEnum);
-	basalelement->FindParam(&dt,HydrologydtEnum);
+	basalelement->FindParam(&dt,TimesteppingTimeStepEnum);
 	basalelement->FindParam(&isefficientlayer,HydrologydcIsefficientlayerEnum);
 	basalelement->FindParam(&smb_model,SmbEnum);
 
-	Input* sed_head_input	= basalelement->GetInput(SedimentHeadHydrostepEnum);
-	Input* epl_head_input	= basalelement->GetInput(EplHeadHydrostepEnum);
-	Input* base_input			= basalelement->GetInput(BaseEnum);
-	Input* basal_melt_input	= basalelement->GetInput(BasalforcingsGroundediceMeltingRateEnum); _assert_(basal_melt_input);
-	Input* SedTrans_input	= basalelement->GetInput(HydrologydcSedimentTransmitivityEnum); _assert_(SedTrans_input);
+	Input*	sed_head_input			 = basalelement->GetInput(SedimentHeadSubstepEnum);
+	Input*	epl_head_input			 = basalelement->GetInput(EplHeadSubstepEnum);
+	Input*	base_input				 = basalelement->GetInput(BaseEnum);
+	Input*	basal_melt_input		 = basalelement->GetInput(BasalforcingsGroundediceMeltingRateEnum); _assert_(basal_melt_input);
+	Input*	SedTrans_input			 = basalelement->GetInput(HydrologydcSedimentTransmitivityEnum); _assert_(SedTrans_input);
+
+	IssmDouble time;
+	basalelement->FindParam(&time,TimeEnum);
+
 
 	if(dt!= 0.){
@@ -374,5 +378,12 @@
 	}
 	if(smb_model==SMBgradientscomponentsEnum){
-		surface_runoff_input = basalelement->GetInput(SmbRunoffEnum); _assert_(surface_runoff_input);
+		basalelement->FindParam(&smbsubstepping,SmbStepsPerStepEnum);
+		if(smbsubstepping>1) {
+			dummy_input = basalelement->GetInput(SmbRunoffTransientEnum); _assert_(dummy_input);
+		}
+		else {
+			dummy_input = basalelement->GetInput(SmbRunoffEnum); _assert_(dummy_input);
+		}
+		surface_runoff_input=xDynamicCast<TransientInput*>(dummy_input); _assert_(surface_runoff_input);
 	}
 
@@ -384,4 +395,8 @@
 	/* Start  looping on the number of gaussian points: */
 	Gauss* gauss=basalelement->NewGauss(2);
+
+	IssmDouble yts;
+	basalelement->FindParam(&yts,ConstantsYtsEnum);
+
 	for(int ig=gauss->begin();ig<gauss->end();ig++){
 		gauss->GaussPoint(ig);
@@ -407,6 +422,6 @@
 			if(!active_element){
 				basal_melt_input->GetInputValue(&water_load,gauss);
-				if(surface_runoff_input) surface_runoff_input->GetInputValue(&runoff_value,gauss);
-				else                     runoff_value = 0.;
+				if(surface_runoff_input)surface_runoff_input->GetInputValue(&runoff_value,gauss);
+				else runoff_value = 0.;
 				scalar = Jdet*gauss->weight*(water_load+runoff_value);
 				//scalar = Jdet*gauss->weight*(water_load)/sediment_transmitivity;
@@ -480,5 +495,5 @@
 }/*}}}*/
 void HydrologyDCInefficientAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/
-	element->GetSolutionFromInputsOneDof(solution,SedimentHeadHydrostepEnum);
+	element->GetSolutionFromInputsOneDof(solution,SedimentHeadSubstepEnum);
 }/*}}}*/
 void HydrologyDCInefficientAnalysis::GradientJ(Vector<IssmDouble>* gradient,Element* element,int control_type,int control_index){/*{{{*/
@@ -514,9 +529,9 @@
 	IssmDouble* residual = xNew<IssmDouble>(numnodes);
 
-	/*Use the dof list to index into the solution vector reseting to base is done at the deactivate stage: */
 	for(int i=0;i<numnodes;i++){
 	  	values[i] =solution[doflist[i]];
 		if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector");
 		if(xIsInf<IssmDouble>(values[i])) _error_("Inf found in solution vector");
+
 	}
 
@@ -553,5 +568,4 @@
 			}
 			pressure[i]=(rho_ice*g*thickness[i])-(rho_freshwater*g*(values[i]-base[i]));
-
 		}
 		xDelete<IssmDouble>(thickness);
@@ -561,6 +575,6 @@
 
 	/*Add input to the element: */
-	element->AddBasalInput(SedimentHeadHydrostepEnum,values,P1Enum);
-	element->AddBasalInput(EffectivePressureHydrostepEnum,pressure,P1Enum);
+	element->AddBasalInput(SedimentHeadSubstepEnum,values,P1Enum);
+	element->AddBasalInput(EffectivePressureSubstepEnum,pressure,P1Enum);
 	element->AddBasalInput(SedimentHeadResidualEnum,residual,P1Enum);
 
Index: /issm/trunk-jpl/src/c/analyses/L2ProjectionEPLAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/L2ProjectionEPLAnalysis.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/analyses/L2ProjectionEPLAnalysis.cpp	(revision 24240)
@@ -60,5 +60,5 @@
 	}
 
-	iomodel->FetchDataToInput(elements,"md.initialization.epl_head",EplHeadHydrostepEnum);
+	iomodel->FetchDataToInput(elements,"md.initialization.epl_head",EplHeadSubstepEnum);
 	iomodel->FetchDataToInput(elements,"md.mask.ice_levelset",MaskIceLevelsetEnum);
 	if(iomodel->domaintype!=Domain2DhorizontalEnum){
@@ -202,6 +202,6 @@
 	basalelement->FindParam(&input_enum,InputToL2ProjectEnum);
 	switch(input_enum){
-		case EplHeadSlopeXEnum: input = basalelement->GetInput(EplHeadHydrostepEnum); index = 0; _assert_(input); break;
-		case EplHeadSlopeYEnum: input = basalelement->GetInput(EplHeadHydrostepEnum); index = 1; _assert_(input); break;
+		case EplHeadSlopeXEnum: input = basalelement->GetInput(EplHeadSubstepEnum); index = 0; _assert_(input); break;
+		case EplHeadSlopeYEnum: input = basalelement->GetInput(EplHeadSubstepEnum); index = 1; _assert_(input); break;
 		default: _error_("not implemented");
 	}
Index: /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp	(revision 24240)
@@ -107,5 +107,5 @@
 	parameters->AddObject(iomodel->CopyConstantObject("md.levelset.kill_icebergs",LevelsetKillIcebergsEnum));
 	parameters->AddObject(iomodel->CopyConstantObject("md.levelset.calving_max",CalvingMaxEnum));
-	
+
 	int  calvinglaw;
 	iomodel->FindConstant(&calvinglaw,"md.calving.law");
@@ -168,5 +168,5 @@
 
 	if(save_results){
-		if(VerboseSolution()) _printf0_("   saving results\n");
+		if(VerboseSolution()) _printf0_("   saving levelset results\n");
 		int outputs[1] = {MaskIceLevelsetEnum};
 		femmodel->RequestedOutputsx(&femmodel->results,&outputs[0],1);
@@ -328,5 +328,5 @@
 		/* Advection */
 		vx_input->GetInputValue(&v[0],gauss);
-		vy_input->GetInputValue(&v[1],gauss); 
+		vy_input->GetInputValue(&v[1],gauss);
 		gr_input->GetInputValue(&groundedice,gauss);
 
@@ -350,5 +350,5 @@
 
 				if(norm_dlsf>1.e-10)
-				 for(i=0;i<dim;i++){ 
+				 for(i=0;i<dim;i++){
 					 c[i]=calvingrate*dlsf[i]/norm_dlsf; m[i]=meltingrate*dlsf[i]/norm_dlsf;
 				 }
@@ -379,5 +379,5 @@
 
 				if(norm_dlsf>1.e-10)
-				 for(i=0;i<dim;i++){ 
+				 for(i=0;i<dim;i++){
 					 c[i]=0.;
 					 m[i]=meltingrate*dlsf[i]/norm_dlsf;
@@ -400,5 +400,5 @@
 
 				if(norm_dlsf>1.e-10)
-				 for(i=0;i<dim;i++){ 
+				 for(i=0;i<dim;i++){
 					 c[i]=0.;
 					 m[i]=meltingrate*dlsf[i]/norm_dlsf;
@@ -423,5 +423,5 @@
 
 				if(norm_dlsf>1.e-10)
-				 for(i=0;i<dim;i++){ 
+				 for(i=0;i<dim;i++){
 					 c[i]=0.;
 					 m[i]=meltingrate*dlsf[i]/norm_dlsf;
@@ -450,5 +450,5 @@
 					meltingrate=0.;
 				}
-				else if(groundedice-calvinghaf>=haf_eps){ 
+				else if(groundedice-calvinghaf>=haf_eps){
 					// ice is well above calvinghaf -> no calving back, i.e. limit calving rate to ice velocity
 					calvingrate=min(calvingrate,vel);
@@ -457,5 +457,5 @@
 				else{ // ice is close to calvinghaf: smooth transition between limitation and free calving.
 					//heaviside: 0 for floating, 1 for grounded
-					heaviside=(groundedice-calvinghaf+haf_eps)/(2.*haf_eps) + sin(PI*(groundedice-calvinghaf)/haf_eps)/(2.*PI); 
+					heaviside=(groundedice-calvinghaf+haf_eps)/(2.*haf_eps) + sin(PI*(groundedice-calvinghaf)/haf_eps)/(2.*PI);
 					calvingrate=heaviside*(min(calvingrate,vel)-calvingrate)+calvingrate;
 					meltingrate=heaviside*meltingrate+0.;
@@ -467,11 +467,11 @@
 
 				if(norm_dlsf>1.e-10)
-				 for(i=0;i<dim;i++){ 
-					 c[i]=calvingrate*dlsf[i]/norm_dlsf; 
+				 for(i=0;i<dim;i++){
+					 c[i]=calvingrate*dlsf[i]/norm_dlsf;
 					 m[i]=meltingrate*dlsf[i]/norm_dlsf;
 				 }
 				else
 				 for(i=0;i<dim;i++){
-					 c[i]=0.; 
+					 c[i]=0.;
 					 m[i]=0.;
 				 }
@@ -506,5 +506,5 @@
 				/* Artificial Diffusion */
 				basalelement->ElementSizes(&hx,&hy,&hz);
-				h=sqrt( pow(hx*w[0]/vel,2) + pow(hy*w[1]/vel,2) ); 
+				h=sqrt( pow(hx*w[0]/vel,2) + pow(hy*w[1]/vel,2) );
 				kappa=h*vel/2.;
 				for(i=0;i<numnodes;i++){
@@ -515,5 +515,5 @@
 					}
 				}
-				break;	
+				break;
 			case 2:
 				  {
@@ -522,6 +522,6 @@
 				h=sqrt( pow(hx*w[0]/vel,2) + pow(hy*w[1]/vel,2) );
 				IssmDouble D[9];
-				for(row=0;row<dim;row++) 
-					for(col=0;col<dim;col++) 
+				for(row=0;row<dim;row++)
+					for(col=0;col<dim;col++)
 						D[row*dim+col] = D_scalar*h/(2.*vel)*w[row]*w[col];
 				GetBprime(Bprime,basalelement,xyz_list,gauss);
@@ -597,7 +597,7 @@
 }/*}}}*/
 void           LevelsetAnalysis::GetB(IssmDouble* B,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
-	/*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 
+	/*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2.
 	 * For node i, Bi can be expressed in the actual coordinate system
-	 * by: 
+	 * by:
 	 *       Bi=[ N ]
 	 *          [ N ]
@@ -624,7 +624,7 @@
 }/*}}}*/
 void           LevelsetAnalysis::GetBprime(IssmDouble* Bprime,Element* element,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
-	/*Compute B'  matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2. 
+	/*Compute B'  matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2.
 	 * For node i, Bi' can be expressed in the actual coordinate system
-	 * by: 
+	 * by:
 	 *       Bi_prime=[ dN/dx ]
 	 *                [ dN/dy ]
@@ -716,5 +716,5 @@
 			Element* element  = xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i));
 
-			int      numnodes = element->GetNumberOfNodes();	
+			int      numnodes = element->GetNumberOfNodes();
 			Gauss*   gauss    = element->NewGauss();
 			Input*   H_input  = element->GetInput(ThicknessEnum); _assert_(H_input);
@@ -736,5 +736,5 @@
 				else {
 					/* no ice, set no spc */
-					node->DofInFSet(0); 
+					node->DofInFSet(0);
 				}
 			}
@@ -779,5 +779,5 @@
 				else {
 					/* no ice, set no spc */
-					node->DofInFSet(0); 
+					node->DofInFSet(0);
 				}
 			}
@@ -795,5 +795,5 @@
 		femmodel->elements->InputDuplicate(MaskIceLevelsetEnum,DistanceToCalvingfrontEnum);
 		femmodel->DistanceToFieldValue(MaskIceLevelsetEnum,0,DistanceToCalvingfrontEnum);
-		
+
 		/*Vector of size number of nodes*/
 		vec_constraint_nodes=new Vector<IssmDouble>(femmodel->nodes->NumberOfNodes());
@@ -821,5 +821,5 @@
 					thickness_input->GetInputValue(&thickness,gauss);
 					surface_input->GetInputValue(&surface,gauss);
-					
+
 					if((surface_crevasse-surface>0. || crevassedepth-thickness>0.) && bed<0.){
 						vec_constraint_nodes->SetValue(node->Sid(),1.0,INS_VAL);
Index: /issm/trunk-jpl/src/c/analyses/SmbAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/SmbAnalysis.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/analyses/SmbAnalysis.cpp	(revision 24240)
@@ -178,8 +178,9 @@
 void SmbAnalysis::UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum){/*{{{*/
 
+	printf("start param update\n");
 	int     numoutputs;
 	char**  requestedoutputs = NULL;
 	bool    isdelta18o,ismungsm,isd18opd,issetpddfac,interp,isfirnwarming;
-	int     smb_model;
+	int     smb_model, smbslices;
 	IssmDouble *temp = NULL;
 	int         N,M;
@@ -189,4 +190,7 @@
 	iomodel->FindConstant(&smb_model,"md.smb.model");
 	iomodel->FindConstant(&interp,"md.timestepping.interp_forcings");
+
+	iomodel->FetchData(&smbslices,"md.smb.steps_per_step");
+	parameters->AddObject(new IntParam(SmbStepsPerStepEnum,smbslices));
 
 	switch(smb_model){
Index: /issm/trunk-jpl/src/c/classes/Elements/Element.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 24240)
@@ -512,7 +512,7 @@
 		case PentaEnum:
 		case TetraEnum:
-							this->InputExtrude(SmbMonthlytemperaturesEnum,-1);
-							this->InputExtrude(SmbPrecipitationEnum,-1);
-							break;
+         this->InputExtrude(SmbMonthlytemperaturesEnum,-1);
+         this->InputExtrude(SmbPrecipitationEnum,-1);
+         break;
 		default: _error_("Not implemented yet");
 	}
@@ -644,7 +644,7 @@
 		case PentaEnum:
 		case TetraEnum:
-							this->InputExtrude(SmbMonthlytemperaturesEnum,-1);
-							this->InputExtrude(SmbPrecipitationEnum,-1);
-							break;
+         this->InputExtrude(SmbMonthlytemperaturesEnum,-1);
+         this->InputExtrude(SmbPrecipitationEnum,-1);
+         break;
 		default: _error_("Not implemented yet");
 	}
@@ -673,5 +673,5 @@
 	IssmDouble accugrad, runoffgrad; //gradients from reference altitude
 	IssmDouble rho_water, rho_ice;
-	IssmDouble time;
+	IssmDouble time,yts;
 
 	IssmDouble*		smb		= xNew<IssmDouble>(NUM_VERTICES);
@@ -686,4 +686,5 @@
 	/*Recover parameters*/
 	parameters->FindParam(&time,TimeEnum);
+	parameters->FindParam(&yts,ConstantsYtsEnum);
 	parameters->FindParam(&accualti,SmbAccualtiEnum);
 	parameters->FindParam(&accugrad,SmbAccugradEnum);
@@ -704,25 +705,24 @@
 		smb[iv]=(accu[iv]-runoff[iv])*rho_ice/rho_water;
 	}
+
 	switch(this->ObjectEnum()){
-		case TriaEnum:
-			this->inputs->AddInput(new TriaInput(SmbMassBalanceEnum,&smb[0],P1Enum));
-			this->inputs->AddInput(new TriaInput(SmbRunoffEnum,&runoff[0],P1Enum));
-			break;
-		case PentaEnum:
-			this->inputs->AddInput(new PentaInput(SmbMassBalanceEnum,&smb[0],P1Enum));
-			this->inputs->AddInput(new PentaInput(SmbRunoffEnum,&runoff[0],P1Enum));
-			this->InputExtrude(SmbMassBalanceEnum,-1);
-			this->InputExtrude(SmbRunoffEnum,-1);
-			break;
-		case TetraEnum:
-			this->inputs->AddInput(new TetraInput(SmbMassBalanceEnum,&smb[0],P1Enum));
-			this->inputs->AddInput(new TetraInput(SmbRunoffEnum,&runoff[0],P1Enum));
-			this->InputExtrude(SmbMassBalanceEnum,-1);
-			this->InputExtrude(SmbRunoffEnum,-1);
-			break;
-		default: _error_("Not implemented yet");
-	}
-	/* this->AddInput(SmbMassBalanceEnum,smb,P1Enum); */
-	/* this->AddInput(SmbRunoffEnum,runoff,P1Enum); */
+	case TriaEnum:
+		this->inputs->AddInput(new TriaInput(SmbMassBalanceSubstepEnum,&smb[0],P1Enum));
+		this->inputs->AddInput(new TriaInput(SmbRunoffSubstepEnum,&runoff[0],P1Enum));
+		break;
+	case PentaEnum:
+		this->inputs->AddInput(new PentaInput(SmbMassBalanceSubstepEnum,&smb[0],P1Enum));
+		this->inputs->AddInput(new PentaInput(SmbRunoffSubstepEnum,&runoff[0],P1Enum));
+		this->InputExtrude(SmbMassBalanceSubstepEnum,-1);
+		this->InputExtrude(SmbRunoffSubstepEnum,-1);
+		break;
+	case TetraEnum:
+		this->inputs->AddInput(new TetraInput(SmbMassBalanceSubstepEnum,&smb[0],P1Enum));
+		this->inputs->AddInput(new TetraInput(SmbRunoffSubstepEnum,&runoff[0],P1Enum));
+		this->InputExtrude(SmbMassBalanceSubstepEnum,-1);
+		this->InputExtrude(SmbRunoffSubstepEnum,-1);
+		break;
+	default: _error_("Not implemented yet");
+	}
 	/*clean-up*/
 	xDelete<IssmDouble>(surf);
@@ -1175,5 +1175,4 @@
 	Input* input=this->GetInput(enumtype);
 	if (!input) _error_("Input " << EnumToStringx(enumtype) << " not found in element");
-
 	/*Fetch number vertices for this element*/
 	const int NUM_VERTICES = this->GetNumberOfVertices();
@@ -2512,5 +2511,5 @@
 	IssmDouble rho_water    = this->FindParam(MaterialsRhoSeawaterEnum);
 	IssmDouble rho_ice      = this->FindParam(MaterialsRhoIceEnum);
-	IssmDouble latentheat   = this->FindParam(MaterialsLatentheatEnum); 
+	IssmDouble latentheat   = this->FindParam(MaterialsLatentheatEnum);
 	IssmDouble mixed_layer_capacity = this->FindParam(MaterialsMixedLayerCapacityEnum);
 	IssmDouble thermal_exchange_vel = this->FindParam(MaterialsThermalExchangeVelocityEnum);
Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 24240)
@@ -313,5 +313,5 @@
 
 		/*Calving rate proportionnal to the positive product of the strain rate along the ice flow direction and the strain rate perpendicular to the ice flow */
-		calvingrate[iv]=propcoeff*strainparallel*strainperpendicular;	
+		calvingrate[iv]=propcoeff*strainparallel*strainperpendicular;
 		if(calvingrate[iv]<0){
 			calvingrate[iv]=0;
@@ -410,6 +410,6 @@
 
 		/*Some checks in debugging mode*/
-		_assert_(s1>=0 && s1<=1.); 
-		_assert_(s2>=0 && s2<=1.); 
+		_assert_(s1>=0 && s1<=1.);
+		_assert_(s2>=0 && s2<=1.);
 
 		/*Get normal vector*/
@@ -441,5 +441,5 @@
 
 			flux += rho_ice*Jdet*gauss->weight*thickness*(calvingratex*normal[0] + calvingratey*normal[1]);
-			area += Jdet*gauss->weight*thickness; 
+			area += Jdet*gauss->weight*thickness;
 
 			flux_per_area=flux/area;
@@ -447,5 +447,5 @@
 
 		this->inputs->AddInput(new PentaInput(CalvingFluxLevelsetEnum,&flux_per_area,P0Enum));
-		
+
 		/*Clean up and return*/
 		delete gauss;
@@ -532,6 +532,6 @@
 
 		/*Some checks in debugging mode*/
-		_assert_(s1>=0 && s1<=1.); 
-		_assert_(s2>=0 && s2<=1.); 
+		_assert_(s1>=0 && s1<=1.);
+		_assert_(s2>=0 && s2<=1.);
 
 		/*Get normal vector*/
@@ -569,5 +569,5 @@
 			vy_input->GetInputValue(&vy,gauss);
 			vel=vx*vx+vy*vy;
-			meltingrate_input->GetInputValue(&meltingrate,gauss);	
+			meltingrate_input->GetInputValue(&meltingrate,gauss);
 			meltingratex=meltingrate*vx/(sqrt(vel)+1.e-14);
 			meltingratey=meltingrate*vy/(sqrt(vel)+1.e-14);
@@ -575,5 +575,5 @@
 
 			flux += rho_ice*Jdet*gauss->weight*thickness*((calvingratex+meltingratex)*normal[0] + (calvingratey+meltingratey)*normal[1]);
-			area += Jdet*gauss->weight*thickness; 
+			area += Jdet*gauss->weight*thickness;
 
 			flux_per_area=flux/area;
@@ -581,5 +581,5 @@
 
 		this->inputs->AddInput(new PentaInput(CalvingMeltingFluxLevelsetEnum,&flux_per_area,P0Enum));
-		
+
 		/*Clean up and return*/
 		delete gauss;
@@ -707,5 +707,5 @@
 
 		/*Compute Stress*/
-		tau_xx[iv]=2*viscosity*epsilon[0]; // tau = nu eps 
+		tau_xx[iv]=2*viscosity*epsilon[0]; // tau = nu eps
 		tau_yy[iv]=2*viscosity*epsilon[1];
 		tau_zz[iv]=2*viscosity*epsilon[2];
@@ -796,5 +796,5 @@
 	this->element_type=this->element_type_list[analysis_counter];
 
-	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective
 	 * datasets, using internal ids and offsets hidden in hooks: */
 	if (this->hnodes[analysis_counter]) this->hnodes[analysis_counter]->configure(nodesin);
@@ -887,5 +887,5 @@
 	int         connectivity[NUMVERTICES];
 	IssmPDouble values[NUMVERTICES];
-	IssmPDouble gradients[NUMVERTICES]; 
+	IssmPDouble gradients[NUMVERTICES];
 	IssmDouble  value,gradient;
 
@@ -958,5 +958,5 @@
 			}
 			break;
-		default:  
+		default:
 			_error_("Response type " << EnumToStringx(response_enum) << " not supported yet!");
 	}
@@ -1106,5 +1106,5 @@
 /*}}}*/
 void       Penta::GetAreaCoordinates(IssmDouble* area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints){/*{{{*/
-	/*Computeportion of the element that is grounded*/ 
+	/*Computeportion of the element that is grounded*/
 
 	int         i,j,k;
@@ -1115,5 +1115,5 @@
 
 	/*Initialize xyz_list with original xyz_list of triangle coordinates*/
-	for(j=0;j<3;j++){ 
+	for(j=0;j<3;j++){
 		for(k=0;k<3;k++){
 			xyz_bis[j][k]=xyz_list[j*3+k];
@@ -1121,5 +1121,5 @@
 	}
 	for(i=0;i<numpoints;i++){
-		for(j=0;j<3;j++){ 
+		for(j=0;j<3;j++){
 			for(k=0;k<3;k++){
 				/*Change appropriate line*/
@@ -1174,5 +1174,5 @@
 /*}}}*/
 void       Penta::GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating){/*{{{*/
-	/*Computeportion of the element that is grounded*/ 
+	/*Computeportion of the element that is grounded*/
 
 	bool               floating=true;
@@ -1228,5 +1228,5 @@
 /*}}}*/
 IssmDouble Penta::GetGroundedPortion(IssmDouble* xyz_list){/*{{{*/
-	/*Computeportion of the element that is grounded*/ 
+	/*Computeportion of the element that is grounded*/
 
 	bool               mainlyfloating = true;
@@ -1330,5 +1330,5 @@
 /*}}}*/
 IssmDouble Penta::GetIcefrontArea(){/*{{{*/
-	
+
 	IssmDouble  bed[NUMVERTICES]; //basinId[NUMVERTICES];
 	IssmDouble	Haverage,frontarea;
@@ -1359,5 +1359,5 @@
 		IssmDouble  s[2],x[2],y[2];
 		this->GetLevelsetIntersectionBase(&indices, &numiceverts,&s[0],MaskIceLevelsetEnum,0.);
-		_assert_(numiceverts); 
+		_assert_(numiceverts);
 
 		/*3 Write coordinates*/
@@ -1396,5 +1396,5 @@
 		x1=x[0]; y1=y[0]; x2=x[1]; y2=y[1];
 		distance=sqrt(pow((x1-x2),2)+pow((y1-y2),2));
-		
+
 		int numthk=numiceverts+2;
 		H=xNew<IssmDouble>(numthk);
@@ -1421,9 +1421,9 @@
 		frontarea=distance*Haverage;
 	}
-	else return 0;	
-	
+	else return 0;
+
 	xDelete<int>(indices);
 	xDelete<IssmDouble>(H);
-	
+
 	_assert_(frontarea>0);
 	return frontarea;
@@ -1456,5 +1456,5 @@
 		indicesfront[0]=indicesfront[1];
 		indicesfront[1]=index;
-	}	
+	}
 
 	IssmDouble* xyz_front = xNew<IssmDouble>(2*dim*nrfrontnodes);
@@ -1511,5 +1511,5 @@
 void       Penta::GetLevelsetIntersectionBase(int** pindices, int* pnumiceverts, IssmDouble* fraction, int levelset_enum, IssmDouble level){/*{{{*/
 
-	/* GetLevelsetIntersection computes: 
+	/* GetLevelsetIntersection computes:
 	 * 1. indices of element, sorted in [iceverts, noiceverts] in counterclockwise fashion,
 	 * 2. fraction of intersected triangle edges intersected by levelset, lying below level*/
@@ -1553,5 +1553,5 @@
 		}
 	}
-	//merge indices 
+	//merge indices
 	for(i=0;i<numiceverts;i++){indices[i]=indices_ice[i];}
 	for(i=0;i<numnoiceverts;i++){indices[numiceverts+i]=indices_noice[i];}
@@ -1586,5 +1586,4 @@
 /*}}}*/
 int        Penta::GetVertexIndex(Vertex* vertex){/*{{{*/
-
 	_assert_(vertices);
 	for(int i=0;i<NUMVERTICES;i++){
@@ -1604,5 +1603,5 @@
 /*}}}*/
 int        Penta::GetNumberOfVertices(void){/*{{{*/
-	return NUMVERTICES; 
+	return NUMVERTICES;
 }
 /*}}}*/
@@ -1768,5 +1767,5 @@
 
 	/*Scaled not implemented yet...*/
-	_assert_(!scaled); 
+	_assert_(!scaled);
 
 	int               domaintype,index1,index2;
@@ -1842,6 +1841,6 @@
 
 	/*Some checks in debugging mode*/
-	_assert_(s1>=0 && s1<=1.); 
-	_assert_(s2>=0 && s2<=1.); 
+	_assert_(s1>=0 && s1<=1.);
+	_assert_(s2>=0 && s2<=1.);
 
 	/*Get normal vector*/
@@ -1850,5 +1849,5 @@
 	normal[0] = -normal[0];
 	normal[1] = -normal[1];
-	
+
 	this->InputDepthAverageAtBase(VxEnum,VxAverageEnum);
 	this->InputDepthAverageAtBase(VyEnum,VyAverageEnum);
@@ -2002,5 +2001,5 @@
 		case PentaInputEnum:
 		case ControlInputEnum:
-			depth_averaged_input=new PentaInput(average_enum,&total[0],P1Enum); 
+			depth_averaged_input=new PentaInput(average_enum,&total[0],P1Enum);
 			break;
 		default:
@@ -2069,5 +2068,5 @@
 	/*Recover vertices ids needed to initialize inputs*/
 	_assert_(iomodel->elements);
-	for(i=0;i<NUMVERTICES;i++){ 
+	for(i=0;i<NUMVERTICES;i++){
 		penta_vertex_ids[i]=iomodel->elements[NUMVERTICES*index+i]; //ids for vertices are in the elements array from Matlab
 	}
@@ -2249,5 +2248,5 @@
 
 	switch(type){
-		case VertexLIdEnum: 
+		case VertexLIdEnum:
 			for (int i=0;i<NUMVERTICES;i++){
 				values[i]=vector[this->vertices[i]->Lid()];
@@ -2257,5 +2256,5 @@
 			return;
 
-		case VertexPIdEnum: 
+		case VertexPIdEnum:
 			for (int i=0;i<NUMVERTICES;i++){
 				values[i]=vector[this->vertices[i]->Pid()];
@@ -2265,5 +2264,5 @@
 			return;
 
-		case VertexSIdEnum: 
+		case VertexSIdEnum:
 			for (int i=0;i<NUMVERTICES;i++){
 				values[i]=vector[this->vertices[i]->Sid()];
@@ -2320,5 +2319,5 @@
 	isicefront=false;
 	if(IsIceInElement()){
-		nrice=0;       
+		nrice=0;
 		for(i=0;i<NUMVERTICES2D;i++)
 			if(ls[i]<0.) nrice++;
@@ -2618,5 +2617,5 @@
 
 	/*First, serarch the input: */
-	data=inputs->GetInput(natureofdataenum); 
+	data=inputs->GetInput(natureofdataenum);
 
 	/*figure out if we have the vertex id: */
@@ -2851,14 +2850,14 @@
 
 		/*New X axis          New Z axis*/
-		xz_plane[0]=1.;       xz_plane[3]=-slopex;  
-		xz_plane[1]=0.;       xz_plane[4]=-slopey;  
-		xz_plane[2]=slopex;   xz_plane[5]=1.;          
+		xz_plane[0]=1.;       xz_plane[3]=-slopex;
+		xz_plane[1]=0.;       xz_plane[4]=-slopey;
+		xz_plane[2]=slopex;   xz_plane[5]=1.;
 
 		if(groundedice>=0){
 			if(this->nodes[indices[i]]->GetApproximation()==FSvelocityEnum){
-				this->nodes[indices[i]]->DofInSSet(2); //vz 
+				this->nodes[indices[i]]->DofInSSet(2); //vz
 			}
 			else if(this->nodes[indices[i]]->GetApproximation()==SSAFSApproximationEnum || this->nodes[indices[i]]->GetApproximation()==HOFSApproximationEnum){
-				this->nodes[indices[i]]->DofInSSet(4); //vz 
+				this->nodes[indices[i]]->DofInSSet(4); //vz
 			}
 			else _error_("Flow equation approximation"<<EnumToStringx(this->nodes[indices[i]]->GetApproximation())<<" not supported yet");
@@ -2869,5 +2868,5 @@
 			}
 			else if(this->nodes[indices[i]]->GetApproximation()==SSAFSApproximationEnum || this->nodes[indices[i]]->GetApproximation()==HOFSApproximationEnum){
-				this->nodes[indices[i]]->DofInFSet(4); //vz 
+				this->nodes[indices[i]]->DofInFSet(4); //vz
 			}
 			else _error_("Flow equation approximation"<<EnumToStringx(this->nodes[indices[i]]->GetApproximation())<<" not supported yet");
@@ -2902,5 +2901,5 @@
 
 	if(!this->IsOnBase()) return;
-   
+
 	IssmDouble A, B, alpha, beta;
 	IssmDouble bed,qsg,qsg_basin,TF,yts;
@@ -2910,15 +2909,15 @@
 
 	/* Coefficients */
-	A    = 3e-4;        
-	B    = 0.15;        
+	A    = 3e-4;
+	B    = 0.15;
 	alpha = 0.39;
 	beta = 1.18;
-	
+
 	/*Get inputs*/
 	Input* bed_input = this->GetInput(BedEnum);                     _assert_(bed_input);
 	Input* qsg_input = this->GetInput(FrontalForcingsSubglacialDischargeEnum);		 _assert_(qsg_input);
 	Input* TF_input  = this->GetInput(FrontalForcingsThermalForcingEnum);          _assert_(TF_input);
-	GetInputListOnVertices(&basinid[0],FrontalForcingsBasinIdEnum);	
-	
+	GetInputListOnVertices(&basinid[0],FrontalForcingsBasinIdEnum);
+
 	this->FindParam(&yts, ConstantsYtsEnum);
 	this->parameters->FindParam(&numbasins,FrontalForcingsNumberofBasinsEnum);
@@ -2926,5 +2925,5 @@
 
 	IssmDouble meltrates[NUMVERTICES2D];  //frontal melt-rate
-	
+
 	/* Start looping on the number of vertices: */
 	GaussPenta* gauss=new GaussPenta();
@@ -2944,5 +2943,5 @@
 			/* calculate melt rates */
 			meltrates[iv]=((A*max(-bed,0.)*pow(max(qsg_basin,0.),alpha)+B)*pow(max(TF,0.),beta))/86400; //[m/s]
-		}	
+		}
 
 		if(xIsNan<IssmDouble>(meltrates[iv])) _error_("NaN found in vector");
@@ -2952,7 +2951,7 @@
 	/*Add input*/
 	this->inputs->AddInput(new PentaInput(CalvingMeltingrateEnum,&meltrates[0],P1Enum));
-	
+
 	this->InputExtrude(CalvingMeltingrateEnum,-1);
-   
+
 	/*Cleanup and return*/
 	xDelete<IssmDouble>(basin_icefront_area);
@@ -3085,5 +3084,5 @@
 	if(this->inputs->GetInput(CalvingratexEnum)) this->InputDepthAverageAtBase(CalvingratexEnum,CalvingratexAverageEnum);
 	if(this->inputs->GetInput(CalvingrateyEnum)) this->InputDepthAverageAtBase(CalvingrateyEnum,CalvingrateyAverageEnum);
-	
+
 	Tria* tria=(Tria*)SpawnTria(0,1,2);
 	switch(this->material->ObjectEnum()){
@@ -3149,5 +3148,5 @@
 
 	normu=pow(pow(u,2)+pow(v,2)+pow(w,2),0.5);
-	if(normu*diameter/(3*2*kappa)<1){ 
+	if(normu*diameter/(3*2*kappa)<1){
 		tau_parameter=pow(diameter,2)/(3*2*2*kappa);
 	}
@@ -3168,5 +3167,5 @@
 	hk=sqrt(pow(hx,2)+pow(hy,2));
 
-	if(normu*hk/(C*2*kappa)<1){ 
+	if(normu*hk/(C*2*kappa)<1){
 		tau_parameter_anisotropic[0]=pow(hk,2)/(C*2*2*kappa);
 	}
@@ -3175,5 +3174,5 @@
 	/* compute tau for the vertical direction */
 	hk=hz;
-	if(normu*hk/(C*2*kappa)<1){ 
+	if(normu*hk/(C*2*kappa)<1){
 		tau_parameter_anisotropic[1]=pow(hk,2)/(C*2*2*kappa);
 	}
@@ -3334,5 +3333,5 @@
 
 				if(prof<water_depth&prof<thickness){
-					/* Compute the local stress intensity factor*/ 
+					/* Compute the local stress intensity factor*/
 					ki[ig]+=Jdet[ig]*gauss->weight*stress_xx*StressIntensityIntegralWeight(prof,min(water_depth,thickness),thickness);
 				}
@@ -3374,5 +3373,5 @@
 	else if (approximation==SSAApproximationEnum){
 
-		/*This element should be collapsed into a tria element at its base. Create this tria element, 
+		/*This element should be collapsed into a tria element at its base. Create this tria element,
 		 * and compute SurfaceArea*/
 		tria=(Tria*)SpawnTria(0,1,2);
@@ -3439,5 +3438,5 @@
 
 	/*Scaled not implemented yet...*/
-	_assert_(!scaled); 
+	_assert_(!scaled);
 
 	int               domaintype,index1,index2;
@@ -3513,6 +3512,6 @@
 
 	/*Some checks in debugging mode*/
-	_assert_(s1>=0 && s1<=1.); 
-	_assert_(s2>=0 && s2<=1.); 
+	_assert_(s1>=0 && s1<=1.);
+	_assert_(s2>=0 && s2<=1.);
 
 	/*Get normal vector*/
@@ -3546,5 +3545,5 @@
 
 	return flux;
-		
+
 	/*Clean up and return*/
 	delete gauss;
@@ -3557,5 +3556,5 @@
 
 	/*Scaled not implemented yet...*/
-	_assert_(!scaled); 
+	_assert_(!scaled);
 
 	int               domaintype,index1,index2;
@@ -3631,6 +3630,6 @@
 
 	/*Some checks in debugging mode*/
-	_assert_(s1>=0 && s1<=1.); 
-	_assert_(s2>=0 && s2<=1.); 
+	_assert_(s1>=0 && s1<=1.);
+	_assert_(s2>=0 && s2<=1.);
 
 	/*Get normal vector*/
@@ -3639,5 +3638,5 @@
 	normal[0] = -normal[0];
 	normal[1] = -normal[1];
-	
+
 	this->InputDepthAverageAtBase(VxEnum,VxAverageEnum);
 	this->InputDepthAverageAtBase(VyEnum,VyAverageEnum);
@@ -3670,5 +3669,5 @@
 		vy_input->GetInputValue(&vy,gauss);
 		vel=vx*vx+vy*vy;
-		meltingrate_input->GetInputValue(&meltingrate,gauss);	
+		meltingrate_input->GetInputValue(&meltingrate,gauss);
 		meltingratex=meltingrate*vx/(sqrt(vel)+1.e-14);
 		meltingratey=meltingrate*vy/(sqrt(vel)+1.e-14);
@@ -3679,5 +3678,5 @@
 
 	return flux;
-	
+
 	/*Clean up and return*/
 	delete gauss;
@@ -3699,9 +3698,9 @@
 	/*Get material parameters :*/
 	rho_ice=FindParam(MaterialsRhoIceEnum);
-	Input* floatingmelt_input = this->GetInput(BasalforcingsFloatingiceMeltingRateEnum); _assert_(floatingmelt_input); 
+	Input* floatingmelt_input = this->GetInput(BasalforcingsFloatingiceMeltingRateEnum); _assert_(floatingmelt_input);
 	Input* gllevelset_input = this->GetInput(MaskGroundediceLevelsetEnum); _assert_(gllevelset_input);
 	Input* scalefactor_input = NULL;
 	if(scaled==true){
-		scalefactor_input = this->GetInput(MeshScaleFactorEnum); _assert_(scalefactor_input); 
+		scalefactor_input = this->GetInput(MeshScaleFactorEnum); _assert_(scalefactor_input);
 	}
 	::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
@@ -3744,9 +3743,9 @@
 	/*Get material parameters :*/
 	rho_ice=FindParam(MaterialsRhoIceEnum);
-	Input* groundedmelt_input = this->GetInput(BasalforcingsGroundediceMeltingRateEnum); _assert_(groundedmelt_input); 
+	Input* groundedmelt_input = this->GetInput(BasalforcingsGroundediceMeltingRateEnum); _assert_(groundedmelt_input);
 	Input* gllevelset_input = this->GetInput(MaskGroundediceLevelsetEnum); _assert_(gllevelset_input);
 	Input* scalefactor_input = NULL;
 	if(scaled==true){
-		scalefactor_input = this->GetInput(MeshScaleFactorEnum); _assert_(scalefactor_input); 
+		scalefactor_input = this->GetInput(MeshScaleFactorEnum); _assert_(scalefactor_input);
 	}
 	::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
@@ -3799,5 +3798,5 @@
 	if(scaled==true){
 		Input* scalefactor_input = inputs->GetInput(MeshScaleFactorEnum); _assert_(scalefactor_input);
-		scalefactor_input->GetInputAverage(&scalefactor);// average scalefactor on element 
+		scalefactor_input->GetInputAverage(&scalefactor);// average scalefactor on element
 	}
 	else{
@@ -3827,5 +3826,5 @@
 	/*Checks if debuging*/
 	_assert_(iomodel->elements);
-	_assert_(index==this->sid); 
+	_assert_(index==this->sid);
 
 	/*Recover element type*/
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 24240)
@@ -245,5 +245,5 @@
 	IssmDouble  B,sigma_max,sigma_max_floating,sigma_max_grounded,n;
 	IssmDouble  epse_2,groundedice,bed,sealevel;		// added sealevel
-	
+
 
 	/* Get node coordinates and dof list: */
@@ -260,5 +260,5 @@
 	Input* n_input  = inputs->GetInput(MaterialsRheologyNEnum); _assert_(n_input);
 	Input* sl_input  = inputs->GetInput(SealevelEnum); _assert_(sl_input);
-	
+
 
 
@@ -274,5 +274,5 @@
 		vy_input->GetInputValue(&vy,gauss);
 		gr_input->GetInputValue(&groundedice,gauss);
-		bs_input->GetInputValue(&bed,gauss);	
+		bs_input->GetInputValue(&bed,gauss);
 		smax_fl_input->GetInputValue(&sigma_max_floating,gauss);
 		smax_gr_input->GetInputValue(&sigma_max_grounded,gauss);
@@ -316,5 +316,5 @@
 		}
 		calvingrate[iv] =sqrt(calvingratex[iv]*calvingratex[iv] + calvingratey[iv]*calvingratey[iv]);
-	
+
 	}
 
@@ -339,5 +339,5 @@
 	IssmDouble  s_xx,s_xy,s_yy,s1,s2,stmp;
 	int crevasse_opening_stress;
-	
+
 	/* Get node coordinates and dof list: */
 	::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
@@ -397,9 +397,9 @@
 			basal_crevasse[iv] = (rho_ice/(rho_seawater-rho_ice)) * (B * strainparallel * pow(straineffective,((1/n)-1)) / (rho_ice*constant_g) - Ho);
 		}
-		else if(crevasse_opening_stress==1){	 /*Benn2017,Todd2018: maximum principal stress */	
+		else if(crevasse_opening_stress==1){	 /*Benn2017,Todd2018: maximum principal stress */
 			surface_crevasse[iv] = s1 / (rho_ice*constant_g);
 			basal_crevasse[iv] = (rho_ice/(rho_seawater-rho_ice))* (s1/ (rho_ice*constant_g)-Ho);
-		}	
-	
+		}
+
 		/* some constraints */
 		if (surface_crevasse[iv]<0.) {
@@ -408,14 +408,14 @@
 		}
 		if (basal_crevasse[iv]<0.) basal_crevasse[iv]=0.;
-		if (bed>0.) basal_crevasse[iv] = 0.; 
-		
+		if (bed>0.) basal_crevasse[iv] = 0.;
+
 		//if (surface_crevasse[iv]<water_height){
 		//	water_height = surface_crevasse[iv];
 		//}
-		
+
 		/* add water in surface crevasse */
 		surface_crevasse[iv] = surface_crevasse[iv] + (rho_freshwater/rho_ice)*water_height; /* surface crevasse + water */
 		crevasse_depth[iv] = surface_crevasse[iv] + (rho_freshwater/rho_ice)*water_height + basal_crevasse[iv]; /* surface crevasse + basal crevasse + water */
-	
+
 	}
 
@@ -571,6 +571,6 @@
 
 		/*Some checks in debugging mode*/
-		_assert_(s1>=0 && s1<=1.); 
-		_assert_(s2>=0 && s2<=1.); 
+		_assert_(s1>=0 && s1<=1.);
+		_assert_(s2>=0 && s2<=1.);
 
 		/*Get normal vector*/
@@ -608,5 +608,5 @@
 
 			flux += rho_ice*Jdet*gauss->weight*thickness*(calvingratex*normal[0] + calvingratey*normal[1]);
-			area += Jdet*gauss->weight*thickness; 
+			area += Jdet*gauss->weight*thickness;
 
 			flux_per_area=flux/area;
@@ -614,5 +614,5 @@
 
 		this->inputs->AddInput(new TriaInput(CalvingFluxLevelsetEnum,&flux_per_area,P0Enum));
-		
+
 		/*Clean up and return*/
 		delete gauss;
@@ -708,6 +708,6 @@
 
 		/*Some checks in debugging mode*/
-		_assert_(s1>=0 && s1<=1.); 
-		_assert_(s2>=0 && s2<=1.); 
+		_assert_(s1>=0 && s1<=1.);
+		_assert_(s2>=0 && s2<=1.);
 
 		/*Get normal vector*/
@@ -751,5 +751,5 @@
 			vy_input->GetInputValue(&vy,gauss);
 			vel=vx*vx+vy*vy;
-			meltingrate_input->GetInputValue(&meltingrate,gauss);	
+			meltingrate_input->GetInputValue(&meltingrate,gauss);
 			meltingratex=meltingrate*vx/(sqrt(vel)+1.e-14);
 			meltingratey=meltingrate*vy/(sqrt(vel)+1.e-14);
@@ -757,5 +757,5 @@
 
 			flux += rho_ice*Jdet*gauss->weight*thickness*((calvingratex+meltingratex)*normal[0] + (calvingratey+meltingratey)*normal[1]);
-			area += Jdet*gauss->weight*thickness; 
+			area += Jdet*gauss->weight*thickness;
 
 			flux_per_area=flux/area;
@@ -763,5 +763,5 @@
 
 		this->inputs->AddInput(new TriaInput(CalvingMeltingFluxLevelsetEnum,&flux_per_area,P0Enum));
-		
+
 		/*Clean up and return*/
 		delete gauss;
@@ -882,5 +882,5 @@
 		strain_yy[iv]=epsilon[1];
 		strain_xy[iv]=epsilon[2];
-		vorticity_xy[iv]=epsilon[3]; 
+		vorticity_xy[iv]=epsilon[3];
 	}
 
@@ -909,5 +909,5 @@
 		IssmDouble  sigma_xx,sigma_xy,sigma_yy;
 		IssmDouble  epsilon[3]; /* epsilon=[exx,eyy,exy];*/
-		IssmDouble  base_normal[2]; 
+		IssmDouble  base_normal[2];
 		int domaintype,dim=2;
 
@@ -1016,5 +1016,5 @@
 	if (this->element_type_list) this->element_type=this->element_type_list[analysis_counter];
 
-	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective
 	 * datasets, using internal ids and offsets hidden in hooks: */
 	if(this->hnodes){
@@ -1022,5 +1022,5 @@
 		else this->hnodes[analysis_counter] = NULL;
 	}
-	else this->hnodes = NULL; 
+	else this->hnodes = NULL;
 	this->hvertices->configure(verticesin);
 	this->hmaterial->configure(materialsin);
@@ -1098,5 +1098,5 @@
 	int         connectivity[NUMVERTICES];
 	IssmPDouble values[NUMVERTICES];
-	IssmPDouble gradients[NUMVERTICES]; 
+	IssmPDouble gradients[NUMVERTICES];
 	IssmDouble  value,gradient;
 
@@ -1241,5 +1241,5 @@
 			*presponse=vel;}
 			break;
-		default:  
+		default:
 			_error_("Response type " << EnumToStringx(response_enum) << " not supported yet!");
 	}
@@ -1361,5 +1361,5 @@
 		}
 		/*If was floating*/
-		else{	
+		else{
 			/*Tricky part:
 			 * 1. if base is now touching, we put 1 for sigma_nn and leave water pressure at 0 so that the rest of the module will reground this vertex
@@ -1452,5 +1452,5 @@
 	IssmDouble llr_list[NUMVERTICES][3];
 	IssmDouble x1,y1,z1,x2,y2,z2,x3,y3,z3;
-	IssmDouble arc12,arc23,arc31,semi_peri,excess; 
+	IssmDouble arc12,arc23,arc31,semi_peri,excess;
 
 	/*retrieve coordinates: lat,long,radius */
@@ -1465,16 +1465,16 @@
 	arc31=2.*asin(sqrt(pow(sin((x1-x3)/2),2.0)+cos(x3)*cos(x1)*pow(sin((y1-y3)/2),2)));
 
-	/*semi parameter */ 
-	semi_peri=(arc12+arc23+arc31)/2; 
+	/*semi parameter */
+	semi_peri=(arc12+arc23+arc31)/2;
 
 	/*spherical excess */
-	excess=4.*atan(sqrt(tan(semi_peri/2)*tan((semi_peri-arc12)/2)*tan((semi_peri-arc23)/2)*tan((semi_peri-arc31)/2))); 
+	excess=4.*atan(sqrt(tan(semi_peri/2)*tan((semi_peri-arc12)/2)*tan((semi_peri-arc23)/2)*tan((semi_peri-arc31)/2)));
 
 	/*area = excess*radius^2 */
-	return excess*pow((z1+z2+z3)/3,2); 
+	return excess*pow((z1+z2+z3)/3,2);
 }
 /*}}}*/
 void       Tria::GetAreaCoordinates(IssmDouble* area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints){/*{{{*/
-	/*Computeportion of the element that is grounded*/ 
+	/*Computeportion of the element that is grounded*/
 
 	int         i,j,k;
@@ -1485,5 +1485,5 @@
 
 	/*Initialize xyz_list with original xyz_list of triangle coordinates*/
-	for(j=0;j<3;j++){ 
+	for(j=0;j<3;j++){
 		for(k=0;k<3;k++){
 			xyz_bis[j][k]=xyz_list[j*3+k];
@@ -1491,5 +1491,5 @@
 	}
 	for(i=0;i<numpoints;i++){
-		for(j=0;j<3;j++){ 
+		for(j=0;j<3;j++){
 			for(k=0;k<3;k++){
 				/*Change appropriate line*/
@@ -1518,5 +1518,5 @@
 /*}}}*/
 void       Tria::GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating){/*{{{*/
-	/*Computeportion of the element that is grounded*/ 
+	/*Computeportion of the element that is grounded*/
 
 	bool               floating=true;
@@ -1572,5 +1572,5 @@
 /*}}}*/
 IssmDouble Tria::GetGroundedPortion(IssmDouble* xyz_list){/*{{{*/
-	/*Computeportion of the element that is grounded*/ 
+	/*Computeportion of the element that is grounded*/
 
 	bool              mainlyfloating = true;
@@ -1697,5 +1697,5 @@
 /*}}}*/
 IssmDouble Tria::GetIcefrontArea(){/*{{{*/
-	
+
 	IssmDouble  bed[NUMVERTICES]; //basinId[NUMVERTICES];
 	IssmDouble	Haverage,frontarea;
@@ -1725,5 +1725,5 @@
 		IssmDouble  s[2],x[2],y[2];
 		this->GetLevelsetIntersection(&indices, &numiceverts,&s[0],MaskIceLevelsetEnum,0.);
-		_assert_(numiceverts); 
+		_assert_(numiceverts);
 
 		/*3 Write coordinates*/
@@ -1762,5 +1762,5 @@
 		x1=x[0]; y1=y[0]; x2=x[1]; y2=y[1];
 		distance=sqrt(pow((x1-x2),2)+pow((y1-y2),2));
-		
+
 		int numthk=numiceverts+2;
 		H=xNew<IssmDouble>(numthk);
@@ -1787,9 +1787,9 @@
 		frontarea=distance*Haverage;
 	}
-	else return 0;	
-	
+	else return 0;
+
 	xDelete<int>(indices);
 	xDelete<IssmDouble>(H);
-	
+
 	_assert_(frontarea>0);
 	return frontarea;
@@ -1820,5 +1820,5 @@
 		indicesfront[0]=indicesfront[1];
 		indicesfront[1]=index;
-	}	
+	}
 
 	IssmDouble* xyz_front = xNew<IssmDouble>(3*2);
@@ -1886,5 +1886,5 @@
 		indicesfront[0]=indicesfront[1];
 		indicesfront[1]=index;
-	}	
+	}
 
 	IssmDouble* xyz_front = xNew<IssmDouble>(3*nrfrontnodes);
@@ -1901,5 +1901,5 @@
 void       Tria::GetLevelsetIntersection(int** pindices, int* pnumiceverts, IssmDouble* fraction, int levelset_enum, IssmDouble level){/*{{{*/
 
-	/* GetLevelsetIntersection computes: 
+	/* GetLevelsetIntersection computes:
 	 * 1. indices of element, sorted in [iceverts, noiceverts] in counterclockwise fashion,
 	 * 2. fraction of intersected triangle edges intersected by levelset, lying below level*/
@@ -1943,5 +1943,5 @@
 		}
 	}
-	//merge indices 
+	//merge indices
 	for(i=0;i<numiceverts;i++){indices[i]=indices_ice[i];}
 	for(i=0;i<numnoiceverts;i++){indices[numiceverts+i]=indices_noice[i];}
@@ -1977,5 +1977,5 @@
 void       Tria::GetLevelsetPositivePart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlynegative,IssmDouble* gl){/*{{{*/
 
-	/*Computeportion of the element that has a positive levelset*/ 
+	/*Computeportion of the element that has a positive levelset*/
 
 	bool               negative=true;
@@ -2029,5 +2029,4 @@
 /*}}}*/
 int        Tria::GetVertexIndex(Vertex* vertex){/*{{{*/
-
 	_assert_(vertices);
 	for(int i=0;i<NUMVERTICES;i++){
@@ -2258,5 +2257,5 @@
 
 	/*Scaled not implemented yet...*/
-	_assert_(!scaled); 
+	_assert_(!scaled);
 
 	/*Get domain type*/
@@ -2314,5 +2313,5 @@
 
 	/*Scaled not implemented yet...*/
-	_assert_(!scaled); 
+	_assert_(!scaled);
 
 	int               domaintype,index1,index2;
@@ -2396,6 +2395,6 @@
 
 	/*Some checks in debugging mode*/
-	_assert_(s1>=0 && s1<=1.); 
-	_assert_(s2>=0 && s2<=1.); 
+	_assert_(s1>=0 && s1<=1.);
+	_assert_(s2>=0 && s2<=1.);
 
 	/*Get normal vector*/
@@ -2444,5 +2443,5 @@
 
 	/*Scaled not implemented yet...*/
-	_assert_(!scaled); 
+	_assert_(!scaled);
 
 	int               domaintype,index1,index2;
@@ -2525,6 +2524,6 @@
 
 	/*Some checks in debugging mode*/
-	_assert_(s1>=0 && s1<=1.); 
-	_assert_(s2>=0 && s2<=1.); 
+	_assert_(s1>=0 && s1<=1.);
+	_assert_(s2>=0 && s2<=1.);
 
 	/*Get normal vector*/
@@ -2585,5 +2584,5 @@
 
 	if(false && IsIcefront()){
-		//Assumption: linear ice thickness profile on element. 
+		//Assumption: linear ice thickness profile on element.
 		//Hence ice thickness at intersection of levelset function with triangle edge is linear interpolation of ice thickness at vertices.
 		this->GetLevelsetIntersection(&indices, &numiceverts, s, MaskIceLevelsetEnum, 0.);
@@ -2596,5 +2595,5 @@
 			for(i=0;i<NUMVERTICES;i++) SFaux[i]= scalefactors[indices[i]]; //sort thicknesses in ice/noice
 			switch(numiceverts){
-				case 1: // average over triangle 
+				case 1: // average over triangle
 					SF[0]=SFaux[0];
 					SF[1]=SFaux[0]+s[0]*(SFaux[1]-SFaux[0]);
@@ -2620,5 +2619,5 @@
 		for(i=0;i<NUMVERTICES;i++) Haux[i]= surfaces[indices[i]]-bases[indices[i]]; //sort thicknesses in ice/noice
 		switch(numiceverts){
-			case 1: // average over triangle 
+			case 1: // average over triangle
 				H[0]=Haux[0];
 				H[1]=Haux[0]+s[0]*(Haux[1]-Haux[0]);
@@ -2913,5 +2912,5 @@
 
 	switch(type){
-		case VertexLIdEnum: 
+		case VertexLIdEnum:
 			values = xNew<IssmDouble>(NUMVERTICES);
 			for(int i=0;i<NUMVERTICES;i++){
@@ -2924,5 +2923,5 @@
 			break;
 
-		case VertexPIdEnum: 
+		case VertexPIdEnum:
 			values = xNew<IssmDouble>(NUMVERTICES);
 			for(int i=0;i<NUMVERTICES;i++){
@@ -2935,5 +2934,5 @@
 			break;
 
-		case VertexSIdEnum: 
+		case VertexSIdEnum:
 			values = xNew<IssmDouble>(NUMVERTICES);
 			for(int i=0;i<NUMVERTICES;i++){
@@ -2973,5 +2972,5 @@
 			break;
 
-		case ElementEnum: 
+		case ElementEnum:
 			value=vector[this->Sid()];
 			if(xIsNan<IssmDouble>(value)) _error_("NaN found in vector");
@@ -3023,5 +3022,5 @@
 	isicefront=false;
 	if(IsIceInElement()){
-		nrice=0;       
+		nrice=0;
 		for(i=0;i<NUMVERTICES;i++)
 			if(ls[i]<0.) nrice++;
@@ -3220,5 +3219,5 @@
 	vy_input->GetInputValue(&vy2,gauss_2);
 
-	mass_flux= rho_ice*length*(  
+	mass_flux= rho_ice*length*(
 				(1./3.*(h1-h2)*(vx1-vx2)+0.5*h2*(vx1-vx2)+0.5*(h1-h2)*vx2+h2*vx2)*nx+
 				(1./3.*(h1-h2)*(vy1-vy2)+0.5*h2*(vy1-vy2)+0.5*(h1-h2)*vy2+h2*vy2)*ny
@@ -3430,5 +3429,5 @@
 
 	/*First, serarch the input: */
-	data=inputs->GetInput(natureofdataenum); 
+	data=inputs->GetInput(natureofdataenum);
 
 	/*figure out if we have the vertex id: */
@@ -3467,5 +3466,5 @@
 	bed_normal[0]= + vector[1]/norm;
 	bed_normal[1]= - vector[0]/norm;
-	_assert_(bed_normal[1]<0); 
+	_assert_(bed_normal[1]<0);
 }
 /*}}}*/
@@ -3500,5 +3499,5 @@
 	top_normal[0]= + vector[1]/norm;
 	top_normal[1]= - vector[0]/norm;
-	_assert_(top_normal[1]>0); 
+	_assert_(top_normal[1]>0);
 }
 /*}}}*/
@@ -3615,7 +3614,7 @@
 
 			/*New X axis                  New Z axis*/
-			xz_plane[0]=cos(theta);       xz_plane[3]=0.;  
-			xz_plane[1]=sin(theta);       xz_plane[4]=0.;  
-			xz_plane[2]=0.;               xz_plane[5]=1.;          
+			xz_plane[0]=cos(theta);       xz_plane[3]=0.;
+			xz_plane[1]=sin(theta);       xz_plane[4]=0.;
+			xz_plane[2]=0.;               xz_plane[5]=1.;
 
 			if(groundedice>=0){
@@ -3660,15 +3659,15 @@
 
 	/* Coefficients */
-	A    = 3e-4;        
-	B    = 0.15;      
+	A    = 3e-4;
+	B    = 0.15;
 	alpha = 0.39;
 	beta = 1.18;
-	
+
 	/*Get inputs*/
 	Input* bed_input = this->GetInput(BedEnum);                     _assert_(bed_input);
 	Input* qsg_input = this->GetInput(FrontalForcingsSubglacialDischargeEnum);		 _assert_(qsg_input);
 	Input* TF_input  = this->GetInput(FrontalForcingsThermalForcingEnum);          _assert_(TF_input);
-	GetInputListOnVertices(&basinid[0],FrontalForcingsBasinIdEnum);	
-	
+	GetInputListOnVertices(&basinid[0],FrontalForcingsBasinIdEnum);
+
 	this->FindParam(&yts, ConstantsYtsEnum);
 	this->parameters->FindParam(&numbasins,FrontalForcingsNumberofBasinsEnum);
@@ -3676,5 +3675,5 @@
 
 	IssmDouble meltrates[NUMVERTICES];  //frontal melt-rate
-	
+
 	/* Start looping on the number of vertices: */
 	GaussTria* gauss=new GaussTria();
@@ -3694,5 +3693,5 @@
 			/* calculate melt rates */
 			meltrates[iv]=((A*max(-bed,0.)*pow(max(qsg_basin,0.),alpha)+B)*pow(max(TF,0.),beta))/86400; //[m/s]
-		}	
+		}
 
 		if(xIsNan<IssmDouble>(meltrates[iv])) _error_("NaN found in vector");
@@ -3702,5 +3701,5 @@
 	/*Add input*/
 	this->inputs->AddInput(new TriaInput(CalvingMeltingrateEnum,&meltrates[0],P1Enum));
-   
+
 	/*Cleanup and return*/
 	xDelete<IssmDouble>(basin_icefront_area);
@@ -4049,5 +4048,5 @@
 
 	/*Scaled not implemented yet...*/
-	_assert_(!scaled); 
+	_assert_(!scaled);
 
 	int               domaintype,index1,index2;
@@ -4131,6 +4130,6 @@
 
 	/*Some checks in debugging mode*/
-	_assert_(s1>=0 && s1<=1.); 
-	_assert_(s2>=0 && s2<=1.); 
+	_assert_(s1>=0 && s1<=1.);
+	_assert_(s2>=0 && s2<=1.);
 
 	/*Get normal vector*/
@@ -4178,5 +4177,5 @@
 
 	/*Scaled not implemented yet...*/
-	_assert_(!scaled); 
+	_assert_(!scaled);
 
 	int               domaintype,index1,index2;
@@ -4260,6 +4259,6 @@
 
 	/*Some checks in debugging mode*/
-	_assert_(s1>=0 && s1<=1.); 
-	_assert_(s2>=0 && s2<=1.); 
+	_assert_(s1>=0 && s1<=1.);
+	_assert_(s2>=0 && s2<=1.);
 
 	/*Get normal vector*/
@@ -4302,5 +4301,5 @@
 		vy_input->GetInputValue(&vy,gauss);
 		vel=vx*vx+vy*vy;
-		meltingrate_input->GetInputValue(&meltingrate,gauss);	
+		meltingrate_input->GetInputValue(&meltingrate,gauss);
 		meltingratex=meltingrate*vx/(sqrt(vel)+1.e-14);
 		meltingratey=meltingrate*vy/(sqrt(vel)+1.e-14);
@@ -4328,9 +4327,9 @@
 	/*Get material parameters :*/
 	rho_ice=FindParam(MaterialsRhoIceEnum);
-	Input* floatingmelt_input = this->GetInput(BasalforcingsFloatingiceMeltingRateEnum); _assert_(floatingmelt_input); 
+	Input* floatingmelt_input = this->GetInput(BasalforcingsFloatingiceMeltingRateEnum); _assert_(floatingmelt_input);
 	Input* gllevelset_input = this->GetInput(MaskGroundediceLevelsetEnum); _assert_(gllevelset_input);
 	Input* scalefactor_input = NULL;
 	if(scaled==true){
-		scalefactor_input = this->GetInput(MeshScaleFactorEnum); _assert_(scalefactor_input); 
+		scalefactor_input = this->GetInput(MeshScaleFactorEnum); _assert_(scalefactor_input);
 	}
 	::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
@@ -4373,9 +4372,9 @@
 	/*Get material parameters :*/
 	rho_ice=FindParam(MaterialsRhoIceEnum);
-	Input* groundedmelt_input = this->GetInput(BasalforcingsGroundediceMeltingRateEnum); _assert_(groundedmelt_input); 
+	Input* groundedmelt_input = this->GetInput(BasalforcingsGroundediceMeltingRateEnum); _assert_(groundedmelt_input);
 	Input* gllevelset_input = this->GetInput(MaskGroundediceLevelsetEnum); _assert_(gllevelset_input);
 	Input* scalefactor_input = NULL;
 	if(scaled==true){
-		scalefactor_input = this->GetInput(MeshScaleFactorEnum); _assert_(scalefactor_input); 
+		scalefactor_input = this->GetInput(MeshScaleFactorEnum); _assert_(scalefactor_input);
 	}
 	::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
@@ -4427,5 +4426,5 @@
 	if(scaled==true){
 		Input* scalefactor_input = inputs->GetInput(MeshScaleFactorEnum); _assert_(scalefactor_input);
-		scalefactor_input->GetInputAverage(&scalefactor);// average scalefactor on element 
+		scalefactor_input->GetInputAverage(&scalefactor);// average scalefactor on element
 	}
 	else{
@@ -4446,5 +4445,5 @@
 	/*Checks if debuging*/
 	_assert_(iomodel->elements);
-	_assert_(index==this->sid); 
+	_assert_(index==this->sid);
 
 	/*Recover element type*/
@@ -4693,5 +4692,5 @@
 	int        *indices = NULL;
 	this->GetLevelsetIntersection(&indices, &numiceverts,&s[0],fieldenum,fieldvalue);
-	_assert_(numiceverts); 
+	_assert_(numiceverts);
 
 	/*3 Write coordinates*/
@@ -4798,7 +4797,7 @@
 
 	/*pull thickness averages: */
-	thickness_input=inputs->GetInput(ThicknessEnum); 
+	thickness_input=inputs->GetInput(ThicknessEnum);
 	if (!thickness_input)_error_("thickness input needed to compute gia deflection!");
-	thickness_input->GetInputUpToCurrentTimeAverages(&hes,&times,&numtimes,currenttime);
+	thickness_input->GetInputAveragesUpToCurrentTime(&hes,&times,&numtimes,currenttime);
 
 	/*recover mantle viscosity: */
@@ -4873,5 +4872,5 @@
 	IssmDouble area;
 	IssmDouble earth_radius = 6371012.0;	// Earth's radius [m]
-	IssmDouble I;		//ice/water loading 
+	IssmDouble I;		//ice/water loading
 	IssmDouble rho_ice, rho_earth;
 
@@ -4879,5 +4878,5 @@
 	IssmDouble* U_elastic_precomputed = NULL;
 	IssmDouble* H_elastic_precomputed = NULL;
-	int         M, hemi; 
+	int         M, hemi;
 
 	/*computation of Green functions:*/
@@ -4892,10 +4891,10 @@
 
 	/*Compute ice thickness change: */
-	Input*	deltathickness_input=inputs->GetInput(EsaDeltathicknessEnum); 
+	Input*	deltathickness_input=inputs->GetInput(EsaDeltathicknessEnum);
 	if (!deltathickness_input)_error_("delta thickness input needed to compute elastic adjustment!");
 	deltathickness_input->GetInputAverage(&I);
 
-	/*early return if we are not on the (ice) loading point: */ 
-	if(I==0) return; 
+	/*early return if we are not on the (ice) loading point: */
+	if(I==0) return;
 
 	/*recover material parameters: */
@@ -4907,5 +4906,5 @@
 
 	/*which hemisphere? for north-south, east-west components*/
-	this->parameters->FindParam(&hemi,EsaHemisphereEnum); 
+	this->parameters->FindParam(&hemi,EsaHemisphereEnum);
 
 	/*compute area of element:*/
@@ -4913,5 +4912,5 @@
 
 	/*figure out gravity center of our element (Cartesian): */
-	IssmDouble x_element, y_element; 
+	IssmDouble x_element, y_element;
 	::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
 	x_element=(xyz_list[0][0]+xyz_list[1][0]+xyz_list[2][0])/3.0;
@@ -4938,22 +4937,22 @@
 	IssmDouble* Y_values=xNewZeroInit<IssmDouble>(gsize);
 	IssmDouble dx, dy, dist, alpha, ang, ang2;
-	IssmDouble N_azim, E_azim, X_azim, Y_azim; 
+	IssmDouble N_azim, E_azim, X_azim, Y_azim;
 
 	for(int i=0;i<gsize;i++){
 
-		indices[i]=i; 
-
-		IssmDouble N_azim=0; 
+		indices[i]=i;
+
+		IssmDouble N_azim=0;
 		IssmDouble E_azim=0;
 
 		/*Compute alpha angle between centroid and current vertex: */
-		dx = x_element - xx[i];		dy = y_element - yy[i]; 
-		dist = sqrt(pow(dx,2)+pow(dy,2));						// distance between vertex and elemental centroid [m] 
-		alpha = dist*360.0/(2*PI*earth_radius) * PI/180.0;	// [in radians] 360 degree = 2*pi*earth_radius 
+		dx = x_element - xx[i];		dy = y_element - yy[i];
+		dist = sqrt(pow(dx,2)+pow(dy,2));						// distance between vertex and elemental centroid [m]
+		alpha = dist*360.0/(2*PI*earth_radius) * PI/180.0;	// [in radians] 360 degree = 2*pi*earth_radius
 
 		/*Compute azimuths, both north and east components: */
-		ang = PI/2 - atan2(dy,dx);		// this is bearing angle! 
-		Y_azim = cos(ang); 
-		X_azim = sin(ang); 
+		ang = PI/2 - atan2(dy,dx);		// this is bearing angle!
+		Y_azim = cos(ang);
+		X_azim = sin(ang);
 
 		/*Elastic component  (from Eq 17 in Adhikari et al, GMD 2015): */
@@ -4968,10 +4967,10 @@
 		X_values[i]+=3*rho_ice/rho_earth*area/(4*PI*pow(earth_radius,2))*I*X_elastic[i];
 
-		/*North-south, East-west components */ 
+		/*North-south, East-west components */
 		if (hemi == -1) {
-			ang2 = PI/2 - atan2(yy[i],xx[i]); 
-		} 
+			ang2 = PI/2 - atan2(yy[i],xx[i]);
+		}
 		else if (hemi == 1) {
-			ang2 = PI/2 - atan2(-yy[i],-xx[i]); 
+			ang2 = PI/2 - atan2(-yy[i],-xx[i]);
 		}
 		if (hemi != 0){
@@ -4992,5 +4991,5 @@
 
 	/*free ressources:*/
-	xDelete<int>(indices); 
+	xDelete<int>(indices);
 	xDelete<IssmDouble>(U_values); xDelete<IssmDouble>(N_values); xDelete<IssmDouble>(E_values);
 	xDelete<IssmDouble>(U_elastic); xDelete<IssmDouble>(N_elastic); xDelete<IssmDouble>(E_elastic);
@@ -5009,5 +5008,5 @@
 	IssmDouble xyz_list[NUMVERTICES][3];
 	IssmDouble area;
-	IssmDouble I;		//ice/water loading 
+	IssmDouble I;		//ice/water loading
 	IssmDouble late,longe,re;
 	IssmDouble lati,longi,ri;
@@ -5030,10 +5029,10 @@
 
 	/*Compute ice thickness change: */
-	Input*	deltathickness_input=inputs->GetInput(EsaDeltathicknessEnum); 
+	Input*	deltathickness_input=inputs->GetInput(EsaDeltathicknessEnum);
 	if (!deltathickness_input)_error_("delta thickness input needed to compute elastic adjustment!");
 	deltathickness_input->GetInputAverage(&I);
 
-	/*early return if we are not on the (ice) loading point: */ 
-	if(I==0) return; 
+	/*early return if we are not on the (ice) loading point: */
+	if(I==0) return;
 
 	/*recover material parameters: */
@@ -5077,5 +5076,5 @@
 	longe=(llr_list[0][1]+llr_list[1][1]+llr_list[2][1])/3.0;
 
-	late=90-late; 
+	late=90-late;
 	if(longe>180)longe=(longe-180)-180;
 
@@ -5085,5 +5084,5 @@
 
 	/*figure out gravity center of our element (Cartesian): */
-	IssmDouble x_element, y_element, z_element; 
+	IssmDouble x_element, y_element, z_element;
 	::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
 	x_element=(xyz_list[0][0]+xyz_list[1][0]+xyz_list[2][0])/3.0;
@@ -5108,10 +5107,10 @@
 	IssmDouble alpha;
 	IssmDouble delPhi,delLambda;
-	IssmDouble dx, dy, dz, x, y, z; 
+	IssmDouble dx, dy, dz, x, y, z;
 	IssmDouble N_azim, E_azim;
 
 	for(int i=0;i<gsize;i++){
 
-		indices[i]=i; 
+		indices[i]=i;
 
 		/*Compute alpha angle between centroid and current vertex: */
@@ -5122,12 +5121,12 @@
 
 		/*Compute azimuths, both north and east components: */
-		x = xx[i]; y = yy[i]; z = zz[i]; 
+		x = xx[i]; y = yy[i]; z = zz[i];
 		if(latitude[i]==90){
-			x=1e-12; y=1e-12; 
+			x=1e-12; y=1e-12;
 		}
 		if(latitude[i]==-90){
-			x=1e-12; y=1e-12; 
-		}
-		dx = x_element-x; dy = y_element-y; dz = z_element-z; 
+			x=1e-12; y=1e-12;
+		}
+		dx = x_element-x; dy = y_element-y; dz = z_element-z;
 		N_azim = (-z*x*dx-z*y*dy+(pow(x,2)+pow(y,2))*dz) /pow((pow(x,2)+pow(y,2))*(pow(x,2)+pow(y,2)+pow(z,2))*(pow(dx,2)+pow(dy,2)+pow(dz,2)),0.5);
 		E_azim = (-y*dx+x*dy) /pow((pow(x,2)+pow(y,2))*(pow(dx,2)+pow(dy,2)+pow(dz,2)),0.5);
@@ -5149,5 +5148,5 @@
 
 	/*free ressources:*/
-	xDelete<int>(indices); 
+	xDelete<int>(indices);
 	xDelete<IssmDouble>(U_values); xDelete<IssmDouble>(N_values); xDelete<IssmDouble>(E_values);
 	xDelete<IssmDouble>(U_elastic); xDelete<IssmDouble>(N_elastic); xDelete<IssmDouble>(E_elastic);
@@ -5187,12 +5186,12 @@
 	/*early return if we are not on an ice cap OR ocean:*/
 	if(!(this->inputs->Max(MaskIceLevelsetEnum)<0) && !IsWaterInElement()){
-		dI_list[0] = 0.0; // this is important!!! 
-		dI_list[1] = 0.0; // this is important!!! 
-		dI_list[2] = 0.0; // this is important!!! 
-		return; 
+		dI_list[0] = 0.0; // this is important!!!
+		dI_list[1] = 0.0; // this is important!!!
+		dI_list[2] = 0.0; // this is important!!!
+		return;
 	}
 
 	/*Compute area of element:*/
-	IssmDouble area; 
+	IssmDouble area;
 	area=GetAreaSpherical();
 
@@ -5231,5 +5230,5 @@
 	longe=(llr_list[0][1]+llr_list[1][1]+llr_list[2][1])/3.0;
 
-	late=90-late; 
+	late=90-late;
 	if(longe>180)longe=(longe-180)-180;
 
@@ -5240,5 +5239,5 @@
 
 	if(IsWaterInElement()){
-		IssmDouble rho_water, S; 
+		IssmDouble rho_water, S;
 
 		/*recover material parameters: */
@@ -5248,15 +5247,15 @@
 		S=0; for(int i=0;i<NUMVERTICES;i++) S+=Sg_old[this->vertices[i]->Sid()]/NUMVERTICES;
 
-		/* Perturbation terms for moment of inertia (moi_list): 
-		 * computed analytically (see Wu & Peltier, eqs 10 & 32) 
+		/* Perturbation terms for moment of inertia (moi_list):
+		 * computed analytically (see Wu & Peltier, eqs 10 & 32)
 		 * also consistent with my GMD formulation!
-		 * ALL in geographic coordinates 
+		 * ALL in geographic coordinates
 		 * */
-		dI_list[0] = -4*PI*(rho_water*S*area)*pow(re,4)*(sin(late)*cos(late)*cos(longe))/eartharea; 
-		dI_list[1] = -4*PI*(rho_water*S*area)*pow(re,4)*(sin(late)*cos(late)*sin(longe))/eartharea; 
-		dI_list[2] = +4*PI*(rho_water*S*area)*pow(re,4)*(1-pow(sin(late),2))/eartharea; 
+		dI_list[0] = -4*PI*(rho_water*S*area)*pow(re,4)*(sin(late)*cos(late)*cos(longe))/eartharea;
+		dI_list[1] = -4*PI*(rho_water*S*area)*pow(re,4)*(sin(late)*cos(late)*sin(longe))/eartharea;
+		dI_list[2] = +4*PI*(rho_water*S*area)*pow(re,4)*(1-pow(sin(late),2))/eartharea;
 	}
 	else if(this->inputs->Max(MaskIceLevelsetEnum)<0){
-		IssmDouble rho_ice, I; 
+		IssmDouble rho_ice, I;
 
 		/*recover material parameters: */
@@ -5264,14 +5263,14 @@
 
 		/*Compute ice thickness change: */
-		Input*	deltathickness_input=inputs->GetInput(SealevelriseDeltathicknessEnum); 
+		Input*	deltathickness_input=inputs->GetInput(SealevelriseDeltathicknessEnum);
 		if (!deltathickness_input)_error_("delta thickness input needed to compute sea level rise!");
 		deltathickness_input->GetInputAverage(&I);
 
-		dI_list[0] = -4*PI*(rho_ice*I*area)*pow(re,4)*(sin(late)*cos(late)*cos(longe))/eartharea; 
-		dI_list[1] = -4*PI*(rho_ice*I*area)*pow(re,4)*(sin(late)*cos(late)*sin(longe))/eartharea; 
-		dI_list[2] = +4*PI*(rho_ice*I*area)*pow(re,4)*(1-pow(sin(late),2))/eartharea; 
-	}
-
-	return; 
+		dI_list[0] = -4*PI*(rho_ice*I*area)*pow(re,4)*(sin(late)*cos(late)*cos(longe))/eartharea;
+		dI_list[1] = -4*PI*(rho_ice*I*area)*pow(re,4)*(sin(late)*cos(late)*sin(longe))/eartharea;
+		dI_list[2] = +4*PI*(rho_ice*I*area)*pow(re,4)*(1-pow(sin(late),2))/eartharea;
+	}
+
+	return;
 }/*}}}*/
 void    Tria::SealevelriseEustatic(Vector<IssmDouble>* pSgi,IssmDouble* peustatic,IssmDouble* latitude,IssmDouble* longitude,IssmDouble* radius,IssmDouble oceanarea,IssmDouble eartharea){ /*{{{*/
@@ -5340,5 +5339,5 @@
 	/*recover elastic green function:*/
 	if(computeelastic){
-		DoubleVecParam* parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelriseGElasticEnum)); 
+		DoubleVecParam* parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelriseGElasticEnum));
 		_assert_(parameter);
 		parameter->GetParameterValueByPointer(&G_elastic_precomputed,&M);
@@ -5380,5 +5379,5 @@
 	longe=(llr_list[0][1]+llr_list[1][1]+llr_list[2][1])/3.0;
 
-	late=90-late; 
+	late=90-late;
 	if(longe>180)longe=(longe-180)-180;
 
@@ -5399,10 +5398,10 @@
 
 	/*Compute ice thickness change: */
-	Input*	deltathickness_input=inputs->GetInput(SealevelriseDeltathicknessEnum); 
+	Input*	deltathickness_input=inputs->GetInput(SealevelriseDeltathicknessEnum);
 	if (!deltathickness_input)_error_("delta thickness input needed to compute sea level rise!");
 
 	/*If we are fully grounded, take the average over the element: */
 	if(!notfullygrounded)deltathickness_input->GetInputAverage(&I);
-	else{ 
+	else{
 		IssmDouble total_weight=0;
 		bool mainlyfloating = true;
@@ -5430,6 +5429,6 @@
 	/*Compute eustatic compoent:*/
 	_assert_(oceanarea>0.);
-	if(scaleoceanarea) oceanarea=3.619e+14; // use true ocean area, m^2 
-	eustatic += rho_ice*area*I/(oceanarea*rho_water); 
+	if(scaleoceanarea) oceanarea=3.619e+14; // use true ocean area, m^2
+	eustatic += rho_ice*area*I/(oceanarea*rho_water);
 
 	if(computeelastic | computerigid){
@@ -5564,5 +5563,5 @@
 	longe=(llr_list[0][1]+llr_list[1][1]+llr_list[2][1])/3.0;
 
-	late=90-late; 
+	late=90-late;
 	if(longe>180)longe=(longe-180)-180;
 
@@ -5589,5 +5588,5 @@
 	for(int i=0;i<gsize;i++){
 
-		indices[i]=i; 
+		indices[i]=i;
 
 		/*Compute alpha angle between centroid and current vertex : */
@@ -5598,6 +5597,6 @@
 
 		/*Rigid earth gravitational perturbation: */
-		if(computerigid){ 
-			G_rigid[i]=1.0/2.0/sin(alpha/2.0); 
+		if(computerigid){
+			G_rigid[i]=1.0/2.0/sin(alpha/2.0);
 			values[i]+=3*rho_water/rho_earth*area/eartharea*S*G_rigid[i];
 		}
@@ -5662,5 +5661,5 @@
 
 	/*early return if we are not on the ocean or on an ice cap:*/
-	if(!(this->inputs->Max(MaskIceLevelsetEnum)<0) && !IsWaterInElement()) return; 
+	if(!(this->inputs->Max(MaskIceLevelsetEnum)<0) && !IsWaterInElement()) return;
 
 	/*early return if we are fully floating: */
@@ -5715,5 +5714,5 @@
 	longe=(llr_list[0][1]+llr_list[1][1]+llr_list[2][1])/3.0;
 
-	late=90-late; 
+	late=90-late;
 	if(longe>180)longe=(longe-180)-180;
 
@@ -5723,5 +5722,5 @@
 
 	/*figure out gravity center of our element (Cartesian): */
-	IssmDouble x_element, y_element, z_element; 
+	IssmDouble x_element, y_element, z_element;
 	::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
 	x_element=(xyz_list[0][0]+xyz_list[1][0]+xyz_list[2][0])/3.0;
@@ -5741,5 +5740,5 @@
 
 	/*Compute ice thickness change: */
-	Input*	deltathickness_input=inputs->GetInput(SealevelriseDeltathicknessEnum); 
+	Input*	deltathickness_input=inputs->GetInput(SealevelriseDeltathicknessEnum);
 	if (!deltathickness_input)_error_("delta thickness input needed to compute sea level rise!");
 	deltathickness_input->GetInputAverage(&I);
@@ -5755,15 +5754,15 @@
 	U_values=xNewZeroInit<IssmDouble>(gsize);
 	if(horiz){
-		N_values=xNewZeroInit<IssmDouble>(gsize); 
+		N_values=xNewZeroInit<IssmDouble>(gsize);
 		E_values=xNewZeroInit<IssmDouble>(gsize);
 	}
 	IssmDouble alpha;
 	IssmDouble delPhi,delLambda;
-	IssmDouble dx, dy, dz, x, y, z; 
+	IssmDouble dx, dy, dz, x, y, z;
 	IssmDouble N_azim, E_azim;
 
 	for(int i=0;i<gsize;i++){
 
-		indices[i]=i; 
+		indices[i]=i;
 
 		/*Compute alpha angle between centroid and current vertex: */
@@ -5774,12 +5773,12 @@
 
 		/*Compute azimuths, both north and east components: */
-		x = xx[i]; y = yy[i]; z = zz[i]; 
+		x = xx[i]; y = yy[i]; z = zz[i];
 		if(latitude[i]==90){
-			x=1e-12; y=1e-12; 
+			x=1e-12; y=1e-12;
 		}
 		if(latitude[i]==-90){
-			x=1e-12; y=1e-12; 
-		}
-		dx = x_element-x; dy = y_element-y; dz = z_element-z; 
+			x=1e-12; y=1e-12;
+		}
+		dx = x_element-x; dy = y_element-y; dz = z_element-z;
 		if(horiz){
 			N_azim = (-z*x*dx-z*y*dy+(pow(x,2)+pow(y,2))*dz) /pow((pow(x,2)+pow(y,2))*(pow(x,2)+pow(y,2)+pow(z,2))*(pow(dx,2)+pow(dy,2)+pow(dz,2)),0.5);
@@ -5818,7 +5817,7 @@
 
 	/*free ressources:*/
-	xDelete<int>(indices); 
-	xDelete<IssmDouble>(U_values); 
-	xDelete<IssmDouble>(U_elastic); 
+	xDelete<int>(indices);
+	xDelete<IssmDouble>(U_values);
+	xDelete<IssmDouble>(U_elastic);
 	if(horiz){
 		xDelete<IssmDouble>(N_values); xDelete<IssmDouble>(E_values);
Index: /issm/trunk-jpl/src/c/classes/Elements/TriaRef.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/TriaRef.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Elements/TriaRef.cpp	(revision 24240)
@@ -33,5 +33,5 @@
 /*Reference Element numerics*/
 void TriaRef::GetInputDerivativeValue(IssmDouble* p, IssmDouble* plist,IssmDouble* xyz_list, Gauss* gauss,int finiteelement){/*{{{*/
-	/*From node values of parameter p (plist[0],plist[1],plist[2]), return parameter derivative value at gaussian 
+	/*From node values of parameter p (plist[0],plist[1],plist[2]), return parameter derivative value at gaussian
 	 * point specified by gauss_basis:
 	 *   dp/dx=plist[0]*dh1/dx+plist[1]*dh2/dx+plist[2]*dh3/dx
@@ -89,5 +89,5 @@
 /*}}}*/
 void TriaRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
-	/*The Jacobian is constant over the element, discard the gaussian points. 
+	/*The Jacobian is constant over the element, discard the gaussian points.
 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
 
@@ -106,5 +106,5 @@
 /*}}}*/
 void TriaRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
-	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+	/*The Jacobian determinant is constant over the element, discard the gaussian points.
 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
 	IssmDouble J[2][2];
@@ -120,5 +120,5 @@
 /*}}}*/
 void TriaRef::GetJacobianDeterminant3D(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
-	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+	/*The Jacobian determinant is constant over the element, discard the gaussian points.
 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
 	IssmDouble J[2][2];
@@ -202,5 +202,5 @@
 void TriaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss,int finiteelement){/*{{{*/
 
-	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+	/*This routine returns the values of the nodal functions derivatives  (with respect to the
 	 * actual coordinate system): */
 	IssmDouble    Jinv[2][2];
@@ -211,10 +211,10 @@
 	/*Get nodal functions derivatives in reference triangle*/
 	IssmDouble dbasis_ref[2*NUMNODESMAX];
-	GetNodalFunctionsDerivativesReference(dbasis_ref,gauss,finiteelement); 
+	GetNodalFunctionsDerivativesReference(dbasis_ref,gauss,finiteelement);
 
 	/*Get Jacobian invert: */
 	GetJacobianInvert(&Jinv[0][0], xyz_list, gauss);
 
-	/*Build dbasis: 
+	/*Build dbasis:
 	 * [dhi/dx]= Jinv*[dhi/dr]
 	 * [dhi/dy]       [dhi/ds]
@@ -228,5 +228,5 @@
 /*}}}*/
 void TriaRef::GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
-	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+	/*The Jacobian determinant is constant over the element, discard the gaussian points.
 	 * J is assumed to have been allocated*/
 
@@ -313,5 +313,5 @@
 /*}}}*/
 void TriaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss_in,int finiteelement){/*{{{*/
-	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+	/*This routine returns the values of the nodal functions derivatives  (with respect to the
 	 * natural coordinate system) at the gaussian point. */
 
Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 24240)
@@ -1534,5 +1534,7 @@
 void FemModel::IcefrontAreax(){/*{{{*/
 
+	int numvertices      = this->GetElementsWidth();
 	int numbasins;
+	IssmDouble* BasinId   = xNew<IssmDouble>(numvertices);
 	this->parameters->FindParam(&numbasins,FrontalForcingsNumberofBasinsEnum);
 	IssmDouble* basin_icefront_area           = xNewZeroInit<IssmDouble>(numbasins);
@@ -1544,9 +1546,6 @@
 		for(int i=0;i<this->elements->Size();i++){
 			Element* element=xDynamicCast<Element*>(this->elements->GetObjectByOffset(i));
-			if(!element->IsOnBase()) continue;
-			int  numvertices = element->GetNumberOfVertices();
-			IssmDouble* BasinId   = xNew<IssmDouble>(numvertices);
 			element->GetInputListOnVertices(BasinId,FrontalForcingsBasinIdEnum);
-			for(int j=0;j<3;j++){
+			for(int j=0;j<numvertices;j++){
 				if(BasinId[j]==basin){
 					local_icefront_area+=element->GetIcefrontArea();
@@ -1554,5 +1553,4 @@
 				}
 			}
-			xDelete<IssmDouble>(BasinId);
 		}
 		ISSM_MPI_Reduce(&local_icefront_area,&total_icefront_area,1,ISSM_MPI_DOUBLE,ISSM_MPI_SUM,0,IssmComm::GetComm());
@@ -1563,6 +1561,7 @@
 
 	this->parameters->AddObject(new DoubleVecParam(FrontalForcingsBasinIcefrontAreaEnum,basin_icefront_area,numbasins));
+
 	xDelete<IssmDouble>(basin_icefront_area);
-
+	xDelete<IssmDouble>(BasinId);
 }/*}}}*/
 void FemModel::IcefrontMassFluxx(IssmDouble* pM, bool scaled){/*{{{*/
@@ -2216,5 +2215,5 @@
 /*}}}*/
 void FemModel::RequestedOutputsx(Results **presults,char** requested_outputs, int numoutputs, bool save_results){/*{{{*/
-	
+
 	/*Intermediaries*/
 	bool        isvec,results_on_nodes;
@@ -2235,10 +2234,11 @@
 	if(numonnodes) parameters->FindParam(&resultsonnodes,&numonnodes,SettingsResultsOnNodesEnum);
 
+
 	/*Go through all requested output*/
 	for(int i=0;i<numoutputs;i++){
-
 		output_string = requested_outputs[i];
 		output_enum   = StringToEnumx(output_string,false);
 		isvec         = false;
+
 
 		/*If string is not an enum, it is defined in output definitions*/
@@ -5086,39 +5086,22 @@
 }
 /*}}}*/
-void FemModel::InitMeanOutputx(int* stackedinput_enum,int numoutputs){ /*{{{*/
-
-  for(int i=0;i<numoutputs;i++){
-		if(stackedinput_enum[i]<0){
+void FemModel::InitTransientOutputx(int* transientinput_enum,int numoutputs){ /*{{{*/
+
+	for(int i=0;i<numoutputs;i++){
+		if(transientinput_enum[i]<0){
 			_error_("Can't deal with non enum fields for result Stack");
 		}
 		else{
 			for(int j=0;j<elements->Size();j++){
+				TransientInput* transient_input = new TransientInput(transientinput_enum[i]);
 				/*Intermediaries*/
-				Element*    element     = xDynamicCast<Element*>(elements->GetObjectByOffset(j));
-				int         numvertices = element->GetNumberOfVertices();
-				IssmDouble* zeros       = xNewZeroInit<IssmDouble>(numvertices);
-				switch(element->ObjectEnum()){
-					case TriaEnum:
-						element->inputs->AddInput(new TriaInput(stackedinput_enum[i],&zeros[0],P1Enum));
-						break;
-					case PentaEnum:
-						element->inputs->AddInput(new PentaInput(stackedinput_enum[i],&zeros[0],P1Enum));
-						break;
-					case TetraEnum:
-						element->inputs->AddInput(new TetraInput(stackedinput_enum[i],&zeros[0],P1Enum));
-						break;
-					default: _error_("Not implemented yet");
-				}
-				xDelete<IssmDouble>(zeros);
-			}
-		}
-	}
-}
-/*}}}*/
-void FemModel::SumOutputx(int* input_enum,int* stackedinput_enum,int numoutputs){ /*{{{*/
-
-	//First get sub-timestep
-	IssmDouble hydrodt;
-	this->parameters->FindParam(&hydrodt,HydrologydtEnum);
+				Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(j));
+				element->inputs->AddInput(transient_input);
+			}
+		}
+	}
+}
+/*}}}*/
+void FemModel::StackTransientOutputx(int* input_enum,int* transientinput_enum,IssmDouble subtime,int numoutputs){ /*{{{*/
 
   for(int i=0;i<numoutputs;i++){
@@ -5130,45 +5113,54 @@
 				/*Intermediaries*/
 				Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(j));
+				Input* input=element->inputs->GetInput(transientinput_enum[i]); _assert_(input); //this is the enum stack
+				TransientInput* stacking_input=xDynamicCast<TransientInput*>(input);
+
 				int  numvertices = element->GetNumberOfVertices();
-				IssmDouble* values_to_add=xNew<IssmDouble>(numvertices);
-				IssmDouble* existing_values=xNew<IssmDouble>(numvertices);
-				element->GetInputListOnVertices(&values_to_add[0],input_enum[i]); //those are the values to add
-				element->GetInputListOnVertices(&existing_values[0],stackedinput_enum[i]); //those are the values to add
-				for(int k=0;k<numvertices;k++){
-					existing_values[k]+=values_to_add[k]*hydrodt;
+				IssmDouble* N=xNew<IssmDouble>(numvertices);
+				element->GetInputListOnVertices(&N[0],input_enum[i]);   //this is the enum to stack
+				switch(element->ObjectEnum()){
+				case TriaEnum:
+					stacking_input->AddTimeInput(new TriaInput(transientinput_enum[i],&N[0],P1Enum),subtime);
+					break;
+				case PentaEnum:
+					stacking_input->AddTimeInput(new PentaInput(transientinput_enum[i],&N[0],P1Enum),subtime);
+					break;
+				case TetraEnum:
+					stacking_input->AddTimeInput(new TetraInput(transientinput_enum[i],&N[0],P1Enum),subtime);
+					break;
+				default: _error_("Not implemented yet");
 				}
-				element->AddInput(stackedinput_enum[i],&existing_values[0],P1Enum);
-				xDelete<IssmDouble>(existing_values);
-				xDelete<IssmDouble>(values_to_add);
-			}
-		}
-	}
-}
-/*}}}*/
-void FemModel::AverageSumOutputx(int* stackedinput_enum,int* averagedinput_enum,int numoutputs){ /*{{{*/
-
-	//First get timestep
-	IssmDouble maindt;
-	this->parameters->FindParam(&maindt,TimesteppingTimeStepEnum);
-  for(int i=0;i<numoutputs;i++){
-		if(stackedinput_enum[i]<0){
+				stacking_input->Configure(parameters);
+				xDelete<IssmDouble>(N);
+			}
+		}
+	}
+}
+/*}}}*/
+void FemModel::AverageTransientOutputx(int* transientinput_enum,int* averagedinput_enum,IssmDouble init_time,IssmDouble end_time,int numoutputs){ /*{{{*/
+
+
+	IssmDouble yts;
+	this->parameters->FindParam(&yts,ConstantsYtsEnum);
+	for(int i=0;i<numoutputs;i++){
+		if(transientinput_enum[i]<0){
 			_error_("Can't deal with non enum fields for result Stack");
 		}
 		else{
 			for(int j=0;j<elements->Size();j++){
-				/*Intermediaries*/
-				Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(j));
-				int  numvertices = element->GetNumberOfVertices();
-				IssmDouble* time_averaged=xNew<IssmDouble>(numvertices);
-				IssmDouble* existing_values=xNew<IssmDouble>(numvertices);
-				element->GetInputListOnVertices(&existing_values[0],stackedinput_enum[i]); //those are the values to add
-
-				for(int k=0;k<numvertices;k++){
-					time_averaged[k]=existing_values[k]/maindt;
+				Element*    element       = xDynamicCast<Element*>(elements->GetObjectByOffset(j));
+				int         numnodes      = element->GetNumberOfNodes();
+				IssmDouble* time_averaged = xNew<IssmDouble>(numnodes);
+				Gauss*      gauss         = element->NewGauss();
+
+				Input*      input         = element->GetInput(transientinput_enum[i]); _assert_(input);
+				TransientInput* transient_input=xDynamicCast<TransientInput*>(input);
+
+				for(int iv=0;iv<numnodes;iv++){
+					gauss->GaussNode(element->FiniteElement(),iv);
+					transient_input->GetInputAverageOverTimeSlice(&time_averaged[iv],gauss,init_time,end_time);
 				}
-
-				element->AddInput(averagedinput_enum[i],&time_averaged[0],P1Enum);
-				xDelete<IssmDouble>(time_averaged);
-				xDelete<IssmDouble>(existing_values);
+				element->AddInput(averagedinput_enum[i],&time_averaged[0],element->GetElementType());
+				delete gauss;
 			}
 		}
Index: /issm/trunk-jpl/src/c/classes/FemModel.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/FemModel.h	(revision 24240)
@@ -170,7 +170,7 @@
 		void UpdateConstraintsExtrudeFromTopx();
 		void UpdateConstraintsL2ProjectionEPLx(IssmDouble* pL2count);
-		void InitMeanOutputx(int* stackedinput_enum,int numoutputs);
-		void SumOutputx(int* input_enum,int* stackedinput_enum,int numoutputs);
-		void AverageSumOutputx(int* stackedinput_enum,int* averagedinput_enum,int numoutputs);
+		void InitTransientOutputx(int* transientinput_enum,int numoutputs);
+		void StackTransientOutputx(int* input_enum,int* transientinput_enum,IssmDouble hydrotime,int numoutputs);
+		void AverageTransientOutputx(int* transientinput_enum,int* averagedinput_enum,IssmDouble init_time,IssmDouble end_time,int numoutputs);
 		void UpdateConstraintsx(void);
 		int  UpdateVertexPositionsx(void);
Index: /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.cpp	(revision 24240)
@@ -153,4 +153,27 @@
 }
 /*}}}*/
+void BoolInput::PointwiseMult(Input* xinput){/*{{{*/
+	/*That would compare to a AND operation*/
+	BoolInput* xboolinput=NULL;
+
+	/*xinput is of the same type, so cast it: */
+	xboolinput=(BoolInput*)xinput;
+
+	/*Carry out the PointwiseMult operation depending on type:*/
+	switch(xinput->ObjectEnum()){
+
+		case BoolInputEnum:
+			this->value=reCast<bool,IssmDouble>(this->value=this->value*xboolinput->value);
+			return;
+
+		default:
+			_error_("not implemented yet");
+	}
+}
+/*}}}*/
+void BoolInput::Pow(IssmDouble exponent){/*{{{*/
+	/* no power for Bools*/
+}
+/*}}}*/
 void BoolInput::Scale(IssmDouble scale_factor){/*{{{*/
 	/*a bool cannot be scaled: */
Index: /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.h	(revision 24240)
@@ -1,3 +1,3 @@
-/*! \file BoolInput.h 
+/*! \file BoolInput.h
  *  \brief: header file for triavertexinput object
  */
@@ -44,9 +44,9 @@
 		void ChangeEnum(int newenumtype);
 		void Extrude(int start);
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
 		void GetInputAverage(IssmDouble* pvalue);
+		void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
 		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, Gauss* gauss){_error_("not implemented yet");};
 		void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list){_error_("not implemented yet");};
-		void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
+		void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
 		void GetInputValue(bool* pvalue);
 		void GetInputValue(int* pvalue);
@@ -61,4 +61,6 @@
 		IssmDouble Min(void){_error_("Min not implemented for booleans");};
 		IssmDouble MinAbs(void){_error_("Min not implemented for booleans");};
+		void PointwiseMult(Input* xinput);
+		void Pow(IssmDouble exponent);
 		void Scale(IssmDouble scale_factor);
 		/*}}}*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp	(revision 24240)
@@ -253,4 +253,7 @@
 }
 /*}}}*/
+void ControlInput::PointwiseMult(Input* xinput){/*{{{*/
+	values->PointwiseMult(xinput);
+}/*}}}*/
 void ControlInput::SaveValue(void){/*{{{*/
 	if(!values) _error_("Values of " << EnumToStringx(this->enum_type) << " not found");
Index: /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.h	(revision 24240)
@@ -1,3 +1,3 @@
-/*! \file ControlInput.h 
+/*! \file ControlInput.h
  *  \brief: header file for triavertexinput object
  */
@@ -35,5 +35,5 @@
 		void  DeepEcho();
 		void  Echo();
-		int   Id(); 
+		int   Id();
 		void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
 		int   ObjectEnum();
@@ -52,9 +52,9 @@
 		void GetGradient(Vector<IssmDouble>* gradient_vec,int* doflist);
 		void GetGradientValue(IssmDouble* pvalue,Gauss* gauss);
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
+		void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
 		void GetInputAverage(IssmDouble* pvalue);
 		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list,Gauss* gauss);
 		void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list){_error_("not implemented yet");};
-		void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
+		void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
 		void GetInputValue(bool* pvalue);
 		void GetInputValue(int* pvalue);
@@ -75,4 +75,6 @@
 		void ResultToPatch(IssmDouble* values,int nodesperelement,int sid){_error_("not supported yet");};
 		void SaveValue(void);
+		void PointwiseMult(Input* xinput);
+		void Pow(IssmDouble exponent){_error_("not implemented yet");};
 		void Scale(IssmDouble scale_factor){_error_("not implemented yet");};
 		void SetGradient(Input* gradient_in,int timestep);
Index: /issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.h	(revision 24240)
@@ -1,3 +1,3 @@
-/*! \file DatasetInput.h 
+/*! \file DatasetInput.h
  *  \brief: header file for datasetinput object
  */
@@ -47,5 +47,5 @@
 		void Extrude(int start){_error_("not implemented yet");};
 		void GetGradient(Vector<IssmDouble>* gradient_vec,int* doflist){_error_("not implemented yet");};
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
+		void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
 		void GetInputAverage(IssmDouble* pvalue){_error_("not implemented yet");};
 		void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list){_error_("not implemented yet");};
@@ -57,5 +57,5 @@
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");};
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index);
-		void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
+		void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
 		int  GetInputInterpolationType(){_error_("not implemented yet!");};
 		int GetResultArraySize(void){_error_("not implemented yet");};
@@ -69,4 +69,6 @@
 		void ResultToPatch(IssmDouble* values,int nodesperelement,int sid){_error_("not supported yet");};
 		void SaveValue(void){_error_("not implemented yet");};
+		void PointwiseMult(Input* xinput){_error_("not implemented yet");};
+		void Pow(IssmDouble exponent){_error_("not implemented yet");};
 		void Scale(IssmDouble scale_factor){_error_("not implemented yet");};
 		void SetGradient(Input* gradient_in){_error_("not implemented yet");};
Index: /issm/trunk-jpl/src/c/classes/Inputs/DoubleArrayInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/DoubleArrayInput.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/DoubleArrayInput.h	(revision 24240)
@@ -1,3 +1,3 @@
-/*! \file DoubleArrayInput.h 
+/*! \file DoubleArrayInput.h
  *  \brief: header file for vector type input object
  */
@@ -27,5 +27,5 @@
 		void  DeepEcho();
 		void  Echo();
-		int   Id(); 
+		int   Id();
 		void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
 		int   ObjectEnum();
@@ -46,5 +46,5 @@
 		void ChangeEnum(int newenumtype);
 		void Extrude(int start){_error_("not supported yet");};
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
+		void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
 		void GetInputAverage(IssmDouble* pvalue){_error_("not implemented yet");};
 		void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list){_error_("not implemented yet");};
@@ -56,5 +56,5 @@
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");};
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");};
-		void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
+		void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
 		void GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){_error_("not implemented yet");};
 		int  GetInputInterpolationType(){_error_("not implemented yet!");};
@@ -63,4 +63,6 @@
 		IssmDouble Min(void){_error_("not implemented yet");};
 		IssmDouble MinAbs(void){_error_("not implemented yet");};
+		void PointwiseMult(Input* xinput){_error_("not implemented yet");};
+		void Pow(IssmDouble exponent){_error_("not implemented yet");};
 		void Scale(IssmDouble scale_factor){_error_("not implemented yet");};
 		/*}}}*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.cpp	(revision 24240)
@@ -171,4 +171,61 @@
 }
 /*}}}*/
+void DoubleInput::PointwiseMult(Input* xinput){/*{{{*/
+
+	DoubleInput* xIssmDoubleinput=NULL;
+
+
+	/*xinput is of the same type, so cast it: */
+	xIssmDoubleinput=(DoubleInput*)xinput;
+
+	switch(xinput->ObjectEnum()){
+
+		case DoubleInputEnum:
+			this->value=this->value*xIssmDoubleinput->value;
+			return;
+
+		default:
+			_error_("not implemented yet");
+	}
+}
+/*}}}*/
+void DoubleInput::Pow(IssmDouble exponent){/*{{{*/
+
+	if(exponent==0.0){
+		/*  Not-a-number left alone Infinity set to one  */
+		if (value==value)value=1.0;
+	}
+	else if(exponent==0.5){
+		if(value>=0){
+			value=sqrt(value);
+		}
+		else{
+			value=INFINITY;
+		}
+	}
+	else if(exponent==1.0){
+		/* do nothing */
+	}
+	else if(exponent==-0.5){
+		if(value>=0){
+			value=1.0/sqrt(value);
+		}
+		else{
+			value=INFINITY;
+		}
+	}
+	else if(exponent==-1.0){
+		if(value!=0.){
+			value=1.0/value;
+		}
+		else{
+			value=INFINITY;
+		}
+	}
+	else {
+		value=pow(value,exponent);
+	}
+}
+/*}}}*/
 void DoubleInput::Scale(IssmDouble scale_factor){/*{{{*/
 	value=value*scale_factor;
Index: /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.h	(revision 24240)
@@ -1,3 +1,3 @@
-/*! \file DoubleInput.h 
+/*! \file DoubleInput.h
  *  \brief: header file for triavertexinput object
  */
@@ -28,5 +28,5 @@
 		void  DeepEcho();
 		void  Echo();
-		int   Id(); 
+		int   Id();
 		void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
 		int   ObjectEnum();
@@ -47,5 +47,5 @@
 		void ChangeEnum(int newenumtype);
 		void Extrude(int start){_error_("not supported yet");};
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
+		void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
 		void GetInputAverage(IssmDouble* pvalue);
 		void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list){_error_("not implemented yet");};
@@ -57,5 +57,5 @@
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");};
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");};
-		void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
+		void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
 		int  GetInputInterpolationType(){return P0Enum; };
 		void GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist);
@@ -64,4 +64,6 @@
 		IssmDouble Min(void);
 		IssmDouble MinAbs(void);
+		void PointwiseMult(Input* xinput);
+		void Pow(IssmDouble exponent);
 		void Scale(IssmDouble scale_factor);
 		/*}}}*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/Input.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/Input.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/Input.h	(revision 24240)
@@ -1,5 +1,5 @@
 /*!\file:  Input.h
  * \brief abstract class for Input object
- */ 
+ */
 
 #ifndef _INPUT_H_
@@ -21,5 +21,5 @@
 class Input: public Object{
 
-	public: 
+	public:
 
 		virtual        ~Input(){};
@@ -27,5 +27,5 @@
 		virtual void ChangeEnum(int newenumtype)=0;
 		virtual void Configure(Parameters* parameters)=0;
-		virtual void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes)=0;
+		virtual void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes)=0;
 		virtual void GetInputAverage(IssmDouble* pvalue)=0;
 		virtual void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list)=0;
@@ -38,6 +38,6 @@
 		virtual void GetInputValue(IssmDouble* pvalue,Gauss* gauss,int index)=0;
 		virtual int  GetInputInterpolationType()=0;
-		virtual void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime)=0;
-		virtual int  InstanceEnum()=0; 
+		virtual void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime)=0;
+		virtual int  InstanceEnum()=0;
 
 		virtual void   AXPY(Input* xinput,IssmDouble scalar)=0;
@@ -48,4 +48,6 @@
 		virtual IssmDouble Min(void)=0;
 		virtual IssmDouble MinAbs(void)=0;
+		virtual void   PointwiseMult(Input* xinput)=0;
+		virtual void   Pow(IssmDouble exponent)=0;
 		virtual void   Scale(IssmDouble scale_factor)=0;
 
@@ -56,5 +58,5 @@
 		virtual Input* SpawnTriaInput(int index1,int index2,int index3)=0;
 		virtual void ResultToMatrix(IssmDouble* values,int ncols,int sid){_error_("not supported yet");};
-		virtual void ResultToPatch(IssmDouble* values,int nodesperelement,int sid){_error_("not supported yet");}; 
+		virtual void ResultToPatch(IssmDouble* values,int nodesperelement,int sid){_error_("not supported yet");};
 };
 #endif
Index: /issm/trunk-jpl/src/c/classes/Inputs/IntInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/IntInput.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/IntInput.cpp	(revision 24240)
@@ -149,4 +149,66 @@
 }
 /*}}}*/
+void IntInput::PointwiseMult(Input* xinput){/*{{{*/
+
+	IssmDouble dvalue;
+	IntInput* xintinput=NULL;
+
+	/*xinput is of the same type, so cast it: */
+	xintinput=(IntInput*)xinput;
+
+	/*Carry out the PointwiseMult operation depending on type:*/
+	switch(xinput->ObjectEnum()){
+
+		case IntInputEnum:
+			dvalue=(IssmDouble)this->value*(IssmDouble)xintinput->value;
+			this->value=reCast<int>(dvalue);
+			return;
+
+		default:
+			_error_("not implemented yet");
+	}
+}
+/*}}}*/
+void IntInput::Pow(IssmDouble exponent){/*{{{*/
+
+	IssmDouble dvalue;
+
+	if(exponent==0.0){
+		/*  Not-a-number left alone Infinity set to one  */
+		if (dvalue==dvalue)dvalue=1.0;
+	}
+	else if(exponent==0.5){
+		if(dvalue>=0){
+			dvalue=sqrt(dvalue);
+		}
+		else{
+			dvalue=INFINITY;
+		}
+	}
+	else if(exponent==1.0){
+		/* do nothing */
+	}
+	else if(exponent==-0.5){
+		if(dvalue>=0){
+			dvalue=1.0/sqrt(dvalue);
+		}
+		else{
+			dvalue=INFINITY;
+		}
+	}
+	else if(exponent==-1.0){
+		if(dvalue!=0.){
+			dvalue=1.0/dvalue;
+		}
+		else{
+			dvalue=INFINITY;
+		}
+	}
+	else {
+		dvalue=pow(dvalue,exponent);
+	}
+	value=reCast<int>(dvalue);
+}
+/*}}}*/
 void IntInput::Scale(IssmDouble scale_factor){/*{{{*/
 	IssmDouble dvalue=(IssmDouble)value*scale_factor;
Index: /issm/trunk-jpl/src/c/classes/Inputs/IntInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/IntInput.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/IntInput.h	(revision 24240)
@@ -1,3 +1,3 @@
-/*! \file IntInput.h 
+/*! \file IntInput.h
  *  \brief: header file for triavertexinput object
  */
@@ -29,5 +29,5 @@
 		void  DeepEcho();
 		void  Echo();
-		int   Id(); 
+		int   Id();
 		void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
 		int   ObjectEnum();
@@ -48,5 +48,5 @@
 		void ChangeEnum(int newenumtype);
 		void Extrude(int start){_error_("not supported yet");};
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
+		void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
 		void GetInputAverage(IssmDouble* pvalue);
 		void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list){_error_("not implemented yet");};
@@ -58,5 +58,5 @@
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");};
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");};
-		void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
+		void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
 		int  GetInputInterpolationType(){_error_("not implemented yet!");};
 		void GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist);
@@ -65,4 +65,6 @@
 		IssmDouble Min(void){_error_("Min not implemented for integers");};
 		IssmDouble MinAbs(void){_error_("Min not implemented for integers");};
+		void PointwiseMult(Input* xinput);
+		void Pow(IssmDouble exponent);
 		void Scale(IssmDouble scale_factor);
 		/*}}}*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp	(revision 24240)
@@ -126,10 +126,10 @@
 	TriaInput* outinput=NULL;
 
-	if(this->interpolation_type==P0Enum){ 
+	if(this->interpolation_type==P0Enum){
 		outinput=new TriaInput(this->enum_type,&this->values[0],P0Enum);
 	}
 	else{
 		/*Assume P1 interpolation only for now*/
-		IssmDouble newvalues[3]; 
+		IssmDouble newvalues[3];
 
 		/*Create array of indices depending on location (0=base 1=surface)*/
@@ -319,4 +319,72 @@
 }
 /*}}}*/
+void PentaInput::PointwiseMult(Input* xinput){/*{{{*/
+
+	const int numnodes=this->NumberofNodes(this->interpolation_type);
+	PentaInput* xpentainput=NULL;
+
+	/*If xinput is a ControlInput, take its values directly*/
+	if(xinput->ObjectEnum()==ControlInputEnum){
+		xinput=((ControlInput*)xinput)->values;
+	}
+
+	/*xinput is of the same type, so cast it: */
+	if(xinput->ObjectEnum()!=PentaInputEnum)
+	  _error_("Operation not permitted because xinput is of type " << EnumToStringx(xinput->ObjectEnum()));
+	xpentainput=(PentaInput*)xinput;
+	if(xpentainput->interpolation_type!=this->interpolation_type) _error_("Operation not permitted because xinput is of type " << EnumToStringx(xpentainput->interpolation_type));
+
+	/*Carry out the PointwiseMult operation depending on type:*/
+	for(int i=0;i<numnodes;i++)this->values[i]=this->values[i]*xpentainput->values[i];
+
+}
+/*}}}*/
+void PentaInput::Pow(IssmDouble exponent){/*{{{*/
+
+	const int numnodes=this->NumberofNodes(this->interpolation_type);
+	if(exponent==0.0){
+		/*  Not-a-number left alone Infinity set to one  */
+		for(int i=0;i<numnodes;i++){
+			if (this->values[i]==this->values[i])this->values[i]=1.0;
+		}
+	}
+	else if(exponent==0.5){
+		for(int i=0;i<numnodes;i++){
+			if(this->values[i]>=0){
+				this->values[i]=sqrt(this->values[i]);
+			}
+			else{
+				this->values[i]=INFINITY;
+			}
+		}
+	}
+	else if(exponent==1.0){
+		/* do nothing */
+	}
+	else if(exponent==-0.5){
+		for(int i=0;i<numnodes;i++){
+			if(this->values[i]>=0){
+				this->values[i]=1.0/sqrt(this->values[i]);
+			}
+			else{
+				this->values[i]=INFINITY;
+			}
+		}
+	}
+	else if(exponent==-1.0){
+		for(int i=0;i<numnodes;i++){
+			if(this->values[i]!=0.){
+				this->values[i]=1.0/this->values[i];
+			}
+			else{
+				this->values[i]=INFINITY;
+			}
+		}
+	}
+	else {
+		for(int i=0;i<numnodes;i++)this->values[i]=pow(this->values[i],exponent);
+	}
+}
+/*}}}*/
 void PentaInput::Scale(IssmDouble scale_factor){/*{{{*/
 
Index: /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.h	(revision 24240)
@@ -1,3 +1,3 @@
-/*! \file PentaInput.h 
+/*! \file PentaInput.h
  *  \brief: header file for PentaInput object
  */
@@ -46,5 +46,5 @@
 		void ChangeEnum(int newenumtype);
 		void Extrude(int start);
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
+		void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
 		void GetInputAverage(IssmDouble* pvalue);
 		void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list){_error_("not implemented yet");};
@@ -56,5 +56,5 @@
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");};
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");};
-		void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
+		void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
 		void GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist);
 		int  GetInputInterpolationType(){_error_("not implemented yet!");};
@@ -63,4 +63,6 @@
 		IssmDouble Min(void);
 		IssmDouble MinAbs(void);
+		void PointwiseMult(Input* xinput);
+		void Pow(IssmDouble exponent);
 		void Scale(IssmDouble scale_factor);
 		Input* SpawnTriaInput(int index1,int index2,int index3);
Index: /issm/trunk-jpl/src/c/classes/Inputs/SegInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/SegInput.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/SegInput.h	(revision 24240)
@@ -1,3 +1,3 @@
-/*! \file SegInput.h 
+/*! \file SegInput.h
  *  \brief: header file for SegInput object
  */
@@ -49,5 +49,5 @@
 		void ChangeEnum(int newenumtype){_error_("not implemented yet");};
 		void Extrude(int start){_error_("not supported yet");};
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
+		void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
 		void GetInputAverage(IssmDouble* pvalue);
 		void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list){_error_("not implemented yet");};
@@ -59,5 +59,5 @@
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");};
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");};
-		void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
+		void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){_error_("not implemented yet");};
 		void GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){_error_("not implemented yet");};
 		int  GetInputInterpolationType(){_error_("not implemented yet!");};
@@ -66,4 +66,6 @@
 		IssmDouble Min(void);
 		IssmDouble MinAbs(void){_error_("not implemented yet");};
+		void PointwiseMult(Input* xinput){_error_("not implemented yet");};
+		void Pow(IssmDouble exponent){_error_("not implemented yet");};
 		void Scale(IssmDouble scale_factor){_error_("not implemented yet");};
 
Index: /issm/trunk-jpl/src/c/classes/Inputs/TetraInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/TetraInput.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/TetraInput.cpp	(revision 24240)
@@ -122,5 +122,5 @@
 }
 /*}}}*/
-void TetraInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){/*{{{*/
+void TetraInput::GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){/*{{{*/
 
 	IssmDouble* outvalues=NULL;
@@ -160,5 +160,5 @@
 }
 /*}}}*/
-void TetraInput::GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){/*{{{*/
+void TetraInput::GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){/*{{{*/
 
 	IssmDouble* outvalues=NULL;
@@ -192,10 +192,10 @@
 	TriaInput* outinput=NULL;
 
-	if(this->interpolation_type==P0Enum){ 
+	if(this->interpolation_type==P0Enum){
 		outinput=new TriaInput(this->enum_type,&this->values[0],P0Enum);
 	}
 	else{
 		/*Assume P1 interpolation only for now*/
-		IssmDouble newvalues[3]; 
+		IssmDouble newvalues[3];
 
 		/*Create array of indices depending on location (0=base 1=surface)*/
@@ -286,4 +286,66 @@
 }
 /*}}}*/
+void TetraInput::PointwiseMult(Input* xinput){/*{{{*/
+
+	const int numnodes=this->NumberofNodes(this->interpolation_type);
+	TetraInput* xtetrainput=NULL;
+
+	/*xinput is of the same type, so cast it: */
+	if(xinput->ObjectEnum()!=TetraInputEnum) _error_("Operation not permitted because xinput is of type " << EnumToStringx(xinput->ObjectEnum()));
+	xtetrainput=(TetraInput*)xinput;
+	if(xtetrainput->interpolation_type!=this->interpolation_type) _error_("Operation not permitted because xinput is of type " << EnumToStringx(xtetrainput->interpolation_type));
+
+	/*Carry out the PointwiseMult operation depending on type:*/
+	for(int i=0;i<numnodes;i++)this->values[i]=this->values[i]*xtetrainput->values[i];
+
+}
+/*}}}*/
+void TetraInput::Pow(IssmDouble exponent){/*{{{*/
+
+	const int numnodes=this->NumberofNodes(this->interpolation_type);
+	if(exponent==0.0){
+		/*  Not-a-number left alone Infinity set to one  */
+		for(int i=0;i<numnodes;i++){
+			if (this->values[i]==this->values[i])this->values[i]=1.0;
+		}
+	}
+	else if(exponent==0.5){
+		for(int i=0;i<numnodes;i++){
+			if(this->values[i]>=0){
+				this->values[i]=sqrt(this->values[i]);
+			}
+			else{
+				this->values[i]=INFINITY;
+			}
+		}
+	}
+	else if(exponent==1.0){
+		/* do nothing */
+	}
+	else if(exponent==-0.5){
+		for(int i=0;i<numnodes;i++){
+			if(this->values[i]>=0){
+				this->values[i]=1.0/sqrt(this->values[i]);
+			}
+			else{
+				this->values[i]=INFINITY;
+			}
+		}
+	}
+	else if(exponent==-1.0){
+		for(int i=0;i<numnodes;i++){
+			if(this->values[i]!=0.){
+				this->values[i]=1.0/this->values[i];
+			}
+			else{
+				this->values[i]=INFINITY;
+			}
+		}
+	}
+	else {
+		for(int i=0;i<numnodes;i++)this->values[i]=pow(this->values[i],exponent);
+	}
+}
+/*}}}*/
 void TetraInput::Scale(IssmDouble scale_factor){/*{{{*/
 
Index: /issm/trunk-jpl/src/c/classes/Inputs/TetraInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/TetraInput.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/TetraInput.h	(revision 24240)
@@ -1,3 +1,3 @@
-/*! \file TetraInput.h 
+/*! \file TetraInput.h
  *  \brief: header file for TetraInput object
  */
@@ -49,5 +49,5 @@
 		void ChangeEnum(int newenumtype);
 		void Extrude(int start){_error_("not supported yet");};
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes);
+		void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes);
 		void GetInputAverage(IssmDouble* pvalue);
 		void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list){_error_("not implemented yet");};
@@ -59,5 +59,5 @@
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");};
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss,int index){_error_("not implemented yet");};
-		void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime);
+		void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime);
 		void GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist);
 		int  GetInputInterpolationType(){_error_("not implemented yet!");};
@@ -66,4 +66,6 @@
 		IssmDouble Min(void);
 		IssmDouble MinAbs(void);
+		void PointwiseMult(Input* xinput);
+		void Pow(IssmDouble exponent);
 		void Scale(IssmDouble scale_factor);
 
Index: /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp	(revision 24240)
@@ -60,4 +60,39 @@
 }
 /*}}}*/
+void TransientInput::AddTimeInput(Input* input,IssmDouble time){/*{{{*/
+
+	/*insert values at time step: */
+	if (this->numtimesteps>0 && time<=this->timesteps[this->numtimesteps-1]) _error_("timestep values must increase sequentially");
+
+	//copy timesteps, add the new time, delete previous timesteps, and add the new input: inputs->AddObject(input);
+	IssmDouble* old_timesteps=NULL;
+
+	if (this->numtimesteps > 0){
+		old_timesteps=xNew<IssmDouble>(this->numtimesteps);
+		xMemCpy(old_timesteps,this->timesteps,this->numtimesteps);
+		xDelete(this->timesteps);
+	}
+
+	this->numtimesteps=this->numtimesteps+1;
+	this->timesteps=xNew<IssmDouble>(this->numtimesteps);
+
+	if (this->numtimesteps > 1){
+		xMemCpy(this->timesteps,old_timesteps,this->numtimesteps-1);
+		xDelete(old_timesteps);
+	}
+
+	/*go ahead and plug: */
+	this->timesteps[this->numtimesteps-1]=time;
+	inputs->AddObject(input);
+
+}
+/*}}}*/
+void TransientInput::AddTimeInput(Input* input){/*{{{*/
+
+	_assert_(this->inputs->Size()<this->numtimesteps);
+	inputs->AddObject(input);
+
+}
+/*}}}*/
 
 /*Object virtual functions definitions:*/
@@ -120,4 +155,43 @@
 
 /*TransientInput management*/
+void TransientInput::Configure(Parameters* parameters){/*{{{*/
+	this->parameters=parameters;
+}
+/*}}}*/
+int  TransientInput::GetResultArraySize(void){/*{{{*/
+
+	return 1;
+}
+/*}}}*/
+int  TransientInput::GetResultInterpolation(void){/*{{{*/
+
+	IssmDouble time;
+	int        output;
+
+	parameters->FindParam(&time,TimeEnum);
+	Input* input=GetTimeInput(time);
+	output = input->GetResultInterpolation();
+
+	/*Clean up and return*/
+	delete input;
+	return output;
+
+}
+/*}}}*/
+int  TransientInput::GetResultNumberOfNodes(void){/*{{{*/
+
+	IssmDouble time;
+	int        output;
+
+	parameters->FindParam(&time,TimeEnum);
+	Input* input=GetTimeInput(time);
+	output = input->GetResultNumberOfNodes();
+
+	/*Clean up and return*/
+	delete input;
+	return output;
+
+}
+/*}}}*/
 int TransientInput::InstanceEnum(void){/*{{{*/
 
@@ -174,5 +248,132 @@
 }
 /*}}}*/
-void TransientInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){/*{{{*/
+void TransientInput::GetInputAverage(IssmDouble* pvalue){/*{{{*/
+
+	IssmDouble time;
+
+	/*First, recover current time from parameters: */
+	parameters->FindParam(&time,TimeEnum);
+
+	/*Retrieve interpolated values for this time step: */
+	Input* input=GetTimeInput(time);
+
+	/*Call input function*/
+	input->GetInputAverage(pvalue);
+
+	delete input;
+
+}
+/*}}}*/
+void TransientInput::GetInputAverageOverTimeSlice(IssmDouble* pvalue, Gauss* gauss, IssmDouble start_time,IssmDouble end_time){/*{{{*/
+
+	int averaging = 0;
+
+	Input* input=GetInputAverageOverTime(start_time,end_time,averaging);
+
+	/*Call input function*/
+	input->GetInputValue(pvalue, gauss);
+
+	//*pvalues=values;
+	delete input;
+}
+/*}}}*/
+Input* TransientInput::GetInputAverageOverTime(IssmDouble start_time,IssmDouble end_time,int averaging){/*{{{*/
+
+	int found;
+	int offset,start_offset,end_offset;
+	IssmDouble subdt,yts;
+	IssmDouble slice_duration;
+
+	IssmDouble time;
+
+	this->parameters->FindParam(&time,TimeEnum);
+	this->parameters->FindParam(&yts,ConstantsYtsEnum);
+	this->parameters->FindParam(&subdt,TimesteppingTimeStepEnum); //duration of each substeps
+
+	Input *averageinput  = NULL;
+	Input *currentinput  = NULL;
+
+	slice_duration=end_time-start_time;
+	start_time+=subdt; //because time is actually considered at the end of the timestep
+
+	/*go through the timesteps, and grab offset for the start of the slice*/
+	found=binary_search(&offset,start_time,this->timesteps,this->numtimesteps);
+	if(!found) _error_("Input not found (is TransientInput sorted ?)");
+	/*go through the timesteps, and grab offset for the end of the slice*/
+	found=binary_search(&end_offset,end_time,this->timesteps,this->numtimesteps);
+	if(!found) _error_("Input not found (is TransientInput sorted ?)");
+
+	start_offset = offset;
+	//stack the input for each timestep in the slice
+	while(offset <= end_offset ){
+		if (offset==-1){
+			/*get values for the first time: */
+			_assert_(start_time<this->timesteps[0]);
+			currentinput=(Input*)((Input*)this->inputs->GetObjectByOffset(0))->copy();
+		}
+		else if(offset==(this->numtimesteps-1)){
+			/*get values for the last time: */
+			_assert_(end_time>=this->timesteps[offset]);
+			currentinput=(Input*)((Input*)this->inputs->GetObjectByOffset(offset))->copy();
+		}
+		else{
+			currentinput=(Input*)((Input*)this->inputs->GetObjectByOffset(offset))->copy();
+		}
+		switch(averaging){
+			case 0: //Arithmetic mean
+				if (offset==start_offset){
+					averageinput=(Input*)currentinput->copy();
+					averageinput->Scale(subdt);
+				}
+				else{
+					averageinput->AXPY(currentinput,subdt);
+				}
+				break;
+			case 1: //Geometric mean
+				if (offset==start_offset){
+					averageinput=(Input*)currentinput->copy();
+					averageinput->Scale(subdt);
+				}
+				else{
+					currentinput->Scale(subdt);
+					averageinput->PointwiseMult(currentinput);
+				}
+				break;
+			case 2: //Harmonic mean
+				if (offset==start_offset){
+					averageinput=(Input*)currentinput->copy();
+					averageinput->Pow(-1);
+					averageinput->Scale(subdt);
+				}
+				else{
+					currentinput->Pow(-1);
+					averageinput->AXPY(currentinput,subdt);
+				}
+				break;
+			default:
+				_error_("averaging method is not recognised");
+		}
+		offset+=1;
+	}
+
+	//summation is done, now we normalise
+	switch(averaging){
+		case 0: //Arithmetic mean
+			averageinput->Scale(1.0/slice_duration);
+			break;
+		case 1: //Geometric mean
+			averageinput->Pow(1.0/slice_duration);
+			break;
+		case 2: //Harmonic mean
+			averageinput->Scale(1.0/slice_duration);
+			averageinput->Pow(-1.0);
+			break;
+		default:
+			_error_("averaging method is not recognised");
+	}
+	return averageinput;
+}
+/*}}}*/
+void TransientInput::GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){/*{{{*/
 
 	int i;
@@ -195,82 +396,5 @@
 }
 /*}}}*/
-void TransientInput::GetInputAverage(IssmDouble* pvalue){/*{{{*/
-
-	IssmDouble time;
-
-	/*First, recover current time from parameters: */
-	parameters->FindParam(&time,TimeEnum);
-
-	/*Retrieve interpolated values for this time step: */
-	Input* input=GetTimeInput(time);
-
-	/*Call input function*/
-	input->GetInputAverage(pvalue);
-
-	delete input;
-
-}
-/*}}}*/
-void TransientInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){/*{{{*/
-
-	IssmDouble time;
-
-	/*First, recover current time from parameters: */
-	parameters->FindParam(&time,TimeEnum);
-
-	/*Retrieve interpolated values for this time step: */
-	Input* input=GetTimeInput(time);
-
-	/*Call input function*/
-	input->GetInputDerivativeValue(p,xyz_list,gauss);
-
-	delete input;
-}
-/*}}}*/
-void TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){/*{{{*/
-	IssmDouble time;
-
-	/*First, recover current time from parameters: */
-	parameters->FindParam(&time,TimeEnum);
-
-	/*Retrieve interpolated values for this time step: */
-	Input* input=GetTimeInput(time);
-
-	/*Call input function*/
-	input->GetInputValue(pvalue,gauss);
-
-	delete input;
-}
-/*}}}*/
-void TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){/*{{{*/
-
-	/*Retrieve interpolated values for this time step: */
-	Input* input=GetTimeInput(time);
-
-	/*Call input function*/
-	input->GetInputValue(pvalue,gauss);
-
-	delete input;
-}
-/*}}}*/
-int  TransientInput::GetTimeInputOffset(IssmDouble time){/*{{{*/
-
-	int offset;
-
-	/*go through the timesteps, and figure out which interval we
-	 *     *fall within. Then interpolate the values on this interval: */
-	int found=binary_search(&offset,time,this->timesteps,this->numtimesteps);
-	if(!found) _error_("Input not found (is TransientInput sorted ?)");
-
-	return offset;
-}
-/*}}}*/
-IssmDouble  TransientInput::GetTimeByOffset(int offset){/*{{{*/
-	if (offset < 0) offset=0;
-	_assert_(offset<(this->numtimesteps));
-	return this->timesteps[offset];
-}
-/*}}}*/
-void TransientInput::GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){/*{{{*/
+void TransientInput::GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){/*{{{*/
 
 	int         i;
@@ -312,45 +436,65 @@
 }
 /*}}}*/
-
+void TransientInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, Gauss* gauss){/*{{{*/
+
+	IssmDouble time;
+
+	/*First, recover current time from parameters: */
+	parameters->FindParam(&time,TimeEnum);
+
+	/*Retrieve interpolated values for this time step: */
+	Input* input=GetTimeInput(time);
+
+	/*Call input function*/
+	input->GetInputDerivativeValue(p,xyz_list,gauss);
+
+	delete input;
+}
+/*}}}*/
+void TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){/*{{{*/
+	IssmDouble time;
+
+	/*First, recover current time from parameters: */
+	parameters->FindParam(&time,TimeEnum);
+
+	/*Retrieve interpolated values for this time step: */
+	Input* input=GetTimeInput(time);
+
+	/*Call input function*/
+	input->GetInputValue(pvalue,gauss);
+
+	delete input;
+}
+/*}}}*/
+void TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){/*{{{*/
+
+	/*Retrieve interpolated values for this time step: */
+	Input* input=GetTimeInput(time);
+
+	/*Call input function*/
+	input->GetInputValue(pvalue,gauss);
+
+	delete input;
+}
+/*}}}*/
+IssmDouble  TransientInput::GetTimeByOffset(int offset){/*{{{*/
+	if (offset < 0) offset=0;
+	_assert_(offset<(this->numtimesteps));
+	return this->timesteps[offset];
+}
+/*}}}*/
+int  TransientInput::GetTimeInputOffset(IssmDouble time){/*{{{*/
+
+	int offset;
+
+	/*go through the timesteps, and figure out which interval we
+	 *     *fall within. Then interpolate the values on this interval: */
+	int found=binary_search(&offset,time,this->timesteps,this->numtimesteps);
+	if(!found) _error_("Input not found (is TransientInput sorted ?)");
+
+	return offset;
+}
+/*}}}*/
 /*Intermediary*/
-void TransientInput::AddTimeInput(Input* input,IssmDouble time){/*{{{*/
-
-	/*insert values at time step: */
-	if (this->numtimesteps>0 && time<=this->timesteps[this->numtimesteps-1]) _error_("timestep values must increase sequentially");
-
-	//copy timesteps, add the new time, delete previous timesteps, and add the new input: inputs->AddObject(input);
-	IssmDouble* old_timesteps=NULL;
-
-	if (this->numtimesteps > 0){
-		old_timesteps=xNew<IssmDouble>(this->numtimesteps);
-		xMemCpy(old_timesteps,this->timesteps,this->numtimesteps);
-		xDelete(this->timesteps);
-	}
-
-	this->numtimesteps=this->numtimesteps+1;
-	this->timesteps=xNew<IssmDouble>(this->numtimesteps);
-
-	if (this->numtimesteps > 1){
-		xMemCpy(this->timesteps,old_timesteps,this->numtimesteps-1);
-		xDelete(old_timesteps);
-	}
-
-	/*go ahead and plug: */
-	this->timesteps[this->numtimesteps-1]=time;
-	inputs->AddObject(input);
-
-}
-/*}}}*/
-void TransientInput::AddTimeInput(Input* input){/*{{{*/
-
-	_assert_(this->inputs->Size()<this->numtimesteps);
-	inputs->AddObject(input);
-
-}
-/*}}}*/
-void TransientInput::Configure(Parameters* parameters){/*{{{*/
-	this->parameters=parameters;
-}
-/*}}}*/
 void TransientInput::Extrude(int start){/*{{{*/
 
@@ -358,39 +502,4 @@
 		((Input*)this->inputs->GetObjectByOffset(i))->Extrude(start);
 	}
-}
-/*}}}*/
-int  TransientInput::GetResultArraySize(void){/*{{{*/
-
-	return 1;
-}
-/*}}}*/
-int  TransientInput::GetResultInterpolation(void){/*{{{*/
-
-	IssmDouble time;
-	int        output;
-
-	parameters->FindParam(&time,TimeEnum);
-	Input* input=GetTimeInput(time);
-	output = input->GetResultInterpolation();
-
-	/*Clean up and return*/
-	delete input;
-	return output;
-
-}
-/*}}}*/
-int  TransientInput::GetResultNumberOfNodes(void){/*{{{*/
-
-	IssmDouble time;
-	int        output;
-
-	parameters->FindParam(&time,TimeEnum);
-	Input* input=GetTimeInput(time);
-	output = input->GetResultNumberOfNodes();
-
-	/*Clean up and return*/
-	delete input;
-	return output;
-
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.h	(revision 24240)
@@ -44,17 +44,21 @@
 		int  GetResultInterpolation(void);
 		int  GetResultNumberOfNodes(void);
-		int    InstanceEnum();
+		int  InstanceEnum();
 		void ResultToPatch(IssmDouble* values,int nodesperelement,int sid){_error_("not supported yet");};
 		Input* SpawnSegInput(int index1,int index2);
 		Input* SpawnTriaInput(int index1,int index2,int index3);
 		/*}}}*/
-		/*numerics: {{{*/
+		/*Object Functions: {{{*/
 		void AXPY(Input* xforcing,IssmDouble scalar){_error_("not implemented yet");};
 		void ChangeEnum(int newenumtype);
-		void Extrude(int start);
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes);
 		void GetInputAverage(IssmDouble* pvalue);
+		void GetInputAverageOverTimeSlice(IssmDouble* pvalue, Gauss* gauss, IssmDouble init_time, IssmDouble end_time);
+		Input* GetInputAverageOverTime(IssmDouble start_time,IssmDouble end_time,int averaging);
+		void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes);
+		void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime);
 		void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list){_error_("not implemented yet");};
 		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list,Gauss* gauss);
+		int  GetInputInterpolationType(){_error_("not implemented yet!");};
+		void GetTimeValues(IssmDouble* values,IssmDouble time){_error_("not implemented yet");};
 		void GetInputValue(bool* pvalue){_error_("not implemented yet");};
 		void GetInputValue(int* pvalue){_error_("not implemented yet");};
@@ -63,10 +67,13 @@
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time);
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");};
-		void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime);
-		int  GetInputInterpolationType(){_error_("not implemented yet!");};
 		IssmDouble  GetTimeByOffset(int offset);
+		int  GetTimeInputOffset(IssmDouble time);
+		void PointwiseMult(Input* xforcing){_error_("not implemented yet");};
+		void Pow(IssmDouble exponent){_error_("not implemented yet");};
+		void Scale(IssmDouble scale_factor){_error_("not implemented yet");};
+		/*}}}*/
+		/*Intermiadaries: {{{*/
+		void Extrude(int start);
 		Input* GetTimeInput(IssmDouble time);
-		int  GetTimeInputOffset(IssmDouble time);
-		void GetTimeValues(IssmDouble* values,IssmDouble time){_error_("not implemented yet");};
 		void GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist);
 		IssmDouble Max(void);
@@ -74,5 +81,4 @@
 		IssmDouble Min(void);
 		IssmDouble MinAbs(void);
-		void Scale(IssmDouble scale_factor){_error_("not implemented yet");};
 		/*}}}*/
 
Index: /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.cpp	(revision 24240)
@@ -126,5 +126,5 @@
 	SegInput* outinput=NULL;
 
-	if(this->interpolation_type==P0Enum){ 
+	if(this->interpolation_type==P0Enum){
 		outinput=new SegInput(this->enum_type,&this->values[0],P0Enum);
 	}
@@ -165,5 +165,5 @@
 }
 /*}}}*/
-void TriaInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){/*{{{*/
+void TriaInput::GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){/*{{{*/
 
 	IssmDouble* outvalues=NULL;
@@ -224,5 +224,5 @@
 /*}}}*/
 
-void TriaInput::GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){/*{{{*/
+void TriaInput::GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime){/*{{{*/
 
 	IssmDouble* outvalues=NULL;
@@ -320,4 +320,67 @@
 }
 /*}}}*/
+void TriaInput::PointwiseMult(Input* xinput){/*{{{*/
+
+	const int numnodes=this->NumberofNodes(this->interpolation_type);
+	TriaInput* xtriainput=NULL;
+
+
+	/*xinput is of the same type, so cast it: */
+	if(xinput->ObjectEnum()!=TriaInputEnum) _error_("Operation not permitted because xinput is of type " << EnumToStringx(xinput->ObjectEnum()));
+	xtriainput=(TriaInput*)xinput;
+	if(xtriainput->interpolation_type!=this->interpolation_type) _error_("Operation not permitted because xinput is of type " << EnumToStringx(xtriainput->interpolation_type));
+
+	/*Carry out the PointwiseMult operation depending on type:*/
+	for(int i=0;i<numnodes;i++)this->values[i]=this->values[i]*xtriainput->values[i];
+
+}
+/*}}}*/
+void TriaInput::Pow(IssmDouble exponent){/*{{{*/
+
+	const int numnodes=this->NumberofNodes(this->interpolation_type);
+	if(exponent==0.0){
+		/*  Not-a-number left alone Infinity set to one  */
+		for(int i=0;i<numnodes;i++){
+			if (this->values[i]==this->values[i])this->values[i]=1.0;
+		}
+	}
+	else if(exponent==0.5){
+		for(int i=0;i<numnodes;i++){
+			if(this->values[i]>=0){
+				this->values[i]=sqrt(this->values[i]);
+			}
+			else{
+				this->values[i]=INFINITY;
+			}
+		}
+	}
+	else if(exponent==1.0){
+		/* do nothing */
+	}
+	else if(exponent==-0.5){
+		for(int i=0;i<numnodes;i++){
+			if(this->values[i]>=0){
+				this->values[i]=1.0/sqrt(this->values[i]);
+			}
+			else{
+				this->values[i]=INFINITY;
+			}
+		}
+	}
+	else if(exponent==-1.0){
+		for(int i=0;i<numnodes;i++){
+			if(this->values[i]!=0.){
+				this->values[i]=1.0/this->values[i];
+			}
+			else{
+				this->values[i]=INFINITY;
+			}
+		}
+	}
+	else {
+		for(int i=0;i<numnodes;i++)this->values[i]=pow(this->values[i],exponent);
+	}
+}
+/*}}}*/
 void TriaInput::Scale(IssmDouble scale_factor){/*{{{*/
 
Index: /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.h	(revision 24240)
@@ -1,3 +1,3 @@
-/*! \file TriaInput.h 
+/*! \file TriaInput.h
  *  \brief: header file for TriaInput object
  */
@@ -49,5 +49,5 @@
 		void ChangeEnum(int newenumtype);
 		void Extrude(int start){_error_("not supported yet");};
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes);
+		void GetInputAveragesOnAllTime(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes);
 		void GetInputAverage(IssmDouble* pvalue);
 		void GetInputDerivativeAverageValue(IssmDouble* derivativevalues, IssmDouble* xyz_list);
@@ -59,5 +59,5 @@
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");};
 		void GetInputValue(IssmDouble* pvalue,Gauss* gauss,int index){_error_("not implemented yet");};
-		void GetInputUpToCurrentTimeAverages(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime);
+		void GetInputAveragesUpToCurrentTime(IssmDouble** pvalues, IssmDouble** ptimes, int* pnumtimes, IssmDouble currenttime);
 		int  GetInputInterpolationType(){return interpolation_type;};
 		void GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist);
@@ -66,4 +66,6 @@
 		IssmDouble Min(void);
 		IssmDouble MinAbs(void);
+		void PointwiseMult(Input* xinput);
+		void Pow(IssmDouble exponent);
 		void Scale(IssmDouble scale_factor);
 
Index: /issm/trunk-jpl/src/c/classes/IoModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/IoModel.cpp	(revision 24240)
@@ -953,5 +953,4 @@
 	/*recover my_rank:*/
 	int my_rank=IssmComm::GetRank();
-
 	/*Set file pointer to beginning of the data: */
 	fid=this->SetFilePointerToData(&code,NULL,data_name);
Index: /issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp	(revision 24240)
@@ -381,5 +381,5 @@
 	/*Get sediment water head h*/
 	inefanalysis = new HydrologyDCInefficientAnalysis();
-	element->GetInputValue(&h,node,SedimentHeadHydrostepEnum);
+	element->GetInputValue(&h,node,SedimentHeadSubstepEnum);
 	inefanalysis->GetHydrologyDCInefficientHmax(&h_max,element,node);
 	parameters->FindParam(&penalty_lock,HydrologydcPenaltyLockEnum);
Index: /issm/trunk-jpl/src/c/classes/Params/Parameters.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Params/Parameters.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/classes/Params/Parameters.cpp	(revision 24240)
@@ -467,5 +467,4 @@
 	/*first, figure out if the param has already been created: */
 	param=xDynamicCast<Param*>(this->FindParamObject(enum_type));
-
 	if(param) param->SetValue(scalar); //already exists, just set it.
 	else this->AddObject(new DoubleParam(enum_type,scalar)); //just add the new parameter.
Index: /issm/trunk-jpl/src/c/cores/bedslope_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/bedslope_core.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/cores/bedslope_core.cpp	(revision 24240)
@@ -1,5 +1,5 @@
 /*!\file: bedslope_core.cpp
- * \brief: core of the slope solution 
- */ 
+ * \brief: core of the slope solution
+ */
 
 #include "./cores.h"
@@ -34,5 +34,5 @@
 
 	if(save_results){
-		if(VerboseSolution()) _printf0_("   saving results\n");
+		if(VerboseSolution()) _printf0_("   saving bedslopes results\n");
 		if(domaintype!=Domain2DverticalEnum){
 			int outputs[2] = {BedSlopeXEnum,BedSlopeYEnum};
Index: /issm/trunk-jpl/src/c/cores/damage_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/damage_core.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/cores/damage_core.cpp	(revision 24240)
@@ -1,5 +1,5 @@
-/* 
+/*
  * \brief: damage_core.cpp: core for the damage solution
- */ 
+ */
 
 #include "./cores.h"
@@ -11,13 +11,13 @@
 
 void damage_core(FemModel* femmodel){
-	
+
 	/*Start profiler*/
 	femmodel->profiler->Start(DAMAGECORE);
-        
+
 	/*intermediary*/
 	bool   save_results;
 	bool   dakota_analysis     = false;
 	int    solution_type,stabilization;
-	int    numoutputs          = 0; 
+	int    numoutputs          = 0;
 	char   **requested_outputs = NULL;
 
@@ -40,16 +40,16 @@
 
 	if(save_results){
-		if(VerboseSolution()) _printf0_("   saving results\n");
+		if(VerboseSolution()) _printf0_("   saving damage results\n");
 		femmodel->RequestedOutputsx(&femmodel->results,requested_outputs,numoutputs);
 	}
 
-	/*Free resources:*/	
+	/*Free resources:*/
 	if(numoutputs){
 		for(int i=0;i<numoutputs;i++){
 			xDelete<char>(requested_outputs[i]);
-		} 
+		}
 		xDelete<char*>(requested_outputs);
 	}
-	
+
 	/*End profiler*/
 	femmodel->profiler->Stop(DAMAGECORE);
Index: /issm/trunk-jpl/src/c/cores/hydrology_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/hydrology_core.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/cores/hydrology_core.cpp	(revision 24240)
@@ -19,10 +19,7 @@
 	int          solution_type;
 	int          numoutputs        = 0;
-	int          smboutputs;
 	bool         save_results;
 	bool         modify_loads      = true;
-	bool         issmb;
 	char       **requested_outputs = NULL;
-	char       **requested_smb_outputs = NULL;
 	IssmDouble   ThawedNodes;
 
@@ -33,5 +30,4 @@
 	femmodel->parameters->FindParam(&numoutputs,HydrologyNumRequestedOutputsEnum);
 	if(numoutputs) femmodel->parameters->FindParam(&requested_outputs,&numoutputs,HydrologyRequestedOutputsEnum);
-	femmodel->parameters->FindParam(&issmb,TransientIssmbEnum);
 
 	/*Using the Shreve based Model*/
@@ -54,23 +50,6 @@
 		/*intermediary: */
 		bool       isefficientlayer;
-		int        hydrostep,hydroslices,numaveragedinput;
-		IssmDouble time,hydrotime,yts;
-		IssmDouble dt,hydrodt;
-		/*SMB related */
-		int    smb_model;
-
 		/*recover parameters: */
 		femmodel->parameters->FindParam(&isefficientlayer,HydrologydcIsefficientlayerEnum);
-		femmodel->parameters->FindParam(&dt,TimesteppingTimeStepEnum);
-		femmodel->parameters->FindParam(&time,TimeEnum);
-		femmodel->parameters->FindParam(&hydroslices,HydrologyStepsPerStepEnum);
-		femmodel->parameters->FindParam(&yts,ConstantsYtsEnum);
-
-		/*recover SMB related parameters: */
-		if(issmb){
-			femmodel->parameters->FindParam(&smb_model,SmbEnum);
-			femmodel->parameters->FindParam(&smboutputs,SmbNumRequestedOutputsEnum);
-			if(smboutputs) femmodel->parameters->FindParam(&requested_smb_outputs,&smboutputs,SmbRequestedOutputsEnum);
-		}
 
 		/*first we exclude frozen nodes of the solved nodes*/
@@ -79,103 +58,88 @@
 
 		if(ThawedNodes>0){
-			hydrotime=time-dt; //getting the time back to the start of the timestep
-			hydrodt=dt/hydroslices; //computing hydro dt from dt and a divider
-			hydrostep=0;
-			femmodel->parameters->AddObject(new DoubleParam(HydrologydtEnum,hydrodt));
-
-			if(hydroslices>1){
+			/*check if we need sub steps*/
+			int        dtslices;
+			femmodel->parameters->FindParam(&dtslices,HydrologyStepsPerStepEnum);
+
+			if(dtslices>1){
+				int        substep, numaveragedinput;
+				IssmDouble global_time, subtime, yts;
+				IssmDouble dt, subdt;
+
+            femmodel->parameters->FindParam(&global_time,TimeEnum);
+            femmodel->parameters->FindParam(&dt,TimesteppingTimeStepEnum);
+            femmodel->parameters->FindParam(&yts,ConstantsYtsEnum);
+
+				subtime=global_time-dt; //getting the time back to the start of the timestep
+				subdt=dt/dtslices; //computing hydro dt from dt and a divider
+				substep=0;
+				femmodel->parameters->SetParam(subdt,TimesteppingTimeStepEnum);
+
+				/*intermiedaries to deal with averaging*/
+				static const int substeplist[4] = {EffectivePressureSubstepEnum,SedimentHeadSubstepEnum,EplHeadSubstepEnum,HydrologydcEplThicknessSubstepEnum};
+				static const int transientlist[4] = {EffectivePressureTransientEnum,SedimentHeadTransientEnum,EplHeadTransientEnum,HydrologydcEplThicknessTransientEnum};
+				static const int averagelist[4] = {EffectivePressureEnum,SedimentHeadEnum,EplHeadEnum,HydrologydcEplThicknessEnum};
+				std::vector<int> substepinput;
+				std::vector<int> transientinput;
+				std::vector<int> averagedinput;
+
 				if (isefficientlayer){
 					/*define which variable needs to be averaged on the sub-timestep and initialize as needed*/
 					numaveragedinput = 4;
-					int inputtostack[4]	=	{EffectivePressureHydrostepEnum,SedimentHeadHydrostepEnum,EplHeadHydrostepEnum,HydrologydcEplThicknessHydrostepEnum};
-					int stackedinput[4]	=	{EffectivePressureStackedEnum,SedimentHeadStackedEnum,EplHeadStackedEnum,HydrologydcEplThicknessStackedEnum};
-					int averagedinput[4]	=	{EffectivePressureEnum,SedimentHeadEnum,EplHeadEnum,HydrologydcEplThicknessEnum};
-					femmodel->InitMeanOutputx(&stackedinput[0],numaveragedinput);
-
-					//while(hydrotime<time-(yts*DBL_EPSILON)){ //loop on hydro dts
-					while(hydrostep<hydroslices){ //loop on hydro dts
-						hydrostep+=1;
-						hydrotime+=hydrodt;
-						/*Setting substep time as global time*/
-						femmodel->parameters->SetParam(hydrotime,TimeEnum);
-						if(VerboseSolution()) _printf0_("sub iteration " << hydrostep << "/" << hydroslices << "  time [yr]: " << setprecision(4) << hydrotime/yts << " (time step: " << hydrodt/yts << ")\n");
-						if(issmb){
-							if(VerboseSolution()) _printf0_("   computing mass balance\n");
-							SmbAnalysis* analysis = new SmbAnalysis();
-							analysis->Core(femmodel);
-							delete analysis;
-						}
-						if(VerboseSolution()) _printf0_("   computing water heads\n");
-						/*save preceding timestep*/
-						InputDuplicatex(femmodel,SedimentHeadHydrostepEnum,SedimentHeadOldEnum);
-						InputDuplicatex(femmodel,EplHeadHydrostepEnum,EplHeadOldEnum);
-						InputDuplicatex(femmodel,HydrologydcEplThicknessHydrostepEnum,HydrologydcEplThicknessOldEnum);
-						/*Proceed now to heads computations*/
-						solutionsequence_hydro_nonlinear(femmodel);
-						/*If we have a sub-timestep we stack the variables here*/
-						femmodel->SumOutputx(&inputtostack[0],&stackedinput[0],numaveragedinput);
+					substepinput.assign(substeplist,substeplist+4);
+					transientinput.assign(transientlist,transientlist+4);
+					averagedinput.assign(averagelist,averagelist+4);
+				}
+				else{
+					numaveragedinput = 2;
+					substepinput.assign(substeplist,substeplist+2);
+					transientinput.assign(transientlist,transientlist+2);
+					averagedinput.assign(averagelist,averagelist+2);
+				}
+				femmodel->InitTransientOutputx(&transientinput[0],numaveragedinput);
+				while(substep<dtslices){ //loop on hydro dts
+					substep+=1;
+					subtime+=subdt;
+					/*Setting substep time as global time*/
+					femmodel->parameters->SetParam(subtime,TimeEnum);
+					if(VerboseSolution()) _printf0_("sub iteration " << substep << "/" << dtslices << "  time [yr]: " << setprecision(4) << subtime/yts << " (time step: " << subdt/yts << ")\n");
+					if(VerboseSolution()) _printf0_("   computing water heads\n");
+					/*save preceding timestep*/
+					InputDuplicatex(femmodel,SedimentHeadSubstepEnum,SedimentHeadOldEnum);
+					if (isefficientlayer){
+						InputDuplicatex(femmodel,EplHeadSubstepEnum,EplHeadOldEnum);
+						InputDuplicatex(femmodel,HydrologydcEplThicknessSubstepEnum,HydrologydcEplThicknessOldEnum);
 					}
-					/*Reseting to global time*/
-					femmodel->parameters->SetParam(time,TimeEnum);
-					femmodel->AverageSumOutputx(&stackedinput[0],&averagedinput[0],numaveragedinput);
-				}
-				else{
-					/*define which variable needs to be averaged on the sub-timestep and initialize as needed*/
-					numaveragedinput = 2;
-					int inputtostack[2]	=	{EffectivePressureHydrostepEnum,SedimentHeadHydrostepEnum};
-					int stackedinput[2]	=	{EffectivePressureStackedEnum,SedimentHeadStackedEnum};
-					int averagedinput[2]	=	{EffectivePressureEnum,SedimentHeadEnum};
-					femmodel->InitMeanOutputx(&stackedinput[0],numaveragedinput);
-					while(hydrotime<time-(yts*DBL_EPSILON)){ //loop on hydro dts
-						hydrostep+=1;
-						hydrotime+=hydrodt;
-						/*Setting substep time as global time*/
-						femmodel->parameters->SetParam(hydrotime,TimeEnum);
-						if(VerboseSolution()) _printf0_("sub iteration " << hydrostep << "/" << hydroslices << "  time [yr]: " << setprecision(4) << hydrotime/yts << " (time step: " << hydrodt/yts << ")\n");
-						if(issmb){
-							if(VerboseSolution()) _printf0_("   computing mass balance\n");
-							SmbAnalysis* analysis = new SmbAnalysis();
-							analysis->Core(femmodel);
-							delete analysis;
-						}
-						if(VerboseSolution()) _printf0_("   computing water heads\n");
-						/*save preceding timestep*/
-						InputDuplicatex(femmodel,SedimentHeadHydrostepEnum,SedimentHeadOldEnum);
-						/*Proceed now to heads computations*/
-						solutionsequence_hydro_nonlinear(femmodel);
-						/*If we have a sub-timestep we stack the variables here*/
-						femmodel->SumOutputx(&inputtostack[0],&stackedinput[0],numaveragedinput);
-					}
-					/*Reseting to global time*/
-					femmodel->parameters->SetParam(time,TimeEnum);
-					femmodel->AverageSumOutputx(&stackedinput[0],&averagedinput[0],numaveragedinput);
-				}
+					/*Proceed now to heads computations*/
+					solutionsequence_hydro_nonlinear(femmodel);
+               /*If we have a sub-timestep we store the substep inputs in a transient input here*/
+					femmodel->StackTransientOutputx(&substepinput[0],&transientinput[0],subtime,numaveragedinput);
+				}
+				/*averaging the stack*/
+				femmodel->AverageTransientOutputx(&transientinput[0],&averagedinput[0],global_time-dt,subtime,numaveragedinput);
+
+				/*And reseting to global time*/
+				femmodel->parameters->SetParam(dt,TimesteppingTimeStepEnum);
+				femmodel->parameters->SetParam(global_time,TimeEnum);
 			}
 			else{
-				if(issmb){
-					if(VerboseSolution()) _printf0_("   computing mass balance\n");
-					SmbAnalysis* analysis = new SmbAnalysis();
-					analysis->Core(femmodel);
-					delete analysis;
-				}
-				InputDuplicatex(femmodel,SedimentHeadHydrostepEnum,SedimentHeadOldEnum);
+				InputDuplicatex(femmodel,SedimentHeadSubstepEnum,SedimentHeadOldEnum);
 				if (isefficientlayer){
-					InputDuplicatex(femmodel,EplHeadHydrostepEnum,EplHeadOldEnum);
-					InputDuplicatex(femmodel,HydrologydcEplThicknessHydrostepEnum,HydrologydcEplThicknessOldEnum);
+					InputDuplicatex(femmodel,EplHeadSubstepEnum,EplHeadOldEnum);
+					InputDuplicatex(femmodel,HydrologydcEplThicknessSubstepEnum,HydrologydcEplThicknessOldEnum);
 				}
 				/*Proceed now to heads computations*/
 				if(VerboseSolution()) _printf0_("   computing water heads\n");
 				solutionsequence_hydro_nonlinear(femmodel);
+				/*If no substeps are present we want to duplicate the results for coupling purposes*/
+				InputDuplicatex(femmodel,SedimentHeadSubstepEnum,SedimentHeadEnum);
+				InputDuplicatex(femmodel,EffectivePressureSubstepEnum,EffectivePressureEnum);
+				if (isefficientlayer){
+					InputDuplicatex(femmodel,EplHeadSubstepEnum,EplHeadEnum);
+					InputDuplicatex(femmodel,HydrologydcEplThicknessSubstepEnum,HydrologydcEplThicknessEnum);
+				}
 			}
 		}
-		else{
-			/* If everything is frozen we still need smb */
-			if(issmb){
-				if(VerboseSolution()) _printf0_("   computing mass balance\n");
-				SmbAnalysis* analysis = new SmbAnalysis();
-				analysis->Core(femmodel);
-				delete analysis;
-			}
-		}
+		if(VerboseSolution()) printf("   hydroDC done\n");
 	}
 
@@ -221,11 +185,7 @@
 	}
 	if(save_results){
-		if(VerboseSolution()) _printf0_("   saving results \n");
+		if(VerboseSolution()) _printf0_("   saving hydrology results \n");
 		if(hydrology_model==HydrologydcEnum && ThawedNodes==0){
 			if(VerboseSolution()) _printf0_("   No thawed node hydro is skiped \n");}
-		else if (hydrology_model==HydrologydcEnum && issmb){
-			femmodel->RequestedOutputsx(&femmodel->results,requested_outputs,numoutputs);
-			femmodel->RequestedOutputsx(&femmodel->results,requested_smb_outputs,smboutputs);
-		}
 		else{
 			femmodel->RequestedOutputsx(&femmodel->results,requested_outputs,numoutputs);
@@ -239,12 +199,4 @@
 		xDelete<char*>(requested_outputs);
 	}
-	if(issmb){
-		if(smboutputs){
-			for(int i=0;i<smboutputs;i++){
-				xDelete<char>(requested_smb_outputs[i]);
-			}
-			xDelete<char*>(requested_smb_outputs);
-		}
-	}
 	/*End profiler*/
 	femmodel->profiler->Stop(HYDROLOGYCORE);
Index: /issm/trunk-jpl/src/c/cores/smb_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/smb_core.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/cores/smb_core.cpp	(revision 24240)
@@ -1,5 +1,5 @@
 /*!\file: smb_core.cpp
- * \brief: core of the smb solution 
- */ 
+ * \brief: core of the smb solution
+ */
 
 #include "./cores.h"
@@ -11,8 +11,8 @@
 
 void smb_core(FemModel* femmodel){
-	
+
 	/*Start profiler*/
 	femmodel->profiler->Start(SMBCORE);
-	
+
 	/*parameters: */
 	Analysis* analysis=NULL;
@@ -33,12 +33,74 @@
 	if(numoutputs) femmodel->parameters->FindParam(&requested_outputs,&numoutputs,SmbRequestedOutputsEnum);
 
-	if(VerboseSolution()) _printf0_("   computing smb \n");
+	/*sub steping specifics*/
+	int dtslices;
+	int numaveragedinput;
+	femmodel->parameters->FindParam(&dtslices,SmbStepsPerStepEnum);
+	/*intermiedaries to deal with averaging*/
+	static const int substeplist[2] = {SmbMassBalanceSubstepEnum,SmbRunoffSubstepEnum};
+	static const int transientlist[2] = {SmbMassBalanceTransientEnum,SmbRunoffTransientEnum};
+	static const int averagelist[2] = {SmbMassBalanceEnum,SmbRunoffEnum};
+	std::vector<int> substepinput;
+	std::vector<int> transientinput;
+	std::vector<int> averagedinput;
 
-	analysis = new SmbAnalysis();
-	analysis->Core(femmodel);
-	delete analysis;
+	/*define which variable needs to be averaged on the sub-timestep and initialize as needed*/
+	if(smb_model==SMBgradientscomponentsEnum){
+		numaveragedinput = 2;
+		substepinput.assign(substeplist,substeplist+2);
+		transientinput.assign(transientlist,transientlist+2);
+		averagedinput.assign(averagelist,averagelist+2);
+	}
+
+	/*if yes compute necessary intermiedaries and start looping*/
+	if (dtslices>1){
+		int        substep;
+		IssmDouble global_time,subtime,yts;
+		IssmDouble dt,subdt;
+
+		femmodel->parameters->FindParam(&global_time,TimeEnum);
+		femmodel->parameters->FindParam(&dt,TimesteppingTimeStepEnum);
+		femmodel->parameters->FindParam(&yts,ConstantsYtsEnum);
+
+		subtime=global_time-dt; //getting the time back to the start of the timestep
+		subdt=dt/dtslices; //computing substep from dt and a divider
+		substep=0;
+		femmodel->parameters->SetParam(subdt,TimesteppingTimeStepEnum);
+
+		femmodel->InitTransientOutputx(&transientinput[0],numaveragedinput);
+		while(substep<dtslices){ //loop on sub dts
+			substep+=1;
+			subtime+=subdt;
+			femmodel->parameters->SetParam(subtime,TimeEnum);
+         if(VerboseSolution()) _printf0_("sub iteration " << substep << "/" << dtslices << "  time [yr]: " << setprecision(4) << subtime/yts << " (time step: " << subdt/yts << ")\n");
+         if(VerboseSolution()) _printf0_("   computing smb\n");
+         analysis = new SmbAnalysis();
+			if(VerboseSolution()) _printf0_("   Calling core\n");
+			analysis->Core(femmodel);
+         /*If we have a sub-timestep we store the substep inputs in a transient input here*/
+         femmodel->StackTransientOutputx(&substepinput[0],&transientinput[0],subtime,numaveragedinput);
+			delete analysis;
+		}
+      /*averaging the transient input*/
+		femmodel->AverageTransientOutputx(&transientinput[0],&averagedinput[0],global_time-dt,subtime,numaveragedinput);
+		/*and reset timesteping variables to original*/
+		femmodel->parameters->SetParam(global_time,TimeEnum);
+		femmodel->parameters->SetParam(dt,TimesteppingTimeStepEnum);
+	}
+	else{
+      if(VerboseSolution()) _printf0_("   computing smb \n");
+      analysis = new SmbAnalysis();
+		analysis->Core(femmodel);
+		/*If no substeps are present we want to duplicate the computed substep enum for coupling purposes*/
+		if(smb_model==SMBgradientscomponentsEnum){
+			for(int i=0;i<numaveragedinput;i++){
+				InputDuplicatex(femmodel,substepinput[i],averagedinput[i]);
+			}
+		}
+		delete analysis;
+	}
 
 	if(save_results){
-		if(VerboseSolution()) _printf0_("   saving results\n");
+		if(VerboseSolution()) _printf0_("   saving smb results\n");
 		femmodel->RequestedOutputsx(&femmodel->results,requested_outputs,numoutputs);
 	}
Index: /issm/trunk-jpl/src/c/cores/stressbalance_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/stressbalance_core.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/cores/stressbalance_core.cpp	(revision 24240)
@@ -1,5 +1,5 @@
 /*!\file: stressbalance_core.cpp
- * \brief: core of the stressbalance solution 
- */ 
+ * \brief: core of the stressbalance solution
+ */
 
 #include "./cores.h"
@@ -91,11 +91,12 @@
 
 	if(save_results){
-		if(VerboseSolution()) _printf0_("   saving results\n");
+		if(VerboseSolution()) _printf0_("   saving stressbalance results\n");
 		femmodel->RequestedOutputsx(&femmodel->results,requested_outputs,numoutputs);
+		if(VerboseSolution()) _printf0_("   results saved\n");
 	}
 
 	if(solution_type==StressbalanceSolutionEnum && !control_analysis)femmodel->RequestedDependentsx();
 
-	/*Free ressources:*/	
+	/*Free ressources:*/
 	if(numoutputs){for(int i=0;i<numoutputs;i++){xDelete<char>(requested_outputs[i]);} xDelete<char*>(requested_outputs);}
 
Index: /issm/trunk-jpl/src/c/cores/surfaceslope_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/surfaceslope_core.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/cores/surfaceslope_core.cpp	(revision 24240)
@@ -1,5 +1,5 @@
 /*!\file: surfaceslope_core.cpp
- * \brief: core of the slope solution 
- */ 
+ * \brief: core of the slope solution
+ */
 
 #include "./cores.h"
@@ -38,5 +38,5 @@
 
 	if(save_results){
-		if(VerboseSolution()) _printf0_("saving results:\n");
+		if(VerboseSolution()) _printf0_("saving surface slopes results:\n");
 		if(domaintype!=Domain2DverticalEnum){
 			int outputs[2] = {SurfaceSlopeXEnum,SurfaceSlopeYEnum};
Index: /issm/trunk-jpl/src/c/cores/thermal_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/thermal_core.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/cores/thermal_core.cpp	(revision 24240)
@@ -1,5 +1,5 @@
 /*!\file: thermal_core.cpp
- * \brief: core of the thermal solution 
- */ 
+ * \brief: core of the thermal solution
+ */
 
 #include "./cores.h"
@@ -12,8 +12,8 @@
 
 void thermal_core(FemModel* femmodel){
-	
+
 	/*Start profiler*/
         femmodel->profiler->Start(THERMALCORE);
-	
+
 	/*intermediary*/
 	bool   save_results,isenthalpy;
@@ -49,11 +49,11 @@
 
 	if(save_results){
-		if(VerboseSolution()) _printf0_("   saving results\n");
+		if(VerboseSolution()) _printf0_("   saving thermal results\n");
 		femmodel->RequestedOutputsx(&femmodel->results,requested_outputs,numoutputs);
 	}
 
-	/*Free ressources:*/	
+	/*Free ressources:*/
 	if(numoutputs){for(int i=0;i<numoutputs;i++){xDelete<char>(requested_outputs[i]);} xDelete<char*>(requested_outputs);}
-	
+
 	/*End profiler*/
         femmodel->profiler->Stop(THERMALCORE);
Index: /issm/trunk-jpl/src/c/cores/transient_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/transient_core.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/cores/transient_core.cpp	(revision 24240)
@@ -151,5 +151,11 @@
 		}
 		/* Using Hydrology dc  coupled we need to compute smb in the hydrology inner time loop*/
+		if(issmb) {
+			if(VerboseSolution()) _printf0_("   computing smb\n");
+			smb_core(femmodel);
+		}
+
 		if(ishydrology){
+			if(VerboseSolution()) _printf0_("   computing hydrology\n");
 			int hydrology_model;
 			hydrology_core(femmodel);
@@ -157,13 +163,19 @@
 			if(hydrology_model!=HydrologydcEnum && issmb)smb_core(femmodel);
 		}
-		else{
-			if(issmb) smb_core(femmodel);
-		}
-
-		if(isstressbalance && (step%sb_coupling_frequency==0 || step==1) ) stressbalance_core(femmodel);
-
-		if(isdamageevolution) damage_core(femmodel);
-
-		if(ismovingfront)	movingfront_core(femmodel);
+
+		if(isstressbalance && (step%sb_coupling_frequency==0 || step==1) ) {
+			if(VerboseSolution()) _printf0_("   computing stress balance\n");
+			stressbalance_core(femmodel);
+		}
+
+		if(isdamageevolution) {
+			if(VerboseSolution()) _printf0_("   computing damage\n");
+			damage_core(femmodel);
+		}
+
+		if(ismovingfront)	{
+			if(VerboseSolution()) _printf0_("   computing moving front\n");
+			movingfront_core(femmodel);
+		}
 
 		/* from here on, prepare geometry for next time step*/
@@ -171,4 +183,5 @@
 
 		if(ismasstransport){
+			if(VerboseSolution()) _printf0_("   computing mass transport\n");
 			bmb_core(femmodel);
 			masstransport_core(femmodel);
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 24240)
@@ -182,12 +182,11 @@
 	HydrologydcRelTolEnum,
 	HydrologydcSedimentCompressibilityEnum,
+	HydrologydcSedimentlimitEnum,
+	HydrologydcSedimentlimitFlagEnum,
 	HydrologydcSedimentPorosityEnum,
 	HydrologydcSedimentThicknessEnum,
-	HydrologydcSedimentlimitEnum,
-	HydrologydcSedimentlimitFlagEnum,
 	HydrologydcTransferFlagEnum,
 	HydrologydcUnconfinedFlagEnum,
 	HydrologydcWaterCompressibilityEnum,
-	HydrologydtEnum,
 	HydrologyshreveStabilizationEnum,
 	IcecapToEarthCommEnum,
@@ -331,11 +330,11 @@
 	SmbAccurefEnum,
 	SmbAdThreshEnum,
+	SmbDesfacEnum,
+	SmbDpermilEnum,
+	SmbDsnowIdxEnum,
 	SmbCldFracEnum,
 	SmbDelta18oEnum,
 	SmbDelta18oSurfaceEnum,
 	SmbDenIdxEnum,
-	SmbDesfacEnum,
-	SmbDpermilEnum,
-	SmbDsnowIdxEnum,
 	SmbDtEnum,
 	SmbEnum,
@@ -369,4 +368,5 @@
 	SmbRunoffrefEnum,
 	SmbSealevEnum,
+	SmbStepsPerStepEnum,
 	SmbSwIdxEnum,
 	SmbT0dryEnum,
@@ -494,5 +494,5 @@
 	DamageFEnum,
 	DegreeOfChannelizationEnum,
-	DepthBelowSurfaceEnum, 
+	DepthBelowSurfaceEnum,
 	DeviatoricStresseffectiveEnum,
 	DeviatoricStressxxEnum,
@@ -512,15 +512,15 @@
 	DrivingStressXEnum,
 	DrivingStressYEnum,
-	EffectivePressureEnum,
-	EffectivePressureHydrostepEnum,
-	EffectivePressureStackedEnum,
+   EffectivePressureEnum,
+	EffectivePressureSubstepEnum,
+	EffectivePressureTransientEnum,
 	EnthalpyEnum,
 	EnthalpyPicardEnum,
 	EplHeadEnum,
-	EplHeadHydrostepEnum,
-	EplHeadOldEnum,
+   EplHeadOldEnum,
 	EplHeadSlopeXEnum,
 	EplHeadSlopeYEnum,
-	EplHeadStackedEnum,
+	EplHeadSubstepEnum,
+   EplHeadTransientEnum,
 	EsaDeltathicknessEnum,
 	EsaEmotionEnum,
@@ -564,6 +564,16 @@
 	HydrologyBumpHeightEnum,
 	HydrologyBumpSpacingEnum,
-	HydrologyDrainageRateEnum,
-	HydrologyEnglacialInputEnum,
+	HydrologydcBasalMoulinInputEnum,
+	HydrologydcEplThicknessEnum,
+	HydrologydcEplThicknessOldEnum,
+	HydrologydcEplThicknessSubstepEnum,
+	HydrologydcEplThicknessTransientEnum,
+	HydrologydcMaskEplactiveEltEnum,
+	HydrologydcMaskEplactiveNodeEnum,
+	HydrologydcMaskThawedEltEnum,
+	HydrologydcMaskThawedNodeEnum,
+	HydrologydcSedimentTransmitivityEnum,
+   HydrologyDrainageRateEnum,
+   HydrologyEnglacialInputEnum,
 	HydrologyGapHeightEnum,
 	HydrologyHeadEnum,
@@ -575,17 +585,7 @@
 	HydrologySheetThicknessEnum,
 	HydrologySheetThicknessOldEnum,
+	HydrologyWatercolumnMaxEnum,
 	HydrologyWaterVxEnum,
 	HydrologyWaterVyEnum,
-	HydrologyWatercolumnMaxEnum,
-	HydrologydcBasalMoulinInputEnum,
-	HydrologydcEplThicknessEnum,
-	HydrologydcEplThicknessHydrostepEnum,
-	HydrologydcEplThicknessOldEnum,
-	HydrologydcEplThicknessStackedEnum,
-	HydrologydcMaskEplactiveEltEnum,
-	HydrologydcMaskEplactiveNodeEnum,
-	HydrologydcMaskThawedEltEnum,
-	HydrologydcMaskThawedNodeEnum,
-	HydrologydcSedimentTransmitivityEnum,
 	IceEnum,
 	IceMaskNodeActivationEnum,
@@ -628,10 +628,10 @@
 	P1Enum,
 	PressureEnum,
-	RadarEnum, 
-	RadarAttenuationMacGregorEnum, 
+	RadarEnum,
+	RadarAttenuationMacGregorEnum,
 	RadarAttenuationWolffEnum,
-	RadarIcePeriodEnum, 
+	RadarIcePeriodEnum,
 	RadarPowerMacGregorEnum,
-	RadarPowerWolffEnum, 
+	RadarPowerWolffEnum,
 	RheologyBAbsGradientEnum,
 	RheologyBInitialguessEnum,
@@ -659,7 +659,8 @@
 	SealevelriseSpcthicknessEnum,
 	SealevelriseStericRateEnum,
-	SedimentHeadEnum,
-	SedimentHeadHydrostepEnum,
-	SedimentHeadOldEnum,
+   SedimentHeadEnum,
+   SedimentHeadOldEnum,
+	SedimentHeadSubstepEnum,
+	SedimentHeadTransientEnum,
 	SedimentHeadResidualEnum,
 	SedimentHeadStackedEnum,
@@ -708,4 +709,6 @@
 	SmbMassBalanceClimateEnum,
 	SmbMassBalanceEnum,
+   SmbMassBalanceSubstepEnum,
+   SmbMassBalanceTransientEnum,
 	SmbMeanLHFEnum,
 	SmbMeanSHFEnum,
@@ -728,4 +731,6 @@
 	SmbReiniEnum,
 	SmbRunoffEnum,
+   SmbRunoffSubstepEnum,
+   SmbRunoffTransientEnum,
 	SmbS0gcmEnum,
 	SmbS0pEnum,
@@ -941,5 +946,5 @@
 	BasalforcingsIsmip6Enum,
 	BasalforcingsPicoEnum,
-	BeckmannGoosseFloatingMeltRateEnum,	
+	BeckmannGoosseFloatingMeltRateEnum,
 	BedSlopeSolutionEnum,
 	BoolExternalResultEnum,
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 24240)
@@ -190,12 +190,11 @@
 		case HydrologydcRelTolEnum : return "HydrologydcRelTol";
 		case HydrologydcSedimentCompressibilityEnum : return "HydrologydcSedimentCompressibility";
+		case HydrologydcSedimentlimitEnum : return "HydrologydcSedimentlimit";
+		case HydrologydcSedimentlimitFlagEnum : return "HydrologydcSedimentlimitFlag";
 		case HydrologydcSedimentPorosityEnum : return "HydrologydcSedimentPorosity";
 		case HydrologydcSedimentThicknessEnum : return "HydrologydcSedimentThickness";
-		case HydrologydcSedimentlimitEnum : return "HydrologydcSedimentlimit";
-		case HydrologydcSedimentlimitFlagEnum : return "HydrologydcSedimentlimitFlag";
 		case HydrologydcTransferFlagEnum : return "HydrologydcTransferFlag";
 		case HydrologydcUnconfinedFlagEnum : return "HydrologydcUnconfinedFlag";
 		case HydrologydcWaterCompressibilityEnum : return "HydrologydcWaterCompressibility";
-		case HydrologydtEnum : return "Hydrologydt";
 		case HydrologyshreveStabilizationEnum : return "HydrologyshreveStabilization";
 		case IcecapToEarthCommEnum : return "IcecapToEarthComm";
@@ -339,11 +338,11 @@
 		case SmbAccurefEnum : return "SmbAccuref";
 		case SmbAdThreshEnum : return "SmbAdThresh";
+		case SmbDesfacEnum : return "SmbDesfac";
+		case SmbDpermilEnum : return "SmbDpermil";
+		case SmbDsnowIdxEnum : return "SmbDsnowIdx";
 		case SmbCldFracEnum : return "SmbCldFrac";
 		case SmbDelta18oEnum : return "SmbDelta18o";
 		case SmbDelta18oSurfaceEnum : return "SmbDelta18oSurface";
 		case SmbDenIdxEnum : return "SmbDenIdx";
-		case SmbDesfacEnum : return "SmbDesfac";
-		case SmbDpermilEnum : return "SmbDpermil";
-		case SmbDsnowIdxEnum : return "SmbDsnowIdx";
 		case SmbDtEnum : return "SmbDt";
 		case SmbEnum : return "Smb";
@@ -377,4 +376,5 @@
 		case SmbRunoffrefEnum : return "SmbRunoffref";
 		case SmbSealevEnum : return "SmbSealev";
+		case SmbStepsPerStepEnum : return "SmbStepsPerStep";
 		case SmbSwIdxEnum : return "SmbSwIdx";
 		case SmbT0dryEnum : return "SmbT0dry";
@@ -519,14 +519,14 @@
 		case DrivingStressYEnum : return "DrivingStressY";
 		case EffectivePressureEnum : return "EffectivePressure";
-		case EffectivePressureHydrostepEnum : return "EffectivePressureHydrostep";
-		case EffectivePressureStackedEnum : return "EffectivePressureStacked";
+		case EffectivePressureSubstepEnum : return "EffectivePressureSubstep";
+		case EffectivePressureTransientEnum : return "EffectivePressureTransient";
 		case EnthalpyEnum : return "Enthalpy";
 		case EnthalpyPicardEnum : return "EnthalpyPicard";
 		case EplHeadEnum : return "EplHead";
-		case EplHeadHydrostepEnum : return "EplHeadHydrostep";
 		case EplHeadOldEnum : return "EplHeadOld";
 		case EplHeadSlopeXEnum : return "EplHeadSlopeX";
 		case EplHeadSlopeYEnum : return "EplHeadSlopeY";
-		case EplHeadStackedEnum : return "EplHeadStacked";
+		case EplHeadSubstepEnum : return "EplHeadSubstep";
+		case EplHeadTransientEnum : return "EplHeadTransient";
 		case EsaDeltathicknessEnum : return "EsaDeltathickness";
 		case EsaEmotionEnum : return "EsaEmotion";
@@ -570,4 +570,14 @@
 		case HydrologyBumpHeightEnum : return "HydrologyBumpHeight";
 		case HydrologyBumpSpacingEnum : return "HydrologyBumpSpacing";
+		case HydrologydcBasalMoulinInputEnum : return "HydrologydcBasalMoulinInput";
+		case HydrologydcEplThicknessEnum : return "HydrologydcEplThickness";
+		case HydrologydcEplThicknessOldEnum : return "HydrologydcEplThicknessOld";
+		case HydrologydcEplThicknessSubstepEnum : return "HydrologydcEplThicknessSubstep";
+		case HydrologydcEplThicknessTransientEnum : return "HydrologydcEplThicknessTransient";
+		case HydrologydcMaskEplactiveEltEnum : return "HydrologydcMaskEplactiveElt";
+		case HydrologydcMaskEplactiveNodeEnum : return "HydrologydcMaskEplactiveNode";
+		case HydrologydcMaskThawedEltEnum : return "HydrologydcMaskThawedElt";
+		case HydrologydcMaskThawedNodeEnum : return "HydrologydcMaskThawedNode";
+		case HydrologydcSedimentTransmitivityEnum : return "HydrologydcSedimentTransmitivity";
 		case HydrologyDrainageRateEnum : return "HydrologyDrainageRate";
 		case HydrologyEnglacialInputEnum : return "HydrologyEnglacialInput";
@@ -581,17 +591,7 @@
 		case HydrologySheetThicknessEnum : return "HydrologySheetThickness";
 		case HydrologySheetThicknessOldEnum : return "HydrologySheetThicknessOld";
+		case HydrologyWatercolumnMaxEnum : return "HydrologyWatercolumnMax";
 		case HydrologyWaterVxEnum : return "HydrologyWaterVx";
 		case HydrologyWaterVyEnum : return "HydrologyWaterVy";
-		case HydrologyWatercolumnMaxEnum : return "HydrologyWatercolumnMax";
-		case HydrologydcBasalMoulinInputEnum : return "HydrologydcBasalMoulinInput";
-		case HydrologydcEplThicknessEnum : return "HydrologydcEplThickness";
-		case HydrologydcEplThicknessHydrostepEnum : return "HydrologydcEplThicknessHydrostep";
-		case HydrologydcEplThicknessOldEnum : return "HydrologydcEplThicknessOld";
-		case HydrologydcEplThicknessStackedEnum : return "HydrologydcEplThicknessStacked";
-		case HydrologydcMaskEplactiveEltEnum : return "HydrologydcMaskEplactiveElt";
-		case HydrologydcMaskEplactiveNodeEnum : return "HydrologydcMaskEplactiveNode";
-		case HydrologydcMaskThawedEltEnum : return "HydrologydcMaskThawedElt";
-		case HydrologydcMaskThawedNodeEnum : return "HydrologydcMaskThawedNode";
-		case HydrologydcSedimentTransmitivityEnum : return "HydrologydcSedimentTransmitivity";
 		case IceEnum : return "Ice";
 		case IceMaskNodeActivationEnum : return "IceMaskNodeActivation";
@@ -666,6 +666,7 @@
 		case SealevelriseStericRateEnum : return "SealevelriseStericRate";
 		case SedimentHeadEnum : return "SedimentHead";
-		case SedimentHeadHydrostepEnum : return "SedimentHeadHydrostep";
 		case SedimentHeadOldEnum : return "SedimentHeadOld";
+		case SedimentHeadSubstepEnum : return "SedimentHeadSubstep";
+		case SedimentHeadTransientEnum : return "SedimentHeadTransient";
 		case SedimentHeadResidualEnum : return "SedimentHeadResidual";
 		case SedimentHeadStackedEnum : return "SedimentHeadStacked";
@@ -714,4 +715,6 @@
 		case SmbMassBalanceClimateEnum : return "SmbMassBalanceClimate";
 		case SmbMassBalanceEnum : return "SmbMassBalance";
+		case SmbMassBalanceSubstepEnum : return "SmbMassBalanceSubstep";
+		case SmbMassBalanceTransientEnum : return "SmbMassBalanceTransient";
 		case SmbMeanLHFEnum : return "SmbMeanLHF";
 		case SmbMeanSHFEnum : return "SmbMeanSHF";
@@ -734,4 +737,6 @@
 		case SmbReiniEnum : return "SmbReini";
 		case SmbRunoffEnum : return "SmbRunoff";
+		case SmbRunoffSubstepEnum : return "SmbRunoffSubstep";
+		case SmbRunoffTransientEnum : return "SmbRunoffTransient";
 		case SmbS0gcmEnum : return "SmbS0gcm";
 		case SmbS0pEnum : return "SmbS0p";
Index: /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 24240)
@@ -193,12 +193,11 @@
 	      else if (strcmp(name,"HydrologydcRelTol")==0) return HydrologydcRelTolEnum;
 	      else if (strcmp(name,"HydrologydcSedimentCompressibility")==0) return HydrologydcSedimentCompressibilityEnum;
+	      else if (strcmp(name,"HydrologydcSedimentlimit")==0) return HydrologydcSedimentlimitEnum;
+	      else if (strcmp(name,"HydrologydcSedimentlimitFlag")==0) return HydrologydcSedimentlimitFlagEnum;
 	      else if (strcmp(name,"HydrologydcSedimentPorosity")==0) return HydrologydcSedimentPorosityEnum;
 	      else if (strcmp(name,"HydrologydcSedimentThickness")==0) return HydrologydcSedimentThicknessEnum;
-	      else if (strcmp(name,"HydrologydcSedimentlimit")==0) return HydrologydcSedimentlimitEnum;
-	      else if (strcmp(name,"HydrologydcSedimentlimitFlag")==0) return HydrologydcSedimentlimitFlagEnum;
 	      else if (strcmp(name,"HydrologydcTransferFlag")==0) return HydrologydcTransferFlagEnum;
 	      else if (strcmp(name,"HydrologydcUnconfinedFlag")==0) return HydrologydcUnconfinedFlagEnum;
 	      else if (strcmp(name,"HydrologydcWaterCompressibility")==0) return HydrologydcWaterCompressibilityEnum;
-	      else if (strcmp(name,"Hydrologydt")==0) return HydrologydtEnum;
 	      else if (strcmp(name,"HydrologyshreveStabilization")==0) return HydrologyshreveStabilizationEnum;
 	      else if (strcmp(name,"IcecapToEarthComm")==0) return IcecapToEarthCommEnum;
@@ -260,9 +259,9 @@
 	      else if (strcmp(name,"MaterialsLithosphereShearModulus")==0) return MaterialsLithosphereShearModulusEnum;
 	      else if (strcmp(name,"MaterialsMantleDensity")==0) return MaterialsMantleDensityEnum;
+	      else if (strcmp(name,"MaterialsMantleShearModulus")==0) return MaterialsMantleShearModulusEnum;
          else stage=3;
    }
    if(stage==3){
-	      if (strcmp(name,"MaterialsMantleShearModulus")==0) return MaterialsMantleShearModulusEnum;
-	      else if (strcmp(name,"MaterialsMeltingpoint")==0) return MaterialsMeltingpointEnum;
+	      if (strcmp(name,"MaterialsMeltingpoint")==0) return MaterialsMeltingpointEnum;
 	      else if (strcmp(name,"MaterialsMixedLayerCapacity")==0) return MaterialsMixedLayerCapacityEnum;
 	      else if (strcmp(name,"MaterialsMuWater")==0) return MaterialsMuWaterEnum;
@@ -345,11 +344,11 @@
 	      else if (strcmp(name,"SmbAccuref")==0) return SmbAccurefEnum;
 	      else if (strcmp(name,"SmbAdThresh")==0) return SmbAdThreshEnum;
+	      else if (strcmp(name,"SmbDesfac")==0) return SmbDesfacEnum;
+	      else if (strcmp(name,"SmbDpermil")==0) return SmbDpermilEnum;
+	      else if (strcmp(name,"SmbDsnowIdx")==0) return SmbDsnowIdxEnum;
 	      else if (strcmp(name,"SmbCldFrac")==0) return SmbCldFracEnum;
 	      else if (strcmp(name,"SmbDelta18o")==0) return SmbDelta18oEnum;
 	      else if (strcmp(name,"SmbDelta18oSurface")==0) return SmbDelta18oSurfaceEnum;
 	      else if (strcmp(name,"SmbDenIdx")==0) return SmbDenIdxEnum;
-	      else if (strcmp(name,"SmbDesfac")==0) return SmbDesfacEnum;
-	      else if (strcmp(name,"SmbDpermil")==0) return SmbDpermilEnum;
-	      else if (strcmp(name,"SmbDsnowIdx")==0) return SmbDsnowIdxEnum;
 	      else if (strcmp(name,"SmbDt")==0) return SmbDtEnum;
 	      else if (strcmp(name,"Smb")==0) return SmbEnum;
@@ -383,4 +382,5 @@
 	      else if (strcmp(name,"SmbRunoffref")==0) return SmbRunoffrefEnum;
 	      else if (strcmp(name,"SmbSealev")==0) return SmbSealevEnum;
+	      else if (strcmp(name,"SmbStepsPerStep")==0) return SmbStepsPerStepEnum;
          else stage=4;
    }
@@ -531,14 +531,14 @@
 	      else if (strcmp(name,"DrivingStressY")==0) return DrivingStressYEnum;
 	      else if (strcmp(name,"EffectivePressure")==0) return EffectivePressureEnum;
-	      else if (strcmp(name,"EffectivePressureHydrostep")==0) return EffectivePressureHydrostepEnum;
-	      else if (strcmp(name,"EffectivePressureStacked")==0) return EffectivePressureStackedEnum;
+	      else if (strcmp(name,"EffectivePressureSubstep")==0) return EffectivePressureSubstepEnum;
+	      else if (strcmp(name,"EffectivePressureTransient")==0) return EffectivePressureTransientEnum;
 	      else if (strcmp(name,"Enthalpy")==0) return EnthalpyEnum;
 	      else if (strcmp(name,"EnthalpyPicard")==0) return EnthalpyPicardEnum;
 	      else if (strcmp(name,"EplHead")==0) return EplHeadEnum;
-	      else if (strcmp(name,"EplHeadHydrostep")==0) return EplHeadHydrostepEnum;
 	      else if (strcmp(name,"EplHeadOld")==0) return EplHeadOldEnum;
 	      else if (strcmp(name,"EplHeadSlopeX")==0) return EplHeadSlopeXEnum;
 	      else if (strcmp(name,"EplHeadSlopeY")==0) return EplHeadSlopeYEnum;
-	      else if (strcmp(name,"EplHeadStacked")==0) return EplHeadStackedEnum;
+	      else if (strcmp(name,"EplHeadSubstep")==0) return EplHeadSubstepEnum;
+	      else if (strcmp(name,"EplHeadTransient")==0) return EplHeadTransientEnum;
 	      else if (strcmp(name,"EsaDeltathickness")==0) return EsaDeltathicknessEnum;
 	      else if (strcmp(name,"EsaEmotion")==0) return EsaEmotionEnum;
@@ -582,4 +582,14 @@
 	      else if (strcmp(name,"HydrologyBumpHeight")==0) return HydrologyBumpHeightEnum;
 	      else if (strcmp(name,"HydrologyBumpSpacing")==0) return HydrologyBumpSpacingEnum;
+	      else if (strcmp(name,"HydrologydcBasalMoulinInput")==0) return HydrologydcBasalMoulinInputEnum;
+	      else if (strcmp(name,"HydrologydcEplThickness")==0) return HydrologydcEplThicknessEnum;
+	      else if (strcmp(name,"HydrologydcEplThicknessOld")==0) return HydrologydcEplThicknessOldEnum;
+	      else if (strcmp(name,"HydrologydcEplThicknessSubstep")==0) return HydrologydcEplThicknessSubstepEnum;
+	      else if (strcmp(name,"HydrologydcEplThicknessTransient")==0) return HydrologydcEplThicknessTransientEnum;
+	      else if (strcmp(name,"HydrologydcMaskEplactiveElt")==0) return HydrologydcMaskEplactiveEltEnum;
+	      else if (strcmp(name,"HydrologydcMaskEplactiveNode")==0) return HydrologydcMaskEplactiveNodeEnum;
+	      else if (strcmp(name,"HydrologydcMaskThawedElt")==0) return HydrologydcMaskThawedEltEnum;
+	      else if (strcmp(name,"HydrologydcMaskThawedNode")==0) return HydrologydcMaskThawedNodeEnum;
+	      else if (strcmp(name,"HydrologydcSedimentTransmitivity")==0) return HydrologydcSedimentTransmitivityEnum;
 	      else if (strcmp(name,"HydrologyDrainageRate")==0) return HydrologyDrainageRateEnum;
 	      else if (strcmp(name,"HydrologyEnglacialInput")==0) return HydrologyEnglacialInputEnum;
@@ -593,17 +603,7 @@
 	      else if (strcmp(name,"HydrologySheetThickness")==0) return HydrologySheetThicknessEnum;
 	      else if (strcmp(name,"HydrologySheetThicknessOld")==0) return HydrologySheetThicknessOldEnum;
+	      else if (strcmp(name,"HydrologyWatercolumnMax")==0) return HydrologyWatercolumnMaxEnum;
 	      else if (strcmp(name,"HydrologyWaterVx")==0) return HydrologyWaterVxEnum;
 	      else if (strcmp(name,"HydrologyWaterVy")==0) return HydrologyWaterVyEnum;
-	      else if (strcmp(name,"HydrologyWatercolumnMax")==0) return HydrologyWatercolumnMaxEnum;
-	      else if (strcmp(name,"HydrologydcBasalMoulinInput")==0) return HydrologydcBasalMoulinInputEnum;
-	      else if (strcmp(name,"HydrologydcEplThickness")==0) return HydrologydcEplThicknessEnum;
-	      else if (strcmp(name,"HydrologydcEplThicknessHydrostep")==0) return HydrologydcEplThicknessHydrostepEnum;
-	      else if (strcmp(name,"HydrologydcEplThicknessOld")==0) return HydrologydcEplThicknessOldEnum;
-	      else if (strcmp(name,"HydrologydcEplThicknessStacked")==0) return HydrologydcEplThicknessStackedEnum;
-	      else if (strcmp(name,"HydrologydcMaskEplactiveElt")==0) return HydrologydcMaskEplactiveEltEnum;
-	      else if (strcmp(name,"HydrologydcMaskEplactiveNode")==0) return HydrologydcMaskEplactiveNodeEnum;
-	      else if (strcmp(name,"HydrologydcMaskThawedElt")==0) return HydrologydcMaskThawedEltEnum;
-	      else if (strcmp(name,"HydrologydcMaskThawedNode")==0) return HydrologydcMaskThawedNodeEnum;
-	      else if (strcmp(name,"HydrologydcSedimentTransmitivity")==0) return HydrologydcSedimentTransmitivityEnum;
 	      else if (strcmp(name,"Ice")==0) return IceEnum;
 	      else if (strcmp(name,"IceMaskNodeActivation")==0) return IceMaskNodeActivationEnum;
@@ -681,6 +681,7 @@
 	      else if (strcmp(name,"SealevelriseStericRate")==0) return SealevelriseStericRateEnum;
 	      else if (strcmp(name,"SedimentHead")==0) return SedimentHeadEnum;
-	      else if (strcmp(name,"SedimentHeadHydrostep")==0) return SedimentHeadHydrostepEnum;
 	      else if (strcmp(name,"SedimentHeadOld")==0) return SedimentHeadOldEnum;
+	      else if (strcmp(name,"SedimentHeadSubstep")==0) return SedimentHeadSubstepEnum;
+	      else if (strcmp(name,"SedimentHeadTransient")==0) return SedimentHeadTransientEnum;
 	      else if (strcmp(name,"SedimentHeadResidual")==0) return SedimentHeadResidualEnum;
 	      else if (strcmp(name,"SedimentHeadStacked")==0) return SedimentHeadStackedEnum;
@@ -729,4 +730,6 @@
 	      else if (strcmp(name,"SmbMassBalanceClimate")==0) return SmbMassBalanceClimateEnum;
 	      else if (strcmp(name,"SmbMassBalance")==0) return SmbMassBalanceEnum;
+	      else if (strcmp(name,"SmbMassBalanceSubstep")==0) return SmbMassBalanceSubstepEnum;
+	      else if (strcmp(name,"SmbMassBalanceTransient")==0) return SmbMassBalanceTransientEnum;
 	      else if (strcmp(name,"SmbMeanLHF")==0) return SmbMeanLHFEnum;
 	      else if (strcmp(name,"SmbMeanSHF")==0) return SmbMeanSHFEnum;
@@ -749,11 +752,13 @@
 	      else if (strcmp(name,"SmbReini")==0) return SmbReiniEnum;
 	      else if (strcmp(name,"SmbRunoff")==0) return SmbRunoffEnum;
+         else stage=7;
+   }
+   if(stage==7){
+	      if (strcmp(name,"SmbRunoffSubstep")==0) return SmbRunoffSubstepEnum;
+	      else if (strcmp(name,"SmbRunoffTransient")==0) return SmbRunoffTransientEnum;
 	      else if (strcmp(name,"SmbS0gcm")==0) return SmbS0gcmEnum;
 	      else if (strcmp(name,"SmbS0p")==0) return SmbS0pEnum;
 	      else if (strcmp(name,"SmbS0t")==0) return SmbS0tEnum;
-         else stage=7;
-   }
-   if(stage==7){
-	      if (strcmp(name,"SmbSizeini")==0) return SmbSizeiniEnum;
+	      else if (strcmp(name,"SmbSizeini")==0) return SmbSizeiniEnum;
 	      else if (strcmp(name,"SmbSmbCorr")==0) return SmbSmbCorrEnum;
 	      else if (strcmp(name,"SmbSmbref")==0) return SmbSmbrefEnum;
@@ -870,13 +875,13 @@
 	      else if (strcmp(name,"Outputdefinition37")==0) return Outputdefinition37Enum;
 	      else if (strcmp(name,"Outputdefinition38")==0) return Outputdefinition38Enum;
-	      else if (strcmp(name,"Outputdefinition39")==0) return Outputdefinition39Enum;
+         else stage=8;
+   }
+   if(stage==8){
+	      if (strcmp(name,"Outputdefinition39")==0) return Outputdefinition39Enum;
 	      else if (strcmp(name,"Outputdefinition3")==0) return Outputdefinition3Enum;
 	      else if (strcmp(name,"Outputdefinition40")==0) return Outputdefinition40Enum;
 	      else if (strcmp(name,"Outputdefinition41")==0) return Outputdefinition41Enum;
 	      else if (strcmp(name,"Outputdefinition42")==0) return Outputdefinition42Enum;
-         else stage=8;
-   }
-   if(stage==8){
-	      if (strcmp(name,"Outputdefinition43")==0) return Outputdefinition43Enum;
+	      else if (strcmp(name,"Outputdefinition43")==0) return Outputdefinition43Enum;
 	      else if (strcmp(name,"Outputdefinition44")==0) return Outputdefinition44Enum;
 	      else if (strcmp(name,"Outputdefinition45")==0) return Outputdefinition45Enum;
@@ -993,13 +998,13 @@
 	      else if (strcmp(name,"ControlInputMaxs")==0) return ControlInputMaxsEnum;
 	      else if (strcmp(name,"ControlInputMins")==0) return ControlInputMinsEnum;
-	      else if (strcmp(name,"ControlInputValues")==0) return ControlInputValuesEnum;
+         else stage=9;
+   }
+   if(stage==9){
+	      if (strcmp(name,"ControlInputValues")==0) return ControlInputValuesEnum;
 	      else if (strcmp(name,"CrouzeixRaviart")==0) return CrouzeixRaviartEnum;
 	      else if (strcmp(name,"Cuffey")==0) return CuffeyEnum;
 	      else if (strcmp(name,"CuffeyTemperate")==0) return CuffeyTemperateEnum;
 	      else if (strcmp(name,"DamageEvolutionAnalysis")==0) return DamageEvolutionAnalysisEnum;
-         else stage=9;
-   }
-   if(stage==9){
-	      if (strcmp(name,"DamageEvolutionSolution")==0) return DamageEvolutionSolutionEnum;
+	      else if (strcmp(name,"DamageEvolutionSolution")==0) return DamageEvolutionSolutionEnum;
 	      else if (strcmp(name,"DataSet")==0) return DataSetEnum;
 	      else if (strcmp(name,"DataSetParam")==0) return DataSetParamEnum;
@@ -1116,13 +1121,13 @@
 	      else if (strcmp(name,"LoveHi")==0) return LoveHiEnum;
 	      else if (strcmp(name,"LoveHr")==0) return LoveHrEnum;
-	      else if (strcmp(name,"LoveKernelsImag")==0) return LoveKernelsImagEnum;
+         else stage=10;
+   }
+   if(stage==10){
+	      if (strcmp(name,"LoveKernelsImag")==0) return LoveKernelsImagEnum;
 	      else if (strcmp(name,"LoveKernelsReal")==0) return LoveKernelsRealEnum;
 	      else if (strcmp(name,"LoveKi")==0) return LoveKiEnum;
 	      else if (strcmp(name,"LoveKr")==0) return LoveKrEnum;
 	      else if (strcmp(name,"LoveLi")==0) return LoveLiEnum;
-         else stage=10;
-   }
-   if(stage==10){
-	      if (strcmp(name,"LoveLr")==0) return LoveLrEnum;
+	      else if (strcmp(name,"LoveLr")==0) return LoveLrEnum;
 	      else if (strcmp(name,"LoveSolution")==0) return LoveSolutionEnum;
 	      else if (strcmp(name,"MINI")==0) return MINIEnum;
@@ -1239,13 +1244,13 @@
 	      else if (strcmp(name,"Segment")==0) return SegmentEnum;
 	      else if (strcmp(name,"SegmentRiftfront")==0) return SegmentRiftfrontEnum;
-	      else if (strcmp(name,"Separate")==0) return SeparateEnum;
+         else stage=11;
+   }
+   if(stage==11){
+	      if (strcmp(name,"Separate")==0) return SeparateEnum;
 	      else if (strcmp(name,"Seq")==0) return SeqEnum;
 	      else if (strcmp(name,"SmbAnalysis")==0) return SmbAnalysisEnum;
 	      else if (strcmp(name,"SmbSolution")==0) return SmbSolutionEnum;
 	      else if (strcmp(name,"SmoothAnalysis")==0) return SmoothAnalysisEnum;
-         else stage=11;
-   }
-   if(stage==11){
-	      if (strcmp(name,"SoftMigration")==0) return SoftMigrationEnum;
+	      else if (strcmp(name,"SoftMigration")==0) return SoftMigrationEnum;
 	      else if (strcmp(name,"SpatialLinearFloatingMeltRate")==0) return SpatialLinearFloatingMeltRateEnum;
 	      else if (strcmp(name,"SpcDynamic")==0) return SpcDynamicEnum;
Index: /issm/trunk-jpl/src/c/shared/Enum/Synchronize.sh
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/Synchronize.sh	(revision 24239)
+++ /issm/trunk-jpl/src/c/shared/Enum/Synchronize.sh	(revision 24240)
@@ -6,6 +6,6 @@
 
 #Removed existing files
-rm $ISSM_DIR/src/c/shared/Enum/EnumToStringx.cpp
-rm $ISSM_DIR/src/c/shared/Enum/StringToEnumx.cpp
+rm $ISSM_DEV_DIR/src/c/shared/Enum/EnumToStringx.cpp
+rm $ISSM_DEV_DIR/src/c/shared/Enum/StringToEnumx.cpp
 
 #Get number of enums
@@ -16,5 +16,5 @@
 #Build EnumToAnalysis.cpp {{{
 #Header
-cat <<END > $ISSM_DIR/src/c/analyses/EnumToAnalysis.cpp
+cat <<END > $ISSM_DEV_DIR/src/c/analyses/EnumToAnalysis.cpp
 /*
 * \file EnumToAnalysis.cpp
@@ -37,8 +37,8 @@
 	grep -v DefaultAnalysis | grep -v FlaimAnalysis | grep -v SurfaceSlopeAnalysis | grep -v BedSlopeAnalysis | \
 	awk '{print "\t\t#ifdef _HAVE_"toupper(substr($1,1,length($1)-12))"_\n\t\t" "case " $1" : return new " substr($1,1,length($1)-4) "();\n\t\t#endif"}' \
-		>> $ISSM_DIR/src/c/analyses/EnumToAnalysis.cpp
+		>> $ISSM_DEV_DIR/src/c/analyses/EnumToAnalysis.cpp
 
 #Footer
-cat <<END >> $ISSM_DIR/src/c/analyses/EnumToAnalysis.cpp
+cat <<END >> $ISSM_DEV_DIR/src/c/analyses/EnumToAnalysis.cpp
 		default : _error_("enum provided not supported ("<<EnumToStringx(analysis_enum)<<")");
 	}
@@ -48,5 +48,5 @@
 #Build analyses.m4{{{
 #Header
-cat <<END > $ISSM_DIR/m4/analyses.m4
+cat <<END > $ISSM_DEV_DIR/m4/analyses.m4
 
 dnl   WARNING: DO NOT MODIFY THIS FILE
@@ -78,8 +78,8 @@
 AC_MSG_RESULT($HAVE_" toupper($1)")\n\
 dnl }}}"}' \
-	>> $ISSM_DIR/m4/analyses.m4
+	>> $ISSM_DEV_DIR/m4/analyses.m4
 
 #Footer
-cat <<END >> $ISSM_DIR/m4/analyses.m4
+cat <<END >> $ISSM_DEV_DIR/m4/analyses.m4
 
 ])
@@ -91,5 +91,5 @@
 #Build EnumToStringx.cpp {{{
 #Header
-cat <<END >  $ISSM_DIR/src/c/shared/Enum/EnumToStringx.cpp
+cat <<END >  $ISSM_DEV_DIR/src/c/shared/Enum/EnumToStringx.cpp
 /*
 * \file EnumToStringx.cpp:
@@ -112,7 +112,7 @@
 END
 #core
-cat temp |  awk '{print "\t\t" "case " $1" : return \"" substr($1,1,length($1)-4) "\";"}' >> $ISSM_DIR/src/c/shared/Enum/EnumToStringx.cpp
+cat temp |  awk '{print "\t\t" "case " $1" : return \"" substr($1,1,length($1)-4) "\";"}' >> $ISSM_DEV_DIR/src/c/shared/Enum/EnumToStringx.cpp
 #Footer
-cat <<END >> $ISSM_DIR/src/c/shared/Enum/EnumToStringx.cpp
+cat <<END >> $ISSM_DEV_DIR/src/c/shared/Enum/EnumToStringx.cpp
 		default : return "unknown";
 
@@ -144,5 +144,5 @@
 #Build StringToEnumx.cpp {{{
 #Header
-cat <<END > $ISSM_DIR/src/c/shared/Enum/StringToEnumx.cpp
+cat <<END > $ISSM_DEV_DIR/src/c/shared/Enum/StringToEnumx.cpp
 /*
 * \file StringToEnumx.cpp:
@@ -168,10 +168,10 @@
 i2=120;
 for (( i=1 ; i<=100 ; i++ )); do
-	echo "   if(stage==$i){" >> $ISSM_DIR//src/c/shared/Enum/StringToEnumx.cpp
+	echo "   if(stage==$i){" >> $ISSM_DEV_DIR//src/c/shared/Enum/StringToEnumx.cpp
 	awk -v i1=$i1 -v i2=$i2 '{if(NR>=i1 && NR<=i2) print $0 }' temp |
-	awk '{print "\t" ((NR==1)?"      if":"      else if") " (strcmp(name,\"" substr($1,1,length($1)-4) "\")==0) return " $1 ";"}' >> $ISSM_DIR//src/c/shared/Enum/StringToEnumx.cpp
-	echo "         else stage=$(($i+1));" >> $ISSM_DIR//src/c/shared/Enum/StringToEnumx.cpp
-	echo "   }" >> $ISSM_DIR//src/c/shared/Enum/StringToEnumx.cpp
-	
+	awk '{print "\t" ((NR==1)?"      if":"      else if") " (strcmp(name,\"" substr($1,1,length($1)-4) "\")==0) return " $1 ";"}' >> $ISSM_DEV_DIR//src/c/shared/Enum/StringToEnumx.cpp
+	echo "         else stage=$(($i+1));" >> $ISSM_DEV_DIR//src/c/shared/Enum/StringToEnumx.cpp
+	echo "   }" >> $ISSM_DEV_DIR//src/c/shared/Enum/StringToEnumx.cpp
+
 	if [ $i2 -ge $NUMENUMS ]; then break; fi
 	let i1=$i1+120
@@ -180,5 +180,5 @@
 
 #footer
-cat <<END >> $ISSM_DIR/src/c/shared/Enum/StringToEnumx.cpp
+cat <<END >> $ISSM_DEV_DIR/src/c/shared/Enum/StringToEnumx.cpp
 	/*If we reach this point, the string provided has not been found*/
 	if(notfounderror)
Index: /issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscVec.cpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscVec.cpp	(revision 24239)
+++ /issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscVec.cpp	(revision 24240)
@@ -83,5 +83,5 @@
 
 	_assert_(this->vector);
-	VecAssemblyBegin(this->vector); 
+	VecAssemblyBegin(this->vector);
 	VecAssemblyEnd(this->vector);
 
@@ -135,7 +135,7 @@
 
 	/*Get Ownership range*/
-	PetscInt lower_row,upper_row; 
+	PetscInt lower_row,upper_row;
 	VecGetOwnershipRange(this->vector,&lower_row,&upper_row);
-	int range=upper_row-lower_row;    
+	int range=upper_row-lower_row;
 
 	/*return NULL if no range*/
@@ -147,9 +147,9 @@
 
 	/*Build indices*/
-	int* indices=xNew<int>(range); 
+	int* indices=xNew<int>(range);
 	for(int i=0;i<range;i++) indices[i]=lower_row+i;
 	/*Get vector*/
 	IssmDouble* values =xNew<IssmDouble>(range);
-	VecGetValues(this->vector,range,indices,values); 
+	VecGetValues(this->vector,range,indices,values);
 
 	*pvector  = values;
@@ -238,5 +238,12 @@
 
 	_assert_(this->vector);
-	VecScale(this->vector,scale_factor); 
+	VecScale(this->vector,scale_factor);
+
+}
+/*}}}*/
+void PetscVec::Pow(IssmDouble scale_factor){/*{{{*/
+
+	_assert_(this->vector);
+	VecPow(this->vector,scale_factor);
 
 }
@@ -258,2 +265,9 @@
 }
 /*}}}*/
+void PetscVec::PointwiseMult(PetscVec* x,PetscVec* y){/*{{{*/
+
+	_assert_(this->vector);
+	VecPointwiseMult(this->vector,x->vector,y->vector);
+
+}
+/*}}}*/
Index: /issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscVec.h
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscVec.h	(revision 24239)
+++ /issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscVec.h	(revision 24240)
@@ -1,7 +1,7 @@
 /*!\file:  PetscVec.h
- * \brief wrapper to our own PetscVec object, which is needed to add AD capabilities (using ADOLC) 
- * to a C-coded Petsc API. We are just wrapping the Petsc objects into C++ equivalent, so that 
+ * \brief wrapper to our own PetscVec object, which is needed to add AD capabilities (using ADOLC)
+ * to a C-coded Petsc API. We are just wrapping the Petsc objects into C++ equivalent, so that
  * later, we can map all of the Petsc routines into Adolc equivalents.
- */ 
+ */
 
 #ifndef _PETSCVEC_H_
@@ -57,5 +57,7 @@
 		IssmDouble  Max(void);
 		void        Scale(IssmDouble scale_factor);
+		void        Pow(IssmDouble scale_factor);
 		void        PointwiseDivide(PetscVec* x,PetscVec* y);
+		void        PointwiseMult(PetscVec* x,PetscVec* y);
 		IssmDouble  Dot(PetscVec* vector);
 };
Index: /issm/trunk-jpl/src/m/archive/arch.py
===================================================================
--- /issm/trunk-jpl/src/m/archive/arch.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/archive/arch.py	(revision 24240)
@@ -8,8 +8,8 @@
     """
     ARCHWRITE - Write data to a field, given the file name, field name, and data.
-
         Usage:
             archwrite('archive101.arch', 'variable_name', data)
     """
+
     nargs = len(args)
     if nargs % 2 != 0:
@@ -23,12 +23,10 @@
     except IOError as e:
         raise IOError("archwrite error: could not open '{}' to write to due to:".format(filename), e)
-
     nfields = len(args) / 2
     # generate data to write
-    for i in range(nfields):
+    for i in range(int(nfields)):
         # write field name
         name = args[2 * i]
         write_field_name(fid, name)
-
         # write data associated with field name
         data = args[2 * i + 1]
@@ -42,7 +40,5 @@
         else:
             raise ValueError("archwrite : error writing data, invalid code entered '{}'".format(code))
-
     fid.close()
-
     # }}}
 
@@ -64,8 +60,6 @@
 
     archive_results = []
-
     # read first result
     result = read_field(fid)
-
     while result:
         if fieldname == result['field_name']:
@@ -73,11 +67,8 @@
             archive_results = result['data']  # we only want the data
             break
-
     # read next result
         result = read_field(fid)
-
     # close file
     fid.close()
-
     return archive_results
     # }}}
@@ -98,9 +89,7 @@
     except IOError as e:
         raise IOError("archread error : could not open file '{}' to read from due to ".format(filename), e)
-
     print('Source file: ')
     print(('\t{0}'.format(filename)))
     print('Variables: ')
-
     result = read_field(fid)
     while result:
@@ -110,13 +99,10 @@
     # go to next result
         result = read_field(fid)
-
     # close file
     fid.close()
-
-    # }}}
-
-    # Helper functions
-
-
+    # }}}
+
+
+# Helper functions
 def write_field_name(fid, data):  # {{{
     """
@@ -127,5 +113,4 @@
     reclen = len(data) + 4 + 4
     fid.write(struct.pack('>i', reclen))
-
     # write format code
     code = format_archive_code(data)
@@ -133,5 +118,4 @@
         raise TypeError("archwrite : error writing field name, expected string, but got %s" % type(data))
     fid.write(struct.pack('>i', 1))
-
     # write string length, and then the string
     fid.write(struct.pack('>i', len(data)))
@@ -151,8 +135,6 @@
     # write the format code (2 for scalar)
     fid.write(struct.pack('>i', 2))
-
     # write the double
     fid.write(struct.pack('>d', data))
-
     # }}}
 
@@ -168,5 +150,4 @@
     elif isinstance(data, (list, tuple)):
         data = np.array(data).reshape(- 1, )
-
     if np.ndim(data) == 1:
         if np.size(data):
@@ -174,8 +155,6 @@
         else:
             data = data.reshape(0, 0)
-
     # get size of data
     sz = data.shape
-
     # write length of record
     # format code + row size + col size + (double size * row amt * col amt)
@@ -185,8 +164,6 @@
         raise ValueError("archwrite error : can not write vector to binary file because it is too large")
     fid.write(struct.pack('>i', reclen))
-
     # write format code
     fid.write(struct.pack('>i', 3))
-
     # write vector
     fid.write(struct.pack('>i', sz[0]))
@@ -195,5 +172,4 @@
         for j in range(sz[1]):
             fid.write(struct.pack('>d', float(data[i][j])))
-
     # }}}
 
Index: /issm/trunk-jpl/src/m/classes/SMBcomponents.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBcomponents.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBcomponents.m	(revision 24240)
@@ -5,10 +5,11 @@
 
 classdef SMBcomponents
-	properties (SetAccess=public) 
+	properties (SetAccess=public)
 		isclimatology = 0;
 		accumulation = NaN;
 		runoff = NaN;
 		evaporation = NaN;
-		requested_outputs      = {};
+		steps_per_step = 1;
+		requested_outputs     = {};
 	end
 	methods
@@ -36,13 +37,13 @@
 			if isnan(self.accumulation)
 				self.accumulation=zeros(md.mesh.numberofvertices,1);
-				disp('      no smb.accumulation specified: values set as zero');
+				disp('	no smb.accumulation specified: values set as zero');
 			end
 			if isnan(self.evaporation)
 				self.evaporation=zeros(md.mesh.numberofvertices,1);
-				disp('      no smb.evaporation specified: values set as zero');
+				disp('	no smb.evaporation specified: values set as zero');
 			end
 			if isnan(self.runoff)
 				self.runoff=zeros(md.mesh.numberofvertices,1);
-				disp('      no smb.runoff specified: values set as zero');
+				disp('	no smb.runoff specified: values set as zero');
 			end
 
@@ -52,37 +53,31 @@
 			if ismember('MasstransportAnalysis',analyses),
 				md = checkfield(md,'fieldname','smb.accumulation','timeseries',1,'NaN',1,'Inf',1);
+				md = checkfield(md,'fieldname','smb.runoff','timeseries',1,'NaN',1,'Inf',1);
+				md = checkfield(md,'fieldname','smb.evaporation','timeseries',1,'NaN',1,'Inf',1);
 			end
 			if ismember('BalancethicknessAnalysis',analyses),
 				md = checkfield(md,'fieldname','smb.accumulation','size',[md.mesh.numberofvertices 1],'NaN',1,'Inf',1);
-			end
-			if ismember('MasstransportAnalysis',analyses),
-				md = checkfield(md,'fieldname','smb.runoff','timeseries',1,'NaN',1,'Inf',1);
-			end
-			if ismember('BalancethicknessAnalysis',analyses),
 				md = checkfield(md,'fieldname','smb.runoff','size',[md.mesh.numberofvertices 1],'NaN',1,'Inf',1);
-			end
-			if ismember('MasstransportAnalysis',analyses),
-				md = checkfield(md,'fieldname','smb.evaporation','timeseries',1,'NaN',1,'Inf',1);
-			end
-			if ismember('BalancethicknessAnalysis',analyses),
 				md = checkfield(md,'fieldname','smb.evaporation','size',[md.mesh.numberofvertices 1],'NaN',1,'Inf',1);
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
 			md = checkfield(md,'fieldname','smb.isclimatology','values',[0 1]);
 			if (self.isclimatology)
 				md = checkfield(md,'fieldname', 'smb.accumulation', 'size',[md.mesh.numberofvertices+1],...
-					'message',['accumulation must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
+						'message',['accumulation must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
 				md = checkfield(md,'fieldname', 'smb.runoff', 'size',[md.mesh.numberofvertices+1],...
-					'message',['runoff must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
+						'message',['runoff must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
 				md = checkfield(md,'fieldname', 'smb.evaporation', 'size',[md.mesh.numberofvertices+1],...
-					'message',['evaporation must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
+						'message',['evaporation must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
 			end
 		end % }}}
 		function disp(self) % {{{
-			disp(sprintf('   surface forcings parameters (SMB=accumulation-runoff-evaporation) :'));
+			disp(sprintf('	  surface forcings parameters (SMB=accumulation-runoff-evaporation) :'));
 			fielddisplay(self,'accumulation','accumulated snow [m/yr ice eq]');
 			fielddisplay(self,'runoff','amount of ice melt lost from the ice column [m/yr ice eq]');
 			fielddisplay(self,'evaporation','amount of ice lost to evaporative processes [m/yr ice eq]');
 			fielddisplay(self,'isclimatology','repeat all forcings when past last forcing time (default false)');
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested');
 		end % }}}
@@ -95,11 +90,11 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','runoff','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','evaporation','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
 			%process requested outputs
 			outputs = self.requested_outputs;
 			pos  = find(ismember(outputs,'default'));
 			if ~isempty(pos),
-				outputs(pos) = [];                         %remove 'default' from outputs
-				outputs      = [outputs defaultoutputs(self,md)]; %add defaults
+				outputs(pos) = [];			       %remove 'default' from outputs
+				outputs	 = [outputs defaultoutputs(self,md)]; %add defaults
 			end
 			WriteData(fid,prefix,'data',outputs,'name','md.smb.requested_outputs','format','StringArray');
Index: /issm/trunk-jpl/src/m/classes/SMBcomponents.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBcomponents.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBcomponents.py	(revision 24240)
@@ -18,16 +18,18 @@
         self.evaporation = float('NaN')
         self.isclimatology = 0
+        self.steps_per_step = 1
         self.requested_outputs = []
-    #}}}
+        #}}}
 
     def __repr__(self):  # {{{
-        string = "   surface forcings parameters (SMB = accumulation - runoff - evaporation) :"
-        string = "%s\n%s" % (string, fielddisplay(self, 'accumulation', 'accumulated snow [m / yr ice eq]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'runoff', 'amount of ice melt lost from the ice column [m / yr ice eq]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'evaporation', 'mount of ice lost to evaporative processes [m / yr ice eq]'))
+        string = "   surface forcings parameters (SMB = accumulation-runoff-evaporation) :"
+        string = "%s\n%s" % (string, fielddisplay(self, 'accumulation', 'accumulated snow [m/yr ice eq]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'runoff', 'amount of ice melt lost from the ice column [m/yr ice eq]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'evaporation', 'mount of ice lost to evaporative processes [m/yr ice eq]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'isclimatology', 'repeat all forcings when past last forcing time (default false)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'))
         string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
         return string
-    #}}}
+        #}}}
 
     def extrude(self, md):  # {{{
@@ -61,20 +63,12 @@
         if 'MasstransportAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.accumulation', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
-
+            md = checkfield(md, 'fieldname', 'smb.runoff', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
+            md = checkfield(md, 'fieldname', 'smb.evaporation', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
         if 'BalancethicknessAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.accumulation', 'size', [md.mesh.numberofvertices], 'NaN', 1, 'Inf', 1)
-
-        if 'MasstransportAnalysis' in analyses:
-            md = checkfield(md, 'fieldname', 'smb.runoff', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
-
-        if 'BalancethicknessAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.runoff', 'size', [md.mesh.numberofvertices], 'NaN', 1, 'Inf', 1)
-
-        if 'MasstransportAnalysis' in analyses:
-            md = checkfield(md, 'fieldname', 'smb.evaporation', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
-
-        if 'BalancethicknessAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.evaporation', 'size', [md.mesh.numberofvertices], 'NaN', 1, 'Inf', 1)
 
+        md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1])
         md = checkfield(md, 'fieldname', 'masstransport.requested_outputs', 'stringrow', 1)
         md = checkfield(md, 'fieldname', 'smb.isclimatology', 'values', [0, 1])
@@ -90,5 +84,5 @@
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'runoff', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'evaporation', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
-
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer')
     #process requested outputs
         outputs = self.requested_outputs
Index: /issm/trunk-jpl/src/m/classes/SMBd18opdd.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBd18opdd.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBd18opdd.m	(revision 24240)
@@ -5,11 +5,12 @@
 
 classdef SMBd18opdd
-	properties (SetAccess=public) 
+	properties (SetAccess=public)
+
 		desfac                    = 0;
 		s0p                       = NaN;
 		s0t                       = NaN;
 		rlaps                     = 0;
-		rlapslgm                  = 0; 
-		dpermil                   = 0; 
+		rlapslgm                  = 0;
+		dpermil                   = 0;
 		f                         = 0;
 		Tdiff                     = NaN;
@@ -28,5 +29,6 @@
 		pddfac_snow               = NaN;
 		pddfac_ice                = NaN;
-		requested_outputs      = {};
+		steps_per_step            = 1;
+		requested_outputs         = {};
 	end
 	methods
@@ -50,5 +52,5 @@
 
 		end % }}}
-	 function list = defaultoutputs(self,md) % {{{
+		function list = defaultoutputs(self,md) % {{{
 
 			list = {''};
@@ -56,8 +58,8 @@
 		end % }}}
 		function self = initialize(self,md) % {{{
-                    
+
 			if isnan(self.s0p),
-			 	self.s0p=zeros(md.mesh.numberofvertices,1);
-			 	disp('      no SMBd18opdd.s0p specified: values set as zero');
+				self.s0p=zeros(md.mesh.numberofvertices,1);
+				disp('      no SMBd18opdd.s0p specified: values set as zero');
 			end
 			if isnan(self.s0t),
@@ -69,15 +71,15 @@
 		function self = setdefaultparameters(self) % {{{
 
-		  self.ismungsm   = 0;
-		  self.isd18opd   = 1;
-		  self.istemperaturescaled = 1;
-		  self.isprecipscaled = 1;
-		  self.desfac     = 0.5;
-		  self.rlaps      = 6.5;
-		  self.rlapslgm   = 6.5;
-		  self.dpermil    = 2.4;
-		  self.f          = 0.169;
-		  self.issetpddfac = 0;
-                  
+			self.ismungsm   = 0;
+			self.isd18opd   = 1;
+			self.istemperaturescaled = 1;
+			self.isprecipscaled = 1;
+			self.desfac     = 0.5;
+			self.rlaps      = 6.5;
+			self.rlapslgm   = 6.5;
+			self.dpermil    = 2.4;
+			self.f          = 0.169;
+			self.issetpddfac = 0;
+
 		end % }}}
 		function md = checkconsistency(self,md,solution,analyses) % {{{
@@ -89,5 +91,6 @@
 				md = checkfield(md,'fieldname','smb.rlaps','>=',0,'numel',1);
 				md = checkfield(md,'fieldname','smb.rlapslgm','>=',0,'numel',1);
-				if(self.isd18opd==1) 
+
+				if(self.isd18opd==1)
 					md = checkfield(md,'fieldname','smb.temperatures_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1);
 					md = checkfield(md,'fieldname','smb.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1);
@@ -104,5 +107,5 @@
 					md = checkfield(md,'fieldname','smb.delta18o','NaN',1,'Inf',1,'size',[2,NaN],'singletimeseries',1);
 					md = checkfield(md,'fieldname','smb.dpermil','>=',0,'numel',1);
-				   md = checkfield(md,'fieldname','smb.f','>=',0,'numel',1);
+					md = checkfield(md,'fieldname','smb.f','>=',0,'numel',1);
 					if(self.istemperaturescaled==0)
 						lent=size(self.temperatures_reconstructed,2);
@@ -121,4 +124,5 @@
 				end
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
 		end % }}}
@@ -133,5 +137,5 @@
 			fielddisplay(self,'s0t','should be set to elevation from temperature source (between 0 and a few 1000s m, default is 0) [m]');
 			fielddisplay(self,'rlaps','present day lapse rate [degree/km]');
-			if(self.isd18opd==1) 
+			if(self.isd18opd==1)
 				fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if delta18o/mungsm/d18opd is activated');
 				fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm/d18opd is activated');
@@ -144,7 +148,7 @@
 					fielddisplay(self,'precipitations_reconstructed','monthly historical precipitation [m/yr water eq], required if delta18o/mungsm/d18opd is activated and isprecipscaled is not activated');
 				end
-				fielddisplay(self,'delta18o','delta18o [per mil], required if pdd is activated and d18opd activated');  
-				fielddisplay(self,'dpermil','degree per mil, required if d18opd is activated');                            
-			   fielddisplay(self,'f','precip/temperature scaling factor, required if d18opd is activated');
+				fielddisplay(self,'delta18o','delta18o [per mil], required if pdd is activated and d18opd activated');
+				fielddisplay(self,'dpermil','degree per mil, required if d18opd is activated');
+				fielddisplay(self,'f','precip/temperature scaling factor, required if d18opd is activated');
 			end
 			if(self.issetpddfac==1)
@@ -152,4 +156,5 @@
 				fielddisplay(self,'pddfac_ice','Pdd factor for ice, at each vertex [mm ice equiv/day/degree C]');
 			end
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested');
 			% No need to display rlapslgm, Tdiff, ismungsm
@@ -173,4 +178,5 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2,'yts',md.constants.yts);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2,'yts',md.constants.yts);
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
 
 			if self.isd18opd
@@ -181,5 +187,5 @@
 				WriteData(fid,prefix,'object',self,'class','smb','fieldname','delta18o','format','DoubleMat','mattype',1,'timeserieslength',2,'yts',md.constants.yts);
 				WriteData(fid,prefix,'object',self,'class','smb','fieldname','dpermil','format','Double');
-			   WriteData(fid,prefix,'object',self,'class','smb','fieldname','f','format','Double');
+				WriteData(fid,prefix,'object',self,'class','smb','fieldname','f','format','Double');
 				if self.istemperaturescaled==0
 					WriteData(fid,prefix,'object',self,'class','smb','fieldname','temperatures_reconstructed','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
@@ -193,5 +199,5 @@
 				WriteData(fid,prefix,'object',self,'class','smb','fieldname','pddfac_ice','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
 			end
-			
+
 			%process requested outputs
 			outputs = self.requested_outputs;
Index: /issm/trunk-jpl/src/m/classes/SMBd18opdd.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBd18opdd.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBd18opdd.py	(revision 24240)
@@ -13,5 +13,4 @@
           SMBd18opdd = SMBd18opdd()
     """
-
     def __init__(self):  # {{{
         self.desfac = 0.
@@ -37,4 +36,5 @@
         self.pddfac_snow = float('NaN')
         self.pddfac_ice = float('NaN')
+        self.steps_per_step = 1
 
     #set defaults
@@ -51,16 +51,16 @@
         string = "%s\n%s" % (string, fielddisplay(self, 's0p', 'should be set to elevation from precip source (between 0 and a few 1000s m, default is 0) [m]'))
         string = "%s\n%s" % (string, fielddisplay(self, 's0t', 'should be set to elevation from temperature source (between 0 and a few 1000s m, default is 0) [m]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'rlaps', 'present day lapse rate [degree / km]'))
-        if self.isd18opd:
-            string = "%s\n%s" % (string, fielddisplay(self, 'temperatures_presentday', 'monthly present day surface temperatures [K], required if delta18o / mungsm is activated'))
-            string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_presentday', 'monthly surface precipitation [m / yr water eq], required if delta18o or mungsm is activated'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'rlaps', 'present day lapse rate [degree/km]'))
+        if self.isd18opd:
+            string = "%s\n%s" % (string, fielddisplay(self, 'temperatures_presentday', 'monthly present day surface temperatures [K], required if delta18o/mungsm is activated'))
+            string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_presentday', 'monthly surface precipitation [m/yr water eq], required if delta18o or mungsm is activated'))
             string = "%s\n%s" % (string, fielddisplay(self, 'istemperaturescaled', 'if delta18o parametrisation from present day temperature and precipitation is activated, is temperature scaled to delta18o value? (0 or 1, default is 1)'))
             string = "%s\n%s" % (string, fielddisplay(self, 'isprecipscaled', 'if delta18o parametrisation from present day temperature and precipitation is activated, is precipitation scaled to delta18o value? (0 or 1, default is 1)'))
 
             if self.istemperaturescaled == 0:
-                string = "%s\n%s" % (string, fielddisplay(self, 'temperatures_reconstructed', 'monthly historical surface temperatures [K], required if delta18o / mungsm / d18opd is activated and istemperaturescaled is not activated'))
+                string = "%s\n%s" % (string, fielddisplay(self, 'temperatures_reconstructed', 'monthly historical surface temperatures [K], required if delta18o/mungsm/d18opd is activated and istemperaturescaled is not activated'))
 
             if self.isprecipscaled == 0:
-                string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_reconstructed', 'monthly historical precipitation [m / yr water eq], required if delta18o / mungsm / d18opd is activated and isprecipscaled is not activated'))
+                string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_reconstructed', 'monthly historical precipitation [m/yr water eq], required if delta18o/mungsm/d18opd is activated and isprecipscaled is not activated'))
 
             string = "%s\n%s" % (string, fielddisplay(self, 'delta18o', 'delta18o [per mil], required if pdd is activated and delta18o activated'))
@@ -69,6 +69,7 @@
 
         if self.issetpddfac == 1:
-            string = "%s\n%s" % (string, fielddisplay(self, 'pddfac_snow', 'Pdd factor for snow, at each vertex [mm ice equiv / day / degree C]'))
-            string = "%s\n%s" % (string, fielddisplay(self, 'pddfac_ice', 'Pdd factor for ice, at each vertex [mm ice equiv / day / degree C]'))
+            string = "%s\n%s" % (string, fielddisplay(self, 'pddfac_snow', 'Pdd factor for snow, at each vertex [mm ice equiv/day/degree C]'))
+            string = "%s\n%s" % (string, fielddisplay(self, 'pddfac_ice', 'Pdd factor for ice, at each vertex [mm ice equiv/day/degree C]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'))
         string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
 
@@ -93,5 +94,4 @@
         self.s0p = project3d(md, 'vector', self.s0p, 'type', 'node')
         self.s0t = project3d(md, 'vector', self.s0t, 'type', 'node')
-
         return self
     #}}}
@@ -109,5 +109,4 @@
             self.s0t = np.zeros((md.mesh.numberofvertices))
             print("      no SMBd18opdd.s0t specified: values set as zero")
-
         return self
     # }}}
@@ -135,4 +134,5 @@
             md = checkfield(md, 'fieldname', 'smb.rlaps', '>=', 0, 'numel', [1])
             md = checkfield(md, 'fieldname', 'smb.rlapslgm', '>=', 0, 'numel', [1])
+            md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1])
 
             if self.isd18opd:
@@ -163,5 +163,4 @@
 
         md = checkfield(md, 'fieldname', 'masstransport.requested_outputs', 'stringrow', 1)
-
         return md
     # }}}
@@ -171,5 +170,4 @@
 
         WriteData(fid, prefix, 'name', 'md.smb.model', 'data', 5, 'format', 'Integer')
-
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'ismungsm', 'format', 'Boolean')
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'isd18opd', 'format', 'Boolean')
@@ -182,4 +180,5 @@
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Tdiff', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'sealev', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts)
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer')
 
         if self.isd18opd:
Index: /issm/trunk-jpl/src/m/classes/SMBforcing.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBforcing.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBforcing.m	(revision 24240)
@@ -5,8 +5,9 @@
 
 classdef SMBforcing
-	properties (SetAccess=public) 
-		isclimatology = 0;
-		mass_balance = NaN;
-		requested_outputs      = {};
+	properties (SetAccess=public)
+		isclimatology     = 0;
+		mass_balance      = NaN;
+		steps_per_step    = 1;
+		requested_outputs = {};
 	end
 	methods
@@ -57,9 +58,10 @@
 				md = checkfield(md,'fieldname','smb.mass_balance','size',[md.mesh.numberofvertices 1],'NaN',1,'Inf',1);
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
 			md = checkfield(md,'fieldname','smb.isclimatology','values',[0 1]);
 			if (self.isclimatology)
 				md = checkfield(md,'fieldname', 'smb.mass_balance', 'size',[md.mesh.numberofvertices+1],...
-					'message',['mass_balance must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
+						'message',['mass_balance must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
 			end
 		end % }}}
@@ -68,4 +70,5 @@
 			fielddisplay(self,'mass_balance','surface mass balance [m/yr ice eq]');
 			fielddisplay(self,'isclimatology','repeat all forcings when past last forcing time (default false)');
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested');
 		end % }}}
@@ -77,5 +80,6 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','mass_balance','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
 			%WriteData(fid,prefix,'object',self,'class','smb','fieldname','mass_balance','format','CompressedMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
+
 			%process requested outputs
 			outputs = self.requested_outputs;
@@ -90,5 +94,5 @@
 		end % }}}
 		function savemodeljs(self,fid,modelname) % {{{
-		
+
 			writejs1Darray(fid,[modelname '.smb.mass_balance'],self.mass_balance);
 			writejscellstring(fid,[modelname '.smb.requested_outputs'],self.requested_outputs);
Index: /issm/trunk-jpl/src/m/classes/SMBforcing.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBforcing.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBforcing.py	(revision 24240)
@@ -18,10 +18,12 @@
         self.requested_outputs = []
         self.isclimatology = 0
+        self.steps_per_step = 1
     #}}}
 
     def __repr__(self):  # {{{
         string = "   surface forcings parameters:"
-        string = "%s\n%s" % (string, fielddisplay(self, 'mass_balance', 'surface mass balance [m / yr ice eq]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'mass_balance', 'surface mass balance [m/yr ice eq]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'isclimatology', 'repeat all forcings when past last forcing time (default false)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'))
         string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
         return string
@@ -53,4 +55,5 @@
             md = checkfield(md, 'fieldname', 'smb.mass_balance', 'size', [md.mesh.numberofvertices], 'NaN', 1, 'Inf', 1)
 
+        md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1])
         md = checkfield(md, 'fieldname', 'masstransport.requested_outputs', 'stringrow', 1)
         md = checkfield(md, 'fieldname', 'smb.isclimatology', 'values', [0, 1])
@@ -61,9 +64,9 @@
     # }}}
 
-    def marshall(self, prefix, md, fid):  # {{{
+    def marshall(self, prefix, md, fid):    # {{{
         yts = md.constants.yts
-
         WriteData(fid, prefix, 'name', 'md.smb.model', 'data', 1, 'format', 'Integer')
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'mass_balance', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer')
 
         #process requested outputs
Index: /issm/trunk-jpl/src/m/classes/SMBgemb.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBgemb.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBgemb.m	(revision 24240)
@@ -1,14 +1,14 @@
-%SMBgemb Class definition. 
-%   This is the class that hosts all the inputs for the Alberta Glacier Surface Mass Balance Model 
+%SMBgemb Class definition.
+%   This is the class that hosts all the inputs for the Alberta Glacier Surface Mass Balance Model
 %   Alex Gardner, University of Alberta.
-%   
+%
 %   Usage:
 %      SMBgemb=SMBgemb();
 
 classdef SMBgemb
-	properties (SetAccess=public)  
-	% {{{
-		%each one of these properties is a transient forcing to the GEMB model, loaded from meteorological data derived 
-		%from an automatic weather stations (AWS). Each property is therefore a matrix, of size (numberofvertices x number 
+	properties (SetAccess=public)
+		% {{{
+		%each one of these properties is a transient forcing to the GEMB model, loaded from meteorological data derived
+		%from an automatic weather stations (AWS). Each property is therefore a matrix, of size (numberofvertices x number
 		%of time steps. )
 
@@ -21,8 +21,8 @@
 		ismelt;
 		isdensification;
-		isturbulentflux;    
+		isturbulentflux;
 		isclimatology;
 
-		%inputs: 
+		%inputs:
 		Ta    = NaN; %2 m air temperature, in Kelvin
 		V     = NaN; %wind speed (m/s-1)
@@ -32,5 +32,5 @@
 		eAir  = NaN; %screen level vapor pressure [Pa]
 		pAir  = NaN; %surface pressure [Pa]
-		
+
 		Tmean = NaN; %mean annual temperature [K]
 		Vmean = NaN; %mean annual wind velocity [m s-1]
@@ -42,5 +42,5 @@
 		aValue = NaN; %Albedo forcing at every element.  Used only if aIdx == 0.
 		teValue = NaN; %Outward longwave radiation thermal emissivity forcing at every element (default in code is 1)
-        
+
 		% Initialization of snow properties
 		Dzini = NaN; %cell depth (m)
@@ -55,33 +55,34 @@
 		Sizeini = NaN; %Number of layers
 
-		%settings: 
+		%settings:
 		aIdx   = NaN; %method for calculating albedo and subsurface absorption (default is 1)
-		           % 0: direct input from aValue parameter
-		           % 1: effective grain radius [Gardner & Sharp, 2009]
-					  % 2: effective grain radius [Brun et al., 2009]
-					  % 3: density and cloud amount [Greuell & Konzelmann, 1994]
-					  % 4: exponential time decay & wetness [Bougamont & Bamber, 2005]
+			      % 0: direct input from aValue parameter
+			      % 1: effective grain radius [Gardner & Sharp, 2009]
+			      % 2: effective grain radius [Brun et al., 2009]
+			      % 3: density and cloud amount [Greuell & Konzelmann, 1994]
+			      % 4: exponential time decay & wetness [Bougamont & Bamber, 2005]
 
 		swIdx  = NaN; % apply all SW to top grid cell (0) or allow SW to penetrate surface (1) (default 1)
 
 		denIdx = NaN; %densification model to use (default is 2):
-					% 1 = emperical model of Herron and Langway (1980)
-					% 2 = semi-emperical model of Anthern et al. (2010)
-					% 3 = DO NOT USE: physical model from Appendix B of Anthern et al. (2010)
-					% 4 = DO NOT USE: emperical model of Li and Zwally (2004)
-					% 5 = DO NOT USE: modified emperical model (4) by Helsen et al. (2008)
-					% 6 = Antarctica semi-emperical model of Ligtenberg et al. (2011)
-					% 7 = Greenland semi-emperical model of Kuipers Munneke et al. (2015)
-
-		dsnowIdx = NaN; %model for fresh snow accumulation density (default is 1): 
-		         % 0 = Original GEMB value, 150 kg/m^3
-					% 1 = Antarctica value of fresh snow density, 350 kg/m^3
-					% 2 = Greenland value of fresh snow density, 315 kg/m^3, Fausto et al. (2008)
-					% 3 = Antarctica model of Kaspers et al. (2004)
-					% 4 = Greenland model of Kuipers Munneke et al. (2015)
-					
+			      % 1 = emperical model of Herron and Langway (1980)
+			      % 2 = semi-emperical model of Anthern et al. (2010)
+			      % 3 = DO NOT USE: physical model from Appendix B of Anthern et al. (2010)
+			      % 4 = DO NOT USE: emperical model of Li and Zwally (2004)
+			      % 5 = DO NOT USE: modified emperical model (4) by Helsen et al. (2008)
+			      % 6 = Antarctica semi-emperical model of Ligtenberg et al. (2011)
+			      % 7 = Greenland semi-emperical model of Kuipers Munneke et al. (2015)
+
+		dsnowIdx = NaN; %model for fresh snow accumulation density (default is 1):
+				% 0 = Original GEMB value, 150 kg/m^3
+				% 1 = Antarctica value of fresh snow density, 350 kg/m^3
+				% 2 = Greenland value of fresh snow density, 315 kg/m^3, Fausto et al. (2008)
+				% 3 = Antarctica model of Kaspers et al. (2004)
+				% 4 = Greenland model of Kuipers Munneke et al. (2015)
+
 		zTop  = NaN; % depth over which grid length is constant at the top of the snopack (default 10) [m]
 		dzTop = NaN; % initial top vertical grid spacing (default .05) [m]
-		dzMin = NaN; % initial min vertical allowable grid spacing (default dzTop/2) [m]
+		dzMin = NaN; % initial min vertical allowable grid spacing (default dzMin/2) [m]
+
 		zY    = NaN; % strech grid cells bellow top_z by a [top_dz * y ^ (cells bellow top_z)]
 		zMax = NaN; %initial max model depth (default is min(thickness,250)) [m]
@@ -89,17 +90,17 @@
 		outputFreq = NaN; %output frequency in days (default is monthly, 30)
 
-		%specific albedo parameters: 
-		%Method 1 and 2: 
+		%specific albedo parameters:
+		%Method 1 and 2:
 		aSnow = NaN; % new snow albedo (0.64 - 0.89)
 		aIce  = NaN; % range 0.27-0.58 for old snow
-		%Method 3: Radiation Correction Factors -> only used for met station data and Greuell & Konzelmann, 1994 albedo
+			     %Method 3: Radiation Correction Factors -> only used for met station data and Greuell & Konzelmann, 1994 albedo
 		cldFrac = NaN; % average cloud amount
-		%Method 4: additonal tuning parameters albedo as a funtion of age and water content (Bougamont et al., 2005)
-		t0wet = NaN; % time scale for wet snow (15-21.9) 
-		t0dry = NaN; % warm snow timescale (30) 
-		K     = NaN; % time scale temperature coef. (7) 
+			       %Method 4: additonal tuning parameters albedo as a funtion of age and water content (Bougamont et al., 2005)
+		t0wet = NaN; % time scale for wet snow (15-21.9)
+		t0dry = NaN; % warm snow timescale (30)
+		K     = NaN; % time scale temperature coef. (7)
 		adThresh = NaN; %Apply aIdx method to all areas with densities below this value,
 		                %or else apply direct input value from aValue, allowing albedo to be altered.
-							 %Default value is rho water (1023 kg m-3).
+				%Default value is rho water (1023 kg m-3).
 
 		%densities:
@@ -108,10 +109,11 @@
 		%thermal:
 		ThermoDeltaTScaling= NaN; %scaling factor to multiply the thermal diffusion timestep (delta t)
-		
+
+		steps_per_step = 1;
 		requested_outputs      = {};
 
-		%Several fields are missing from the standard GEMB model, which are capture intrinsically by ISSM. 
-		%dateN: that's the last row of the above fields. 
-		%dt:    included in dateN. Not an input.  
+		%Several fields are missing from the standard GEMB model, which are capture intrinsically by ISSM.
+		%dateN: that's the last row of the above fields.
+		%dt:    included in dateN. Not an input.
 		%elev:  this is taken from the ISSM surface itself.
 
@@ -121,6 +123,6 @@
 			switch nargin
 				case 2
-					mesh=varargin{1}; 
-					geometry=varargin{2}; 
+					mesh=varargin{1};
+					geometry=varargin{2};
 					self=setdefaultparameters(self,mesh,geometry);
 				otherwise
@@ -152,55 +154,55 @@
 		function self = setdefaultparameters(self,mesh,geometry) % {{{
 
-		self.isgraingrowth=1;
-		self.isalbedo=1;
-		self.isshortwave=1;
-		self.isthermal=1;
-		self.isaccumulation=1;
-		self.ismelt=1;
-		self.isdensification=1;
-		self.isturbulentflux=1;
-		self.isclimatology=0;
-	
-		self.aIdx = 1;
-		self.swIdx = 1;
-		self.denIdx = 2;
-		self.dsnowIdx = 1;
-		self.zTop=10*ones(mesh.numberofelements,1);
-		self.dzTop = .05* ones (mesh.numberofelements,1);
-		self.dzMin = self.dzTop/2;
-		self.InitDensityScaling = 1.0;
-		self.ThermoDeltaTScaling = 1/11;
-
-		self.Vmean=10.0*ones(mesh.numberofelements,1);
-		
-		self.zMax=250*ones(mesh.numberofelements,1);
-		self.zMin=130*ones(mesh.numberofelements,1);
-		self.zY = 1.10*ones(mesh.numberofelements,1);
-		self.outputFreq = 30;
-		
-		%additional albedo parameters
-		self.aSnow = 0.85;
-		self.aIce = 0.48;
-		self.cldFrac = 0.1; 
-		self.t0wet = 15;
-		self.t0dry = 30;
-		self.K = 7;
-		self.adThresh = 1023;
-
-		self.teValue = ones(mesh.numberofelements,1);
-		self.aValue = self.aSnow*ones(mesh.numberofelements,1);
-        
-		self.Dzini=0.05*ones(mesh.numberofelements,2);
-		self.Dini=910.0*ones(mesh.numberofelements,2); 
-		self.Reini=2.5*ones(mesh.numberofelements,2);
-		self.Gdnini=0.0*ones(mesh.numberofelements,2);
-		self.Gspini=0.0*ones(mesh.numberofelements,2);
-		self.ECini=0.0*ones(mesh.numberofelements,1);
-		self.Wini=0.0*ones(mesh.numberofelements,2);
-		self.Aini=self.aSnow*ones(mesh.numberofelements,2); 
-		self.Tini=273.15*ones(mesh.numberofelements,2); 
-% 		/!\ Default value of Tini must be equal to Tmean but don't know Tmean yet (computed when atmospheric forcings are interpolated on mesh). 
-% 		If initialization without restart, this value will be overwritten when snow parameters are retrieved in Element.cpp 
-		self.Sizeini=2*ones(mesh.numberofelements,1);
+			self.isgraingrowth=1;
+			self.isalbedo=1;
+			self.isshortwave=1;
+			self.isthermal=1;
+			self.isaccumulation=1;
+			self.ismelt=1;
+			self.isdensification=1;
+			self.isturbulentflux=1;
+			self.isclimatology=0;
+
+			self.aIdx = 1;
+			self.swIdx = 1;
+			self.denIdx = 2;
+			self.dsnowIdx = 1;
+			self.zTop=10*ones(mesh.numberofelements,1);
+			self.dzTop = .05* ones (mesh.numberofelements,1);
+			self.dzMin = self.dzTop/2;
+			self.InitDensityScaling = 1.0;
+			self.ThermoDeltaTScaling = 1/11;
+
+			self.Vmean=10.0*ones(mesh.numberofelements,1);
+
+			self.zMax=250*ones(mesh.numberofelements,1);
+			self.zMin=130*ones(mesh.numberofelements,1);
+			self.zY = 1.10*ones(mesh.numberofelements,1);
+			self.outputFreq = 30;
+
+			%additional albedo parameters
+			self.aSnow = 0.85;
+			self.aIce = 0.48;
+			self.cldFrac = 0.1;
+			self.t0wet = 15;
+			self.t0dry = 30;
+			self.K = 7;
+			self.adThresh = 1023;
+
+			self.teValue = ones(mesh.numberofelements,1);
+			self.aValue = self.aSnow*ones(mesh.numberofelements,1);
+
+			self.Dzini=0.05*ones(mesh.numberofelements,2);
+			self.Dini=910.0*ones(mesh.numberofelements,2);
+			self.Reini=2.5*ones(mesh.numberofelements,2);
+			self.Gdnini=0.0*ones(mesh.numberofelements,2);
+			self.Gspini=0.0*ones(mesh.numberofelements,2);
+			self.ECini=0.0*ones(mesh.numberofelements,1);
+			self.Wini=0.0*ones(mesh.numberofelements,2);
+			self.Aini=self.aSnow*ones(mesh.numberofelements,2);
+			self.Tini=273.15*ones(mesh.numberofelements,2);
+			% 		/!\ Default value of Tini must be equal to Tmean but don't know Tmean yet (computed when atmospheric forcings are interpolated on mesh).
+			% 		If initialization without restart, this value will be overwritten when snow parameters are retrieved in Element.cpp
+			self.Sizeini=2*ones(mesh.numberofelements,1);
 
 		end % }}}
@@ -226,22 +228,22 @@
 			if (self.isclimatology)
 				md = checkfield(md,'fieldname', 'smb.Ta', 'size',[md.mesh.numberofelements+1],...
-					'message',['Ta must have md.mesh.numberofelements+1 rows in order to force a climatology']);
+						'message',['Ta must have md.mesh.numberofelements+1 rows in order to force a climatology']);
 				md = checkfield(md,'fieldname', 'smb.V', 'size',[md.mesh.numberofelements+1],...
-					'message',['V must have md.mesh.numberofelements+1 rows in order to force a climatology']);
+						'message',['V must have md.mesh.numberofelements+1 rows in order to force a climatology']);
 				md = checkfield(md,'fieldname', 'smb.dswrf', 'size',[md.mesh.numberofelements+1],...
-					'message',['dswrf must have md.mesh.numberofelements+1 rows in order to force a climatology']);
+						'message',['dswrf must have md.mesh.numberofelements+1 rows in order to force a climatology']);
 				md = checkfield(md,'fieldname', 'smb.dlwrf', 'size',[md.mesh.numberofelements+1],...
-					'message',['dlwrf must have md.mesh.numberofelements+1 rows in order to force a climatology']);
+						'message',['dlwrf must have md.mesh.numberofelements+1 rows in order to force a climatology']);
 				md = checkfield(md,'fieldname', 'smb.P', 'size',[md.mesh.numberofelements+1],...
-					'message',['P must have md.mesh.numberofelements+1 rows in order to force a climatology']);
+						'message',['P must have md.mesh.numberofelements+1 rows in order to force a climatology']);
 				md = checkfield(md,'fieldname', 'smb.eAir', 'size',[md.mesh.numberofelements+1],...
-					'message',['eAir must have md.mesh.numberofelements+1 rows in order to force a climatology']);
+						'message',['eAir must have md.mesh.numberofelements+1 rows in order to force a climatology']);
 			end
 
 			md = checkfield(md,'fieldname','smb.Tmean','size',[md.mesh.numberofelements 1],'NaN',1,'Inf',1,'>',273-100,'<',273+100); %-100/100 celsius min/max value
-			md = checkfield(md,'fieldname','smb.C','size',[md.mesh.numberofelements 1],'NaN',1,'Inf',1,'>=',0); 
+			md = checkfield(md,'fieldname','smb.C','size',[md.mesh.numberofelements 1],'NaN',1,'Inf',1,'>=',0);
 			md = checkfield(md,'fieldname','smb.Vmean','size',[md.mesh.numberofelements 1],'NaN',1,'Inf',1,'>=',0);
-			md = checkfield(md,'fieldname','smb.Tz','size',[md.mesh.numberofelements 1],'NaN',1,'Inf',1,'>=',0,'<=',5000); 
-			md = checkfield(md,'fieldname','smb.Vz','size',[md.mesh.numberofelements 1],'NaN',1,'Inf',1,'>=',0,'<=',5000); 
+			md = checkfield(md,'fieldname','smb.Tz','size',[md.mesh.numberofelements 1],'NaN',1,'Inf',1,'>=',0,'<=',5000);
+			md = checkfield(md,'fieldname','smb.Vz','size',[md.mesh.numberofelements 1],'NaN',1,'Inf',1,'>=',0,'<=',5000);
 
 			md = checkfield(md,'fieldname','smb.teValue','timeseries',1,'NaN',1,'Inf',1,'>=',0,'<=',1);
@@ -256,5 +258,5 @@
 			md = checkfield(md,'fieldname','smb.dzMin','NaN',1,'Inf',1,'>',0);
 			md = checkfield(md,'fieldname','smb.zY','NaN',1,'Inf',1,'>=',1);
-			md = checkfield(md,'fieldname','smb.outputFreq','NaN',1,'Inf',1,'>',0,'<',10*365); %10 years max 
+			md = checkfield(md,'fieldname','smb.outputFreq','NaN',1,'Inf',1,'>',0,'<',10*365); %10 years max
 			md = checkfield(md,'fieldname','smb.InitDensityScaling','NaN',1,'Inf',1,'>=',0,'<=',1);
 			md = checkfield(md,'fieldname','smb.ThermoDeltaTScaling','NaN',1,'Inf',1,'>=',0,'<=',1);
@@ -280,11 +282,12 @@
 				error('SMBgemb consistency check error: zTop should be smaller than local ice thickness');
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
 
 		end % }}}
 		function disp(self) % {{{
-			
+
 			disp(sprintf('   surface forcings for SMB GEMB model :'));
-			
+
 			fielddisplay(self,'isgraingrowth','run grain growth module (default true)');
 			fielddisplay(self,'isalbedo','run albedo module (default true)');
@@ -319,12 +322,12 @@
 			fielddisplay(self,'adThresh',{'Apply aIdx method to all areas with densities below this value,','or else apply direct input value from aValue, allowing albedo to be altered.'});
 			fielddisplay(self,'aIdx',{'method for calculating albedo and subsurface absorption (default is 1)',...
-				'0: direct input from aValue parameter',...
-				'1: effective grain radius [Gardner & Sharp, 2009]',...
-				'2: effective grain radius [Brun et al., 2009]',...
-				'3: density and cloud amount [Greuell & Konzelmann, 1994]',...
-				'4: exponential time decay & wetness [Bougamont & Bamber, 2005]'})
+					    '0: direct input from aValue parameter',...
+					    '1: effective grain radius [Gardner & Sharp, 2009]',...
+					    '2: effective grain radius [Brun et al., 2009]',...
+					    '3: density and cloud amount [Greuell & Konzelmann, 1994]',...
+					    '4: exponential time decay & wetness [Bougamont & Bamber, 2005]'})
 
 			fielddisplay(self,'teValue','Outward longwave radiation thermal emissivity forcing at every element (default in code is 1)');
-                                
+
 			%snow properties init
 			fielddisplay(self,'Dzini','Initial cell depth when restart [m]');
@@ -338,40 +341,41 @@
 			fielddisplay(self,'Tini','Initial snow temperature when restart [K]');
 			fielddisplay(self,'Sizeini','Initial number of layers when restart [K]');
-            
-            
-			%additional albedo parameters: 
+
+
+			%additional albedo parameters:
 			switch self.aIdx
-			case {0 5}
-				fielddisplay(self,'aValue','Albedo forcing at every element.  Used only if aIdx == {0,5}.');
-			case {1 2}
-				fielddisplay(self,'aSnow','new snow albedo (0.64 - 0.89)');
-				fielddisplay(self,'aIce','albedo of ice (0.27-0.58)');
-			case 3
-				fielddisplay(self,'cldFrac','average cloud amount');
-			case 4
-				fielddisplay(self,'t0wet','time scale for wet snow (15-21.9) [d]');
-				fielddisplay(self,'t0dry','warm snow timescale (30) [d]');
-				fielddisplay(self,'K','time scale temperature coef. (7) [d]');
+				case {0 5}
+					fielddisplay(self,'aValue','Albedo forcing at every element.  Used only if aIdx == {0,5}.');
+				case {1 2}
+					fielddisplay(self,'aSnow','new snow albedo (0.64 - 0.89)');
+					fielddisplay(self,'aIce','albedo of ice (0.27-0.58)');
+				case 3
+					fielddisplay(self,'cldFrac','average cloud amount');
+				case 4
+					fielddisplay(self,'t0wet','time scale for wet snow (15-21.9) [d]');
+					fielddisplay(self,'t0dry','warm snow timescale (30) [d]');
+					fielddisplay(self,'K','time scale temperature coef. (7) [d]');
 			end
 
 			fielddisplay(self,'swIdx','apply all SW to top grid cell (0) or allow SW to penetrate surface (1) [default 1]');
 			fielddisplay(self,'denIdx',{'densification model to use (default is 2):',...
-									'1 = emperical model of Herron and Langway (1980)',...
-									'2 = semi-emperical model of Anthern et al. (2010)',...
-									'3 = DO NOT USE: physical model from Appendix B of Anthern et al. (2010)',...
-									'4 = DO NOT USE: emperical model of Li and Zwally (2004)',...
-									'5 = DO NOT USE: modified emperical model (4) by Helsen et al. (2008)',...
-									'6 = Antarctica semi-emperical model of Ligtenberg et al. (2011)',...
-									'7 = Greenland semi-emperical model of Kuipers Munneke et al. (2015)'});
+					    '1 = emperical model of Herron and Langway (1980)',...
+					    '2 = semi-emperical model of Anthern et al. (2010)',...
+					    '3 = DO NOT USE: physical model from Appendix B of Anthern et al. (2010)',...
+					    '4 = DO NOT USE: emperical model of Li and Zwally (2004)',...
+					    '5 = DO NOT USE: modified emperical model (4) by Helsen et al. (2008)',...
+					    '6 = Antarctica semi-emperical model of Ligtenberg et al. (2011)',...
+					    '7 = Greenland semi-emperical model of Kuipers Munneke et al. (2015)'});
 			fielddisplay(self,'dsnowIdx',{'model for fresh snow accumulation density (default is 1):',...
-				                           '0 = Original GEMB value, 150 kg/m^3',...
-				                           '1 = Antarctica value of fresh snow density, 350 kg/m^3',...
-				                           '2 = Greenland value of fresh snow density, 315 kg/m^3, Fausto et al. (2008)',...
-				                           '3 = Antarctica model of Kaspers et al. (2004), Make sure to set Vmean accurately',...
-				                           '4 = Greenland model of Kuipers Munneke et al. (2015)'});
-
+					    '0 = Original GEMB value, 150 kg/m^3',...
+					    '1 = Antarctica value of fresh snow density, 350 kg/m^3',...
+					    '2 = Greenland value of fresh snow density, 315 kg/m^3, Fausto et al. (2008)',...
+					    '3 = Antarctica model of Kaspers et al. (2004), Make sure to set Vmean accurately',...
+					    '4 = Greenland model of Kuipers Munneke et al. (2015)'});
+
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested');
-									
-			
+
+
 		end % }}}
 		function marshall(self,prefix,md,fid) % {{{
@@ -380,5 +384,5 @@
 
 			WriteData(fid,prefix,'name','md.smb.model','data',8,'format','Integer');
-			
+
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isgraingrowth','format','Boolean');
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isalbedo','format','Boolean');
@@ -390,5 +394,5 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isturbulentflux','format','Boolean');
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','isclimatology','format','Boolean');
-            
+
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','Ta','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1,'yts',md.constants.yts);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','V','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1,'yts',md.constants.yts);
@@ -397,5 +401,5 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','P','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1,'yts',md.constants.yts);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','eAir','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1,'yts',md.constants.yts);
-			WriteData(fid,prefix,'object',self,'class','smb','fieldname','pAir','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1,'yts',md.constants.yts);         
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','pAir','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1,'yts',md.constants.yts);
 
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','Tmean','format','DoubleMat','mattype',2);
@@ -410,5 +414,5 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','zMax','format','DoubleMat','mattype',2);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','zMin','format','DoubleMat','mattype',2);
-		
+
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','aIdx','format','Integer');
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','swIdx','format','Integer');
@@ -428,5 +432,5 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','aValue','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1,'yts',md.constants.yts);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','teValue','format','DoubleMat','mattype',2,'timeserieslength',md.mesh.numberofelements+1,'yts',md.constants.yts);
-            
+
 			%snow properties init
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','Dzini','format','DoubleMat','mattype',3);
@@ -440,17 +444,17 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','Tini','format','DoubleMat','mattype',3);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','Sizeini','format','IntMat','mattype',2);
-
-			%figure out dt from forcings: 
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
+			%figure out dt from forcings:
 			time=self.Ta(end,:); %assume all forcings are on the same time step
 			dtime=diff(time,1);
 			dt=min(dtime);
-            
+
 			WriteData(fid,prefix,'data',dt,'name','md.smb.dt','format','Double','scale',yts);
 
 			% Check if smb_dt goes evenly into transient core time step
 			if (mod(md.timestepping.time_step,dt) >= 1e-10)
-                error('smb_dt/dt = %f. The number of SMB time steps in one transient core time step has to be an an integer',md.timestepping.time_step/dt);
-			end
-			
+				error('smb_dt/dt = %f. The number of SMB time steps in one transient core time step has to be an an integer',md.timestepping.time_step/dt);
+			end
+
 			%process requested outputs
 			outputs = self.requested_outputs;
Index: /issm/trunk-jpl/src/m/classes/SMBgemb.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBgemb.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBgemb.py	(revision 24240)
@@ -31,16 +31,16 @@
 
         #inputs:
-        self.Ta = float('NaN')  #2 m air temperature, in Kelvin
-        self.V = float('NaN')  #wind speed (m / s - 1)
-        self.dswrf = float('NaN')  #downward shortwave radiation flux [W / m^2]
-        self.dlwrf = float('NaN')  #downward longwave radiation flux [W / m^2]
-        self.P = float('NaN')  #precipitation [mm w.e. / m^2]
-        self.eAir = float('NaN')  #screen level vapor pressure [Pa]
-        self.pAir = float('NaN')  #surface pressure [Pa]
-        self.Tmean = float('NaN')  #mean annual temperature [K]
-        self.Vmean = float('NaN')  #mean annual wind velocity [m s - 1]
-        self.C = float('NaN')  #mean annual snow accumulation [kg m - 2 yr - 1]
-        self.Tz = float('NaN')  #height above ground at which temperature (T) was sampled [m]
-        self.Vz = float('NaN')  #height above ground at which wind (V) was sampled [m]
+        self.Ta = float('NaN')       #2 m air temperature, in Kelvin
+        self.V = float('NaN')        #wind speed (m/s-1)
+        self.dswrf = float('NaN')    #downward shortwave radiation flux [W/m^2]
+        self.dlwrf = float('NaN')    #downward longwave radiation flux [W/m^2]
+        self.P = float('NaN')        #precipitation [mm w.e. / m^2]
+        self.eAir = float('NaN')     #screen level vapor pressure [Pa]
+        self.pAir = float('NaN')     #surface pressure [Pa]
+        self.Tmean = float('NaN')    #mean annual temperature [K]
+        self.Vmean = float('NaN')    #mean annual wind velocity [m s-1]
+        self.C = float('NaN')        #mean annual snow accumulation [kg m-2 yr-1]
+        self.Tz = float('NaN')       #height above ground at which temperature (T) was sampled [m]
+        self.Vz = float('NaN')       #height above ground at which wind (V) eas sampled [m]
 
         #optional inputs:
@@ -49,80 +49,63 @@
 
         # Initialization of snow properties
-        self.Dzini = float('NaN')  #cell depth (m)
-        self.Dini = float('NaN')  #snow density (kg m - 3)
-        self.Reini = float('NaN')  #effective grain size (mm)
-        self.Gdnini = float('NaN')  #grain dricity (0 - 1)
-        self.Gspini = float('NaN')  #grain sphericity (0 - 1)
-        self.ECini = float('NaN')  #evaporation/condensation (kg m - 2)
-        self.Wini = float('NaN')  #Water content (kg m - 2)
-        self.Aini = float('NaN')  #albedo (0 - 1)
-        self.Tini = float('NaN')  #snow temperature (K)
+        self.Dzini = float('NaN')    #cell depth (m)
+        self.Dini = float('NaN')     #snow density (kg m-3)
+        self.Reini = float('NaN')    #effective grain size (mm)
+        self.Gdnini = float('NaN')   #grain dricity (0-1)
+        self.Gspini = float('NaN')   #grain sphericity (0-1)
+        self.ECini = float('NaN')    #evaporation/condensation (kg m-2)
+        self.Wini = float('NaN')     #Water content (kg m-2)
+        self.Aini = float('NaN')     #albedo (0-1)
+        self.Tini = float('NaN')     #snow temperature (K)
         self.Sizeini = float('NaN')  #Number of layers
 
         #settings:
-        self.aIdx = float('NaN')  #method for calculating albedo and subsurface absorption (default is 1)
-        # 0: direct input from aValue parameter
-        # 1: effective grain radius [Gardner & Sharp, 2009]
-        # 2: effective grain radius [Brun et al., 2009]
-        # 3: density and cloud amount [Greuell & Konzelmann, 1994]
-        # 4: exponential time decay & wetness [Bougamont & Bamber, 2005]
-        # 5: ingest MODIS mode, direct input from aValue parameter applied to surface ice only
-        self.swIdx = float('NaN')  # apply all SW to top grid cell (0) or allow SW to penetrate surface (1) (default 1)
-        self.denIdx = float('NaN')  #densification model to use (default is 2):
-        # 1 = emperical model of Herron and Langway (1980)
-        # 2 = semi - emperical model of Anthern et al. (2010)
-        # 3 = DO NOT USE: physical model from Appix B of Anthern et al. (2010)
-        # 4 = DO NOT USE: emperical model of Li and Zwally (2004)
-        # 5 = DO NOT USE: modified emperical model (4) by Helsen et al. (2008)
-        # 6 = Antarctica semi - emperical model of Ligtenberg et al. (2011)
-        # 7 = Greenland semi - emperical model of Kuipers Munneke et al. (2015)
+        self.aIdx = float('NaN')     #method for calculating albedo and subsurface absorption (default is 1)
+        self.swIdx = float('NaN')    # apply all SW to top grid cell (0) or allow SW to penetrate surface (1) (default 1)
+        self.denIdx = float('NaN')   #densification model to use (default is 2):
         self.dsnowIdx = float('NaN')  #model for fresh snow accumulation density (default is 1):
-        # 0 = Original GEMB value, 150 kg / m^3
-        # 1 = Antarctica value of fresh snow density, 350 kg / m^3
-        # 2 = Greenland value of fresh snow density, 315 kg / m^3, Fausto et al. (2008)
-        # 3 = Antarctica model of Kaspers et al. (2004)
-        # 4 = Greenland model of Kuipers Munneke et al. (2015)
-
-        self.zTop = float('NaN')  # depth over which grid length is constant at the top of the snopack (default 10) [m]
-        self.dzTop = float('NaN')  # initial top vertical grid spacing (default .05) [m]
-        self.dzMin = float('NaN')  # initial min vertical allowable grid spacing (default dzTop / 2) [m]
-        self.zY = float('NaN')  # strech grid cells bellow top_z by a [top_dz * y ^ (cells bellow top_z)]
-        self.zMax = float('NaN')  #initial max model depth (default is min(thickness, 250)) [m]
-        self.zMin = float('NaN')  #initial min model depth (default is min(thickness, 130)) [m]
-        self.outputFreq = float('NaN')  #output frequency in days (default is monthly, 30)
+        self.zTop = float('NaN')     # depth over which grid length is constant at the top of the snopack (default 10) [m]
+        self.dzTop = float('NaN')    # initial top vertical grid spacing (default .05) [m]
+        self.dzMin = float('NaN')    # initial min vertical allowable grid spacing (default dzMin/2) [m]
+        self.zY = float('NaN')       # strech grid cells bellow top_z by a [top_dz * y ^ (cells bellow top_z)]
+        self.zMax = float('NaN')     #initial max model depth (default is min(thickness, 500)) [m]
+        self.zMin = float('NaN')     #initial min model depth (default is min(thickness, 30)) [m]
+        self.outputFreq = float('NaN')       #output frequency in days (default is monthly, 30)
 
         #specific albedo parameters:
         #Method 1 and 2:
-        self.aSnow = float('NaN')  # new snow albedo (0.64 - 0.89)
-        self.aIce = float('NaN')  # range 0.27 - 0.58 for old snow
-        #Method 3: Radiation Correction Factors - > only used for met station data and Greuell & Konzelmann, 1994 albedo
+        self.aSnow = float('NaN')    # new snow albedo (0.64 - 0.89)
+        self.aIce = float('NaN')     # range 0.27-0.58 for old snow
+        #Method 3: Radiation Correction Factors -> only used for met station data and Greuell & Konzelmann, 1994 albedo
         self.cldFrac = float('NaN')  # average cloud amount
         #Method 4: additonal tuning parameters albedo as a funtion of age and water content (Bougamont et al., 2005)
-        self.t0wet = float('NaN')  # time scale for wet snow (15 - 21.9)
-        self.t0dry = float('NaN')  # warm snow timescale (30)
-        self.K = float('NaN')  # time scale temperature coef. (7)
+        self.t0wet = float('NaN')    # time scale for wet snow (15-21.9)
+        self.t0dry = float('NaN')    # warm snow timescale (30)
+        self.K = float('NaN')        # time scale temperature coef. (7)
         self.adThresh = float('NaN')  # Apply aIdx method to all areas with densities below this value,
         # or else apply direct input value from aValue, allowing albedo to be altered.
-        # Default value is rho water (1023 kg m - 3).
+        # Default value is rho water (1023 kg m-3).
 
         #densities:
-        self.InitDensityScaling = float('NaN')  #initial scaling factor multiplying the density of ice, which describes the density of the snowpack.
+        self.InitDensityScaling = float('NaN')       #initial scaling factor multiplying the density of ice, which describes the density of the snowpack.
 
         #thermo:
         self.ThermoDeltaTScaling = float('NaN')  #scaling factor to multiply the thermal diffusion timestep (delta t)
 
+        self.steps_per_step = 1
         self.requested_outputs = []
 
-    #Several fields are missing from the standard GEMB model, which are capture intrinsically by ISSM.
-    #dateN: that's the last row of the above fields.
-    #dt:    included in dateN. Not an input.
-    #elev:  this is taken from the ISSM surface itself.
-
-    #}}}
+        #Several fields are missing from the standard GEMB model, which are capture intrinsically by ISSM.
+        #dateN: that's the last row of the above fields.
+        #dt:    included in dateN. Not an input.
+        #elev:  this is taken from the ISSM surface itself.
+
+        #}}}
+
 
     def __repr__(self):  # {{{
         #string = "   surface forcings parameters:"
-        #string = "  #s\n  #s" % (string, fielddisplay(self, 'mass_balance', 'surface mass balance [m / yr ice eq]'))
-        #string = "  #s\n  #s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
+        #string = "#s\n#s"%(string, fielddisplay(self, 'mass_balance', 'surface mass balance [m/yr ice eq]'))
+        #string = "#s\n#s"%(string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
         string = '   surface forcings for SMB GEMB model :'
         string = "%s\n%s" % (string, fielddisplay(self, 'issmbgradients', 'is smb gradients method activated (0 or 1, default is 0)'))
@@ -137,18 +120,18 @@
         string = "%s\n%s" % (string, fielddisplay(self, 'isclimatology', 'repeat all forcings when past last forcing time (default false)'))
         string = "%s\n%s" % (string, fielddisplay(self, 'Ta', '2 m air temperature, in Kelvin'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'V', 'wind speed (m s - 1)'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'dlwrf', 'downward shortwave radiation flux [W / m^2]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'dswrf', 'downward longwave radiation flux [W / m^2]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'V', 'wind speed (m s-1)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'dlwrf', 'downward shortwave radiation flux [W/m^2]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'dswrf', 'downward longwave radiation flux [W/m^2]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'P', 'precipitation [mm w.e. / m^2]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'eAir', 'screen level vapor pressure [Pa]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'pAir', 'surface pressure [Pa]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'Tmean', 'mean annual temperature [K]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'C', 'mean annual snow accumulation [kg m - 2 yr - 1]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'Vmean', 'mean annual wind velocity [m s - 1] (default 10 m / s)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'C', 'mean annual snow accumulation [kg m-2 yr-1]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'Vmean', 'mean annual temperature [m s-1] (default 10 m/s)'))
         string = "%s\n%s" % (string, fielddisplay(self, 'Tz', 'height above ground at which temperature (T) was sampled [m]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'Vz', 'height above ground at which wind (V) was sampled [m]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'Vz', 'height above ground at which wind (V) eas sampled [m]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'zTop', 'depth over which grid length is constant at the top of the snopack (default 10) [m]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'dzTop', 'initial top vertical grid spacing (default .05) [m] '))
-        string = "%s\n%s" % (string, fielddisplay(self, 'dzMin', 'initial min vertical allowable grid spacing (default dzMin / 2) [m] '))
+        string = "%s\n%s" % (string, fielddisplay(self, 'dzMin', 'initial min vertical allowable grid spacing (default dzMin/2) [m] '))
         string = "%s\n%s" % (string, fielddisplay(self, 'zMax', 'initial max model depth (default is min(thickness, 500)) [m]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'zMin', 'initial min model depth (default is min(thickness, 30)) [m]'))
@@ -167,26 +150,26 @@
         #snow properties init
         string = "%s\n%s" % (string, fielddisplay(self, 'Dzini', 'Initial cell depth when restart [m]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'Dini', 'Initial snow density when restart [kg m - 3]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'Dini', 'Initial snow density when restart [kg m-3]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'Reini', 'Initial grain size when restart [mm]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'Gdnini', 'Initial grain dricity when restart [ - ]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'Gspini', 'Initial grain sphericity when restart [ - ]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'ECini', 'Initial evaporation / condensation when restart [kg m - 2]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'Wini', 'Initial snow water content when restart [kg m - 2]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'Aini', 'Initial albedo when restart [ - ]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'Gdnini', 'Initial grain dricity when restart [-]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'Gspini', 'Initial grain sphericity when restart [-]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'ECini', 'Initial evaporation/condensation when restart [kg m-2]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'Wini', 'Initial snow water content when restart [kg m-2]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'Aini', 'Initial albedo when restart [-]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'Tini', 'Initial snow temperature when restart [K]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'Sizeini', 'Initial number of layers when restart [K]'))
 
         #additional albedo parameters:
-        if isinstance(self.aIdx, list) or isinstance(self.aIdx, np.ndarray) and (self.aIdx == [1, 2] or (1 in self.aIdx and 2 in self.aIdx)):
+        if isinstance(self.aIdx, (list, type(np.array([1, 2])))) and (self.aIdx == [1, 2] or (1 in self.aIdx and 2 in self.aIdx)):
             string = "%s\n%s" % (string, fielddisplay(self, 'aSnow', 'new snow albedo (0.64 - 0.89)'))
-            string = "%s\n%s" % (string, fielddisplay(self, 'aIce', 'albedo of ice (0.27 - 0.58)'))
-        elif elf.aIdx == 0:
+            string = "%s\n%s" % (string, fielddisplay(self, 'aIce', 'albedo of ice (0.27-0.58)'))
+        elif self.aIdx == 0:
             string = "%s\n%s" % (string, fielddisplay(self, 'aValue', 'Albedo forcing at every element.  Used only if aIdx == {0, 5}'))
-        elif elf.aIdx == 5:
+        elif self.aIdx == 5:
             string = "%s\n%s" % (string, fielddisplay(self, 'aValue', 'Albedo forcing at every element.  Used only if aIdx == {0, 5}'))
         elif self.aIdx == 3:
             string = "%s\n%s" % (string, fielddisplay(self, 'cldFrac', 'average cloud amount'))
         elif self.aIdx == 4:
-            string = "%s\n%s" % (string, fielddisplay(self, 't0wet', 'time scale for wet snow (15 - 21.9) [d]'))
+            string = "%s\n%s" % (string, fielddisplay(self, 't0wet', 'time scale for wet snow (15-21.9) [d]'))
             string = "%s\n%s" % (string, fielddisplay(self, 't0dry', 'warm snow timescale (30) [d]'))
             string = "%s\n%s" % (string, fielddisplay(self, 'K', 'time scale temperature coef. (7) [d]'))
@@ -195,16 +178,17 @@
         string = "%s\n%s" % (string, fielddisplay(self, 'denIdx', ['densification model to use (default is 2):',
                                                                    '1 = emperical model of Herron and Langway (1980)',
-                                                                   '2 = semi - emperical model of Anthern et al. (2010)',
+                                                                   '2 = semi-emperical model of Anthern et al. (2010)',
                                                                    '3 = DO NOT USE: physical model from Appix B of Anthern et al. (2010)',
                                                                    '4 = DO NOT USE: emperical model of Li and Zwally (2004)',
                                                                    '5 = DO NOT USE: modified emperical model (4) by Helsen et al. (2008)',
-                                                                   '6 = Antarctica semi - emperical model of Ligtenberg et al. (2011)',
-                                                                   '7 = Greenland semi - emperical model of Kuipers Munneke et al. (2015)']))
+                                                                   '6 = Antarctica semi-emperical model of Ligtenberg et al. (2011)',
+                                                                   '7 = Greenland semi-emperical model of Kuipers Munneke et al. (2015)']))
         string = "%s\n%s" % (string, fielddisplay(self, 'dsnowIdx', ['model for fresh snow accumulation density (default is 1):',
-                                                                     '0 = Original GEMB value, 150 kg / m^3',
-                                                                     '1 = Antarctica value of fresh snow density, 350 kg / m^3',
-                                                                     '2 = Greenland value of fresh snow density, 315 kg / m^3, Fausto et al. (2008)',
+                                                                     '0 = Original GEMB value, 150 kg/m^3',
+                                                                     '1 = Antarctica value of fresh snow density, 350 kg/m^3',
+                                                                     '2 = Greenland value of fresh snow density, 315 kg/m^3, Fausto et al. (2008)',
                                                                      '3 = Antarctica model of Kaspers et al. (2004), Make sure to set Vmean accurately',
                                                                      '4 = Greenland model of Kuipers Munneke et al. (2015)']))
+        string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'))
         string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
         return string
@@ -247,18 +231,18 @@
         self.denIdx = 2
         self.dsnowIdx = 1
-        self.zTop = 10 * np.ones((mesh.numberofelements, ))
-        self.dzTop = .05 * np.ones((mesh.numberofelements, ))
+        self.zTop = 10 * np.ones((mesh.numberofelements,))
+        self.dzTop = .05 * np.ones((mesh.numberofelements,))
         self.dzMin = self.dzTop / 2
         self.InitDensityScaling = 1.0
         self.ThermoDeltaTScaling = 1 / 11.0
 
-        self.Vmean = 10 * np.ones((mesh.numberofelements, ))
-
-        self.zMax = 250 * np.ones((mesh.numberofelements, ))
-        self.zMin = 130 * np.ones((mesh.numberofelements, ))
-        self.zY = 1.10 * np.ones((mesh.numberofelements, ))
+        self.Vmean = 10 * np.ones((mesh.numberofelements,))
+
+        self.zMax = 250 * np.ones((mesh.numberofelements,))
+        self.zMin = 130 * np.ones((mesh.numberofelements,))
+        self.zY = 1.10 * np.ones((mesh.numberofelements,))
         self.outputFreq = 30
 
-    #additional albedo parameters
+        #additional albedo parameters
         self.aSnow = 0.85
         self.aIce = 0.48
@@ -269,6 +253,6 @@
         self.adThresh = 1023
 
-        self.teValue = np.ones((mesh.numberofelements, ))
-        self.aValue = self.aSnow * np.ones(mesh.numberofelements, )
+        self.teValue = np.ones((mesh.numberofelements,))
+        self.aValue = self.aSnow * np.ones(mesh.numberofelements,)
 
         self.Dzini = 0.05 * np.ones((mesh.numberofelements, 2))
@@ -277,14 +261,15 @@
         self.Gdnini = 0.0 * np.ones((mesh.numberofelements, 2))
         self.Gspini = 0.0 * np.ones((mesh.numberofelements, 2))
-        self.ECini = 0.0 * np.ones((mesh.numberofelements, ))
+        self.ECini = 0.0 * np.ones((mesh.numberofelements,))
         self.Wini = 0.0 * np.ones((mesh.numberofelements, 2))
         self.Aini = self.aSnow * np.ones((mesh.numberofelements, 2))
         self.Tini = 273.15 * np.ones((mesh.numberofelements, 2))
-        #          / !\ Default value of Tini must be equal to Tmean but don't know Tmean yet (computed when atmospheric forcings are interpolated on mesh).
-        #         If initialization without restart, this value will be overwritten when snow parameters are retrieved in Element.cpp
-        self.Sizeini = 2 * np.ones((mesh.numberofelements, ))
+#       /!\ Default value of Tini must be equal to Tmean but don't know Tmean yet (computed when atmospheric forcings are interpolated on mesh).
+#       If initialization without restart, this value will be overwritten when snow parameters are retrieved in Element.cpp
+        self.Sizeini = 2 * np.ones((mesh.numberofelements,))
     #}}}
 
-    def checkconsistency(self, md, solution, analyses):  # {{{
+    def checkconsistency(self, md, solution, analyses):    # {{{
+
         md = checkfield(md, 'fieldname', 'smb.isgraingrowth', 'values', [0, 1])
         md = checkfield(md, 'fieldname', 'smb.isalbedo', 'values', [0, 1])
@@ -297,24 +282,24 @@
         md = checkfield(md, 'fieldname', 'smb.isclimatology', 'values', [0, 1])
 
-        md = checkfield(md, 'fieldname', 'smb.Ta', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '>', 273 - 100, '<', 273 + 100)  # - 100 / 100 celsius min / max value
-        md = checkfield(md, 'fieldname', 'smb.V', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '>=', 0, '<', 45, 'size', np.shape(self.Ta))  #max 500 km / h
-        md = checkfield(md, 'fieldname', 'smb.dswrf', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '>=', 0, '<=', 1400, 'size', np.shape(self.Ta))
-        md = checkfield(md, 'fieldname', 'smb.dlwrf', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '>=', 0, 'size', np.shape(self.Ta))
-        md = checkfield(md, 'fieldname', 'smb.P', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '>=', 0, '<=', 100, 'size', np.shape(self.Ta))
+        md = checkfield(md, 'fieldname', 'smb.Ta', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '>', 273 - 100, '<', 273 + 100)  #-100/100 celsius min/max value
+        md = checkfield(md, 'fieldname', 'smb.V', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '> = ', 0, '<', 45, 'size', np.shape(self.Ta))  #max 500 km/h
+        md = checkfield(md, 'fieldname', 'smb.dswrf', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '> = ', 0, '< = ', 1400, 'size', np.shape(self.Ta))
+        md = checkfield(md, 'fieldname', 'smb.dlwrf', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '> = ', 0, 'size', np.shape(self.Ta))
+        md = checkfield(md, 'fieldname', 'smb.P', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '> = ', 0, '< = ', 100, 'size', np.shape(self.Ta))
         md = checkfield(md, 'fieldname', 'smb.eAir', 'timeseries', 1, 'NaN', 1, 'Inf', 1, 'size', np.shape(self.Ta))
 
         if (self.isclimatology > 0):
-            md = checkfield(md, 'fieldname', 'smb.Ta', 'size', [md.mesh.numberofelements + 1], 'message', 'Ta must have md.mesh.numberofelements + 1 rows in order to force a climatology')
-            md = checkfield(md, 'fieldname', 'smb.V', 'size', [md.mesh.numberofelements + 1], 'message', 'V must have md.mesh.numberofelements + 1 rows in order to force a climatology')
-            md = checkfield(md, 'fieldname', 'smb.dswrf', 'size', [md.mesh.numberofelements + 1], 'message', 'dswrf must have md.mesh.numberofelements + 1 rows in order to force a climatology')
-            md = checkfield(md, 'fieldname', 'smb.dlwrf', 'size', [md.mesh.numberofelements + 1], 'message', 'dlwrf must have md.mesh.numberofelements + 1 rows in order to force a climatology')
-            md = checkfield(md, 'fieldname', 'smb.P', 'size', [md.mesh.numberofelements + 1], 'message', 'P must have md.mesh.numberofelements + 1 rows in order to force a climatology')
-            md = checkfield(md, 'fieldname', 'smb.eAir', 'size', [md.mesh.numberofelements + 1], 'message', 'eAir must have md.mesh.numberofelements + 1 rows in order to force a climatology')
-
-        md = checkfield(md, 'fieldname', 'smb.Tmean', 'size', [md.mesh.numberofelements], 'NaN', 1, 'Inf', 1, '>', 273 - 100, '<', 273 + 100)  # - 100 / 100 celsius min / max value
-        md = checkfield(md, 'fieldname', 'smb.C', 'size', [md.mesh.numberofelements], 'NaN', 1, 'Inf', 1, '>=', 0)
-        md = checkfield(md, 'fieldname', 'smb.Vmean', 'size', [md.mesh.numberofelements], 'NaN', 1, 'Inf', 1, '>=', 0)
-        md = checkfield(md, 'fieldname', 'smb.Tz', 'size', [md.mesh.numberofelements], 'NaN', 1, 'Inf', 1, '>=', 0, '<=', 5000)
-        md = checkfield(md, 'fieldname', 'smb.Vz', 'size', [md.mesh.numberofelements], 'NaN', 1, 'Inf', 1, '>=', 0, '<=', 5000)
+            md = checkfield(md, 'fieldname', 'smb.Ta', 'size', [md.mesh.numberofelements + 1], 'message', 'Ta must have md.mesh.numberofelements+1 rows in order to force a climatology')
+            md = checkfield(md, 'fieldname', 'smb.V', 'size', [md.mesh.numberofelements + 1], 'message', 'V must have md.mesh.numberofelements+1 rows in order to force a climatology')
+            md = checkfield(md, 'fieldname', 'smb.dswrf', 'size', [md.mesh.numberofelements + 1], 'message', 'dswrf must have md.mesh.numberofelements+1 rows in order to force a climatology')
+            md = checkfield(md, 'fieldname', 'smb.dlwrf', 'size', [md.mesh.numberofelements + 1], 'message', 'dlwrf must have md.mesh.numberofelements+1 rows in order to force a climatology')
+            md = checkfield(md, 'fieldname', 'smb.P', 'size', [md.mesh.numberofelements + 1], 'message', 'P must have md.mesh.numberofelements+1 rows in order to force a climatology')
+            md = checkfield(md, 'fieldname', 'smb.eAir', 'size', [md.mesh.numberofelements + 1], 'message', 'eAir must have md.mesh.numberofelements+1 rows in order to force a climatology')
+
+        md = checkfield(md, 'fieldname', 'smb.Tmean', 'size', [md.mesh.numberofelements], 'NaN', 1, 'Inf', 1, '>', 273 - 100, '<', 273 + 100)  #-100/100 celsius min/max value
+        md = checkfield(md, 'fieldname', 'smb.C', 'size', [md.mesh.numberofelements], 'NaN', 1, 'Inf', 1, '> = ', 0)
+        md = checkfield(md, 'fieldname', 'smb.Vmean', 'size', [md.mesh.numberofelements], 'NaN', 1, 'Inf', 1, '> = ', 0)
+        md = checkfield(md, 'fieldname', 'smb.Tz', 'size', [md.mesh.numberofelements], 'NaN', 1, 'Inf', 1, '> = ', 0, '< = ', 5000)
+        md = checkfield(md, 'fieldname', 'smb.Vz', 'size', [md.mesh.numberofelements], 'NaN', 1, 'Inf', 1, '> = ', 0, '< = ', 5000)
 
         md = checkfield(md, 'fieldname', 'smb.teValue', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '>=', 0, '<=', 1)
@@ -325,35 +310,36 @@
         md = checkfield(md, 'fieldname', 'smb.dsnowIdx', 'NaN', 1, 'Inf', 1, 'values', [0, 1, 2, 3, 4])
 
-        md = checkfield(md, 'fieldname', 'smb.zTop', 'NaN', 1, 'Inf', 1, '>=', 0)
+        md = checkfield(md, 'fieldname', 'smb.zTop', 'NaN', 1, 'Inf', 1, '> = ', 0)
         md = checkfield(md, 'fieldname', 'smb.dzTop', 'NaN', 1, 'Inf', 1, '>', 0)
         md = checkfield(md, 'fieldname', 'smb.dzMin', 'NaN', 1, 'Inf', 1, '>', 0)
-        md = checkfield(md, 'fieldname', 'smb.zY', 'NaN', 1, 'Inf', 1, '>=', 1)
+        md = checkfield(md, 'fieldname', 'smb.zY', 'NaN', 1, 'Inf', 1, '> = ', 1)
         md = checkfield(md, 'fieldname', 'smb.outputFreq', 'NaN', 1, 'Inf', 1, '>', 0, '<', 10 * 365)  #10 years max
-        md = checkfield(md, 'fieldname', 'smb.InitDensityScaling', 'NaN', 1, 'Inf', 1, '>=', 0, '<=', 1)
-        md = checkfield(md, 'fieldname', 'smb.ThermoDeltaTScaling', 'NaN', 1, 'Inf', 1, '>=', 0, '<=', 1)
+        md = checkfield(md, 'fieldname', 'smb.InitDensityScaling', 'NaN', 1, 'Inf', 1, '> = ', 0, '< = ', 1)
+        md = checkfield(md, 'fieldname', 'smb.ThermoDeltaTScaling', 'NaN', 1, 'Inf', 1, '> = ', 0, '< = ', 1)
         md = checkfield(md, 'fieldname', 'smb.adThresh', 'NaN', 1, 'Inf', 1, '>=', 0)
 
-        if isinstance(self.aIdx, list) or isinstance(self.aIdx, np.ndarray) and (self.aIdx == [1, 2] or (1 in self.aIdx and 2 in self.aIdx)):
-            md = checkfield(md, 'fieldname', 'smb.aSnow', 'NaN', 1, 'Inf', 1, '>=', .64, '<=', .89)
-            md = checkfield(md, 'fieldname', 'smb.aIce', 'NaN', 1, 'Inf', 1, '>=', .27, '<=', .58)
+        if isinstance(self.aIdx, (list, type(np.array([1, 2])))) and (self.aIdx == [1, 2] or (1 in self.aIdx and 2 in self.aIdx)):
+            md = checkfield(md, 'fieldname', 'smb.aSnow', 'NaN', 1, 'Inf', 1, '> = ', .64, '< = ', .89)
+            md = checkfield(md, 'fieldname', 'smb.aIce', 'NaN', 1, 'Inf', 1, '> = ', .27, '< = ', .58)
         elif self.aIdx == 0:
             md = checkfield(md, 'fieldname', 'smb.aValue', 'timeseries', 1, 'NaN', 1, 'Inf', 1, '>=', 0, '<=', 1)
         elif self.aIdx == 3:
-            md = checkfield(md, 'fieldname', 'smb.cldFrac', 'NaN', 1, 'Inf', 1, '>=', 0, '<=', 1)
+            md = checkfield(md, 'fieldname', 'smb.cldFrac', 'NaN', 1, 'Inf', 1, '> = ', 0, '< = ', 1)
         elif self.aIdx == 4:
-            md = checkfield(md, 'fieldname', 'smb.t0wet', 'NaN', 1, 'Inf', 1, '>=', 15, '<=', 21.9)
-            md = checkfield(md, 'fieldname', 'smb.t0dry', 'NaN', 1, 'Inf', 1, '>=', 30, '<=', 30)
-            md = checkfield(md, 'fieldname', 'smb.K', 'NaN', 1, 'Inf', 1, '>=', 7, '<=', 7)
+            md = checkfield(md, 'fieldname', 'smb.t0wet', 'NaN', 1, 'Inf', 1, '> = ', 15, '< = ', 21.9)
+            md = checkfield(md, 'fieldname', 'smb.t0dry', 'NaN', 1, 'Inf', 1, '> = ', 30, '< = ', 30)
+            md = checkfield(md, 'fieldname', 'smb.K', 'NaN', 1, 'Inf', 1, '> = ', 7, '< = ', 7)
 
         #check zTop is < local thickness:
         he = np.sum(md.geometry.thickness[md.mesh.elements - 1], axis=1) / np.size(md.mesh.elements, 1)
         if np.any(he < self.zTop):
-            error('SMBgemb consistency check error: zTop should be smaller than local ice thickness')
-
+            raise IOError('SMBgemb consistency check error: zTop should be smaller than local ice thickness')
+        md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1])
         md = checkfield(md, 'fieldname', 'smb.requested_outputs', 'stringrow', 1)
         return md
     # }}}
 
-    def marshall(self, prefix, md, fid):  # {{{
+    def marshall(self, prefix, md, fid):    # {{{
+
         yts = md.constants.yts
 
@@ -408,5 +394,5 @@
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'teValue', 'format', 'DoubleMat', 'mattype', 2, 'timeserieslength', md.mesh.numberofelements + 1, 'yts', yts)
 
-    #snow properties init
+        #snow properties init
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Dzini', 'format', 'DoubleMat', 'mattype', 3)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Dini', 'format', 'DoubleMat', 'mattype', 3)
@@ -419,6 +405,6 @@
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Tini', 'format', 'DoubleMat', 'mattype', 3)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Sizeini', 'format', 'IntMat', 'mattype', 2)
-
-    #figure out dt from forcings:
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer')
+        #figure out dt from forcings:
         time = self.Ta[-1]  #assume all forcings are on the same time step
         dtime = np.diff(time, n=1, axis=0)
@@ -427,9 +413,9 @@
         WriteData(fid, prefix, 'data', dt, 'name', 'md.smb.dt', 'format', 'Double', 'scale', yts)
 
-    # Check if smb_dt goes evenly into transient core time step
+        # Check if smb_dt goes evenly into transient core time step
         if (md.timestepping.time_step % dt >= 1e-10):
-            error('smb_dt/dt =  #f. The number of SMB time steps in one transient core time step has to be an an integer', md.timestepping.time_step / dt)
-
-    #process requested outputs
+            raise IOError('smb_dt/dt = #f. The number of SMB time steps in one transient core time step has to be an an integer', md.timestepping.time_step / dt)
+
+        #process requested outputs
         outputs = self.requested_outputs
         indices = [i for i, x in enumerate(outputs) if x == 'default']
Index: /issm/trunk-jpl/src/m/classes/SMBgradients.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBgradients.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBgradients.m	(revision 24240)
@@ -5,10 +5,11 @@
 
 classdef SMBgradients
-	properties (SetAccess=public) 
-		href   = NaN;
-		smbref = NaN;
-		b_pos  = NaN;
-		b_neg  = NaN;
-		requested_outputs      = {};
+	properties (SetAccess=public)
+		href              = NaN;
+		smbref            = NaN;
+		b_pos             = NaN;
+		b_neg             = NaN;
+		steps_per_step    = 1;
+		requested_outputs = {};
 	end
 	methods
@@ -47,4 +48,5 @@
 				md = checkfield(md,'fieldname','smb.b_neg','timeseries',1,'NaN',1,'Inf',1);
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
 		end % }}}
@@ -57,4 +59,5 @@
 			fielddisplay(self,'b_pos',' slope of hs - smb regression line for accumulation regime required if smb gradients is activated');
 			fielddisplay(self,'b_neg',' slope of hs - smb regression line for ablation regime required if smb gradients is activated');
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested');
 
@@ -68,6 +71,8 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','smbref','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','b_pos','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			WriteData(fid,prefix,'object',self,'class','smb','fieldname','b_neg','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','b_neg','format','DoubleMat','mattype',1,'scale',1./yts, ...
+				  'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
+
 			%process requested outputs
 			outputs = self.requested_outputs;
Index: /issm/trunk-jpl/src/m/classes/SMBgradients.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBgradients.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBgradients.py	(revision 24240)
@@ -9,5 +9,5 @@
 
        Usage:
-          SMBgradients = SMBgradients()
+          SMBgradients = SMBgradients();
     """
 
@@ -17,4 +17,5 @@
         self.b_pos = float('NaN')
         self.b_neg = float('NaN')
+        self.steps_per_step = 1
         self.requested_outputs = []
     #}}}
@@ -28,4 +29,5 @@
         string = "%s\n%s" % (string, fielddisplay(self, 'b_pos', ' slope of hs - smb regression line for accumulation regime required if smb gradients is activated'))
         string = "%s\n%s" % (string, fielddisplay(self, 'b_neg', ' slope of hs - smb regression line for ablation regime required if smb gradients is activated'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'))
         string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
 
@@ -47,5 +49,5 @@
     #}}}
 
-    def checkconsistency(self, md, solution, analyses):  # {{{
+    def checkconsistency(self, md, solution, analyses):    # {{{
         if 'MasstransportAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.href', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
@@ -54,18 +56,20 @@
             md = checkfield(md, 'fieldname', 'smb.b_neg', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
 
+        md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1])
         md = checkfield(md, 'fieldname', 'masstransport.requested_outputs', 'stringrow', 1)
         return md
     # }}}
 
-    def marshall(self, prefix, md, fid):  # {{{
+    def marshall(self, prefix, md, fid):    # {{{
         yts = md.constants.yts
 
         WriteData(fid, prefix, 'name', 'md.smb.model', 'data', 6, 'format', 'Integer')
-        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'href', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts)
+        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'href', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'smbref', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'b_pos', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'b_neg', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer')
 
-    #process requested outputs
+        #process requested outputs
         outputs = self.requested_outputs
         indices = [i for i, x in enumerate(outputs) if x == 'default']
Index: /issm/trunk-jpl/src/m/classes/SMBgradientscomponents.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBgradientscomponents.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBgradientscomponents.m	(revision 24240)
@@ -6,10 +6,12 @@
 classdef SMBgradientscomponents
 	properties (SetAccess=public)
-		accuref					  = NaN;
-		accualti				  = NaN;
-		accugrad				  = NaN;
-		runoffref				  = NaN;
-		runoffalti			  = NaN;
-		runoffgrad			  = NaN;
+
+		accuref           = NaN;
+		accualti          = NaN;
+		accugrad          = NaN;
+		runoffref         = NaN;
+		runoffalti        = NaN;
+		runoffgrad        = NaN;
+		steps_per_step    = 1;
 		requested_outputs = {};
 	end
@@ -51,4 +53,5 @@
 				md = checkfield(md,'fieldname','smb.runoffgrad','numel',1,'NaN',1,'Inf',1);
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','masstransport.requested_outputs','stringrow',1);
 		end % }}}
@@ -63,4 +66,5 @@
 			fielddisplay(self,'runoffalti',' Altitude at which the runoff is equal to the reference value');
 			fielddisplay(self,'runoffgrad',' Gradient of the variation of the runoff (0 for uniform runoff) m w.e. m-1 y-1 (lpase rate times ddf)');
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested');
 
@@ -75,5 +79,7 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','runoffalti','format','Double');
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','runoffgrad', ...
-								'format','Double','scale',1./md.constants.yts);
+				  'format','Double','scale',1./md.constants.yts);
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
+
 
 			%process requested outputs
Index: /issm/trunk-jpl/src/m/classes/SMBgradientscomponents.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBgradientscomponents.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBgradientscomponents.py	(revision 24240)
@@ -9,6 +9,6 @@
 
        Usage:
-          SMBgradients = SMBgradientscomponents()
-    For now it has accumulation, runoff ans retention which could be aither refreezing and / or evaporation
+          SMBgradients = SMBgradientscomponents();
+    For now it has accumulation, runoff ans retention which could be aither refreezing and/or evaporation
     """
 
@@ -20,4 +20,5 @@
         self.runoffalti = float('NaN')
         self.runoffgrad = float('NaN')
+        self.steps_per_step = 1
         self.requested_outputs = ['default']
     #}}}
@@ -28,7 +29,8 @@
         string = "%s\n%s" % (string, fielddisplay(self, 'accualti', ' Altitude at which the accumulation is equal to the reference value'))
         string = "%s\n%s" % (string, fielddisplay(self, 'accugrad', ' Gradient of the variation of the accumulation (0 for uniform accumulation)'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'runoffref', ' reference value of the runoff m w.e. y - 1 (temperature times ddf)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'runoffref', ' reference value of the runoff m w.e. y-1 (temperature times ddf)'))
         string = "%s\n%s" % (string, fielddisplay(self, 'runoffalti', ' Altitude at which the runoff is equal to the reference value'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'runoffgrad', ' Gradient of the variation of the runoff (0 for uniform runoff) m w.e. m - 1 y - 1 (lpase rate times ddf)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'runoffgrad', ' Gradient of the variation of the runoff (0 for uniform runoff) m w.e. m-1 y-1 (lapse rate times ddf)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'))
         string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
 
@@ -42,5 +44,8 @@
 
     def defaultoutputs(self, md):  # {{{
-        return ['SmbMassBalance', 'SmbRunoff']
+        list = ['SmbMassBalance', 'SmbRunoff']
+        if self.steps_per_step > 1:
+            list.extend(['SmbMassBalanceSubstep', 'SmbRunoffSubstep'])
+        return list
     #}}}
 
@@ -58,19 +63,22 @@
             md = checkfield(md, 'fieldname', 'smb.runoffalti', 'numel', [1], 'NaN', 1, 'Inf', 1)
             md = checkfield(md, 'fieldname', 'smb.runoffgrad', 'numel', [1], 'NaN', 1, 'Inf', 1)
+
+        md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1])
         md = checkfield(md, 'fieldname', 'masstransport.requested_outputs', 'stringrow', 1)
         return md
     # }}}
 
-    def marshall(self, prefix, md, fid):  # {{{
+    def marshall(self, prefix, md, fid):    # {{{
         yts = md.constants.yts
         WriteData(fid, prefix, 'name', 'md.smb.model', 'data', 11, 'format', 'Integer')
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'accuref', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', yts, 'scale', 1. / yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'accualti', 'format', 'Double')
-        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'accugrad', 'format', 'Double', 'scale', 1. / yts)
+        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'accugrad', 'format', 'Double', 'scale', 1. / md.constants.yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'runoffref', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', yts, 'scale', 1. / yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'runoffalti', 'format', 'Double')
-        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'runoffgrad', 'format', 'Double', 'scale', 1. / yts)
+        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'runoffgrad', 'format', 'Double', 'scale', 1. / md.constants.yts)
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer')
 
-    #process requested outputs
+        #process requested outputs
         outputs = self.requested_outputs
         indices = [i for i, x in enumerate(outputs) if x == 'default']
Index: /issm/trunk-jpl/src/m/classes/SMBgradientsela.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBgradientsela.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBgradientsela.m	(revision 24240)
@@ -5,11 +5,12 @@
 
 classdef SMBgradientsela
-	properties (SetAccess=public) 
-		ela    = NaN;
-		b_pos  = NaN;
-		b_neg  = NaN;
-		b_max  = NaN;
-		b_min  = NaN;
-		requested_outputs      = {};
+	properties (SetAccess=public)
+		ela               = NaN;
+		b_pos             = NaN;
+		b_neg             = NaN;
+		b_max             = NaN;
+		b_min             = NaN;
+		steps_per_step    = 1;
+		requested_outputs = {};
 	end
 	methods
@@ -24,5 +25,5 @@
 		function self = extrude(self,md) % {{{
 
-			%Nothing for now
+		%Nothing for now
 
 		end % }}}
@@ -32,5 +33,5 @@
 		function self = initialize(self,md) % {{{
 
-			%Nothing done for now
+		%Nothing done for now
 
 		end % }}}
@@ -50,4 +51,5 @@
 				md = checkfield(md,'fieldname','smb.b_min','timeseries',1,'NaN',1,'Inf',1);
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
 		end % }}}
@@ -61,4 +63,5 @@
 			fielddisplay(self,'b_max',' upper cap on smb rate, default: 9999 (no cap) [m ice eq./yr] ');
 			fielddisplay(self,'b_min',' lower cap on smb rate, default: -9999 (no cap) [m ice eq./yr]');
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested');
 
@@ -73,6 +76,8 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','b_neg','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','b_max','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			WriteData(fid,prefix,'object',self,'class','smb','fieldname','b_min','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			
+			WriteData(fid,prefix,'object',self,'class','smb','fieldname','b_min','format','DoubleMat','mattype',1,'scale',1./yts, ...
+				  'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
+
 			%process requested outputs
 			outputs = self.requested_outputs;
Index: /issm/trunk-jpl/src/m/classes/SMBgradientsela.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBgradientsela.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBgradientsela.py	(revision 24240)
@@ -18,4 +18,5 @@
         self.b_max = float('NaN')
         self.b_min = float('NaN')
+        self.steps_per_step = 1
         self.requested_outputs = []
         self.setdefaultparameters()
@@ -27,10 +28,10 @@
 
         string = "%s\n%s" % (string, fielddisplay(self, 'ela', ' equilibrium line altitude from which deviation is used to calculate smb using the smb gradients ela method [m a.s.l.]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'b_pos', ' vertical smb gradient (dB / dz) above ela'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'b_neg', ' vertical smb gradient (dB / dz) below ela'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'b_max', ' upper cap on smb rate, default: 9999 (no cap) [m ice eq. / yr]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'b_min', ' lower cap on smb rate, default: - 9999 (no cap) [m ice eq. / yr]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'b_pos', ' vertical smb gradient (dB/dz) above ela'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'b_neg', ' vertical smb gradient (dB/dz) below ela'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'b_max', ' upper cap on smb rate, default: 9999 (no cap) [m ice eq./yr]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'b_min', ' lower cap on smb rate, default: -9999 (no cap) [m ice eq./yr]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'))
         string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
-
         return string
     #}}}
@@ -56,5 +57,5 @@
     #}}}
 
-    def checkconsistency(self, md, solution, analyses):  # {{{
+    def checkconsistency(self, md, solution, analyses):    # {{{
         if 'MasstransportAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.ela', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
@@ -64,19 +65,21 @@
             md = checkfield(md, 'fieldname', 'smb.b_min', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
 
+        md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1])
         md = checkfield(md, 'fieldname', 'smb.requested_outputs', 'stringrow', 1)
         return md
     # }}}
+    def marshall(self, prefix, md, fid):    # {{{
 
-    def marshall(self, prefix, md, fid):  # {{{
         yts = md.constants.yts
 
         WriteData(fid, prefix, 'name', 'md.smb.model', 'data', 9, 'format', 'Integer')
-        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'ela', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts)
+        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'ela', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'b_pos', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'b_neg', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'b_max', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'b_min', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer')
 
-    #process requested outputs
+        #process requested outputs
         outputs = self.requested_outputs
         indices = [i for i, x in enumerate(outputs) if x == 'default']
Index: /issm/trunk-jpl/src/m/classes/SMBhenning.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBhenning.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBhenning.m	(revision 24240)
@@ -5,6 +5,7 @@
 
 classdef SMBhenning
-	properties (SetAccess=public) 
+	properties (SetAccess=public)
 		smbref = NaN;
+		steps_per_step=1;
 		requested_outputs      = {};
 	end
@@ -16,11 +17,11 @@
 					inputstruct=varargin{1};
 					list1 = properties('SMBhenning');
-					list2 = fieldnames(inputstruct);
-					for i=1:length(list1)
-						fieldname = list1{i};
-						if ismember(fieldname,list2),
-							self.(fieldname) = inputstruct.(fieldname);
+						list2 = fieldnames(inputstruct);
+						for i=1:length(list1)
+							fieldname = list1{i};
+							if ismember(fieldname,list2),
+								self.(fieldname) = inputstruct.(fieldname);
+							end
 						end
-					end
 				otherwise
 					error('constructor not supported');
@@ -51,4 +52,5 @@
 				md = checkfield(md,'fieldname','smb.smbref','size',[md.mesh.numberofvertices 1],'NaN',1,'Inf',1);
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
 		end % }}}
@@ -56,4 +58,5 @@
 			disp(sprintf('   surface forcings parameters:'));
 			fielddisplay(self,'smbref','reference smb from which deviation is calculated [m/yr ice eq]');
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested');
 		end % }}}
@@ -64,5 +67,6 @@
 			WriteData(fid,prefix,'name','md.smb.model','data',7,'format','Integer');
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','smbref','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
+
 			%process requested outputs
 			outputs = self.requested_outputs;
Index: /issm/trunk-jpl/src/m/classes/SMBmeltcomponents.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBmeltcomponents.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBmeltcomponents.m	(revision 24240)
@@ -5,5 +5,5 @@
 
 classdef SMBmeltcomponents
-	properties (SetAccess=public) 
+	properties (SetAccess=public)
 		isclimatology = 0;
 		accumulation = NaN;
@@ -11,4 +11,5 @@
 		melt = NaN;
 		refreeze = NaN;
+		steps_per_step=1;
 		requested_outputs      = {};
 	end
@@ -56,37 +57,26 @@
 			if ismember('MasstransportAnalysis',analyses),
 				md = checkfield(md,'fieldname','smb.accumulation','timeseries',1,'NaN',1,'Inf',1);
+				md = checkfield(md,'fieldname','smb.evaporation','timeseries',1,'NaN',1,'Inf',1);
+				md = checkfield(md,'fieldname','smb.refreeze','timeseries',1,'NaN',1,'Inf',1);
+				md = checkfield(md,'fieldname','smb.melt','timeseries',1,'NaN',1,'Inf',1);
 			end
 			if ismember('BalancethicknessAnalysis',analyses),
 				md = checkfield(md,'fieldname','smb.accumulation','size',[md.mesh.numberofvertices 1],'NaN',1,'Inf',1);
-			end
-			if ismember('MasstransportAnalysis',analyses),
-				md = checkfield(md,'fieldname','smb.evaporation','timeseries',1,'NaN',1,'Inf',1);
-			end
-			if ismember('BalancethicknessAnalysis',analyses),
 				md = checkfield(md,'fieldname','smb.evaporation','size',[md.mesh.numberofvertices 1],'NaN',1,'Inf',1);
-			end
-			if ismember('MasstransportAnalysis',analyses),
-				md = checkfield(md,'fieldname','smb.refreeze','timeseries',1,'NaN',1,'Inf',1);
-			end
-			if ismember('BalancethicknessAnalysis',analyses),
 				md = checkfield(md,'fieldname','smb.refreeze','size',[md.mesh.numberofvertices 1],'NaN',1,'Inf',1);
-			end
-			if ismember('MasstransportAnalysis',analyses),
-				md = checkfield(md,'fieldname','smb.melt','timeseries',1,'NaN',1,'Inf',1);
-			end
-			if ismember('BalancethicknessAnalysis',analyses),
 				md = checkfield(md,'fieldname','smb.melt','size',[md.mesh.numberofvertices 1],'NaN',1,'Inf',1);
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
 			md = checkfield(md,'fieldname','smb.isclimatology','values',[0 1]);
 			if (self.isclimatology)
 				md = checkfield(md,'fieldname', 'smb.accumulation', 'size',[md.mesh.numberofvertices+1],...
-					'message',['accumulation must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
+						'message',['accumulation must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
 				md = checkfield(md,'fieldname', 'smb.melt', 'size',[md.mesh.numberofvertices+1],...
-					'message',['melt must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
+						'message',['melt must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
 				md = checkfield(md,'fieldname', 'smb.refreeze', 'size',[md.mesh.numberofvertices+1],...
-					'message',['refreeze must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
+						'message',['refreeze must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
 				md = checkfield(md,'fieldname', 'smb.evaporation', 'size',[md.mesh.numberofvertices+1],...
-					'message',['evaporation must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
+						'message',['evaporation must have md.mesh.numberofvertices+1 rows in order to force a climatology']);
 			end
 		end % }}}
@@ -98,4 +88,5 @@
 			fielddisplay(self,'refreeze','amount of ice melt refrozen in ice column [m/yr ice eq]');
 			fielddisplay(self,'isclimatology','repeat all forcings when past last forcing time (default false)');
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested');
 		end % }}}
@@ -109,5 +100,6 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','melt','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','refreeze','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
+
 			%process requested outputs
 			outputs = self.requested_outputs;
Index: /issm/trunk-jpl/src/m/classes/SMBmeltcomponents.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBmeltcomponents.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBmeltcomponents.py	(revision 24240)
@@ -10,5 +10,5 @@
 
        Usage:
-          SMBmeltcomponents = SMBmeltcomponents()
+          SMBmeltcomponents = SMBmeltcomponents();
     """
 
@@ -18,14 +18,16 @@
         self.evaporation = float('NaN')
         self.isclimatology = 0
+        self.steps_per_step = 1
         self.requested_outputs = []
     #}}}
 
     def __repr__(self):  # {{{
-        string = "   surface forcings parameters with melt (SMB = accumulation - evaporation - melt + refreeze) :"
-        string = "%s\n%s" % (string, fielddisplay(self, 'accumulation', 'accumulated snow [m / yr ice eq]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'evaporation', 'mount of ice lost to evaporative processes [m / yr ice eq]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'melt', 'amount of ice melt in the ice column [m / yr ice eq]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'refreeze', 'amount of ice melt refrozen in the ice column [m / yr ice eq]'))
+        string = "   surface forcings parameters with melt (SMB = accumulation-evaporation-melt+refreeze) :"
+        string = "%s\n%s" % (string, fielddisplay(self, 'accumulation', 'accumulated snow [m/yr ice eq]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'evaporation', 'mount of ice lost to evaporative processes [m/yr ice eq]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'melt', 'amount of ice melt in the ice column [m/yr ice eq]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'refreeze', 'amount of ice melt refrozen in the ice column [m/yr ice eq]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'isclimatology', 'repeat all forcings when past last forcing time (default false)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'))
         string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
         return string
@@ -64,35 +66,24 @@
     #}}}
 
-    def checkconsistency(self, md, solution, analyses):  # {{{
+    def checkconsistency(self, md, solution, analyses):    # {{{
         if 'MasstransportAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.accumulation', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
+            md = checkfield(md, 'fieldname', 'smb.melt', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
+            md = checkfield(md, 'fieldname', 'smb.refreeze', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
+            md = checkfield(md, 'fieldname', 'smb.evaporation', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
 
         if 'BalancethicknessAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.accumulation', 'size', [md.mesh.numberofvertices], 'NaN', 1, 'Inf', 1)
-
-        if 'MasstransportAnalysis' in analyses:
-            md = checkfield(md, 'fieldname', 'smb.melt', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
-
-        if 'BalancethicknessAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.melt', 'size', [md.mesh.numberofvertices], 'NaN', 1, 'Inf', 1)
-
-        if 'MasstransportAnalysis' in analyses:
-            md = checkfield(md, 'fieldname', 'smb.refreeze', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
-
-        if 'BalancethicknessAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.refreeze', 'size', [md.mesh.numberofvertices], 'NaN', 1, 'Inf', 1)
-
-        if 'MasstransportAnalysis' in analyses:
-            md = checkfield(md, 'fieldname', 'smb.evaporation', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
-
-        if 'BalancethicknessAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.evaporation', 'size', [md.mesh.numberofvertices], 'NaN', 1, 'Inf', 1)
 
+        md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1])
         md = checkfield(md, 'fieldname', 'masstransport.requested_outputs', 'stringrow', 1)
         md = checkfield(md, 'fieldname', 'smb.isclimatology', 'values', [0, 1])
         return md
     # }}}
+    def marshall(self, prefix, md, fid):    # {{{
 
-    def marshall(self, prefix, md, fid):  # {{{
         yts = md.constants.yts
 
@@ -102,6 +93,7 @@
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'melt', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'refreeze', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer')
 
-    #process requested outputs
+        #process requested outputs
         outputs = self.requested_outputs
         indices = [i for i, x in enumerate(outputs) if x == 'default']
@@ -112,8 +104,8 @@
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'isclimatology', 'format', 'Boolean')
         if (self.isclimatology > 0):
-            md = checkfield(md, 'fieldname', 'smb.accumulation', 'size', [md.mesh.numberofvertices + 1], 'message', 'accumulation must have md.mesh.numberofvertices + 1 rows in order to force a climatology')
-            md = checkfield(md, 'fieldname', 'smb.melt', 'size', [md.mesh.numberofvertices + 1], 'message', 'melt must have md.mesh.numberofvertices + 1 rows in order to force a climatology')
-            md = checkfield(md, 'fieldname', 'smb.refreeze', 'size', [md.mesh.numberofvertices + 1], 'message', 'refreeze must have md.mesh.numberofvertices + 1 rows in order to force a climatology')
-            md = checkfield(md, 'fieldname', 'smb.evaporation', 'size', [md.mesh.numberofvertices + 1], 'message', 'evaporation must have md.mesh.numberofvertices + 1 rows in order to force a climatology')
+            md = checkfield(md, 'fieldname', 'smb.accumulation', 'size', [md.mesh.numberofvertices + 1], 'message', 'accumulation must have md.mesh.numberofvertices+1 rows in order to force a climatology')
+            md = checkfield(md, 'fieldname', 'smb.melt', 'size', [md.mesh.numberofvertices + 1], 'message', 'melt must have md.mesh.numberofvertices+1 rows in order to force a climatology')
+            md = checkfield(md, 'fieldname', 'smb.refreeze', 'size', [md.mesh.numberofvertices + 1], 'message', 'refreeze must have md.mesh.numberofvertices+1 rows in order to force a climatology')
+            md = checkfield(md, 'fieldname', 'smb.evaporation', 'size', [md.mesh.numberofvertices + 1], 'message', 'evaporation must have md.mesh.numberofvertices+1 rows in order to force a climatology')
 
     # }}}
Index: /issm/trunk-jpl/src/m/classes/SMBpdd.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBpdd.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBpdd.m	(revision 24240)
@@ -5,5 +5,5 @@
 
 classdef SMBpdd
-	properties (SetAccess=public) 
+	properties (SetAccess=public)
 		precipitation             = NaN;
 		monthlytemperatures       = NaN;
@@ -12,5 +12,5 @@
 		s0t                       = NaN;
 		rlaps                     = 0;
-		rlapslgm                  = 0; 
+		rlapslgm                  = 0;
 		Pfac                      = NaN;
 		Tdiff                     = NaN;
@@ -25,5 +25,6 @@
 		precipitations_presentday = NaN;
 		precipitations_lgm        = NaN;
-		requested_outputs      = {};
+		steps_per_step            = 1;
+		requested_outputs         = {};
 	end
 	methods
@@ -55,5 +56,5 @@
 		end % }}}
 		function self = initialize(self,md) % {{{
-                    
+
 			if isnan(self.s0p),
 				self.s0p=zeros(md.mesh.numberofvertices,1);
@@ -73,5 +74,5 @@
 		  self.rlaps      = 6.5;
 		  self.rlapslgm   = 6.5;
-                  
+
 		end % }}}
 		function md = checkconsistency(self,md,solution,analyses) % {{{
@@ -86,5 +87,5 @@
 					md = checkfield(md,'fieldname','smb.monthlytemperatures','timeseries',1,'NaN',1,'Inf',1);
 					md = checkfield(md,'fieldname','smb.precipitation','timeseries',1,'NaN',1,'Inf',1);
-				elseif(self.isdelta18o==1) 
+				elseif(self.isdelta18o==1)
 					md = checkfield(md,'fieldname','smb.delta18o','NaN',1,'Inf',1,'size',[2,NaN],'singletimeseries',1);
 					md = checkfield(md,'fieldname','smb.delta18o_surface','NaN',1,'Inf',1,'size',[2,NaN],'singletimeseries',1);
@@ -92,12 +93,12 @@
 					md = checkfield(md,'fieldname','smb.temperatures_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1);
 					md = checkfield(md,'fieldname','smb.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1);
-					md = checkfield(md,'fieldname','smb.precipitations_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1);                                       
+					md = checkfield(md,'fieldname','smb.precipitations_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1);
 					md = checkfield(md,'fieldname','smb.Tdiff','NaN',1,'Inf',1,'size',[2,NaN],'singletimeseries',1);
 					md = checkfield(md,'fieldname','smb.sealev','NaN',1,'Inf',1,'size',[2,NaN],'singletimeseries',1);
-				elseif(self.ismungsm==1) 
+				elseif(self.ismungsm==1)
 					md = checkfield(md,'fieldname','smb.temperatures_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1);
 					md = checkfield(md,'fieldname','smb.temperatures_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1);
 					md = checkfield(md,'fieldname','smb.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1);
-					md = checkfield(md,'fieldname','smb.precipitations_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1);                                       
+					md = checkfield(md,'fieldname','smb.precipitations_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1);
 					md = checkfield(md,'fieldname','smb.Pfac','NaN',1,'Inf',1,'size',[2,NaN],'singletimeseries',1);
 					md = checkfield(md,'fieldname','smb.Tdiff','NaN',1,'Inf',1,'size',[2,NaN],'singletimeseries',1);
@@ -105,6 +106,7 @@
 				end
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
-			
+
 		end % }}}
 		function disp(self) % {{{
@@ -140,4 +142,5 @@
 				fielddisplay(self,'sealev','sea level [m], 1D(year), required if mungsm is activated');
 			end
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested');
 		end % }}}
@@ -156,5 +159,5 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','rlaps','format','Double');
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','rlapslgm','format','Double');
-
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
 			if(self.isdelta18o==0 & self.ismungsm==0)
 				%WriteData(fid,prefix,'object',self,'class','smb','fieldname','monthlytemperatures','format','DoubleMat','mattype',1);
@@ -179,5 +182,5 @@
 				WriteData(fid,prefix,'object',self,'class','smb','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2,'yts',md.constants.yts);
 			end
-			
+
 			%process requested outputs
 			outputs = self.requested_outputs;
Index: /issm/trunk-jpl/src/m/classes/SMBpdd.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBpdd.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBpdd.py	(revision 24240)
@@ -34,4 +34,5 @@
         self.precipitations_presentday = float('NaN')
         self.precipitations_lgm = float('NaN')
+        self.steps_per_step = 1
 
     #set defaults
@@ -48,26 +49,29 @@
         string = "%s\n%s" % (string, fielddisplay(self, 's0p', 'should be set to elevation from precip source (between 0 and a few 1000s m, default is 0) [m]'))
         string = "%s\n%s" % (string, fielddisplay(self, 's0t', 'should be set to elevation from temperature source (between 0 and a few 1000s m, default is 0) [m]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'rlaps', 'present day lapse rate [degree / km]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'rlapslgm', 'LGM lapse rate [degree / km]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'rlaps', 'present day lapse rate [degree/km]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'rlapslgm', 'LGM lapse rate [degree/km]'))
         if not (self.isdelta18o and self.ismungsm):
-            string = "%s\n%s" % (string, fielddisplay(self, 'monthlytemperatures', ['monthly surface temperatures [K], required if pdd is activated and delta18o not activated']))
-            string = "%s\n%s" % (string, fielddisplay(self, 'precipitation', ['monthly surface precipitation [m / yr water eq], required if pdd is activated and delta18o or mungsm not activated']))
+            string = "%s\n%s" % (string, fielddisplay(self, 'monthlytemperatures', 'monthly surface temperatures [K], required if pdd is activated and delta18o not activated'))
+            string = "%s\n%s" % (string, fielddisplay(self, 'precipitation', 'monthly surface precipitation [m/yr water eq], required if pdd is activated and delta18o or mungsm not activated'))
             if self.isdelta18o:
                 string = "%s\n%s" % (string, fielddisplay(self, 'delta18o', 'delta18o [per mil], required if pdd is activated and delta18o activated'))
                 string = "%s\n%s" % (string, fielddisplay(self, 'delta18o_surface', 'surface elevation of the delta18o site, required if pdd is activated and delta18o activated'))
-                string = "%s\n%s" % (string, fielddisplay(self, 'temperatures_presentday', 'monthly present day surface temperatures [K], required if delta18o / mungsm is activated'))
+                string = "%s\n%s" % (string, fielddisplay(self, 'temperatures_presentday', 'monthly present day surface temperatures [K], required if delta18o/mungsm is activated'))
                 string = "%s\n%s" % (string, fielddisplay(self, 'temperatures_lgm', 'monthly LGM surface temperatures [K], required if delta18o or mungsm is activated'))
-                string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_presentday', 'monthly surface precipitation [m / yr water eq], required if delta18o or mungsm is activated'))
-                string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_lgm', 'monthly surface precipitation [m / yr water eq], required if delta18o or mungsm is activated'))
+                string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_presentday', 'monthly surface precipitation [m/yr water eq], required if delta18o or mungsm is activated'))
+                string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_lgm', 'monthly surface precipitation [m/yr water eq], required if delta18o or mungsm is activated'))
                 string = "%s\n%s" % (string, fielddisplay(self, 'Tdiff', 'time interpolation parameter for temperature, 1D(year), required if mungsm is activated'))
                 string = "%s\n%s" % (string, fielddisplay(self, 'sealev', 'sea level [m], 1D(year), required if mungsm is activated'))
+
             if self.ismungsm:
-                string = "%s\n%s" % (string, fielddisplay(self, 'temperatures_presentday', 'monthly present day surface temperatures [K], required if delta18o / mungsm is activated'))
+                string = "%s\n%s" % (string, fielddisplay(self, 'temperatures_presentday', 'monthly present day surface temperatures [K], required if delta18o/mungsm is activated'))
                 string = "%s\n%s" % (string, fielddisplay(self, 'temperatures_lgm', 'monthly LGM surface temperatures [K], required if delta18o or mungsm is activated'))
-                string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_presentday', 'monthly surface precipitation [m / yr water eq], required if delta18o or mungsm is activated'))
-                string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_lgm', 'monthly surface precipitation [m / yr water eq], required if delta18o or mungsm is activated'))
+                string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_presentday', 'monthly surface precipitation [m/yr water eq], required if delta18o or mungsm is activated'))
+                string = "%s\n%s" % (string, fielddisplay(self, 'precipitations_lgm', 'monthly surface precipitation [m/yr water eq], required if delta18o or mungsm is activated'))
                 string = "%s\n%s" % (string, fielddisplay(self, 'Pfac', 'time interpolation parameter for precipitation, 1D(year), required if mungsm is activated'))
                 string = "%s\n%s" % (string, fielddisplay(self, 'Tdiff', 'time interpolation parameter for temperature, 1D(year), required if mungsm is activated'))
                 string = "%s\n%s" % (string, fielddisplay(self, 'sealev', 'sea level [m], 1D(year), required if mungsm is activated'))
+
+        string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'))
         string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
 
@@ -79,23 +83,19 @@
             self.precipitation = project3d(md, 'vector', self.precipitation, 'type', 'node')
             self.monthlytemperatures = project3d(md, 'vector', self.monthlytemperatures, 'type', 'node')
+
         if self.isdelta18o:
             self.temperatures_lgm = project3d(md, 'vector', self.temperatures_lgm, 'type', 'node')
-        if self.isdelta18o:
             self.temperatures_presentday = project3d(md, 'vector', self.temperatures_presentday, 'type', 'node')
-        if self.isdelta18o:
             self.precipitations_presentday = project3d(md, 'vector', self.precipitations_presentday, 'type', 'node')
-        if self.isdelta18o:
             self.precipitations_lgm = project3d(md, 'vector', self.precipitations_lgm, 'type', 'node')
+
         if self.ismungsm:
             self.temperatures_lgm = project3d(md, 'vector', self.temperatures_lgm, 'type', 'node')
-        if self.ismungsm:
             self.temperatures_presentday = project3d(md, 'vector', self.temperatures_presentday, 'type', 'node')
-        if self.ismungsm:
             self.precipitations_presentday = project3d(md, 'vector', self.precipitations_presentday, 'type', 'node')
-        if self.ismungsm:
             self.precipitations_lgm = project3d(md, 'vector', self.precipitations_lgm, 'type', 'node')
+
         self.s0p = project3d(md, 'vector', self.s0p, 'type', 'node')
         self.s0t = project3d(md, 'vector', self.s0t, 'type', 'node')
-
         return self
     #}}}
@@ -128,5 +128,6 @@
     #}}}
 
-    def checkconsistency(self, md, solution, analyses):  # {{{
+    def checkconsistency(self, md, solution, analyses):    # {{{
+
         if 'MasstransportAnalysis' in analyses:
             md = checkfield(md, 'fieldname', 'smb.desfac', '<=', 1, 'numel', [1])
@@ -157,12 +158,14 @@
                 md = checkfield(md, 'fieldname', 'smb.sealev', 'NaN', 1, 'Inf', 1, 'size', [2, np.nan], 'singletimeseries', 1)
 
+        md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1])
         md = checkfield(md, 'fieldname', 'masstransport.requested_outputs', 'stringrow', 1)
         return md
     #}}}
 
-    def marshall(self, prefix, md, fid):  # {{{
+    def marshall(self, prefix, md, fid):    # {{{
         yts = md.constants.yts
 
         WriteData(fid, prefix, 'name', 'md.smb.model', 'data', 4, 'format', 'Integer')
+
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'isdelta18o', 'format', 'Boolean')
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'ismungsm', 'format', 'Boolean')
@@ -173,4 +176,5 @@
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'rlaps', 'format', 'Double')
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'rlapslgm', 'format', 'Double')
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer')
 
         if (self.isdelta18o == 0 and self.ismungsm == 0):
@@ -182,8 +186,8 @@
             WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'precipitations_presentday', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
             WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'precipitations_lgm', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
-            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'delta18o_surface', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', yts)
-            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'delta18o', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', yts)
-            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Tdiff', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', yts)
-            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'sealev', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', yts)
+            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'delta18o_surface', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts)
+            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'delta18o', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts)
+            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Tdiff', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts)
+            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'sealev', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts)
         elif self.ismungsm:
             WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'temperatures_presentday', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
@@ -191,9 +195,9 @@
             WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'precipitations_presentday', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
             WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'precipitations_lgm', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
-            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Pfac', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', yts)
-            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Tdiff', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', yts)
-            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'sealev', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', yts)
-
-    #process requested outputs
+            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Pfac', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts)
+            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Tdiff', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts)
+            WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'sealev', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts)
+
+        #process requested outputs
         outputs = self.requested_outputs
         indices = [i for i, x in enumerate(outputs) if x == 'default']
Index: /issm/trunk-jpl/src/m/classes/SMBpddSicopolis.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBpddSicopolis.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBpddSicopolis.m	(revision 24240)
@@ -5,5 +5,5 @@
 
 classdef SMBpddSicopolis
-	properties (SetAccess=public) 
+	properties (SetAccess=public)
 		precipitation					= NaN;
 		monthlytemperatures			= NaN;
@@ -16,4 +16,5 @@
 		rlaps								= 0;
 		isfirnwarming					= 0;
+		steps_per_step=1
 		requested_outputs				= {};
 	end
@@ -41,5 +42,5 @@
 		end % }}}
 		function self = initialize(self,md) % {{{
-                    
+
 			if isnan(self.s0p),
 				self.s0p=zeros(md.mesh.numberofvertices,1);
@@ -66,8 +67,8 @@
 		function self = setdefaultparameters(self) % {{{
 
-		  self.isfirnwarming		= 1;
-		  self.desfac				= -log(2.0)/1000;
-		  self.rlaps				= 7.4;
-                  
+			self.isfirnwarming		= 1;
+			self.desfac				= -log(2.0)/1000;
+			self.rlaps				= 7.4;
+
 		end % }}}
 		function md = checkconsistency(self,md,solution,analyses) % {{{
@@ -82,7 +83,9 @@
 				md = checkfield(md,'fieldname','smb.monthlytemperatures','timeseries',1,'NaN',1,'Inf',1,'size',[md.mesh.numberofvertices+1 12]);
 				md = checkfield(md,'fieldname','smb.precipitation','timeseries',1,'NaN',1,'Inf',1,'size',[md.mesh.numberofvertices+1 12]);
+
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
-			
+
 		end % }}}
 		function disp(self) % {{{
@@ -100,4 +103,5 @@
 			fielddisplay(self,'desfac','desertification elevation factor (default is -log(2.0)/1000)');
 			fielddisplay(self,'isfirnwarming','is firnwarming (Reeh 1991) activated (0 or 1, default is 1)');
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested (TemperaturePDD, SmbAccumulation, SmbMelt)');
 		end % }}}
@@ -119,4 +123,5 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','precipitation_anomaly','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','smb_corr','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
 
 			%process requested outputs
Index: /issm/trunk-jpl/src/m/classes/SMBpddSicopolis.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBpddSicopolis.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBpddSicopolis.py	(revision 24240)
@@ -27,4 +27,5 @@
         self.rlaps = 0
         self.isfirnwarming = 0
+        self.steps_per_step = 1
         self.requested_outputs = []
 
@@ -99,4 +100,5 @@
             md = checkfield(md, 'fieldname', 'smb.precipitation', 'timeseries', 1, 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices + 1, 12])
 
+        md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1])
         md = checkfield(md, 'fieldname', 'smb.requested_outputs', 'stringrow', 1)
 
@@ -109,17 +111,19 @@
 
         string = "%s\n%s" % (string, fielddisplay(self, 'monthlytemperatures', 'monthly surface temperatures [K]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'precipitation', 'monthly surface precipitation [m / yr water eq]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'precipitation', 'monthly surface precipitation [m/yr water eq]'))
         string = "%s\n%s" % (string, fielddisplay(self, 'temperature_anomaly', 'anomaly to monthly reference temperature (additive [K])'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'precipitation_anomaly', 'anomaly to monthly precipitation (multiplicative, e.g. q = q0 * exp(0.070458 * DeltaT) after Huybrechts (2002)) [no unit])'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'smb_corr', 'correction of smb after PDD call [m / a]'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'precipitation_anomaly', 'anomaly to monthly precipitation (multiplicative, e.g. q = q0*exp(0.070458*DeltaT) after Huybrechts (2002)) [no unit])'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'smb_corr', 'correction of smb after PDD call [m/a]'))
         string = "%s\n%s" % (string, fielddisplay(self, 's0p', 'should be set to elevation from precip source (between 0 and a few 1000s m, default is 0) [m]'))
         string = "%s\n%s" % (string, fielddisplay(self, 's0t', 'should be set to elevation from temperature source (between 0 and a few 1000s m, default is 0) [m]'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'rlaps', 'present day lapse rate (default is 7.4 degree / km)'))
-        string = "%s\n%s" % (string, fielddisplay(self, 'desfac', 'desertification elevation factor (default is - log(2.0) / 1000)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'rlaps', 'present day lapse rate (default is 7.4 degree/km)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'desfac', 'desertification elevation factor (default is -log(2.0)/1000)'))
         string = "%s\n%s" % (string, fielddisplay(self, 'isfirnwarming', 'is firnwarming (Reeh 1991) activated (0 or 1, default is 1)'))
+        string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'))
         string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested (TemperaturePDD, SmbAccumulation, SmbMelt)'))
     # }}}
 
     def marshall(self, prefix, md, fid):  # {{{
+
         yts = md.constants.yts
 
@@ -132,11 +136,12 @@
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'rlaps', 'format', 'Double')
 
-        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'monthlytemperatures', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
+        WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'monthlytemperatures', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'precipitation', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'temperature_anomaly', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'precipitation_anomaly', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
         WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'smb_corr', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer')
 
-    #process requested outputs
+        #process requested outputs
         outputs = self.requested_outputs
         pos = np.where('default' in outputs)
Index: /issm/trunk-jpl/src/m/classes/SMBsemic.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/SMBsemic.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/SMBsemic.m	(revision 24240)
@@ -5,5 +5,5 @@
 
 classdef SMBsemic
-	properties (SetAccess=public) 
+	properties (SetAccess=public)
 		dailysnowfall		= NaN;
 		dailyrainfall		= NaN;
@@ -19,4 +19,5 @@
 		rdl					= 0;
 		s0gcm					= NaN;
+		steps_per_step = 1;
 		requested_outputs = {};
 	end
@@ -78,4 +79,5 @@
 				md = checkfield(md,'fieldname','smb.dailytemperature','timeseries',1,'NaN',1,'Inf',1);
 			end
+			md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]);
 			md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1);
 
@@ -83,16 +85,16 @@
 		function disp(self) % {{{
 			disp(sprintf('   surface forcings parameters:'));
-			
+
 			disp(sprintf('   Interface for coupling GCM data to the energy balance model SEMIC (Krapp et al (2017) https://doi.org/10.5194/tc-11-1519-2017).'));
-			disp(sprintf('   The implemented coupling uses daily mean GCM input to calculate yearly mean smb, accumulation, ablation, and surface temperature.')); 
+			disp(sprintf('   The implemented coupling uses daily mean GCM input to calculate yearly mean smb, accumulation, ablation, and surface temperature.'));
 			disp(sprintf('   smb and temperatures are updated every year'));
 			disp(sprintf('\n   SEMIC parameters:'));
-			fielddisplay(self,'dailysnowfall','daily surface dailysnowfall [m/s]'); 
+			fielddisplay(self,'dailysnowfall','daily surface dailysnowfall [m/s]');
 			fielddisplay(self,'dailyrainfall','daily surface dailyrainfall [m/s]');
 			fielddisplay(self,'dailydsradiation','daily downwelling shortwave radiation [W/m2]');
 			fielddisplay(self,'dailydlradiation','daily downwelling longwave radiation [W/m2]');
-			fielddisplay(self,'dailywindspeed','daily surface wind speed [m/s]'); 
+			fielddisplay(self,'dailywindspeed','daily surface wind speed [m/s]');
 			fielddisplay(self,'dailypressure','daily surface pressure [Pa]');
-			fielddisplay(self,'dailyairdensity','daily air density [kg/m3]'); 
+			fielddisplay(self,'dailyairdensity','daily air density [kg/m3]');
 			fielddisplay(self,'dailyairhumidity','daily air specific humidity [kg/kg]');
 			fielddisplay(self,'dailytemperature','daily surface air temperature [K]');
@@ -101,8 +103,9 @@
 			fielddisplay(self,'rdl','longwave downward radiation decrease (default is 0.29 [W/m^2/km]; Marty et al. 2002)');
 			fielddisplay(self,'s0gcm','GCM reference elevation; (default is 0) [m]');
+			fielddisplay(self, 'steps_per_step', 'number of smb steps per time step');
 			fielddisplay(self,'requested_outputs','additional outputs requested');
 		end % }}}
 		function marshall(self,prefix,md,fid) % {{{
-			
+
 			WriteData(fid,prefix,'name','md.smb.model','data',12,'format','Integer');
 
@@ -120,5 +123,5 @@
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','dailyairhumidity','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
 			WriteData(fid,prefix,'object',self,'class','smb','fieldname','dailytemperature','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts);
-			
+			WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer');
 			%process requested outputs
 			outputs = self.requested_outputs;
Index: /issm/trunk-jpl/src/m/classes/clusters/generic.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/generic.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/clusters/generic.py	(revision 24240)
@@ -22,5 +22,4 @@
 
     def __init__(self, *args):  # {{{
-
         self.name = ''
         self.login = ''
@@ -116,5 +115,4 @@
 
         else:  # Windows
-
             fid = open(modelname + '.bat', 'w')
             fid.write('@echo off\n')
@@ -156,5 +154,4 @@
 
         else:    # Windows
-
             fid = open(modelname + '.bat', 'w')
             fid.write('@echo off\n')
Index: /issm/trunk-jpl/src/m/classes/clusters/stallo.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/stallo.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/clusters/stallo.py	(revision 24240)
@@ -47,5 +47,4 @@
     #use provided options to change fields
         options = pairoptions(*args)
-
     #initialize cluster using user settings if provided
         self = stallo_settings(self)
@@ -111,5 +110,4 @@
         d, h = divmod(h, 60)
         timestring = "%02d-%02d:%02d:%02d" % (d, h, m, s)
-
         fid = open(modelname + '.queue', 'w')
         fid.write('#!/bin/bash -l\n')
Index: /issm/trunk-jpl/src/m/classes/debug.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/debug.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/debug.py	(revision 24240)
@@ -20,4 +20,5 @@
 
     #}}}
+
     def __repr__(self):  # {{{
         string = "   debug parameters:"
Index: /issm/trunk-jpl/src/m/classes/hydrologydc.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/hydrologydc.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/hydrologydc.m	(revision 24240)
@@ -64,12 +64,12 @@
 		% }}}
     function list = defaultoutputs(self,md) % {{{
-        list = {'SedimentHeadHydrostep','SedimentHeadResidual','EffectivePressureHydrostep'};
+        list = {'SedimentHead','SedimentHeadResidual','EffectivePressure'};
         if self.isefficientlayer,
-            list=[list,{'EplHeadHydrostep','HydrologydcMaskEplactiveNode','HydrologydcMaskEplactiveElt','EplHeadSlopeX','EplHeadSlopeY','HydrologydcEplThicknessHydrostep'}];
+            list=[list,{'EplHead','HydrologydcMaskEplactiveNode','HydrologydcMaskEplactiveElt','EplHeadSlopeX','EplHeadSlopeY','HydrologydcEplThickness'}];
         end
         if self.steps_per_step>1,
-            list = [list,'EffectivePressure','SedimentHead'];
+            list = [list,'EffectivePressureSubstep','SedimentHeadSubstep'];
             if self.isefficientlayer,
-                list = [list,'EplHead','HydrologydcEplThickness'];
+                list = [list,'EplHeadSubstep','HydrologydcEplThicknessSubstep'];
             end
         end
@@ -98,7 +98,7 @@
 			self.sedimentlimit_flag       = 0;
 			self.sedimentlimit            = 0;
-			self.transfer_flag            = 0;
+			self.transfer_flag            = 1;
 			self.unconfined_flag          = 0;
-			self.leakage_factor           = 10.0;
+			self.leakage_factor           = 1.0e-10;
       self.requested_outputs        = {'default'};
 
Index: /issm/trunk-jpl/src/m/classes/hydrologydc.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/hydrologydc.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/hydrologydc.py	(revision 24240)
@@ -128,7 +128,7 @@
         self.sedimentlimit_flag = 0
         self.sedimentlimit = 0
-        self.transfer_flag = 0
+        self.transfer_flag = 1
         self.unconfined_flag = 0
-        self.leakage_factor = 10.0
+        self.leakage_factor = 1.0e-10
         self.requested_outputs = ['default']
         self.sediment_compressibility = 1.0e-08
@@ -150,11 +150,11 @@
 
     def defaultoutputs(self, md):  # {{{
-        list = ['SedimentHeadHydrostep', 'SedimentHeadResidual', 'EffectivePressureHydrostep']
-        if self.isefficientlayer == 1:
-            list.extend(['EplHeadHydrostep', 'HydrologydcMaskEplactiveNode', 'HydrologydcMaskEplactiveElt', 'EplHeadSlopeX', 'EplHeadSlopeY', 'HydrologydcEplThicknessHydrostep'])
+        list = ['SedimentHead', 'SedimentHeadResidual', 'EffectivePressure']
+        if self.isefficientlayer == 1:
+            list.extend(['EplHead', 'HydrologydcMaskEplactiveNode', 'HydrologydcMaskEplactiveElt', 'EplHeadSlopeX', 'EplHeadSlopeY', 'HydrologydcEplThickness'])
         if self.steps_per_step > 1:
-            list.extend(['EffectivePressure', 'SedimentHead'])
+            list.extend(['EffectivePressureSubstep', 'SedimentHeadSubstep'])
             if self.isefficientlayer == 1:
-                list.extend(['EplHead', 'HydrologydcEplThickness'])
+                list.extend(['EplHeadSubstep', 'HydrologydcEplThicknessSubstep'])
         return list
     #}}}
@@ -180,5 +180,5 @@
         md = checkfield(md, 'fieldname', 'hydrology.rel_tol', '>', 0., 'numel', [1])
         md = checkfield(md, 'fieldname', 'hydrology.max_iter', '>', 0., 'numel', [1])
-        md = checkfield(md, 'fieldname', 'hydrology.steps_per_step', '>', 0., 'numel', [1])
+        md = checkfield(md, 'fieldname', 'hydrology.steps_per_step', '>=', 1, 'numel', [1])
         md = checkfield(md, 'fieldname', 'hydrology.sedimentlimit_flag', 'numel', [1], 'values', [0, 1, 2, 3])
         md = checkfield(md, 'fieldname', 'hydrology.transfer_flag', 'numel', [1], 'values', [0, 1])
Index: /issm/trunk-jpl/src/m/classes/linearbasalforcings.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/linearbasalforcings.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/linearbasalforcings.py	(revision 24240)
@@ -40,9 +40,8 @@
         else:
             raise Exception('constructor not supported')
+    #}}}
 
-    #}}}
     def __repr__(self):  # {{{
         string = "   linear basal forcings parameters:"
-
         string = "%s\n%s" % (string, fielddisplay(self, "deepwater_melting_rate", "basal melting rate (positive if melting applied for floating ice whith base < deepwater_elevation) [m/yr]"))
         string = "%s\n%s" % (string, fielddisplay(self, "deepwater_elevation", "elevation of ocean deepwater [m]"))
@@ -53,14 +52,13 @@
         return string
     #}}}
+
     def initialize(self, md):  # {{{
-
         if np.all(np.isnan(self.groundedice_melting_rate)):
             self.groundedice_melting_rate = np.zeros((md.mesh.numberofvertices))
             print("      no basalforcings.groundedice_melting_rate specified: values set as zero")
-
         return self
     #}}}
+
     def setdefaultparameters(self):  # {{{
-
         self.deepwater_melting_rate = 50.0
         self.deepwater_elevation = - 800.0
@@ -70,6 +68,6 @@
         return self
     #}}}
+
     def checkconsistency(self, md, solution, analyses):  # {{{
-
         if 'MasstransportAnalysis' in analyses and not (solution == 'TransientSolution' and not md.transient.ismasstransport):
             md = checkfield(md, 'fieldname', 'basalforcings.groundedice_melting_rate', 'NaN', 1, 'Inf', 1, 'timeseries', 1)
@@ -96,6 +94,6 @@
         return md
     # }}}
+
     def marshall(self, prefix, md, fid):  # {{{
-
         yts = md.constants.yts
 
Index: /issm/trunk-jpl/src/m/classes/verbose.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/verbose.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/classes/verbose.py	(revision 24240)
@@ -24,6 +24,6 @@
           verbose = verbose('module', True, 'solver', False)
 
-    WARNING: some parts of this file are Synchronized with src / c / shared / Numerics / Verbosity.h
-             Do not modify these sections. See src / c / shared / Numerics / README for more info
+    WARNING: some parts of this file are Synchronized with src/c/shared/Numerics/Verbosity.h
+             Do not modify these sections. See src/c/shared/Numerics/README for more info
     """
 
@@ -88,5 +88,4 @@
         s += "   %15s : %s\n" % ('smb', self.smb)
         #ENDDISP
-
         return s
     # }}}
Index: /issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.py
===================================================================
--- /issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.py	(revision 24240)
@@ -36,5 +36,4 @@
     else:
         raise TypeError("solution type: '%s' not supported yet!" % solutiontype)
-
     return analyses
     #}}}
Index: /issm/trunk-jpl/src/m/contrib/defleurian/netCDF/export_netCDF.py
===================================================================
--- /issm/trunk-jpl/src/m/contrib/defleurian/netCDF/export_netCDF.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/contrib/defleurian/netCDF/export_netCDF.py	(revision 24240)
@@ -27,5 +27,5 @@
     dimindex = 1
     dimlist = [2, md.mesh.numberofelements, md.mesh.numberofvertices, np.shape(md.mesh.elements)[1]]
-    print(' == =Creating dimensions == = ')
+    print('===Creating dimensions ===')
     for i in range(0, 4):
         if dimlist[i] not in list(DimDict.keys()):
@@ -38,5 +38,5 @@
     groups = dict.keys(md.__dict__)
     # get all model classes and create respective groups
-    print(' == =Creating and populating groups == = ')
+    print('===Creating and populating groups===')
     for group in groups:
         NCgroup = NCData.createGroup(str(group))
@@ -104,5 +104,5 @@
     NCData.close()
 
-    # == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
+    #============================================================================
     # Define the variables
 
@@ -176,5 +176,5 @@
     return DimDict
 
-    # == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
+    # ============================================================================
     # retriev the dimension tuple from a dictionnary
 
Index: /issm/trunk-jpl/src/m/dev/devpath.py
===================================================================
--- /issm/trunk-jpl/src/m/dev/devpath.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/dev/devpath.py	(revision 24240)
@@ -5,9 +5,9 @@
 
 #Recover ISSM_DIR and USERNAME
-ISSM_DIR = os.getenv('ISSM_DIR')
+ISSM_DIR = os.getenv('ISSM_DEV_DIR')
 USERNAME = os.getenv('USER')
 JPL_SVN = os.getenv('JPL_SVN')
 if ISSM_DIR is None:
-    raise NameError('"ISSM_DIR" environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!')
+    raise NameError('"ISSM_DEV_DIR" environment variable is empty! You should define ISSM_DEV_DIR in your .cshrc or .bashrc!')
 
     #Go through src / m and append any directory that contains a * .py file to PATH
@@ -37,5 +37,4 @@
         warnings.warn('cluster settings should be in, {} / usr / {}'.format(JPL_SVN, USERNAME))
 
-    #Manual imports for commonly used functions
 from runme import runme  #first because plotmodel may fail
 from plotmodel import plotmodel
Index: /issm/trunk-jpl/src/m/os/issmscpin.py
===================================================================
--- /issm/trunk-jpl/src/m/os/issmscpin.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/os/issmscpin.py	(revision 24240)
@@ -9,5 +9,4 @@
     """
     ISSMSCPIN get packages from host, using scp on unix, and pscp on windows
-
        usage: issmscpin(host, packages, path)
     """
@@ -15,5 +14,4 @@
     #first get hostname
     hostname = gethostname()
-
     #first be sure packages are not in the current directory, this could conflict with pscp on windows.
     #remove warnings in case the files do not exist
@@ -23,8 +21,6 @@
         except OSError as e:
             pass
-
     #if hostname and host are the same, do a simple copy
-    if m.strcmpi(hostname, host):
-
+    if hostname == host:
         for package in packages:
             try:
@@ -32,5 +28,4 @@
             except OSError as e:
                 pass
-
     else:
         if m.ispc():
@@ -41,13 +36,11 @@
             else:
                 raise OSError("issmscpin error message: could not find ISSM_DIR_WIN environment variable.")
-
             username = eval(input('Username: (quoted string) '))
             key = eval(input('Key: (quoted string) '))
-
             for package in packages:
                 try:
                     subprocess.check_call('%s/externalpackages/ssh/pscp.exe -l "%s" -pw "%s" %s:%s %s' % (ISSM_DIR, username, key, host, os.path.join(path, package), os.getcwd()), shell=True)
                 except CalledProcessError as e:
-                    raise CalledProcessError("issmscpin error message: could not call putty pscp.")
+                    raise CalledProcessError("issmscpin error message: could not call putty pscp due to ")
 
         else:
Index: /issm/trunk-jpl/src/m/solve/loadresultsfromdisk.py
===================================================================
--- /issm/trunk-jpl/src/m/solve/loadresultsfromdisk.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/solve/loadresultsfromdisk.py	(revision 24240)
@@ -10,8 +10,7 @@
 
        Usage:
-          md = loadresultsfromdisk(md = False, filename = False)
+          md = loadresultsfromdisk(md=False,filename=False);
     """
-
-    #check number of inputs / outputs
+    #check number of inputs/outputs
     if not md or not filename:
         raise ValueError("loadresultsfromdisk: error message.")
@@ -27,5 +26,5 @@
             md.results = results()
 
-            #load results onto model
+        #load results onto model
         structure = parseresultsfromdisk(md, filename, not md.settings.io_gather)
         if not len(structure):
@@ -40,5 +39,5 @@
         if os.path.exists(md.miscellaneous.name + '.errlog'):
             with open(md.miscellaneous.name + '.errlog', 'r') as f:
-                setattr(getattr(md.results, structure[0].SolutionType)[0], 'errlog', [line[: - 1] for line in f])
+                setattr(getattr(md.results, structure[0].SolutionType)[0], 'errlog', [line[: -1] for line in f])
         else:
             setattr(getattr(md.results, structure[0].SolutionType)[0], 'errlog', [])
@@ -46,5 +45,5 @@
         if os.path.exists(md.miscellaneous.name + '.outlog'):
             with open(md.miscellaneous.name + '.outlog', 'r') as f:
-                setattr(getattr(md.results, structure[0].SolutionType)[0], 'outlog', [line[: - 1] for line in f])
+                setattr(getattr(md.results, structure[0].SolutionType)[0], 'outlog', [line[: -1] for line in f])
         else:
             setattr(getattr(md.results, structure[0].SolutionType)[0], 'outlog', [])
Index: /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.m
===================================================================
--- /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.m	(revision 24239)
+++ /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.m	(revision 24240)
@@ -23,8 +23,8 @@
 counter = 1;
 step    = result.step;
-while ~isempty(result), 
+while ~isempty(result),
 
 	if check_nomoresteps,
-		%check that the new result does not add a step, which would be an error: 
+		%check that the new result does not add a step, which would be an error:
 		if result.step>=1,
 			error('parsing results for a steady-state core, which incorporates transient results!');
@@ -40,5 +40,5 @@
 	%Add result
 	if(result.step==0),
-		%if we have a step = 0, this is a steady state solutoin, don't expect more steps. 
+		%if we have a step = 0, this is a steady state solutoin, don't expect more steps.
 		index = 1;
 		check_nomoresteps=1;
@@ -77,5 +77,5 @@
 results=struct();
 
-%if we have done split I/O, ie, we have results that are fragmented across patches, 
+%if we have done split I/O, ie, we have results that are fragmented across patches,
 %do a first pass, and figure out the structure of results
 result=ReadDataDimensions(fid);
@@ -85,5 +85,5 @@
 	results(result.step).step=result.step;
 	if result.time~=-9999,
-		results(result.step).time=result.time; 
+		results(result.step).time=result.time;
 	end
 
@@ -111,5 +111,5 @@
 	results(result.step).step=result.step;
 	if result.time~=-9999,
-		results(result.step).time=result.time; 
+		results(result.step).time=result.time;
 	end
 
@@ -205,4 +205,6 @@
 	elseif strcmp(fieldname,'SmbRunoff'),
 		field = field*yts;
+	elseif strcmp(fieldname,'SmbRunoffSubstep'),
+		field = field*yts;
 	elseif strcmp(fieldname,'SmbEvaporation'),
 		field = field*yts;
@@ -220,19 +222,19 @@
 		field = field*yts;
 	elseif (strcmp(fieldname,'LoveKernelsReal') | strcmp(fieldname,'LoveKernelsImag')),
-		nlayer = md.materials.numlayers; 
-		degmax = md.love.sh_nmax; 
-		nfreq  = md.love.nfreq; 
-		temp_field = cell(degmax+1,nfreq,nlayer+1,6); 
+		nlayer = md.materials.numlayers;
+		degmax = md.love.sh_nmax;
+		nfreq  = md.love.nfreq;
+		temp_field = cell(degmax+1,nfreq,nlayer+1,6);
 		for ii=1:degmax+1
 			for jj=1:nfreq
 				for kk=1:nlayer+1
-					ll = (ii-1)*(nlayer+1)*6 + ((kk-1)*6+1); 
+					ll = (ii-1)*(nlayer+1)*6 + ((kk-1)*6+1);
 					for mm=1:6
-						temp_field{ii,jj,kk,mm} = field(ll+(mm-1),jj);  
+						temp_field{ii,jj,kk,mm} = field(ll+(mm-1),jj);
 					end
 				end
 			end
 		end
-		field=temp_field; 
+		field=temp_field;
 	end
 
Index: /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.py
===================================================================
--- /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.py	(revision 24239)
+++ /issm/trunk-jpl/src/m/solve/parseresultsfromdisk.py	(revision 24240)
@@ -222,4 +222,6 @@
             field = field * yts
         elif fieldname == 'SmbRunoff':
+            field = field * yts
+        elif fieldname == 'SmbRunoffSubstep':
             field = field * yts
         elif fieldname == 'SmbEvaporation':
Index: /issm/trunk-jpl/test/NightlyRun/runme.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/runme.py	(revision 24239)
+++ /issm/trunk-jpl/test/NightlyRun/runme.py	(revision 24240)
@@ -195,5 +195,5 @@
                             print(('ERROR   difference: {} > {} test id: {} test name: {} field: {}'.format(error_diff, tolerance, id, id_string, fieldname)))
                             errorcount += 1
-                            np.append(erroredtest_list, id)
+                            erroredtest_list.append(id)
                         else:
                             print(('SUCCESS difference: {} < {} test id: {} test name: {} field: {}'.format(error_diff, tolerance, id, id_string, fieldname)))
@@ -228,5 +228,5 @@
 
     if errorcount > 0:
-        print("{} errors were detected in test {}".format(errorcount, erroredtest_list))
+        print("{} errors were detected in test {}".format(errorcount, np.unique(erroredtest_list)))
     return
 
Index: /issm/trunk-jpl/test/NightlyRun/test330.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test330.py	(revision 24239)
+++ /issm/trunk-jpl/test/NightlyRun/test330.py	(revision 24240)
@@ -53,3 +53,3 @@
 field_names = ['SedimentWaterHead1', 'SedimentWaterHead2']
 field_tolerances = [1e-13, 1e-13]
-field_values = [md.results.TransientSolution[10].SedimentHeadHydrostep, md.results.TransientSolution[30].SedimentHeadHydrostep]
+field_values = [md.results.TransientSolution[10].SedimentHead, md.results.TransientSolution[30].SedimentHead]
Index: /issm/trunk-jpl/test/NightlyRun/test3300.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3300.py	(revision 24239)
+++ /issm/trunk-jpl/test/NightlyRun/test3300.py	(revision 24240)
@@ -66,12 +66,12 @@
 # sedstore = 20.0 * store
 # for i in range(0, 4000):
-#       sedvol[i] = np.mean(md.results.TransientSolution[i].SedimentHead) * sedstore
-#       eplvol[i] = np.mean(md.results.TransientSolution[i].EplHead) * store * np.mean(md.results.TransientSolution[i].HydrologydcEplThicknessHydrostep)
-#       totvol[i + 1] = totvol[i] + md.basalforcings.groundedice_melting_rate[0, i] * 0.002
+#       sedvol[i]=np.mean(md.results.TransientSolution[i].SedimentHead)*sedstore
+#       eplvol[i]=np.mean(md.results.TransientSolution[i].EplHead)*store*np.mean(md.results.TransientSolution[i].HydrologydcEplThicknessSubstep)
+#       totvol[i+1]=totvol[i]+md.basalforcings.groundedice_melting_rate[0, i]*0.002
 
 field_names = ['SedimentWaterHead5', 'EplWaterHead5', 'SedimentWaterHead40', 'EplWaterHead40']
 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13]
-field_values = [md.results.TransientSolution[5].SedimentHeadHydrostep,
-                md.results.TransientSolution[5].EplHeadHydrostep,
-                md.results.TransientSolution[40].SedimentHeadHydrostep,
-                md.results.TransientSolution[40].EplHeadHydrostep]
+field_values = [md.results.TransientSolution[5].SedimentHeadSubstep,
+                md.results.TransientSolution[5].EplHeadSubstep,
+                md.results.TransientSolution[40].SedimentHeadSubstep,
+                md.results.TransientSolution[40].EplHeadSubstep]
Index: /issm/trunk-jpl/test/NightlyRun/test332.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test332.py	(revision 24239)
+++ /issm/trunk-jpl/test/NightlyRun/test332.py	(revision 24240)
@@ -46,3 +46,3 @@
 field_names = ['SedimentWaterHead', 'SedimentHeadResidual']
 field_tolerances = [1e-13, 3e-10]
-field_values = [md.results.HydrologySolution.SedimentHeadHydrostep, md.results.HydrologySolution.SedimentHeadResidual]
+field_values = [md.results.HydrologySolution.SedimentHead, md.results.HydrologySolution.SedimentHeadResidual]
Index: /issm/trunk-jpl/test/NightlyRun/test333.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test333.py	(revision 24239)
+++ /issm/trunk-jpl/test/NightlyRun/test333.py	(revision 24240)
@@ -10,4 +10,5 @@
 from solve import *
 from generic import generic
+
 
 md = triangle(model(), '../Exp/Square.exp', 100000.)
@@ -26,4 +27,5 @@
 md.hydrology.sedimentlimit_flag = 1
 md.hydrology.sedimentlimit = 800.0
+md.hydrology.transfer_flag = 0
 md.hydrology.mask_thawed_node = np.ones((md.mesh.numberofvertices))
 md.initialization.sediment_head = np.zeros((md.mesh.numberofvertices))
@@ -52,15 +54,8 @@
 #re-run with no substeps
 mdfine = copy.deepcopy(md)
-mdfine.result = []
+mdfine.results = []
 mdfine.hydrology.steps_per_step = 1
 mdfine.timestepping.time_step = 0.2
 mdfine = solve(mdfine, 'Transient')
-
-
-sedmean = mdfine.results.TransientSolution[0].SedimentHeadHydrostep
-eplmean = mdfine.results.TransientSolution[0].EplHeadHydrostep
-for i in range(1, 10):
-    sedmean = sedmean + (mdfine.results.TransientSolution[i].SedimentHeadHydrostep)
-    eplmean = eplmean + (mdfine.results.TransientSolution[i].EplHeadHydrostep)
 
 field_names = ['SedimentWaterHead1', 'EplWaterHead1', 'SedimentHeadResidual1',
@@ -68,21 +63,26 @@
                'SedimentWaterHead5', 'EplWaterHead5', 'SedimentHeadResidual5',
                'SedimentWaterHead9', 'EplWaterHead9', 'SedimentHeadResidual9',
-               'EplWaterHead10']
+               'EplWaterHead10', 'EplWaterHeadSubstep10', 'SedimentWaterHead10',
+               'SedimentWaterHeadSubstep10']
 field_tolerances = [1e-13, 1e-13, 1e-13,
                     1e-13, 1e-13, 1e-13,
                     1e-13, 5e-12, 1e-11,
                     1e-13, 5e-12, 1e-11,
+                    1e-13, 1e-13, 1e-13,
                     1e-13]
-field_values = [mdfine.results.TransientSolution[0].SedimentHeadHydrostep,
-                mdfine.results.TransientSolution[0].EplHeadHydrostep,
+field_values = [mdfine.results.TransientSolution[0].SedimentHead,
+                mdfine.results.TransientSolution[0].EplHead,
                 mdfine.results.TransientSolution[0].SedimentHeadResidual,
-                mdfine.results.TransientSolution[3].SedimentHeadHydrostep,
-                mdfine.results.TransientSolution[3].EplHeadHydrostep,
+                mdfine.results.TransientSolution[3].SedimentHead,
+                mdfine.results.TransientSolution[3].EplHead,
                 mdfine.results.TransientSolution[3].SedimentHeadResidual,
-                mdfine.results.TransientSolution[4].SedimentHeadHydrostep,
-                mdfine.results.TransientSolution[4].EplHeadHydrostep,
+                mdfine.results.TransientSolution[4].SedimentHead,
+                mdfine.results.TransientSolution[4].EplHead,
                 mdfine.results.TransientSolution[4].SedimentHeadResidual,
-                mdfine.results.TransientSolution[8].SedimentHeadHydrostep,
-                mdfine.results.TransientSolution[8].EplHeadHydrostep,
+                mdfine.results.TransientSolution[8].SedimentHead,
+                mdfine.results.TransientSolution[8].EplHead,
                 mdfine.results.TransientSolution[8].SedimentHeadResidual,
-                md.results.TransientSolution[-1].EplHead]
+                md.results.TransientSolution[-1].EplHead,
+                md.results.TransientSolution[-1].EplHeadSubstep,
+                md.results.TransientSolution[-1].SedimentHead,
+                md.results.TransientSolution[-1].SedimentHeadSubstep]
Index: /issm/trunk-jpl/test/NightlyRun/test334.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test334.py	(revision 24239)
+++ /issm/trunk-jpl/test/NightlyRun/test334.py	(revision 24240)
@@ -46,3 +46,3 @@
 field_names = ['SedimentWaterHead', 'SedimentHeadResidual']
 field_tolerances = [1e-13, 3e-10]
-field_values = [md.results.HydrologySolution.SedimentHeadHydrostep, md.results.HydrologySolution.SedimentHeadResidual]
+field_values = [md.results.HydrologySolution.SedimentHead, md.results.HydrologySolution.SedimentHeadResidual]
Index: /issm/trunk-jpl/test/NightlyRun/test335.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test335.py	(revision 24239)
+++ /issm/trunk-jpl/test/NightlyRun/test335.py	(revision 24240)
@@ -26,4 +26,5 @@
 md.hydrology.isefficientlayer = 1
 md.hydrology.sedimentlimit_flag = 1
+md.hydrology.transfer_flag = 0
 md.hydrology.sedimentlimit = 800.0
 md.hydrology.mask_thawed_node = np.ones((md.mesh.numberofvertices))
@@ -58,14 +59,14 @@
                     1e-13, 5e-12, 2e-11,
                     1e-13, 5e-12, 2e-11]
-field_values = [md.results.TransientSolution[0].SedimentHeadHydrostep,
-                md.results.TransientSolution[0].EplHeadHydrostep,
+field_values = [md.results.TransientSolution[0].SedimentHead,
+                md.results.TransientSolution[0].EplHead,
                 md.results.TransientSolution[0].SedimentHeadResidual,
-                md.results.TransientSolution[3].SedimentHeadHydrostep,
-                md.results.TransientSolution[3].EplHeadHydrostep,
+                md.results.TransientSolution[3].SedimentHead,
+                md.results.TransientSolution[3].EplHead,
                 md.results.TransientSolution[3].SedimentHeadResidual,
-                md.results.TransientSolution[4].SedimentHeadHydrostep,
-                md.results.TransientSolution[4].EplHeadHydrostep,
+                md.results.TransientSolution[4].SedimentHead,
+                md.results.TransientSolution[4].EplHead,
                 md.results.TransientSolution[4].SedimentHeadResidual,
-                md.results.TransientSolution[8].SedimentHeadHydrostep,
-                md.results.TransientSolution[8].EplHeadHydrostep,
+                md.results.TransientSolution[8].SedimentHead,
+                md.results.TransientSolution[8].EplHead,
                 md.results.TransientSolution[8].SedimentHeadResidual]
