Update gridrec.py