Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 12298)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 12299)
@@ -2255,5 +2255,4 @@
    double sp;             // elevation between altitude of the prec record and current altitude
 
-
    // PDD and PD constants and variables
    double siglim;          // sigma limit for the integration which is equal to 2.5 sigmanorm
@@ -2295,5 +2294,17 @@
    GetInputListOnVertices(&prectmp[0],SurfaceforcingsPrecipitationEnum);
 
-   for(i=0;i<NUMVERTICES;i++) ttmp[i]=ttmp[i]-273.15; // convertion from Kelvin to celcius
+	/*Recover monthly temperatures*/
+	Input* input=inputs->GetInput(SurfaceforcingsMonthlytemperatures); _assert_(input);
+	GaussTria* gauss=new GaussTria();
+	double time,yts;
+	this->parameters->FindParam(&time,TimeEnum);
+	this->parameters->FindParam(&yts,ConstantsYtsEnum);
+	for(int month=0;month<12;month++){
+		for(int iv=0;iv<NUMVERTICES;iv++){
+			gauss->GaussVertex(iv);
+			input->GetInputValue(&t[iv][month],gauss,time+month/12*yts);
+			t[iv][month]=t[iv][month]-273.15; // conversion from Kelvin to celcius
+		}
+	}
 
    for(i=0;i<NUMVERTICES;i++)
Index: /issm/trunk/src/c/objects/Inputs/BoolInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/BoolInput.h	(revision 12298)
+++ /issm/trunk/src/c/objects/Inputs/BoolInput.h	(revision 12299)
@@ -54,4 +54,5 @@
 		void GetInputValue(double* pvalue);
 		void GetInputValue(double* pvalue,GaussTria* gauss);
+		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussPenta* gauss);
 		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
Index: /issm/trunk/src/c/objects/Inputs/ControlInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/ControlInput.h	(revision 12298)
+++ /issm/trunk/src/c/objects/Inputs/ControlInput.h	(revision 12299)
@@ -59,4 +59,5 @@
 		void GetInputValue(double* pvalue);
 		void GetInputValue(double* pvalue,GaussTria* gauss);
+		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussPenta* gauss);
 		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
Index: /issm/trunk/src/c/objects/Inputs/DatasetInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/DatasetInput.h	(revision 12298)
+++ /issm/trunk/src/c/objects/Inputs/DatasetInput.h	(revision 12299)
@@ -54,4 +54,5 @@
 		void GetInputValue(double* pvalue){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussTria* gauss){_error_("not implemented yet");};
+		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussTria* gauss ,int index);
Index: /issm/trunk/src/c/objects/Inputs/DoubleInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/DoubleInput.h	(revision 12298)
+++ /issm/trunk/src/c/objects/Inputs/DoubleInput.h	(revision 12299)
@@ -53,4 +53,5 @@
 		void GetInputValue(double* pvalue);
 		void GetInputValue(double* pvalue,GaussTria* gauss);
+		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussPenta* gauss);
 		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
Index: /issm/trunk/src/c/objects/Inputs/Input.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/Input.h	(revision 12298)
+++ /issm/trunk/src/c/objects/Inputs/Input.h	(revision 12299)
@@ -27,4 +27,5 @@
 		virtual void GetInputValue(double* pvalue)=0;
 		virtual void GetInputValue(double* pvalue,GaussTria* gauss)=0;
+		virtual void GetInputValue(double* pvalue,GaussTria* gauss,double time)=0;
 		virtual void GetInputValue(double* pvalue,GaussPenta* gauss)=0;
 		virtual void GetInputValue(double* pvalue,GaussTria* gauss ,int index)=0;
Index: /issm/trunk/src/c/objects/Inputs/IntInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/IntInput.h	(revision 12298)
+++ /issm/trunk/src/c/objects/Inputs/IntInput.h	(revision 12299)
@@ -54,4 +54,5 @@
 		void GetInputValue(double* pvalue);
 		void GetInputValue(double* pvalue,GaussTria* gauss);
+		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussPenta* gauss);
 		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
Index: /issm/trunk/src/c/objects/Inputs/PentaP1Input.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/PentaP1Input.h	(revision 12298)
+++ /issm/trunk/src/c/objects/Inputs/PentaP1Input.h	(revision 12299)
@@ -54,4 +54,5 @@
 		void GetInputValue(double* pvalue){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussTria* gauss){_error_("not implemented yet");};
+		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussPenta* gauss);
 		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
Index: /issm/trunk/src/c/objects/Inputs/TransientInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/TransientInput.cpp	(revision 12298)
+++ /issm/trunk/src/c/objects/Inputs/TransientInput.cpp	(revision 12299)
@@ -2,5 +2,5 @@
  * \brief: implementation of the TransientInput object
  */
-/*Headers{{{1*/
+/*Headers{{{*/
 #ifdef HAVE_CONFIG_H
 	#include <config.h>
@@ -19,5 +19,5 @@
 
 /*TransientInput constructors and destructor*/
-/*FUNCTION TransientInput::TransientInput(){{{1*/
+/*FUNCTION TransientInput::TransientInput(){{{*/
 TransientInput::TransientInput(){
 
@@ -30,5 +30,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::TransientInput(int in_enum_type){{{1*/
+/*FUNCTION TransientInput::TransientInput(int in_enum_type){{{*/
 TransientInput::TransientInput(int in_enum_type)
 {
@@ -44,5 +44,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::~TransientInput{{{1*/
+/*FUNCTION TransientInput::~TransientInput{{{*/
 TransientInput::~TransientInput(){
 	xfree((void**)&this->timesteps);
@@ -54,41 +54,12 @@
 }
 /*}}}*/
-/*FUNCTION void TransientInput::AddTimeInput(Input* input,double time){{{1*/
-void TransientInput::AddTimeInput(Input* input,double time){
-
-	/*insert values at time step: */
-	if (this->numtimesteps>0 && time<=this->timesteps[this->numtimesteps-1]) _assert_("timestep values must increase sequentially");
-
-	//copy timesteps, add the new time, delete previous timesteps, and add the new input: inputs->AddObject(input);
-   double* old_timesteps=NULL;
-
-	if (this->numtimesteps > 0){
-		old_timesteps=(double*)xmalloc(this->numtimesteps*sizeof(double));
-		memcpy(old_timesteps,this->timesteps,this->numtimesteps*sizeof(double));
-		xfree((void**)&this->timesteps); 
-	}
-
-	this->numtimesteps=this->numtimesteps+1;
-   this->timesteps=(double*)xmalloc(this->numtimesteps*sizeof(double));
-
-	if (this->numtimesteps > 1){
-		memcpy(this->timesteps,old_timesteps,(this->numtimesteps-1)*sizeof(double));
-		xfree((void**)&old_timesteps);
-	}
-
-	/*go ahead and plug: */
-	this->timesteps[this->numtimesteps-1]=time;
-	inputs->AddObject(input);
-
-}
-/*}}}*/
 
 /*Object virtual functions definitions:*/
-/*FUNCTION TransientInput::Echo {{{1*/
+/*FUNCTION TransientInput::Echo {{{*/
 void TransientInput::Echo(void){
 	this->DeepEcho();
 }
 /*}}}*/
-/*FUNCTION TransientInput::DeepEcho{{{1*/
+/*FUNCTION TransientInput::DeepEcho{{{*/
 void TransientInput::DeepEcho(void){
 
@@ -105,8 +76,8 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::Id{{{1*/
+/*FUNCTION TransientInput::Id{{{*/
 int    TransientInput::Id(void){ return -1; }
 /*}}}*/
-/*FUNCTION TransientInput::MyRank{{{1*/
+/*FUNCTION TransientInput::MyRank{{{*/
 int    TransientInput::MyRank(void){ 
 	extern int my_rank;
@@ -115,5 +86,5 @@
 /*}}}*/
 #ifdef _SERIAL_
-/*FUNCTION TransientInput::Marshall{{{1*/
+/*FUNCTION TransientInput::Marshall{{{*/
 void  TransientInput::Marshall(char** pmarshalled_dataset){
 
@@ -149,5 +120,5 @@
 }
 /*}}}*
-/*FUNCTION TransientInput::MarshallSize{{{1*/
+/*FUNCTION TransientInput::MarshallSize{{{*/
 int   TransientInput::MarshallSize(){
 
@@ -160,5 +131,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::Demarshall{{{1*/
+/*FUNCTION TransientInput::Demarshall{{{*/
 void  TransientInput::Demarshall(char** pmarshalled_dataset){
 
@@ -187,5 +158,5 @@
 /*}}}*/
 #endif
-/*FUNCTION TransientInput::ObjectEnum{{{1*/
+/*FUNCTION TransientInput::ObjectEnum{{{*/
 int TransientInput::ObjectEnum(void){
 
@@ -194,5 +165,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::copy{{{1*/
+/*FUNCTION TransientInput::copy{{{*/
 Object* TransientInput::copy() {
 
@@ -213,5 +184,5 @@
 	
 /*TransientInput management*/
-/*FUNCTION TransientInput::InstanceEnum{{{1*/
+/*FUNCTION TransientInput::InstanceEnum{{{*/
 int TransientInput::InstanceEnum(void){
 
@@ -220,5 +191,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::SpawnTriaInput{{{1*/
+/*FUNCTION TransientInput::SpawnTriaInput{{{*/
 Input* TransientInput::SpawnTriaInput(int* indices){
 
@@ -240,5 +211,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::SpawnResult{{{1*/
+/*FUNCTION TransientInput::SpawnResult{{{*/
 ElementResult* TransientInput::SpawnResult(int step, double time){
 
@@ -258,7 +229,6 @@
 
 /*Object functions*/
-/*FUNCTION TransientInput::GetInputValue(double* pvalue,GaussTria* gauss){{{1*/
+/*FUNCTION TransientInput::GetInputValue(double* pvalue,GaussTria* gauss){{{*/
 void TransientInput::GetInputValue(double* pvalue,GaussTria* gauss){
-	
 	double time;
 
@@ -273,8 +243,19 @@
 
 	delete input;
-
-}
-/*}}}*/
-/*FUNCTION TransientInput::GetInputDerivativeValue(double* p, double* xyz_list, GaussTria* gauss){{{1*/
+}
+/*}}}*/
+/*FUNCTION TransientInput::GetInputValue(double* pvalue,GaussTria* gauss,double time){{{*/
+void TransientInput::GetInputValue(double* pvalue,GaussTria* gauss,double time){
+
+	/*Retrieve interpolated values for this time step: */
+	Input* input=GetTimeInput(time);
+
+	/*Call input function*/
+	input->GetInputValue(pvalue,gauss);
+
+	delete input;
+}
+/*}}}*/
+/*FUNCTION TransientInput::GetInputDerivativeValue(double* p, double* xyz_list, GaussTria* gauss){{{*/
 void TransientInput::GetInputDerivativeValue(double* p, double* xyz_list, GaussTria* gauss){
 
@@ -294,10 +275,10 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::ChangeEnum{{{1*/
+/*FUNCTION TransientInput::ChangeEnum{{{*/
 void TransientInput::ChangeEnum(int newenumtype){
 	this->enum_type=newenumtype;
 }
 /*}}}*/
-/*FUNCTION TransientInput::GetInputAverage{{{1*/
+/*FUNCTION TransientInput::GetInputAverage{{{*/
 void TransientInput::GetInputAverage(double* pvalue){
 	
@@ -319,5 +300,34 @@
 
 /*Intermediary*/
-/*FUNCTION TransientInput::SquareMin{{{1*/
+/*FUNCTION TransientInput::AddTimeInput{{{*/
+void TransientInput::AddTimeInput(Input* input,double time){
+
+	/*insert values at time step: */
+	if (this->numtimesteps>0 && time<=this->timesteps[this->numtimesteps-1]) _assert_("timestep values must increase sequentially");
+
+	//copy timesteps, add the new time, delete previous timesteps, and add the new input: inputs->AddObject(input);
+	double* old_timesteps=NULL;
+
+	if (this->numtimesteps > 0){
+		old_timesteps=(double*)xmalloc(this->numtimesteps*sizeof(double));
+		memcpy(old_timesteps,this->timesteps,this->numtimesteps*sizeof(double));
+		xfree((void**)&this->timesteps); 
+	}
+
+	this->numtimesteps=this->numtimesteps+1;
+	this->timesteps=(double*)xmalloc(this->numtimesteps*sizeof(double));
+
+	if (this->numtimesteps > 1){
+		memcpy(this->timesteps,old_timesteps,(this->numtimesteps-1)*sizeof(double));
+		xfree((void**)&old_timesteps);
+	}
+
+	/*go ahead and plug: */
+	this->timesteps[this->numtimesteps-1]=time;
+	inputs->AddObject(input);
+
+}
+/*}}}*/
+/*FUNCTION TransientInput::SquareMin{{{*/
 void TransientInput::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
 
@@ -337,5 +347,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::InfinityNorm{{{1*/
+/*FUNCTION TransientInput::InfinityNorm{{{*/
 double TransientInput::InfinityNorm(void){
 
@@ -357,5 +367,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::Max{{{1*/
+/*FUNCTION TransientInput::Max{{{*/
 double TransientInput::Max(void){
 
@@ -377,5 +387,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::MaxAbs{{{1*/
+/*FUNCTION TransientInput::MaxAbs{{{*/
 double TransientInput::MaxAbs(void){
 
@@ -398,5 +408,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::Min{{{1*/
+/*FUNCTION TransientInput::Min{{{*/
 double TransientInput::Min(void){
 
@@ -419,5 +429,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::MinAbs{{{1*/
+/*FUNCTION TransientInput::MinAbs{{{*/
 double TransientInput::MinAbs(void){
 
@@ -439,5 +449,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::GetVectorFromInputs{{{1*/
+/*FUNCTION TransientInput::GetVectorFromInputs{{{*/
 void TransientInput::GetVectorFromInputs(Vector* vector,int* doflist){
 
@@ -456,5 +466,5 @@
 
 } /*}}}*/
-/*FUNCTION TransientInput::GetTimeInput{{{1*/
+/*FUNCTION TransientInput::GetTimeInput{{{*/
 Input* TransientInput::GetTimeInput(double intime){
 
@@ -515,5 +525,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::Configure{{{1*/
+/*FUNCTION TransientInput::Configure{{{*/
 void TransientInput::Configure(Parameters* parameters){
 	this->parameters=parameters;
Index: /issm/trunk/src/c/objects/Inputs/TransientInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/TransientInput.h	(revision 12298)
+++ /issm/trunk/src/c/objects/Inputs/TransientInput.h	(revision 12299)
@@ -56,4 +56,5 @@
 		void GetInputValue(double* pvalue){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussTria* gauss);
+		void GetInputValue(double* pvalue,GaussTria* gauss,double time);
 		void GetInputValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
Index: /issm/trunk/src/c/objects/Inputs/TriaP1Input.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/TriaP1Input.h	(revision 12298)
+++ /issm/trunk/src/c/objects/Inputs/TriaP1Input.h	(revision 12299)
@@ -54,4 +54,5 @@
 		void GetInputValue(double* pvalue){_error_("not implemented yet");}
 		void GetInputValue(double* pvalue,GaussTria* gauss);
+		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
 		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
