LAUNCESTON, Australia, July 4 (Reuters) - Russia's invasion of Ukraine and hopes of significant economic stimulus in China are combining to boost Australia's commodity exports to record levels, at least for now.

Australia's exports of natural resources are forecast at a record A$405 billion ($275.4 billion) in the 2021-22 financial year, which ended on June 30, and will likely rise to a new high of A$419 billion in 2022-23.

However, the latest Resources and Energy Quarterly from the government forecaster also predicts a fairly steep drop in commodity earnings thereafter to A$338 billion in 2023-24, as the world boosts supply and adapts to the loss of some Russian exports of crude oil, natural gas and coal.

Australia is the world's largest exporter of iron ore, coking coal, liquefied natural gas (LNG) and lithium, while it ranks second in thermal coal and third in gold and in copper ores and concentrates.

The supply disruptions caused by Russia's Feb. 24 invasion of Ukraine has delivered a massive boost to Australia's exports of coal and LNG, as the price of both fuels has either surged to record highs or stayed close to all-time peaks.

At the same time the price of iron ore has remained well above historical levels amid optimism that China, which buys about 70% of global seaborne volumes, will successfully stimulate its economy in the second half of 2022 as it tries to reach the 5.5% annual growth target.

This is putting Australia in a sweet spot for commodity exports, notwithstanding the uncomfortable reality that the sharp rise in earnings is largely brought about by the war and associated misery in Ukraine.

There are risks, chief among them that China's stimulus disappoints, that the world economy slides into recession on the back of high energy prices and tighter monetary policy, and that the loss of Russia's commodity exports as a result of sanctions is not as large as initially expected.

Iron ore, Australia's most valuable commodity export, is perhaps the best barometer of the risks, with the spot price initially jumping after Russia invaded Ukraine, which was the fifth-largest exporter of the raw material for steel.

But after reaching a 2022 high of $160.30 a tonne on March 8, the spot price, as assessed by commodity price reporting agency Argus, started to struggle, before dropping to $109.50 on June 22.

It has since recovered, ending on July 1 at $115.45 a tonne, but it has been experiencing increased volatility, and the day-to-day moves have largely been driven by headlines about Beijing's economic stimulus, or the lack thereof.

The Australian government expects iron ore prices to average $99 a tonne in 2022-23, down from $119 in the 2021-22 fiscal year; that will see export earnings decline from A$133 billion to $116 billion in the current fiscal year.

A 4% decline in the assumed value of the Australian dollar between the two years will help revenues from iron ore and all other commodities.

The weaker global economic outlook is also feeding into a softer price forecast for copper, with the government report expecting the price to decline to average $9,245 a tonne in 2022-23 from $9,670 in 2021-22.

ENERGY BOOST

However, the ongoing energy crisis created by moves by Western countries, especially those in Europe, to wean themselves of Russian supplies is expected to provide a boost to Australia's coal and LNG earnings.

LNG earnings are forecast at A$84 billion in 2022-23, up from A$70 billion in 2021-22, largely on the back of a 22.8% price boost in Australian dollar terms.

Prices of coking coal, used for making steel, are forecast to decline in 2022-23 to $343 a tonne on average, from 2021-22's $400, but an increase in export volumes will lift earnings to A$60 billion from A$58 billion.

Likewise, prices of thermal coal, for electricity generation, are seen dropping to $216 a tonne in 2022-23 from $241 in the prior year, but a lift in shipments to 199 million tonnes from 195 million will help create a small uptick in earnings to A$44 billion from A$39 billion.

The value of exports of lithium, mainly used in batteries, is forecast to almost double in 2022-23 to A$7.8 billion from A$4.1 billion the prior year as volumes rise 24% and the price jumps 31%.

Overall, what the government forecasts show is that Australia is once again well set to weather a global slowdown, at least initially, as its earnings from energy commodities benefit from sanctions on Russia, and on expectations of economic stimulus in China.