HS & SS changed to grdm_write, fixed scales, error calculations