Update calculate_kernel.f90