FahimFBA / nasa-power-downloader

Automate the downloading and merging process from NASA POWER dataset

Home Page:https://fahimfba.github.io/nasa-power-downloader/

Repository from Github https://github.comFahimFBA/nasa-power-downloaderRepository from Github https://github.comFahimFBA/nasa-power-downloader

🌍 NASA POWER Hourly Data Downloader

This project automates the downloading and merging of hourly climate data from NASA POWER API.

πŸš€ Features

βœ… 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


πŸ“‚ Project Structure

πŸ“¦ 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  

πŸ“Š Available Parameters

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) %

πŸ”§ Setup Instructions

1️⃣ Clone the Repository

git clone https://github.com/FahimFBA/nasa-power-downloader.git  
cd nasa-power-downloader  

2️⃣ Install Dependencies

pip install -r scripts/requirements.txt  

3️⃣ Configure Settings (Optional)

Edit config.py to change location and parameters.

4️⃣ Run the Data Downloader

python scripts/download_nasa_power.py  

5️⃣ Clean & Merge Downloaded Files

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


πŸ“œ License

This project is licensed under the MIT License. See LICENSE for details.


πŸ‘¨β€πŸ’» Author

Md. Fahim Bin Amin – fahimbinamin@gmail.com
GitHub: @FahimFBA

About

Automate the downloading and merging process from NASA POWER dataset

https://fahimfba.github.io/nasa-power-downloader/

License:MIT License


Languages

Language:Python 100.0%