Not many people here have the situation you describe. But, there are two basic ways you can handle this, depending on how you pay your other bills;
1) Treat is like a mortgage payment. Every month, say, $1000, gets automatically deducted. At the end of the year, if it was a good year, top it off with as much as you can. Advantage to this method; you won't think about it as a variable cost and then you can amass quite a bit in a short time.
OR
2) Track the amount with your income. For example, two months, no income = no deductions. Third month, $15k in income, deduct $3000 ($1000 for that month and $2000 for the previous two months). At every payday, write the biggest check you can. Advantage; you can adjust your costs with your income. Disadvantage; it takes ALOT of discipline to write a big check like that on payday.
Either way you need mental discipline. The good news is that you probably have what it takes if you can handle a 'feast or famine' lifestyle. Most people do not have the courage required to live like that.