gridded data code example in python