यूरोप के तापमान में ट्रेंड की गणना
आप ERA5 डेटासेट का उपयोग करके 1980 से वर्तमान तक यूरोप का औसत तापमान निकालना चाहते हैं. यह डेटा मासिक औसत तापमान और वर्षा का Zarr डेटासेट है, जो latitude और longitude की ग्रिड पर है. Zarr फ़ाइल को इस तरह chunk किया गया है कि डिस्क पर हर सबफ़ाइल में 15 latitudes, 15 longitudes, और 12 months की array होती है.
xarray आपके लिए xr नाम से इम्पोर्ट किया जा चुका है.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Python में Dask के साथ Parallel Programming
अभ्यास निर्देश
xarrayका उपयोग करके"data/era_eu.zarr"डेटासेट खोलें.tempDataArray काlatऔरlonडाइमेंशंस के पार mean निकालें.timeडाइमेंशन पर 12 की विंडो साइज के साथ rolling mean लागू करें.- प्राप्त
temp_rolling_meanटाइम सीरीज़ को प्लॉट करें.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Open the ERA5 dataset
ds = ____
# Select the temperature dataset and take the latitude and longitude mean
temp_timeseries = ds[____].____
# Calculate the 12 month rolling mean
temp_rolling_mean = temp_timeseries.____(____).____()
# Plot the result
____
plt.show()