add write_2d_field_clean method and tests for it