{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Peak Month of Precipitation and Annual Rainfall Trends in India (2000–2024)\n", "\n", "In this notebook, we explore **peak month of precipitation and average annual rainfall** across the Indian Region from 2000 to 2024.\n", "\n", "We use **`varunayan`** to extract monthly total precipitation and raw high-resolution precipitation data (latitude-longitude based) from the ERA5 climate reanalysis dataset.\n", "\n", "We aim to:\n", "- Identify the **month when rainfall peaks** in each region\n", "- Visualize the **peak rainfall month spatially** across India\n", "- Map the **average annual precipitation intensity** across regions\n", "\n", "This study can help identify the peak month of rainfall and its intensity, helpful for agriculture planners and climate enthusiasts." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Step 1: Extract ERA5 Total Precipitation for India\n", "\n", "We use the `varunayan` library to download monthly total precipitation (`tp`) for India from 2000 to 2024 at 0.1° resolution. Unit of precipitation is meters" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[0m\n", "============================================================\u001b[0m\n", "\u001b[0m\u001b[0;34mSTARTING ERA5 SINGLE LEVEL PROCESSING\u001b[0m\u001b[0m\n", "\u001b[0m============================================================\u001b[0m\n", "\u001b[0mRequest ID: rainfall_Indian_region\u001b[0m\n", "\u001b[0mVariables: ['total_precipitation']\u001b[0m\n", "\u001b[0mDate Range: 2000-01-01 to 2024-12-31\u001b[0m\n", "\u001b[0mFrequency: monthly\u001b[0m\n", "\u001b[0mResolution: 0.1°\u001b[0m\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "20cad50c93ce4291b15034ec7f2c3d0f", "version_major": 2, "version_minor": 0 }, "text/plain": [ "66c3fdfa3d3be513f9b637537cea8222.zip: 0%| | 0.00/14.5M [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "3ebfcca1357e40c5ba1581579b785f02", "version_major": 2, "version_minor": 0 }, "text/plain": [ "9bad31012ee0ced1e981a10e7dd70505.zip: 0%| | 0.00/14.6M [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "703acf1385704bfd91ccfbcfae737cf1", "version_major": 2, "version_minor": 0 }, "text/plain": [ "573eda0df6c6b84fa185d76238e2cbba.zip: 0%| | 0.00/14.7M [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[0m\n", "Saving files to output directory: rainfall_Indian_region_output\u001b[0m\n", "\u001b[0m Saved final data to: rainfall_Indian_region_output\\rainfall_Indian_region_monthly_data.csv\u001b[0m\n", "\u001b[0m Saved unique coordinates to: rainfall_Indian_region_output\\rainfall_Indian_region_unique_latlongs.csv\u001b[0m\n", "\u001b[0m Saved raw data to: rainfall_Indian_region_output\\rainfall_Indian_region_raw_data.csv\u001b[0m\n", "\u001b[0m\n", "============================================================\u001b[0m\n", "\u001b[0m\u001b[0;32mPROCESSING COMPLETE\u001b[0m\u001b[0m\n", "\u001b[0m============================================================\u001b[0m\n", "\u001b[0m\n", "\u001b[0;36mRESULTS SUMMARY:\u001b[0m\u001b[0m\n", "\u001b[0m----------------------------------------\u001b[0m\n", "\u001b[0mVariables processed: 1\u001b[0m\n", "\u001b[0mTime period: 2000-01-01 to 2024-12-31\u001b[0m\n", "\u001b[0mFinal output shape: (300, 3)\u001b[0m\n", "\u001b[0mTotal complete processing time: 325.50 seconds\u001b[0m\n", "\u001b[0m\n", "First 5 rows of aggregated data:\u001b[0m\n", "\u001b[0m tp year month\n", "0 0.035323 2000 1\n", "1 0.033074 2000 2\n", "2 0.044064 2000 3\n", "3 0.054206 2000 4\n", "4 0.128884 2000 5\u001b[0m\n", "\u001b[0m\n", "============================================================\u001b[0m\n", "\u001b[0m\u001b[0;34mERA5 SINGLE LEVEL PROCESSING COMPLETED SUCCESSFULLY\u001b[0m\u001b[0m\n", "\u001b[0m============================================================\u001b[0m\n" ] }, { "data": { "text/html": [ "
| \n", " | tp | \n", "year | \n", "month | \n", "
|---|---|---|---|
| 0 | \n", "0.035323 | \n", "2000 | \n", "1 | \n", "
| 1 | \n", "0.033074 | \n", "2000 | \n", "2 | \n", "
| 2 | \n", "0.044064 | \n", "2000 | \n", "3 | \n", "
| 3 | \n", "0.054206 | \n", "2000 | \n", "4 | \n", "
| 4 | \n", "0.128884 | \n", "2000 | \n", "5 | \n", "
| ... | \n", "... | \n", "... | \n", "... | \n", "
| 295 | \n", "0.266228 | \n", "2024 | \n", "8 | \n", "
| 296 | \n", "0.180782 | \n", "2024 | \n", "9 | \n", "
| 297 | \n", "0.133635 | \n", "2024 | \n", "10 | \n", "
| 298 | \n", "0.087241 | \n", "2024 | \n", "11 | \n", "
| 299 | \n", "0.068181 | \n", "2024 | \n", "12 | \n", "
300 rows × 3 columns
\n", "| \n", " | latitude | \n", "longitude | \n", "peak_month | \n", "peak_month_precip | \n", "avg_monsoon_precip | \n", "
|---|---|---|---|---|---|
| 0 | \n", "6.3 | \n", "68.1 | \n", "5 | \n", "205.738712 | \n", "1408.417327 | \n", "
| 1 | \n", "6.3 | \n", "68.2 | \n", "5 | \n", "206.832029 | \n", "1416.722255 | \n", "
| 2 | \n", "6.3 | \n", "68.3 | \n", "5 | \n", "207.830631 | \n", "1422.048801 | \n", "
| 3 | \n", "6.3 | \n", "68.4 | \n", "5 | \n", "208.726855 | \n", "1424.383828 | \n", "
| 4 | \n", "6.3 | \n", "68.5 | \n", "5 | \n", "209.740787 | \n", "1427.170548 | \n", "
| ... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
| 90841 | \n", "37.1 | \n", "97.0 | \n", "7 | \n", "27.636770 | \n", "114.003676 | \n", "
| 90842 | \n", "37.1 | \n", "97.1 | \n", "7 | \n", "29.333958 | \n", "122.099992 | \n", "
| 90843 | \n", "37.1 | \n", "97.2 | \n", "7 | \n", "31.622423 | \n", "132.460268 | \n", "
| 90844 | \n", "37.1 | \n", "97.3 | \n", "7 | \n", "35.038696 | \n", "148.160758 | \n", "
| 90845 | \n", "37.1 | \n", "97.4 | \n", "7 | \n", "38.926897 | \n", "166.562461 | \n", "
90846 rows × 5 columns
\n", "