dynamic form fitting gridded data