Index: ../trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 19061)
+++ ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 19062)
@@ -693,6 +693,7 @@
 
 		case DivergenceEnum:               this->Divergencex(responses); break;
 		case MaxDivergenceEnum:            this->MaxDivergencex(responses); break;
+		case IceMassEnum:                  this->IceMassx(responses); break;
 		case IceVolumeEnum:                this->IceVolumex(responses); break;
 		case IceVolumeAboveFloatationEnum: this->IceVolumeAboveFloatationx(responses); break;
 		case MinVelEnum:                   this->MinVelx(responses); break;
@@ -776,6 +777,7 @@
 					/*Scalar output*/
 					case DivergenceEnum:               this->Divergencex(&double_result);               break;
 					case MaxDivergenceEnum:            this->MaxDivergencex(&double_result);            break;
+					case IceMassEnum:                this->IceMassx(&double_result);                break;
 					case IceVolumeEnum:                this->IceVolumex(&double_result);                break;
 					case IceVolumeAboveFloatationEnum: this->IceVolumeAboveFloatationx(&double_result); break;
 					case MinVelEnum:                   this->MinVelx(&double_result);                   break;
@@ -1393,6 +1395,22 @@
 	*pmax=uLmax;
 
 }/*}}}*/
+void FemModel::IceMassx(IssmDouble* pM){/*{{{*/
+
+	IssmDouble local_ice_mass = 0;
+	IssmDouble total_ice_mass;
+
+	for(int i=0;i<this->elements->Size();i++){
+		Element* element=xDynamicCast<Element*>(this->elements->GetObjectByOffset(i));
+		local_ice_mass+=element->IceMass();
+	}
+	ISSM_MPI_Reduce(&local_ice_mass,&total_ice_mass,1,ISSM_MPI_DOUBLE,ISSM_MPI_SUM,0,IssmComm::GetComm() );
+	ISSM_MPI_Bcast(&total_ice_mass,1,ISSM_MPI_DOUBLE,0,IssmComm::GetComm());
+
+	/*Assign output pointers: */
+	*pM=total_ice_mass;
+
+}/*}}}*/
 void FemModel::IceVolumex(IssmDouble* pV){/*{{{*/
 
 	IssmDouble local_ice_volume = 0;
Index: ../trunk-jpl/src/c/classes/FemModel.h
===================================================================
--- ../trunk-jpl/src/c/classes/FemModel.h	(revision 19061)
+++ ../trunk-jpl/src/c/classes/FemModel.h	(revision 19062)
@@ -78,6 +78,7 @@
 		void TotalSmbx(IssmDouble* pSmb);
 		void Divergencex(IssmDouble* pdiv);
 		void MaxDivergencex(IssmDouble* pdiv);
+		void IceMassx(IssmDouble* pV);
 		void IceVolumex(IssmDouble* pV);
 		void IceVolumeAboveFloatationx(IssmDouble* pV);
 		void ElementResponsex(IssmDouble* presponse,int response_enum);
