Potential vorticity (PV) succinctly describes the evolution of large-scale atmospheric flow because of its material conservation and invertibility properties. However, diabatic processes in extratropical cyclones can modify PV and influence both mesoscale weather and the evolution of the synoptic-scale wave pattern. In this investigation, modification of PV by diabatic processes is diagnosed in a Met Office Unified Model (MetUM) simulation of a North Atlantic cyclone using a set of PV tracers. The structure of diabatic PV within the extratropical cyclone is investigated and linked to the processes responsible for it. On the mesoscale, a tripole of diabatic PV is generated across the tropopause fold extending down to the cold front. The structure results from a dipole in heating across the frontal interface due to condensation in the warm conveyor belt flanking the upper side of the fold and evaporation of precipitation in the dry intrusion and below. On isentropic surfaces intersecting the tropopause, positive diabatic PV is generated on the stratospheric side, while negative diabatic PV is generated on the tropospheric side. The stratospheric diabatic PV is generated primarily by long-wave cooling which peaks at the tropopause itself due to the sharp gradient in humidity there. The tropospheric diabatic PV originates locally from the long-wave radiation and non-locally by advection out of the top of heating associated with the large-scale cloud, convection and boundary layer schemes. In most locations there is no diabatic modification of PV at the tropopause itself but diabatic PV anomalies would influence the tropopause indirectly through the winds they induce and subsequent advection. The consequences of this diabatic PV dipole for the evolution of synoptic-scale wave patterns are discussed.