Index: /issm/trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h
===================================================================
--- /issm/trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h	(revision 12326)
@@ -103,4 +103,5 @@
 	MaterialsRhoIceEnum,
 	MaterialsRhoWaterEnum,
+	MaterialsRhoFreshwaterEnum,
 	MaterialsMuWaterEnum,
 	MaterialsThermalExchangeVelocityEnum,
@@ -160,4 +161,6 @@
 	SurfaceforcingsPrecipitationEnum,
 	SurfaceforcingsMassBalanceEnum,
+	SurfaceforcingsIspddEnum,
+	SurfaceforcingsMonthlytemperaturesEnum,
 	ThermalMaxiterEnum,
 	ThermalPenaltyFactorEnum,
Index: /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12325)
+++ /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12326)
@@ -109,4 +109,5 @@
 		case MaterialsRhoIceEnum : return "MaterialsRhoIce";
 		case MaterialsRhoWaterEnum : return "MaterialsRhoWater";
+		case MaterialsRhoFreshwaterEnum : return "MaterialsRhoFreshwater";
 		case MaterialsMuWaterEnum : return "MaterialsMuWater";
 		case MaterialsThermalExchangeVelocityEnum : return "MaterialsThermalExchangeVelocity";
@@ -166,4 +167,6 @@
 		case SurfaceforcingsPrecipitationEnum : return "SurfaceforcingsPrecipitation";
 		case SurfaceforcingsMassBalanceEnum : return "SurfaceforcingsMassBalance";
+		case SurfaceforcingsIspddEnum : return "SurfaceforcingsIspdd";
+		case SurfaceforcingsMonthlytemperaturesEnum : return "SurfaceforcingsMonthlytemperatures";
 		case ThermalMaxiterEnum : return "ThermalMaxiter";
 		case ThermalPenaltyFactorEnum : return "ThermalPenaltyFactor";
Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 12325)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 12326)
@@ -89,4 +89,5 @@
 	parameters->AddObject(iomodel->CopyConstantObject(InversionIscontrolEnum));
 	parameters->AddObject(iomodel->CopyConstantObject(InversionTaoEnum));
+	parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsIspddEnum));
 
 	/*some parameters that did not come with the iomodel: */
Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp	(revision 12325)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp	(revision 12326)
@@ -20,4 +20,5 @@
 	int    stabilization;
 	bool   dakota_analysis;
+	bool   ispdd;
 
 	/*Fetch data needed: */
@@ -27,4 +28,5 @@
 	iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum);
 	iomodel->FetchData(1,MeshElementsEnum);
+	iomodel->Constant(&ispdd,SurfaceforcingsIspddEnum);
 
 	/*Update elements: */
@@ -44,5 +46,4 @@
 	iomodel->FetchDataToInput(elements,MaskElementonfloatingiceEnum);
 	iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);
-	iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
 	iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum);
 	iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateCorrectionEnum);
@@ -66,4 +67,13 @@
 		iomodel->FetchDataToInput(elements,TemperatureEnum);
 	}
+	if(ispdd){
+	  iomodel->FetchDataToInput(elements,VyEnum); 
+	  iomodel->FetchDataToInput(elements,ThermalSpctemperatureEnum);
+	  iomodel->FetchDataToInput(elements,SurfaceforcingsPrecipitationEnum);
+	  iomodel->FetchDataToInput(elements,SurfaceforcingsMonthlytemperaturesEnum);
+	}
+	else{
+		iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
+	}
 
 	/*Free data: */
Index: /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12325)
+++ /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12326)
@@ -26,6 +26,6 @@
   double signorm = 5.5;      // signorm : sigma of the temperature distribution for a normal day 
   double siglim;       // sigma limit for the integration which is equal to 2.5 sigmanorm
-  double signormc;     // sigma of the temperature distribution for cloudy day
-  double siglimc=0, siglim0, siglim0c;
+  double signormc = signorm - 0.5;     // sigma of the temperature distribution for cloudy day
+  double siglimc, siglim0, siglim0c;
   double tstep, tsint, tint, tstepc;
   int    NPDMAX = 1504, NPDCMAX = 1454;
@@ -43,8 +43,4 @@
   pds=(double*)xmalloc(NPDCMAX*sizeof(double)+1); 
   
-  
-  // PDD constant
-  siglim = 2.5*signorm; 
-  
   // initialize PDD (creation of a lookup table)
   tstep = 0.1;
@@ -53,4 +49,9 @@
   snormfac = 1.0/(signorm*sqrt(2.0*acos(-1.0)));
   siglim = 2.5*signorm;
+  siglimc = 2.5*signormc;
+  siglim0 =  siglim/DT + 0.5;
+  siglim0c =  siglimc/DT + 0.5;
+  PDup = siglimc+PDCUT;
+
   itm = (int)(2*siglim/DT + 1.5);
   
Index: /issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12325)
+++ /issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12326)
@@ -110,4 +110,5 @@
 	      else if (strcmp(name,"MaterialsRhoIce")==0) return MaterialsRhoIceEnum;
 	      else if (strcmp(name,"MaterialsRhoWater")==0) return MaterialsRhoWaterEnum;
+	      else if (strcmp(name,"MaterialsRhoFreshwater")==0) return MaterialsRhoFreshwaterEnum;
 	      else if (strcmp(name,"MaterialsMuWater")==0) return MaterialsMuWaterEnum;
 	      else if (strcmp(name,"MaterialsThermalExchangeVelocity")==0) return MaterialsThermalExchangeVelocityEnum;
@@ -138,9 +139,9 @@
 	      else if (strcmp(name,"PrognosticMinThickness")==0) return PrognosticMinThicknessEnum;
 	      else if (strcmp(name,"PrognosticPenaltyFactor")==0) return PrognosticPenaltyFactorEnum;
-	      else if (strcmp(name,"PrognosticSpcthickness")==0) return PrognosticSpcthicknessEnum;
          else stage=2;
    }
    if(stage==2){
-	      if (strcmp(name,"PrognosticStabilization")==0) return PrognosticStabilizationEnum;
+	      if (strcmp(name,"PrognosticSpcthickness")==0) return PrognosticSpcthicknessEnum;
+	      else if (strcmp(name,"PrognosticStabilization")==0) return PrognosticStabilizationEnum;
 	      else if (strcmp(name,"PrognosticVertexPairing")==0) return PrognosticVertexPairingEnum;
 	      else if (strcmp(name,"QmuIsdakota")==0) return QmuIsdakotaEnum;
@@ -170,4 +171,6 @@
 	      else if (strcmp(name,"SurfaceforcingsPrecipitation")==0) return SurfaceforcingsPrecipitationEnum;
 	      else if (strcmp(name,"SurfaceforcingsMassBalance")==0) return SurfaceforcingsMassBalanceEnum;
+	      else if (strcmp(name,"SurfaceforcingsIspdd")==0) return SurfaceforcingsIspddEnum;
+	      else if (strcmp(name,"SurfaceforcingsMonthlytemperatures")==0) return SurfaceforcingsMonthlytemperaturesEnum;
 	      else if (strcmp(name,"ThermalMaxiter")==0) return ThermalMaxiterEnum;
 	      else if (strcmp(name,"ThermalPenaltyFactor")==0) return ThermalPenaltyFactorEnum;
@@ -265,5 +268,7 @@
    }
    if(stage==3){
-	      if (strcmp(name,"MacAyeal3dIceFront")==0) return MacAyeal3dIceFrontEnum;
+	      if (strcmp(name,"IntVecParam")==0) return IntVecParamEnum;
+	      else if (strcmp(name,"MacAyeal2dIceFront")==0) return MacAyeal2dIceFrontEnum;
+	      else if (strcmp(name,"MacAyeal3dIceFront")==0) return MacAyeal3dIceFrontEnum;
 	      else if (strcmp(name,"Matice")==0) return MaticeEnum;
 	      else if (strcmp(name,"Matpar")==0) return MatparEnum;
Index: /issm/trunk-jpl/src/c/modules/modules.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/modules.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/modules/modules.h	(revision 12326)
@@ -94,4 +94,5 @@
 #include "./ConstraintsStatex/ConstraintsStatex.h"
 #include "./PointCloudFindNeighborsx/PointCloudFindNeighborsx.h"
+#include "./PositiveDegreeDayx/PositiveDegreeDayx.h"
 #include "./PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.h"
 #include "./Dakotax/Dakotax.h"
@@ -120,4 +121,3 @@
 #include "./VerticesDofx/VerticesDofx.h"
 #include "./VecMergex/VecMergex.h"
-
 #endif
Index: /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12326)
@@ -2277,5 +2277,6 @@
    // PDD and PD constants and variables
    double siglim;          // sigma limit for the integration which is equal to 2.5 sigmanorm
-   double siglimc=0, siglim0, siglim0c;
+   double signormc = signorm - 0.5;     // sigma of the temperature distribution for cloudy day
+   double siglimc, siglim0, siglim0c;
    double PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C)
    double DT = 0.02;
@@ -2323,11 +2324,11 @@
    /*Get material parameters :*/
    rho_ice=matpar->GetRhoIce();
-   rho_water=matpar->GetRhoWater();
-   density=rho_ice/rho_water;
+   //rho_freshwater=matpar->GetRhoWater();
    
-   sconv=(rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months
+   sconv=(1000/rho_ice)/12.; //rhow_rain/rhoi / 12 months
      
      /*PDD constant*/
    siglim = 2.5*signorm; 
+   siglimc = 2.5*signormc;
    siglim0 =  siglim/DT + 0.5;
    siglim0c =  siglimc/DT + 0.5;
Index: /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12326)
@@ -2087,5 +2087,5 @@
 
    int    i,iqj,imonth;
-   double agd[NUMVERTICES];  // surface and basal
+   double agd[NUMVERTICES];             // surface mass balance
    double saccu[NUMVERTICES] = {0};     // yearly surface accumulation
    double smelt[NUMVERTICES] = {0};     // yearly melt
@@ -2096,16 +2096,16 @@
    double sconv; //rhow_rain/rhoi / 12 months
 
-   double  rho_water,rho_ice,density;
-   double lapser=6.5/1000, sealev=0;    // lapse rate. degrees per meter.
-   double desfac = 0.5;                 //desert elevation factor
-   double s0p[NUMVERTICES]={0};         //should be set to elevation from precip source
-   double s0t[NUMVERTICES]={0};         //should be set to elevation from temperature source
+   double rho_water,rho_ice,density;
+   double lapser=6.5/1000, sealev=0;    // lapse rate. degrees per meter. 7.5 lev's 99 paper, 9 Marshall 99 paper
+   double desfac = 0.5;                 // desert elevation factor
+   double s0p[NUMVERTICES]={0};         // should be set to elevation from precip source
+   double s0t[NUMVERTICES]={0};         // should be set to elevation from temperature source
    double st;             // elevation between altitude of the temp record and current altitude
    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
-   double siglimc=0, siglim0, siglim0c;
+   double signormc = signorm - 0.5;     // sigma of the temperature distribution for cloudy day
+   double siglimc, siglim0, siglim0c;
    double PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C)
    double DT = 0.02;
@@ -2124,5 +2124,5 @@
    
    double h[NUMVERTICES],s[NUMVERTICES],ttmp[NUMVERTICES],prectmp[NUMVERTICES]; // ,b[NUMVERTICES]
-   double t[NUMVERTICES][12],prec[NUMVERTICES][12];
+   double t[NUMVERTICES+1][12],prec[NUMVERTICES+1][12];
    double deltm=1/12;
    int    ismon[12]={12,1,2,3,4,5,6,7,8,9,10,11};
@@ -2143,5 +2143,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(SurfaceforcingsMonthlytemperaturesEnum); _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++)
@@ -2153,6 +2165,5 @@
    /*Get material parameters :*/
    rho_ice=matpar->GetRhoIce();
-   rho_water=matpar->GetRhoWater();
-   density=rho_ice/rho_water;
+   rho_water=matpar->GetRhoFreshwater();
    
    sconv=(rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months
@@ -2160,4 +2171,5 @@
      /*PDD constant*/
    siglim = 2.5*signorm; 
+   siglimc = 2.5*signormc; 
    siglim0 =  siglim/DT + 0.5;
    siglim0c =  siglimc/DT + 0.5;
@@ -2184,5 +2196,5 @@
        else {q = 1.0;}
        
-       qmt[i]= qmt[i] + prec[i][imonth]*sconv;  //*sconv to convert in m of ice equivalent 
+       qmt[i]= qmt[i] + prec[i][imonth]*sconv;  //*sconv to convert in m of ice equivalent per month
        qmpt= q*prec[i][imonth]*sconv;           
        qmp[i]= qmp[i] + qmpt;
Index: /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12326)
@@ -49,4 +49,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-jpl/src/c/objects/Inputs/ControlInput.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12326)
@@ -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-jpl/src/c/objects/Inputs/DatasetInput.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12326)
@@ -49,4 +49,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-jpl/src/c/objects/Inputs/DoubleInput.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12326)
@@ -48,4 +48,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-jpl/src/c/objects/Inputs/Input.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Inputs/Input.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Inputs/Input.h	(revision 12326)
@@ -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-jpl/src/c/objects/Inputs/IntInput.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12326)
@@ -49,4 +49,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-jpl/src/c/objects/Inputs/PentaP1Input.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12326)
@@ -49,4 +49,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-jpl/src/c/objects/Inputs/TransientInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12326)
@@ -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;
@@ -114,5 +85,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::ObjectEnum{{{1*/
+/*FUNCTION TransientInput::ObjectEnum{{{*/
 int TransientInput::ObjectEnum(void){
 
@@ -121,5 +92,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::copy{{{1*/
+/*FUNCTION TransientInput::copy{{{*/
 Object* TransientInput::copy() {
 
@@ -140,5 +111,5 @@
 	
 /*TransientInput management*/
-/*FUNCTION TransientInput::InstanceEnum{{{1*/
+/*FUNCTION TransientInput::InstanceEnum{{{*/
 int TransientInput::InstanceEnum(void){
 
@@ -147,5 +118,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::SpawnTriaInput{{{1*/
+/*FUNCTION TransientInput::SpawnTriaInput{{{*/
 Input* TransientInput::SpawnTriaInput(int* indices){
 
@@ -167,5 +138,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::SpawnResult{{{1*/
+/*FUNCTION TransientInput::SpawnResult{{{*/
 ElementResult* TransientInput::SpawnResult(int step, double time){
 
@@ -185,7 +156,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;
 
@@ -200,8 +170,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){
 
@@ -221,10 +202,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){
 	
@@ -246,5 +227,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){
 
@@ -264,5 +274,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::InfinityNorm{{{1*/
+/*FUNCTION TransientInput::InfinityNorm{{{*/
 double TransientInput::InfinityNorm(void){
 
@@ -284,5 +294,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::Max{{{1*/
+/*FUNCTION TransientInput::Max{{{*/
 double TransientInput::Max(void){
 
@@ -304,5 +314,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::MaxAbs{{{1*/
+/*FUNCTION TransientInput::MaxAbs{{{*/
 double TransientInput::MaxAbs(void){
 
@@ -325,5 +335,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::Min{{{1*/
+/*FUNCTION TransientInput::Min{{{*/
 double TransientInput::Min(void){
 
@@ -346,5 +356,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::MinAbs{{{1*/
+/*FUNCTION TransientInput::MinAbs{{{*/
 double TransientInput::MinAbs(void){
 
@@ -366,5 +376,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::GetVectorFromInputs{{{1*/
+/*FUNCTION TransientInput::GetVectorFromInputs{{{*/
 void TransientInput::GetVectorFromInputs(Vector* vector,int* doflist){
 
@@ -383,5 +393,5 @@
 
 } /*}}}*/
-/*FUNCTION TransientInput::GetTimeInput{{{1*/
+/*FUNCTION TransientInput::GetTimeInput{{{*/
 Input* TransientInput::GetTimeInput(double intime){
 
@@ -442,5 +452,5 @@
 }
 /*}}}*/
-/*FUNCTION TransientInput::Configure{{{1*/
+/*FUNCTION TransientInput::Configure{{{*/
 void TransientInput::Configure(Parameters* parameters){
 	this->parameters=parameters;
Index: /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12326)
@@ -51,4 +51,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-jpl/src/c/objects/Inputs/TriaP1Input.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12326)
@@ -49,4 +49,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");};
Index: /issm/trunk-jpl/src/c/objects/Materials/Matpar.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Materials/Matpar.cpp	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Materials/Matpar.cpp	(revision 12326)
@@ -25,7 +25,8 @@
 Matpar::Matpar(int matpar_mid, IoModel* iomodel){
 
-	this->mid                       = matpar_mid;
+	this->mid = matpar_mid;
 	iomodel->Constant(&this->rho_ice,MaterialsRhoIceEnum);
 	iomodel->Constant(&this->rho_water,MaterialsRhoWaterEnum);
+	iomodel->Constant(&this->rho_freshwater,MaterialsRhoFreshwaterEnum);
 	iomodel->Constant(&this->mu_water,MaterialsMuWaterEnum);
 	iomodel->Constant(&this->heatcapacity,MaterialsHeatcapacityEnum);
@@ -60,4 +61,5 @@
 	printf("   rho_ice: %g\n",rho_ice);
 	printf("   rho_water: %g\n",rho_water);
+	printf("   rho_freshwater: %g\n",rho_freshwater);
 	printf("   mu_water: %g\n",mu_water);
 	printf("   heatcapacity: %g\n",heatcapacity);
@@ -76,19 +78,5 @@
 void Matpar::DeepEcho(void){
 
-	printf("Matpar:\n");
-	printf("   mid: %i\n",mid);
-	printf("   rho_ice: %g\n",rho_ice);
-	printf("   rho_water: %g\n",rho_water);
-	printf("   mu_water: %g\n",mu_water);
-	printf("   heatcapacity: %g\n",heatcapacity);
-	printf("   thermalconductivity: %g\n",thermalconductivity);
-	printf("   latentheat: %g\n",latentheat);
-	printf("   beta: %g\n",beta);
-	printf("   meltingpoint: %g\n",meltingpoint);
-	printf("   referencetemperature: %g\n",referencetemperature);
-	printf("   mixed_layer_capacity: %g\n",mixed_layer_capacity);
-	printf("   thermal_exchange_velocity: %g\n",thermal_exchange_velocity);
-	printf("   g: %g\n",g);
-	return;
+	this->Echo();
 }		
 /*}}}1*/
@@ -158,49 +146,40 @@
 			this->rho_ice=constant;
 			break;
-
 		case MaterialsRhoWaterEnum:
 			this->rho_water=constant;
 			break;
-
+		case MaterialsRhoFreshwaterEnum:
+			this->rho_freshwater=constant;
+			break;
 		case MaterialsMuWaterEnum:
 			this->mu_water=constant;
 			break;
-
 		case MaterialsHeatcapacityEnum:
 			this->heatcapacity=constant;
 			break;
-
 		case MaterialsThermalconductivityEnum:
 			this->thermalconductivity=constant;
 			break;
-
 		case  MaterialsLatentheatEnum:
 			this->latentheat=constant;
 			break;
-
 		case  MaterialsBetaEnum:
 			this->beta=constant;
 			break;
-
 		case  MaterialsMeltingpointEnum:
 			this->meltingpoint=constant;
 			break;
-
 		case  ConstantsReferencetemperatureEnum:
 			this->referencetemperature=constant;
 			break;
-
 		case  MaterialsMixedLayerCapacityEnum:
 			this->mixed_layer_capacity=constant;
 			break;
-
 		case  MaterialsThermalExchangeVelocityEnum:
 			this->thermalconductivity=constant;
 			break;
-
 		case  ConstantsGEnum:
 			this->g=constant;
 			break;
-
 		default: 
 			break;
@@ -277,4 +256,9 @@
 double Matpar::GetRhoWater(){
 	return rho_water;
+}
+/*}}}1*/
+/*FUNCTION Matpar::GetRhoFreshwater {{{1*/
+double Matpar::GetRhoFreshwater(){
+	return rho_freshwater;
 }
 /*}}}1*/
Index: /issm/trunk-jpl/src/c/objects/Materials/Matpar.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Materials/Matpar.h	(revision 12325)
+++ /issm/trunk-jpl/src/c/objects/Materials/Matpar.h	(revision 12326)
@@ -15,7 +15,8 @@
 
 	private: 
-		int	mid;
-		double	rho_ice; 
-		double	rho_water;
+		int	  mid;
+		double  rho_ice; 
+		double  rho_water;
+		double  rho_freshwater;
 		double  mu_water;
 		double  heatcapacity;
@@ -72,4 +73,5 @@
 		double GetRhoIce();
 		double GetRhoWater();
+		double GetRhoFreshwater();
 		double GetMuWater();
 		double GetMixedLayerCapacity();
Index: /issm/trunk-jpl/src/c/solutions/prognostic_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/prognostic_core.cpp	(revision 12325)
+++ /issm/trunk-jpl/src/c/solutions/prognostic_core.cpp	(revision 12326)
@@ -16,4 +16,5 @@
 	/*parameters: */
 	bool save_results;
+	bool ispdd;
 
 	/*activate formulation: */
@@ -22,8 +23,14 @@
 	/*recover parameters: */
 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+	femmodel->parameters->FindParam(&ispdd,SurfaceforcingsIspddEnum);
+
+	if(ispdd){
+	  _printf_(VerboseSolution(),"   call positive degree day module\n");
+	  PositiveDegreeDayx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+	}	
 
 	_printf_(VerboseSolution(),"   call computational core\n");
 	solver_linear(femmodel);
-		
+	
 	if(save_results){
 		_printf_(VerboseSolution(),"   saving results\n");
Index: /issm/trunk-jpl/src/m/classes/clusters/acenet.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/acenet.m	(revision 12326)
+++ /issm/trunk-jpl/src/m/classes/clusters/acenet.m	(revision 12326)
@@ -0,0 +1,165 @@
+%ACENET class definition
+%
+%   Usage:
+%      cluster=acenet();
+%      cluster=acenet('np',3);
+%      cluster=acenet('np',3,'login','username');
+
+classdef acenet
+    properties (SetAccess=public) 
+		 % {{{1
+		 name='glacdyn.ace-net.ca'
+		 %name='placentia.ace-net.ca'
+		 %name='brasdor.ace-net.ca'
+		 login='klemorza';
+		 np=10;
+		 port=0;
+		 queue='shortq';
+		 time=10;
+		 % codepath='/usr/local/issm-r11321/bin'; % this one is for issm on acenet global
+		 codepath='/home/klemorza/issm/bin'; % this one is for issm on my acenet directory
+		 executionpath='/home/klemorza/issm/execution';
+		 %}}}
+	 end
+	 methods
+		 function cluster=acenet(varargin) % {{{1
+			 %use provided options to change fields
+			 options=pairoptions(varargin{:});
+
+			 %initialize cluster using user settings if provided
+			 if (exist([cluster.name '_settings'])==2), eval([cluster.name '_settings']); end
+
+			 %OK get other fields
+			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
+		 end
+		 %}}}
+		 function disp(cluster) % {{{1
+			 %  display the object
+			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+			 disp(sprintf('    login: %s',cluster.login));
+			 disp(sprintf('    np: %i',cluster.np));
+			 disp(sprintf('    port: %i',cluster.port));
+			 disp(sprintf('    queue: %s',cluster.queue));
+			 disp(sprintf('    time: %i',cluster.time));
+			 disp(sprintf('    codepath: %s',cluster.codepath));
+			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+		 end
+		 %}}}
+		 function checkconsistency(cluster,md,solution,analyses) % {{{1
+
+			 available_queues={'debug','shortq','longq'};
+			 queue_requirements_time=[60*1 60*3 60*17];
+			 queue_requirements_np=[32 128 256];
+
+			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,md) % {{{1
+
+			 %retrieve parameters 
+			 modelname=md.miscellaneous.name; 
+			 solution=md.private.solution;
+
+			 %open file for writing: 
+			 fid=fopen([modelname '.queue'],'w');
+
+          %write instructions for launching a job on the cluster
+          % fprintf(fid,'#!/bin/sh\n');
+			 fprintf(fid,'#!/bin/bash\n');
+          %fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
+          %         cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
+			 fprintf(fid,'#$ -cwd\n');
+          fprintf(fid,'#$ -N issm\n');
+          %fprintf(fid,'#$ -l h_rt=%i\n',cluster.time);
+          fprintf(fid,'#$ -l h_rt=10:0:0\n');
+          %fprintf(fid,'#$ -l h_rt=1:0:0,test=true\n');
+          fprintf(fid,'#$ -pe ompi* %i\n',cluster.np);
+          fprintf(fid,'#$ -j y\n');
+          fprintf(fid,'module purge\n');
+          fprintf(fid,'module load gcc openmpi/gcc\n');
+          fprintf(fid,'module load issm\n');
+          fprintf(fid,'\n');
+          %fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+          fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
+                   cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
+
+          % fprintf(fid,'#PBS -l select=%i:ncpus=1\n',cluster.np);
+			 % fprintf(fid,'#PBS -N %s\n',modelname);
+			 % fprintf(fid,'#PBS -l walltime=%i\n',time*60); %walltime is in seconds.
+			 % fprintf(fid,'#PBS -q %s\n',queue);
+			 % fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+			 % fprintf(fid,'#PBS -e %s.errlog \n',modelname);
+			 % fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
+			 % fprintf(fid,'cd $PBS_O_WORKDIR\n');
+			 % fprintf(fid,'export OMP_NUM_THREADS=1\n');
+			 % fprintf(fid,'ulimit -s unlimited\n');
+			 % fprintf(fid,'ulimit -c 0\n');
+			 % fprintf(fid,'/opt/mpich/gm/intel10.1/bin/mpiexec -np %i %s/issm.exe %s %s %s',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+
+			 %close file
+			 fclose(fid);
+
+		 end
+		 %}}}
+		 function LaunchQueueJob(cluster,md,options)% {{{1
+			  %retrieve parameters 
+          modelname=md.miscellaneous.name;
+          solution=md.private.solution;
+
+			 %lauch command, to be executed via ssh
+			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' md.private.runtimename ' && mkdir ' md.private.runtimename ...
+			                ' && cd ' md.private.runtimename ' && mv ../' md.private.runtimename '.tar.gz ./ && tar -zxf ' md.private.runtimename '.tar.gz  && qsub ' modelname '.queue '];
+
+			if ~strcmpi(options.batch,'yes'),
+				
+				%compress the files into one zip.
+				compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue '  md.miscellaneous.name '.petsc '];
+				if md.qmu.isdakota,
+					compressstring=[compressstring md.miscellaneous.name '.qmu.in'];
+				end
+				system(compressstring);
+				
+				disp('uploading input file and queueing script');
+				issmscpout(md.cluster.name,md.cluster.executionpath,md.cluster.login,md.cluster.port,{[md.private.runtimename '.tar.gz']});
+				
+				disp('launching solution sequence on remote cluster');
+				issmssh(md.cluster.name,md.cluster.login,md.cluster.port,launchcommand);
+
+			else
+				disp('batch mode requested: not launching job interactively');
+				disp('launch solution sequence on remote cluster by hand');
+			end
+
+		 end
+		 %}}}
+		 function Download(cluster,md)% {{{1
+
+			%some check
+			if isempty(md.private.runtimename),
+				error('pfe Download error message: supply runtime name for results to be loaded!');
+			end
+
+			%Figure out the  directory where all the files are in: 
+			directory=[cluster.executionpath '/' md.private.runtimename '/'];
+
+			%What packages are we picking up from remote cluster
+			packages={[md.miscellaneous.name '.outlog'],[md.miscellaneous.name '.errlog']};
+			%packages={};
+			if md.qmu.isdakota,
+				packages{end+1}=[md.miscellaneous.name '.qmu.err'];
+				packages{end+1}=[md.miscellaneous.name '.qmu.out'];
+				if isfield(md.qmu.params,'tabular_graphics_data'),
+					if md.qmu.params.tabular_graphics_data==true,
+						packages{end+1}='dakota_tabular.dat'; 
+					end
+				end
+			else
+				packages{end+1}=[md.miscellaneous.name '.outbin'];
+			end
+
+			%copy files from cluster to present directory
+			issmscpin(cluster.name, cluster.login, cluster.port, directory, packages);
+		end %}}}
+	end
+end
Index: /issm/trunk-jpl/src/m/classes/materials.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/materials.m	(revision 12325)
+++ /issm/trunk-jpl/src/m/classes/materials.m	(revision 12326)
@@ -8,4 +8,5 @@
 		rho_ice                    = 0;
 		rho_water                  = 0;
+		rho_freshwater             = 0;
 		mu_water                   = 0;
 		heatcapacity               = 0;
@@ -34,6 +35,9 @@
 			obj.rho_ice=917;
 
-			%water density (kg/m^3)
+			%ocean water density (kg/m^3)
 			obj.rho_water=1023;
+
+			%fresh water density (kg/m^3)
+			obj.rho_freshwater=1000;
 
 			%water viscosity (N.s/m^2)
@@ -68,4 +72,5 @@
 			checkfield(md,'materials.rho_ice','>',0);
 			checkfield(md,'materials.rho_water','>',0);
+			checkfield(md,'materials.rho_freshwater','>',0);
 			checkfield(md,'materials.mu_water','>',0);
 			checkfield(md,'materials.rheology_B','>',0,'size',[md.mesh.numberofvertices 1]);
@@ -77,5 +82,6 @@
 
 			fielddisplay(obj,'rho_ice','ice density [kg/m^3]');
-			fielddisplay(obj,'rho_water','water density [kg/m^3]');
+			fielddisplay(obj,'rho_water','ocean water density [kg/m^3]');
+			fielddisplay(obj,'freshrho_water','fresh water density [kg/m^3]');
 			fielddisplay(obj,'mu_water','water viscosity [N s/m^2]');
 			fielddisplay(obj,'heatcapacity','heat capacity [J/kg/K]');
@@ -93,4 +99,5 @@
 			WriteData(fid,'object',obj,'fieldname','rho_ice','format','Double');
 			WriteData(fid,'object',obj,'fieldname','rho_water','format','Double');
+			WriteData(fid,'object',obj,'fieldname','rho_freshwater','format','Double');
 			WriteData(fid,'object',obj,'fieldname','mu_water','format','Double');
 			WriteData(fid,'object',obj,'fieldname','heatcapacity','format','Double');
Index: /issm/trunk-jpl/src/m/classes/surfaceforcings.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/surfaceforcings.m	(revision 12325)
+++ /issm/trunk-jpl/src/m/classes/surfaceforcings.m	(revision 12326)
@@ -8,4 +8,6 @@
 		precipitation = NaN;
 		mass_balance  = NaN;
+		ispdd = 0;
+		monthlytemperatures = NaN;
 	end
 	methods
@@ -19,4 +21,7 @@
 		end % }}}
 		function obj = setdefaultparameters(obj) % {{{
+		  
+		  %pdd method not used in default mode
+		  obj.ispdd=0;
 
 		end % }}}
@@ -24,5 +29,10 @@
 
 			if ismember(PrognosticAnalysisEnum,analyses),
-				checkfield(md,'surfaceforcings.mass_balance','forcing',1,'NaN',1);
+				checkfield(md,'surfaceforcings.ispdd','numel',1,'values',[0 1]);
+				if(obj.ispdd)
+					checkfield(md,'surfaceforcings.monthlytemperatures','forcing',1,'NaN',1);
+				else
+					checkfield(md,'surfaceforcings.mass_balance','forcing',1,'NaN',1);
+				end
 			end
 			if ismember(BalancethicknessAnalysisEnum,analyses),
@@ -35,4 +45,6 @@
 			fielddisplay(obj,'precipitation','surface precipitation [m/yr water eq]');
 			fielddisplay(obj,'mass_balance','surface mass balance [m/yr ice eq]');
+			fielddisplay(obj,'ispdd','is pdd activated (0 or 1, default is 0)');
+			fielddisplay(obj,'monthlytemperatures','monthly surface temperatures required if pdd is activated');
 
 		end % }}}
@@ -40,4 +52,9 @@
 			WriteData(fid,'object',obj,'fieldname','precipitation','format','DoubleMat','mattype',1);
 			WriteData(fid,'object',obj,'fieldname','mass_balance','format','DoubleMat','mattype',1);
+			WriteData(fid,'object',obj,'fieldname','ispdd','format','Boolean');
+			if obj.ispdd,
+				WriteData(fid,'object',obj,'fieldname','monthlytemperatures','format','DoubleMat','mattype',1);
+			end
+
 		end % }}}
 	end
Index: /issm/trunk-jpl/src/m/enum/MaterialsRhoFreshwaterEnum.m
===================================================================
--- /issm/trunk-jpl/src/m/enum/MaterialsRhoFreshwaterEnum.m	(revision 12326)
+++ /issm/trunk-jpl/src/m/enum/MaterialsRhoFreshwaterEnum.m	(revision 12326)
@@ -0,0 +1,11 @@
+function macro=MaterialsRhoFreshwaterEnum()
+%MATERIALSRHOFRESHWATERENUM - Enum of MaterialsRhoFreshwater
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
+%            Please read src/c/EnumDefinitions/README for more information
+%
+%   Usage:
+%      macro=MaterialsRhoFreshwaterEnum()
+
+macro=StringToEnum('MaterialsRhoFreshwater');
Index: /issm/trunk-jpl/src/m/enum/SurfaceforcingsIspddEnum.m
===================================================================
--- /issm/trunk-jpl/src/m/enum/SurfaceforcingsIspddEnum.m	(revision 12326)
+++ /issm/trunk-jpl/src/m/enum/SurfaceforcingsIspddEnum.m	(revision 12326)
@@ -0,0 +1,11 @@
+function macro=SurfaceforcingsIspddEnum()
+%SURFACEFORCINGSISPDDENUM - Enum of SurfaceforcingsIspdd
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
+%            Please read src/c/EnumDefinitions/README for more information
+%
+%   Usage:
+%      macro=SurfaceforcingsIspddEnum()
+
+macro=StringToEnum('SurfaceforcingsIspdd');
Index: /issm/trunk-jpl/src/m/enum/SurfaceforcingsMonthlytemperaturesEnum.m
===================================================================
--- /issm/trunk-jpl/src/m/enum/SurfaceforcingsMonthlytemperaturesEnum.m	(revision 12326)
+++ /issm/trunk-jpl/src/m/enum/SurfaceforcingsMonthlytemperaturesEnum.m	(revision 12326)
@@ -0,0 +1,11 @@
+function macro=SurfaceforcingsMonthlytemperaturesEnum()
+%SURFACEFORCINGSMONTHLYTEMPERATURESENUM - Enum of SurfaceforcingsMonthlytemperatures
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
+%            Please read src/c/EnumDefinitions/README for more information
+%
+%   Usage:
+%      macro=SurfaceforcingsMonthlytemperaturesEnum()
+
+macro=StringToEnum('SurfaceforcingsMonthlytemperatures');
