A grid code is a technical specification which defines the parameters a facility connected to a public electric grid has to meet to ensure safe, secure and economic proper functioning of the electric system. From Wikipedia