fix the problem in write_scalars() that number of rows is missing in SCALARS line  after 'float'