dihedral_nharmonic: added writing coefficient by write_data
(cherry picked from commit 618f5c6aa52a41035391654af74c335dd0adf33e)