Update gridding.f90

added code to prevent too large of resolution