update and new main module for writing csv files
csv writing now correct for grid and uniform data with opt, mult_weight