Modify replacement in gsub statement
Modify replacement in gsub statement
Directly write formatted output to the ‘grids’ file