ionex¶
IONEX ionospheric map downloader.
This submodule contains functionality to download IONEX global ionospheric TEC
maps from NASA CDDIS. The download_ionex() function is the main interface
for retrieving IONEX files for a UTC date range. Product and temporal-resolution
selection are controlled with IonexProduct and IonexResolution.
Functions¶
|
Download IONEX ionospheric map files from NASA CDDIS. |
- download_ionex(start: datetime.datetime, end: datetime.datetime, *, directory: pathlib.Path | str = '~/.tudat/ancillary/ionex', products: Sequence[tudatpy.data_input.data_retrieval.media_corrections.ionex.ionex_downloader.IonexProduct] | None = None, resolution: tudatpy.data_input.data_retrieval.media_corrections.ionex.ionex_downloader.IonexResolution | None = IonexResolution.TWO_HOUR, netrc_path: pathlib.Path | str | None = None, refresh_within_days: int = 7) tudatpy.data_input.data_retrieval.media_corrections._common.DownloadResult[source]¶
Download IONEX ionospheric map files from NASA CDDIS.
Downloads global ionospheric TEC maps in IONEX format for each day in the given date range. Files are fetched from the NASA CDDIS archive, which requires Earthdata credentials in a
.netrcfile.The downloader uses a product priority fallback: for each day it tries the preferred product first (e.g., JPL final), and if that is not available it falls back to the next product in the list (e.g., IGS final, then CODE, etc.). For recent days within
refresh_within_days, the downloader will attempt to upgrade from rapid to final products on subsequent calls.- Parameters:
start (datetime) – Start of the UTC date range (inclusive).
end (datetime) – End of the UTC date range (inclusive).
directory (Path or str, default = "~/.tudat/ancillary/ionex") – Local storage directory (created if needed).
products (sequence of IonexProduct, optional) – Ordered preference list of IONEX products to try. Defaults to all products in priority order (JPL final first, CODE rapid last).
resolution (IonexResolution or None, default = IonexResolution.TWO_HOUR) – Temporal resolution override.
Noneuses each product’s native resolution (e.g., 1 h for CODE, 2 h for JPL).netrc_path (Path or str, optional) – Path to
.netrcfile for CDDIS authentication. Defaults to~/.netrc.refresh_within_days (int, default = 7) – Re-attempt download for days within this window of today to upgrade from rapid to final products.
- Returns:
Result object with
downloaded,existing,failed, andall_filesattributes.- Return type:
- Raises:
AuthenticationError – If no
.netrcfile is found (required for CDDIS access).
Examples
>>> from datetime import datetime >>> from tudatpy.data_input.data_retrieval.media_corrections.ionex import ( ... download_ionex, IonexProduct) >>> >>> # Download with default settings (JPL preferred, 2h resolution) >>> result = download_ionex(datetime(2025, 3, 1), datetime(2025, 3, 7)) >>> print(result.all_files) >>> >>> # Download only JPL products >>> result = download_ionex( ... datetime(2025, 3, 1), datetime(2025, 3, 7), ... products=[IonexProduct.JPL_FINAL, IonexProduct.JPL_RAPID] ... )
Classes¶
|
IONEX analysis centre and solution type, ordered by preference. |
|
Temporal resolution of IONEX maps. |
- class IonexProduct(*values)[source]¶
Bases:
EnumIONEX analysis centre and solution type, ordered by preference.
Each member corresponds to a specific analysis centre (JPL, IGS, CODE, UPC) and solution type (final or rapid). The enum ordering reflects the default priority: final solutions from more precise centres are preferred.
Members¶
- JPL_FINAL
JPL final GIM product (
JPL0OPSFIN). Bi-cubic spline model, Kalman filter, typically highest accuracy. 2-hour resolution.- JPL_RAPID
JPL rapid GIM product (
JPL0OPSRAP). Same method as final, lower latency. 2-hour resolution.- IGS_FINAL
IGS combined final product (
IGS0OPSFIN). Weighted combination of multiple analysis centres. 2-hour resolution.- COD_FINAL
CODE (Bern) final product (
COD0OPSFIN). Spherical harmonic expansion (degree/order 15). 1-hour resolution.- UPC_FINAL
UPC-IonSAT final product (
UPC0OPSFIN). Tomographic model. 2-hour resolution.- IGS_RAPID
IGS combined rapid product (
IGS0OPSRAP). 2-hour resolution.- COD_RAPID
CODE rapid product (
COD0OPSRAP). 1-hour resolution.