weather P function complete