Mapping of grid faults and grid codes