XML 64 R53.htm IDEA: XBRL DOCUMENT v3.7.0.1
Fair Value Measurements - Fair Value Reconciliation Liabilities Using Significant Unobservable Inputs (Level 3) (Details) - NCRA [Member] - Crack Spread Contingent Payment [Member] - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Feb. 28, 2017
Feb. 29, 2016
Feb. 28, 2017
Feb. 29, 2016
Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation, Calculation [Roll Forward]        
Beginning Balance $ 8,281 $ 43,693 $ 15,051 $ 75,982
Ending Balance 2,172 24,155 2,172 24,155
Cost of Goods, Total        
Fair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation, Calculation [Roll Forward]        
Total (gains) losses included in cost of goods sold $ (6,109) $ (19,538) $ (12,879) $ (51,827)