Index: /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp	(revision 15024)
+++ /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp	(revision 15025)
@@ -31,12 +31,10 @@
 struct blocks{
 	double aswokm; 
-	double asrpos; 
-	double swok; 
 };
 
 extern "C" { 
-	int distme_( int* pidisk,int* piedge, int* pNtime, int* pNtimp, int* pNtimm, int* pNafter,double* time,double* bi,double* dmi,double* zhload,double* hload);
+	int distme_(int* pNtime,int* pNtimp,int* pNtimm,double* time,double* bi,double* dmi,double* zhload);
 
-	int what0_( int* pidisk,int* piedge,int* pNtimp,int* pNtimm,double* time,double* bi,double* dmi);
+	int what0_(int* piedge,int* pNtimp,int* pNtimm,double* time,double* bi,double* dmi);
 	extern struct blockp blockp_;
 	extern struct blocko blocko_;
@@ -74,13 +72,11 @@
 	int numtimes; //loading history length
 	IssmDouble currenttime;
-	int Ntime=5; // number of times with load history 
-	int Ntimm;  // Ntime-1 : for slope/y-cept of load segments 
+	int Ntime; // number of times with load history 
+	int Ntimm; // Ntime-1 : for slope/y-cept of load segments 
 	int Ntimp; // Ntime+1 : for evaluation time  
-	int Nafter;
 	IssmDouble* blockt_time=NULL;
 	IssmDouble* blockt_bi=NULL;
 	IssmDouble* blockt_dmi=NULL;
 	IssmDouble* blocky_zhload=NULL;
-	IssmDouble* blocko_hload=NULL;
 
 	/*gia material parameters: */
@@ -124,8 +120,7 @@
 	//from our model, irate comes in with values in [1,2], which maps into [0,1] in naruse: 
 	irate=irate-1;
-	Nafter=1;
 	Ntime=numtimes;
 	Ntimm=Ntime-1;
-	Ntimp=Ntime+Nafter;
+	Ntimp=Ntime+1;
 
 	/*Prepare block inputs for fortran distme and what0 routines of the naruse code: {{{*/
@@ -141,26 +136,23 @@
 
 	/*loading history: */
-	blocky_zhload=xNew<IssmDouble>(numtimes);
-	for(i=0;i<numtimes;i++){
+	blocky_zhload=xNew<IssmDouble>(Ntime);
+	for(i=0;i<Ntime;i++){
 	blocky_zhload[i]=hes[i];
 	}
 
-	/*times: */
-	blockt_time=xNew<IssmDouble>(numtimes+1);
-	for (i=0;i<numtimes+1;i++){
-		blockt_time[i]=times[i]/1000.0/yts; //in kyr
-		if(i==numtimes-1)blockt_time[i]=2500.0;                 // in kyr  
-		if(i==numtimes)blockt_time[i]=times[numtimes-1]/1000.0/yts; 
+	/*times in kyr: */
+	blockt_time=xNew<IssmDouble>(Ntimp);
+	for (i=0;i<Ntimp;i++){
+		blockt_time[i]=times[i]/1000.0/yts; 
+		if(i==numtimes-1)blockt_time[i]=times[numtimes-1]/1000.0/yts; // final loading time, same as evaluation time
+		if(i==numtimes)blockt_time[i]=times[numtimes-1]/1000.0/yts;   // evaluation time
 	}
 
 	/*bi: */
-	blockt_bi=xNew<IssmDouble>(numtimes-1);
+	blockt_bi=xNew<IssmDouble>(Ntimm);
 
 	/*dmi: */
-	blockt_dmi=xNew<IssmDouble>(numtimes-1);
+	blockt_dmi=xNew<IssmDouble>(Ntimm);
 	
-	/*hload:*/
-	blocko_hload=xNew<IssmDouble>(numtimes);
-
 	/*irate: */
 	blockn_.irate=irate; 
@@ -171,8 +163,8 @@
 
 	/*Call distme driver: */
-	distme_(&idisk,&iedge,&Ntime,&Ntimp,&Ntimm,&Nafter,blockt_time,blockt_bi,blockt_dmi,blocky_zhload,blocko_hload); 
+	distme_(&Ntime,&Ntimp,&Ntimm,blockt_time,blockt_bi,blockt_dmi,blocky_zhload); 
 
 	/*Call what0 driver: */
-	what0_(&idisk,&iedge,&Ntimp,&Ntimm,blockt_time,blockt_bi,blockt_dmi); 
+	what0_(&iedge,&Ntimp,&Ntimm,blockt_time,blockt_bi,blockt_dmi); 
 
 	/*output solution: */
@@ -193,5 +185,4 @@
 	xDelete<IssmDouble>(blockt_dmi);
 	xDelete<IssmDouble>(blocky_zhload);
-	xDelete<IssmDouble>(blocko_hload);
 
 }
Index: /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/distme.f
===================================================================
--- /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/distme.f	(revision 15024)
+++ /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/distme.f	(revision 15025)
@@ -1,11 +1,10 @@
-      subroutine distme(idisk,iedge,Ntime,Ntimp,Ntimm,Nafter,time,bi,
-     &dmi,zhload,hload)
+      subroutine distme(Ntime,Ntimp,Ntimm,time,bi,dmi,zhload)
       implicit double precision (a-h,o-y)
-      integer idisk,iedge,Ntime,Ntimp,Ntimm,Nafter
-      parameter (N3G = 1)
+      integer Ntime,Ntimp,Ntimm
+      parameter (Nafter=1)
       double precision pset(7)
       double precision time(Ntimp),dmi(Ntimm),bi(Ntimm),dumbt(Ntimp)
       double precision hload(Ntime),qpat(Ntime),qt(Ntime)
-      double precision zradii(N3G),zhload(Ntime),rhoi,distrad
+      double precision zhload(Ntime),rhoi,distrad
 c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
       common /blockp/ pset
@@ -22,5 +21,5 @@
       dumbt(k) = time(k)
   776 continue
-c      write(6,*) time(1), time(2), time(3)
+      write(6,*) time(1), time(2), time(3), time(4),time(5)
 c      write(6,*) pset(1), pset(2), pset(3), pset(4), pset(5), pset(6)
 c      write(6,*) pset(7)
Index: /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/what0.f
===================================================================
--- /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/what0.f	(revision 15024)
+++ /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/what0.f	(revision 15025)
@@ -1,3 +1,3 @@
-      subroutine what0(idisk,iedge,Ntimp,Ntimm,time,bi,dmi)
+      subroutine what0(iedge,Ntimp,Ntimm,time,bi,dmi)
       implicit double precision (a-h,o-z)
       integer Ntimp,Ntimm
@@ -39,5 +39,4 @@
       dk = endk/dfloat(nhank)
 c
-      if(idisk.gt.1) go to 7001
       ak = zero
       do 7000 ik = 1,nhank
@@ -73,5 +72,4 @@
       zksamp(ik) = zkp
  7000 continue
- 7001 continue
 c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 c The following looped call sets up the free solution convolved with the
