A CLI tool for fetching data from open data sources, to be extended to forecast as well.
The project now supports multiple fetch pipelines (CDS, ECPDS, IMD variants) and processing workflows (process cos, process analyze).
You can install using pip and github directly:
pip install git+https://github.com/dsih-artpark/indraThis will install from the default branch, i.e. production.
pip install --upgrade git+https://github.com/dsih-artpark/indraThe application requires two configuration files:
- Environment variables file (copy and modify
example.env):
cp example.env .env- A YAML file for application settings (copy and modify
example.yaml):
cp example.yaml config.yaml- Create an account on the Climate Data Store
- Accept the Terms of Use
- Create a
.cdsapircfile in your home directory with your API key:
url: https://cds.climate.copernicus.eu/api/v2
key: YOUR-API-KEY# Fetch CDS data for current month
indra fetch cds config.yaml
# Fetch CDS data with custom date range (specified in yaml)
indra fetch cds --custom-date config.yaml
# Enable debug mode
indra fetch cds --debug config.yaml
# Set custom log level and file
indra --log-level DEBUG --log-file "custom.log" fetch cds config.yaml--log-level, -l: Set logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)--log-file, -f: Specify custom log file
--current-month/--custom-date, -c/-C: Use current month or dates from config--debug/--no-debug, -d/-D: Enable/disable debug mode
The YAML configuration file contains settings for:
shared_params:
local_data_dir: "~/.dsih-data/"
email_recipients:
"user@example.com": "User Name"
s3_bucket: 'example-bucket-name'
cds:
# CDS-specific configuration
cds_dataset_name: "reanalysis-era5-single-levels"
bounds_nwse:
ka: [19,74,11,79] # Example bounds
variables:
"2m_temperature": "2t"
# ... other variables
ecpds:
# ECPDS-specific configuration
url: 'https://data.ecmwf.int/forecasts'
# ... other settingsRequired environment variables in .env:
# CDS API Credentials
CDS_URL=https://cds.climate.copernicus.eu/api/v2
CDS_KEY=YOUR_CDS_API_KEY
# AWS S3 Credentials
AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY
AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_KEY
AWS_DEFAULT_REGION=ap-south-1
# Email Configuration
SMTP_SERVER=smtp.gmail.com
PORT=587
EMAIL=your.email@gmail.com
PASSWORD=your_app_specific_password- Fetch ERA5 reanalysis data from CDS
- Download ECMWF operational forecasts
- Automatic S3 upload of downloaded data
- Email notifications for job status
- Configurable logging
- Support for multiple regions and variables
- Automatic file cleanup after S3 upload
- Python 3.11+
- AWS credentials ( if using S3. You can use the api and store files in your own server and skip the s3 set up)
- CDS API access
uv is used for development and dependency management.
- Install development dependencies:
uv sync --group dev- Install documentation dependencies:
uv sync --group docsBuild the documentation:
cd docs
uv run sphinx-build -b html source build/htmlThis project is licensed under the GPL-3.0 License - see the LICENSE file for details.
- Sai Sneha sneha@artpark.in
- Aishwarya R aishwarya@artpark.in
- Akhil Babu akhil@artpark.in
- Swarna AN swarna@artpark.in