 	auto Psurf = cuda::Fetch<float>(conf, myTargetInfo->Time(), itsBottomLevel, PParam, myTargetInfo->ForecastType());
 	cuda::PrepareInfo(Psurf, d_Psurf, stream);
 
-	InitializeArray<float>(d_T, himan::MissingFloat(), N, stream);
-	InitializeArray<float>(d_TD, himan::MissingFloat(), N, stream);
-
 	std::vector<float> TD(T.size());
 
-	MixingRatioFinalizeKernel<<<gridSize, blockSize, 0, stream>>>(d_T, d_TD, d_Psurf, d_Tpot, d_MR, N);
+	MixingRatioFinalizeKernel<<<gridSize, blockSize, 0, stream>>>(d_T, d_TD, d_Psurf, d_meanTpot, d_meanMR, N);
 
 	CUDA_CHECK(cudaMemcpyAsync(T.data(), d_T, sizeof(float) * N, cudaMemcpyDeviceToHost, stream));
 	CUDA_CHECK(cudaMemcpyAsync(TD.data(), d_TD, sizeof(float) * N, cudaMemcpyDeviceToHost, stream));
 	CUDA_CHECK(cudaStreamSynchronize(stream));
 
-	CUDA_CHECK(cudaFree(d_Tpot));
-	CUDA_CHECK(cudaFree(d_MR));
+	CUDA_CHECK(cudaFree(d_meanTpot));
+	CUDA_CHECK(cudaFree(d_meanMR));
 	CUDA_CHECK(cudaFree(d_RH));
 	CUDA_CHECK(cudaFree(d_P));
 	CUDA_CHECK(cudaFree(d_T));


	CUDA_CHECK(cudaMalloc((float**)&d_Tpot, N * sizeof(float)));
	CUDA_CHECK(cudaMalloc((float**)&d_MR, N * sizeof(float)));
	CUDA_CHECK(cudaMalloc((float**)&d_T, N * sizeof(float)));
	CUDA_CHECK(cudaMalloc((float**)&d_RH, N * sizeof(float)));
	CUDA_CHECK(cudaMalloc((float**)&d_P, N * sizeof(float)));
	CUDA_CHECK(cudaMalloc((float**)&d_TD, N * sizeof(float)));

	InitializeArray<float>(d_Tpot, himan::MissingFloat(), N, stream);
	InitializeArray<float>(d_MR, himan::MissingFloat(), N, stream);

	std::vector<float> Tpot(N, himan::MissingFloat());
	std::vector<float> MR(N, himan::MissingFloat());

	CUDA_CHECK(cudaHostRegister(reinterpret_cast<void*>(Tpot.data()), sizeof(float) * N, 0));
	CUDA_CHECK(cudaHostRegister(reinterpret_cast<void*>(MR.data()), sizeof(float) * N, 0));

	const auto& Psample = std::get<0>(sourceData);
	const auto& Tsample = std::get<1>(sourceData);


	float* d_Tpot = 0;
	float* d_MR = 0;
	float* d_prevTpot = 0;
	float* d_prevMR = 0;
	float* d_meanTpot = 0;
	float* d_meanMR = 0;
	float* d_range = 0;
	float* d_T = 0;
	float* d_RH = 0;
	float* d_P = 0;
