Skip to main content

No project description provided

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Indra v0.1.1

A CLI tool for fetching data from open data sources, to be extended to forecast as well. Currently, only the fetching data from CDS and ECPDS is implemented.

Installation

Using Pip

You can install using pip and github directly:

pip install git+https://github.com/dsih-artpark/indra

This will install from the default branch, i.e. production.

Update

pip install --upgrade git+https://github.com/dsih-artpark/indra

Configuration

The application requires two configuration files:

  1. Environment variables file (copy and modify example.env):
cp example.env .env
  1. A YAML file for application settings (copy and modify example.yaml):
cp example.yaml config.yaml

CDS API Setup

  1. Create an account on the Climate Data Store
  2. Accept the Terms of Use
  3. Create a .cdsapirc file in your home directory with your API key:
url: https://cds.climate.copernicus.eu/api/v2
key: YOUR-API-KEY

Usage

Basic Commands

# Fetch CDS data for current month
indra fetch cds config.yaml

# Fetch CDS data with custom date range (specified in yaml)
indra fetch cds config.yaml --custom-date

# Enable debug mode
indra fetch cds config.yaml --debug

# Set custom log level and file
indra --log-level DEBUG --log-file "custom.log" fetch cds config.yaml

Command Options

Global Options

  • --log-level, -l: Set logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
  • --log-file, -f: Specify custom log file

CDS Command Options

  • --current-month/--custom-date, -c/-C: Use current month or dates from config
  • --debug/--no-debug, -d/-D: Enable/disable debug mode

Configuration Files

YAML Configuration

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 settings

Environment Variables

Required 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

Features

  • 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

Development

Prerequisites

  • 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

Setting up Development Environment

Poetry is required for development.

  1. Install development dependencies:
poetry install --with dev
  1. Install documentation dependencies:
poetry install --with docs

Documentation

Build the documentation:

cd docs
make html

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

indrastack-0.1.1.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

indrastack-0.1.1-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

Details for the file indrastack-0.1.1.tar.gz.

File metadata

  • Download URL: indrastack-0.1.1.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Darwin/24.3.0

File hashes

Hashes for indrastack-0.1.1.tar.gz
Algorithm Hash digest
SHA256 55dd1cb12aa022d284fd07bcb41b56060d312eab6a43e707f164da02d91a3e30
MD5 cf933ffc4ca53051ad799da250413da4
BLAKE2b-256 85a9a96d01242f03796f2d4573a4ffc97975d55094bc3050d95866b78a2c4353

See more details on using hashes here.

File details

Details for the file indrastack-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: indrastack-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 36.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Darwin/24.3.0

File hashes

Hashes for indrastack-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bca1b408cdb259b75e3662615fd5d835045b66b0636a33152efa12d3f30f209b
MD5 ce980c5c453535cad8c12e2413047d7f
BLAKE2b-256 cd854259d01263a31e7dfa894c5d89eaf8c6f4945e03e80bb1f9c18dab556dd7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page