Added averain in ncedit.f90