Leases (Tables)
   | 
3 Months Ended | 
Mar. 31, 2020  | 
| Leases [Abstract] | 
 
 | 
| Schedule of Assets and Liabilities, Lessee | 
 
Included in energy assets are financing lease assets and accumulated depreciation of financing lease assets.  Financing lease assets consist of the following: 
 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
 | 
March 31, | 
 | 
December 31, | 
 
|   | 
2020 | 
 | 
2019 | 
 
| Financing lease assets | 
$ | 
42,402  | 
  | 
 | 
$ | 
42,402  | 
  | 
 
| Less - accumulated depreciation and amortization | 
(6,800) | 
  | 
 | 
(6,268) | 
  | 
 
| Financing lease assets, net | 
$ | 
35,602  | 
  | 
 | 
$ | 
36,134  | 
  | 
 
  These adjustments are detailed as follows:
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
 | 
As of January 1, 2019 | 
 | 
 | 
 | 
 | 
 
 | 
As Reported | 
 | 
842 Adjustment | 
 | 
Adjusted Balances | 
 
| Operating Leases: | 
 | 
 | 
 | 
 | 
 | 
 
| Operating lease assets | 
$ | 
—  | 
  | 
 | 
$ | 
31,639  | 
  | 
 | 
$ | 
31,639  | 
  | 
 
| Current portions of operating lease liabilities | 
—  | 
  | 
 | 
5,084  | 
  | 
 | 
5,084  | 
  | 
 
| Long-term portions of operating lease liabilities | 
—  | 
  | 
 | 
28,480  | 
  | 
 | 
28,480  | 
  | 
 
| Total operating lease liabilities | 
$ | 
—  | 
  | 
 | 
$ | 
33,564  | 
  | 
 | 
$ | 
33,564  | 
  | 
 
| Weighted-average remaining lease term | 
 | 
 | 
 | 
 | 
10 years | 
 
| Weighted-average discount rate  | 
 | 
 | 
 | 
 | 
6.0  | 
% | 
 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Financing Leases: | 
 | 
 | 
 | 
 | 
 | 
 
| Energy assets, net  | 
  | 
$ | 
38,263  | 
  | 
 | 
$ | 
—  | 
  | 
 | 
$ | 
38,263  | 
  | 
 
| Current portions of financing lease liabilities  | 
  | 
4,956  | 
  | 
 | 
—  | 
  | 
 | 
4,956  | 
  | 
 
| Long-term financing lease liabilities, net of current portions and of deferred financing fees  | 
  | 
28,407  | 
  | 
 | 
—  | 
  | 
 | 
28,407  | 
  | 
 
| Total financing lease liabilities | 
$ | 
33,363  | 
  | 
 | 
$ | 
—  | 
  | 
 | 
$ | 
33,363  | 
  | 
 
| Weighted-average remaining lease term  | 
 | 
 | 
 | 
 | 
18 years | 
 
| Weighted-average discount rate  | 
 | 
 | 
 | 
 | 
11.7  | 
% | 
 
 
Supplemental balance sheet information related to leases at March 31, 2020 and December 31, 2019 is as follows: 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
 | 
March 31, 2020 | 
 | 
December 31, 2019 | 
 
| Operating Leases: | 
 | 
 | 
 | 
 
| Operating lease assets | 
$ | 
32,444  | 
  | 
 | 
$ | 
32,791  | 
  | 
 
| Current operating lease liabilities | 
5,360  | 
  | 
 | 
5,802  | 
  | 
 
| Long-term portions of operating lease liabilities | 
29,104  | 
  | 
 | 
29,101  | 
  | 
 
| Total operating lease liabilities | 
$ | 
34,464  | 
  | 
 | 
$ | 
34,903  | 
  | 
 
| Weighted-average remaining lease term | 
11 years | 
 | 
11 years | 
 
| Weighted-average discount rate  | 
6.4  | 
% | 
 | 
6.3  | 
% | 
 
 | 
 | 
 | 
 | 
 
| Financing Leases: | 
 | 
 | 
 | 
 
| Energy assets, net  | 
  | 
$ | 
35,602  | 
  | 
 | 
$ | 
36,134  | 
  | 
 
| Current portions of financing lease liabilities | 
4,906  | 
  | 
 | 
4,997  | 
  | 
 
| Long-term financing lease liabilities, less current portions and net of deferred financing fees  | 
  | 
23,472  | 
  | 
 | 
23,500  | 
  | 
 
| Total financing lease liabilities | 
$ | 
28,378  | 
  | 
 | 
$ | 
28,497  | 
  | 
 
| Weighted-average remaining lease term  | 
17 years | 
 | 
17 years | 
 
| Weighted-average discount rate  | 
11.8  | 
% | 
 | 
11.8  | 
% | 
 
  
 | 
| Schedule of Lease Costs | 
 The costs related to our leases are as follows: 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
 | 
 | 
 | 
Three Months Ended March 31, 2020 | 
 | 
Three Months Ended March 31, 2019 | 
 
| Operating Lease: | 
 | 
 | 
 | 
 | 
 | 
 
| Operating lease costs | 
 | 
 | 
$ | 
1,826  | 
  | 
 | 
$ | 
1,838  | 
  | 
 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Financing Lease: | 
 | 
 | 
 | 
 | 
 | 
 
| Amortization expense | 
 | 
 | 
532  | 
  | 
 | 
532  | 
  | 
 
| Interest on lease liabilities | 
 | 
 | 
801  | 
  | 
 | 
949  | 
  | 
 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Total lease costs | 
 | 
 | 
$ | 
3,159  | 
  | 
 | 
$ | 
3,319  | 
  | 
 
  
 | 
| Schedule of Finance Lease Liability Maturity | 
The Company’s estimated minimum future lease obligations under our leases are as follows: 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
|   | 
Operating Leases | 
 | 
Financing Leases | 
 
| Year ended December 31, | 
  | 
 | 
 | 
 
| 2020 | 
$ | 
5,816  | 
  | 
 | 
$ | 
7,852  | 
  | 
 
| 2021 | 
6,506  | 
  | 
 | 
6,792  | 
  | 
 
| 2022 | 
5,895  | 
  | 
 | 
5,178  | 
  | 
 
| 2023 | 
4,607  | 
  | 
 | 
3,676  | 
  | 
 
| 2024 | 
3,791  | 
  | 
 | 
2,565  | 
  | 
 
| Thereafter | 
22,723  | 
  | 
 | 
24,080  | 
  | 
 
| Total minimum lease payments | 
$ | 
49,338  | 
  | 
 | 
$ | 
50,143  | 
  | 
 
| Less: interest | 
14,874  | 
  | 
 | 
21,765  | 
  | 
 
| Present value of lease liabilities | 
$ | 
34,464  | 
  | 
 | 
$ | 
28,378  | 
  | 
 
 
 | 
| Schedule of Operating Lease Liability Maturity | 
The Company’s estimated minimum future lease obligations under our leases are as follows: 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
|   | 
Operating Leases | 
 | 
Financing Leases | 
 
| Year ended December 31, | 
  | 
 | 
 | 
 
| 2020 | 
$ | 
5,816  | 
  | 
 | 
$ | 
7,852  | 
  | 
 
| 2021 | 
6,506  | 
  | 
 | 
6,792  | 
  | 
 
| 2022 | 
5,895  | 
  | 
 | 
5,178  | 
  | 
 
| 2023 | 
4,607  | 
  | 
 | 
3,676  | 
  | 
 
| 2024 | 
3,791  | 
  | 
 | 
2,565  | 
  | 
 
| Thereafter | 
22,723  | 
  | 
 | 
24,080  | 
  | 
 
| Total minimum lease payments | 
$ | 
49,338  | 
  | 
 | 
$ | 
50,143  | 
  | 
 
| Less: interest | 
14,874  | 
  | 
 | 
21,765  | 
  | 
 
| Present value of lease liabilities | 
$ | 
34,464  | 
  | 
 | 
$ | 
28,378  | 
  | 
 
 
 | 
| Schedule of Amount Related to Sale Leasebacks | 
 A summary of amounts related to sale leasebacks in the Company’s condensed consolidated balance sheets is as follows: 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
 | 
March 31, | 
 | 
December 31, | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
 | 
2020 | 
 | 
2019 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Financing lease assets, net | 
$ | 
35,602  | 
  | 
 | 
$ | 
36,134  | 
  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Deferred loss, short-term, net | 
115  | 
  | 
 | 
115  | 
  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Deferred loss, long-term, net | 
1,773  | 
  | 
 | 
1,801  | 
  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Total deferred loss | 
$ | 
1,888  | 
  | 
 | 
$ | 
1,916  | 
  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Financing lease liabilities, short-term | 
4,906  | 
  | 
 | 
4,997  | 
  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Financing lease liabilities, long-term | 
23,472  | 
  | 
 | 
23,500  | 
  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Total financing lease liabilities | 
$ | 
28,378  | 
  | 
 | 
$ | 
28,497  | 
  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Deferred gain, short-term, net | 
345  | 
  | 
 | 
345  | 
  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Deferred gain, long-term, net | 
5,379  | 
  | 
 | 
5,463  | 
  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
| Total deferred gain | 
$ | 
5,724  | 
  | 
 | 
$ | 
5,808  | 
  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
  
 |