 	const int num_z=(int)((sim->esp)*(double)sim->grid_size);
 	const int fhd_size = num_x * num_y * num_z;
 
+	const int num_x_tdet = sim->.det.x_temp_numdets;
+  const int num_y_tdet = sim->.det.y_temp_numdets;
+  const long num_tbins = sim->.det.temp_bins;
+  const long timegrid_size = num_x_tdet * num_y_tdet * num_tbins;
+
 	// Copy Rd_xy, Tt_xy and A_xyz
 	CUDA_SAFE_CALL( cudaMemcpy(HostMem->Rd_xy,DeviceMem->Rd_xy,xy_size*sizeof(unsigned long long),cudaMemcpyDeviceToHost) );
 	CUDA_SAFE_CALL( cudaMemcpy(HostMem->Tt_xy,DeviceMem->Tt_xy,xy_size*sizeof(unsigned long long),cudaMemcpyDeviceToHost) );
 
 	// Copy fhd
 	CUDA_SAFE_CALL( cudaMemcpy(HostMem->fhd,DeviceMem->fhd,fhd_size*sizeof(unsigned long long),cudaMemcpyDeviceToHost) );
+
+	// Copy time array
+	CUDA_SAFE_CALL( cudaMemcpy(HostMem->time_xyt,DeviceMem->time_xyt,timegrid_size*sizeof(unsigned long long),cudaMemcpyDeviceToHost) );
 
 	// Copy the state of the RNG's
 	CUDA_SAFE_CALL( cudaMemcpy(HostMem->x,DeviceMem->x,NUM_THREADS*sizeof(unsigned long long),cudaMemcpyDeviceToHost) );

	if(HostMem->fhd==NULL){printf("Error allocating HostMem->fhd"); exit (1);}
	CUDA_SAFE_CALL( cudaMalloc((void**)&DeviceMem->fhd,fhd_size*sizeof(unsigned long long)) );
	CUDA_SAFE_CALL( cudaMemset(DeviceMem->fhd,0,fhd_size*sizeof(unsigned long long)) );

	// Allocate x and a on the device (For MWC RNG)
  CUDA_SAFE_CALL(cudaMalloc((void**)&DeviceMem->x,NUM_THREADS*sizeof(unsigned long long)));

	// Copy bulk method flag
	CUDA_SAFE_CALL( cudaMemcpyToSymbol(bulk_method_dc,&(sim->bulk_method),sizeof(unsigned int)) );

	// Copy time sim flag
	CUDA_SAFE_CALL( cudaMemcpyToSymbol(do_temp_sim_dc,&(sim->do_temp_sim),sizeof(unsigned int)) );


	// Copy det-data to constant device memory
	CUDA_SAFE_CALL( cudaMemcpyToSymbol(det_dc,&(sim->det),sizeof(DetStruct)) );

