The Difference between investment and savings in CA identity

Mathematically speaking the current account is defined as: $$\text{CA}=S-I$$

where $$S$$ is savings and $$I$$ is investment.

We know for a closed economy $$S=I$$ so $$CA=0$$. practically speaking for an open economy what is the difference between these two terms?

Yesterday I gave an example of an economy based on grains of wheat where the real domestic activities were

• Plant wheat grains, grow them and harvest them, getting more grains as a result
• Consume wheat as food
• Store unconsumed wheat for future planting or consumption

In an open economy there are two further possibilities

• Send wheat grains abroad (e.g. exports)
In this open economy, you then get the macroeconomic tautology that the increase in stocks must be equal to production plus imports minus the sum of consumption and use for planting and exports. Rearrange this and you get that saving (production minus use for consumption) minus investment (use for planting plus increase in stocks) must equal exports minus imports (in effect the balance of trade or, if you take into account other foreign income, the current account balance), i.e. $$S-I = X-M$$ or $$CA=S-I$$