This project automates the downloading and merging of hourly climate data from NASA POWER API.
β
Downloads hourly weather data (2015β2025)
β
Splits requests into smaller chunks (1 year per request)
β
Cleans and removes unnecessary headers from downloaded CSV files
β
Automatically merges data into a single CSV file
β
Saves cleaned and merged data in organized directories
β
Handles API errors with a retry mechanism
π¦ nasa-power-downloader
βββ π data/ # Stores all data files
β βββ π cleaned/ # Stores cleaned CSV files (without headers)
β βββ π merged/ # Stores the final merged CSV file
βββ π scripts/ # Python scripts for downloading & merging
βββ π README.md # Project documentation
βββ π LICENSE # Open-source license
βββ π config.py # API settings
The following meteorological parameters are included in the downloaded dataset:
| Parameter | Description | Unit |
|---|---|---|
| ALLSKY_SFC_SW_DWN | All Sky Surface Shortwave Downward Irradiance (CERES SYN1deg) | Wh/mΒ² |
| T2M | Temperature at 2 Meters (MERRA-2) | Β°C |
| RH2M | Relative Humidity at 2 Meters (MERRA-2) | % |
| PS | Surface Pressure (MERRA-2) | kPa |
| WS10M | Wind Speed at 10 Meters (MERRA-2) | m/s |
| WD10M | Wind Direction at 10 Meters (MERRA-2) | Degrees |
| WS50M | Wind Speed at 50 Meters (MERRA-2) | m/s |
| WD50M | Wind Direction at 50 Meters (MERRA-2) | Degrees |
| RHOA | Surface Air Density (MERRA-2) | kg/mΒ³ |
| QV10M | Specific Humidity at 10 Meters (MERRA-2) | g/kg |
| CLOUD_AMT | Cloud Amount (CERES SYN1deg) | % |
git clone https://github.com/FahimFBA/nasa-power-downloader.git
cd nasa-power-downloader pip install -r scripts/requirements.txt Edit config.py to change location and parameters.
python scripts/download_nasa_power.py python scripts/merge_csv.py The cleaned files will be saved in:
π data/cleaned/
The final merged dataset will be saved as:
π data/merged/merged_data.csv
This project is licensed under the MIT License. See LICENSE for details.
Md. Fahim Bin Amin β fahimbinamin@gmail.com
GitHub: @FahimFBA