Index: /issm/trunk-jpl/src/c/cores/cores.h
===================================================================
--- /issm/trunk-jpl/src/c/cores/cores.h	(revision 25303)
+++ /issm/trunk-jpl/src/c/cores/cores.h	(revision 25304)
@@ -66,4 +66,5 @@
 void GetStericRate(Vector<IssmDouble> ** psteric_rate_g, FemModel* femmodel);
 void GetDynamicRate(Vector<IssmDouble> ** pdynamic_rate_g, FemModel* femmodel);
+void SetBottomPressure(FemModel* femmodel);
 
 //optimization
Index: /issm/trunk-jpl/src/c/cores/sealevelchange_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/sealevelchange_core.cpp	(revision 25303)
+++ /issm/trunk-jpl/src/c/cores/sealevelchange_core.cpp	(revision 25304)
@@ -169,4 +169,8 @@
 		masks=sealevelrise_core_masks(femmodel);
 
+		/*set bottom pressures:*/
+		SetBottomPressure(femmodel);
+
+
 		/*call eustatic core  (generalized eustatic - Farrel and Clark, Eq 4, 1st, 3rd and 4rd terms on the RHS) */
 		RSLg_eustatic=sealevelrise_core_eustatic(femmodel,masks,&oceanarea); 
@@ -736,4 +740,34 @@
 }
 /*}}}*/
+void SetBottomPressure(FemModel* femmodel){ /*{{{*/
+
+	int dslmodel=-1;
+	int type;
+
+	/*If we are running a dsl mme model, we need to update the bottom pressure first: */
+	femmodel->parameters->FindParam(&dslmodel,DslModelEnum);
+	if(dslmodel==2){
+	
+		IssmDouble modelid;
+		/*figure out the type of DslSeaWaterPressureChangeAtSeaFloor input:*/
+		type=femmodel->inputs2->GetInputObjectEnum(DslSeaWaterPressureChangeAtSeaFloor);
+
+		if(type==DatasetInput2Enum){
+		
+			/*find the DslSeaWaterPressureChangeAtSeaFloor dataset of transient inputs:*/
+			DatasetInput2* dataset_input=femmodel->inputs2->GetDatasetInput2(DslSeaWaterPressureChangeAtSeaFloor);
+		
+			/*Recover modelid:*/
+			femmodel->parameters->FindParam(&modelid,DslModelidEnum);
+			modelid--; //from matlab. 
+		
+			/*Go find the modelid'th transient input:*/
+			TriaInput2* tria_input=dataset_input->GetTriaInputByOffset(reCast<int, IssmDouble>(modelid));
+			/*Plug back into DslSeaWaterPressureChangeAtSeaFloor*/
+			tria_input->ChangeEnum(DslSeaWaterPressureChangeAtSeaFloor);
+		}
+	}
+}
+/*}}}*/
 
 /*support routines:*/
