update grid generator to write fluid and non-fluid grids