Metadata-Version: 2.4
Name: gri-iono-data
Version: 0.2.3
Summary: Ionospheric data pipeline for solar flux and NeQuickG coefficient datasets
Project-URL: Homepage, https://geosolresearch.com
Project-URL: Repository, https://gitlab.com/geosol-foss/python/gri-iono-data
Project-URL: Issues, https://gitlab.com/geosol-foss/python/gri-iono-data/-/issues
Project-URL: Changelog, https://gitlab.com/geosol-foss/python/gri-iono-data/-/releases
Author-email: GeoSol Research Inc <contact@geosolresearch.com>
License-Expression: MIT
License-File: LICENSE
Keywords: NeQuickG,data-pipeline,ionosphere,solar-flux
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Requires-Python: >=3.12
Requires-Dist: georinex>=1.16.0
Requires-Dist: gri-utils>=0.3.3
Requires-Dist: numpy>=2.3.3
Requires-Dist: requests>=2.32.0
Description-Content-Type: text/markdown

[![GeoSol Research Logo](https://geosolresearch.com/logos/foss_logo.png "GeoSol Research")](https://geosolresearch.com)

# Iono Data (Ionospheric Data Processing)

Ionospheric data download and processing tools for generating ionospheric delay datasets used by [gri-iono](https://gitlab.com/geosol-foss/python/gri-iono). Requires Python 3.12+.

## Overview

This package provides scripts for:

- **Downloading solar flux data** from NOAA Space Weather Prediction Center (for bent ionospheric model)
- **Downloading NeQuickG coefficients** from European GNSS Service Centre (for NeQuickG model)
- **Processing solar flux data** to NPZ format for bent iono model
- **Processing NeQuickG coefficients** to NPZ format for NeQuickG model

The output NPZ files are consumed by the `gri-iono` library for ionospheric delay correction calculations.

## Installation

```bash
# Clone and setup
git clone https://gitlab.com/geosol-foss/python/gri-iono-data.git
cd gri-iono-data
uv sync

# Activate environment
source .venv/bin/activate
```

## Usage

### Solar Flux Data (Bent Ionospheric Model)

#### 1. Download Solar Flux Data

Download F10.7 solar flux data from NOAA for a specific date:

```bash
python gri_iono_data/download_solar_flux 2025 03 15
```

**Output:**

- `./data/solar_flux_raw/solar_flux_2025_03_15.json` - Raw solar flux data from NOAA

#### 2. Process Solar Flux Data

Process all unprocessed solar flux data to generate NPZ files:

```bash
python gri_iono_data/update_solar_flux
```

**Output:**

- `./data/solar_flux/solar_flux_2025_03_15.npz` - Processed F10.7 solar flux data

### NeQuickG Coefficients

#### 1. Download NeQuickG Coefficients

Download NeQuickG ionospheric coefficients from GSC for a specific date:

```bash
python gri_iono_data/download_nequickg 2025 03 15
```

**Output:**

- `./data/nequickg_raw/nequickg_2025_03_15.txt` - Raw NeQuickG coefficients from GSC

#### 2. Process NeQuickG Coefficients

Process all unprocessed NeQuickG data to generate NPZ files:

```bash
python gri_iono_data/update_nequickg
```

**Output:**

- `./data/nequickg/nequickg_2025_03_15.npz` - Processed NeQuickG coefficients

## Data Formats

### Solar Flux Data

**Raw Data:**

- F10.7 solar flux index from NOAA SWPC
- JSON format with daily observations
- Units: Solar Flux Units (SFU) where 1 SFU = 10^-22 W/m^2/Hz

**Processed NPZ Files:**

Contains:

- `f107`: F10.7 solar flux value (float)
- `year`, `month`, `day`: Date information
- `observation_time`: ISO format timestamp

### NeQuickG Coefficients

**Raw Data:**

- Effective ionization level (Az) coefficients from European GSC
- Text format with three coefficients: ai0, ai1, ai2
- Broadcast by Galileo satellites

**Processed NPZ Files:**

Contains:

- `ai0`, `ai1`, `ai2`: Individual coefficients
- `coefficients`: Array of all three coefficients
- `year`, `month`, `day`: Date information

## Configuration

All scripts default to `./data/` for input/output but can be configured by modifying the paths in the scripts.

## Data Sources

- **Solar Flux**: NOAA Space Weather Prediction Center (https://www.swpc.noaa.gov/)
- **NeQuickG**: European GNSS Service Centre (https://www.gsc-europa.eu/)

## Project Structure

```
gri-iono-data/
├── gri_iono_data/
│   ├── solar_flux/         # Solar flux data processing
│   │   ├── download.py
│   │   ├── read.py
│   │   ├── process.py
│   │   └── write.py
│   ├── nequickg/           # NeQuickG coefficient processing
│   │   ├── download.py
│   │   ├── read.py
│   │   ├── process.py
│   │   └── write.py
│   ├── file_handling/      # Common utilities
│   │   ├── date_from_filename.py
│   │   ├── available_file_dates.py
│   │   └── unprocessed_file_dates.py
│   ├── download_solar_flux.py    # Main download script
│   ├── download_nequickg.py      # Main download script
│   ├── update_solar_flux.py      # Main processing script
│   └── update_nequickg.py        # Main processing script
├── data/
│   ├── solar_flux_raw/     # Raw solar flux downloads
│   ├── solar_flux/         # Processed solar flux NPZ
│   ├── nequickg_raw/       # Raw NeQuickG downloads
│   └── nequickg/           # Processed NeQuickG NPZ
└── test/                   # Test suite
```

## Other Projects

Current list of other [GRI FOSS Projects](https://gitlab.com/geosol-foss/python/gri-iono-data/-/blob/main/.docs_other_projects.md) we are building and maintaining.

## License

MIT License. See [LICENSE](https://gitlab.com/geosol-foss/python/gri-iono-data/-/blob/main/LICENSE) for details.
