Parallelize the grid-calc function
Add docstring