added qc flag to write_obs