Skip to main content
Python Version PyPI Conda Documentation Status https://zenodo.org/badge/138034133.svg

viresclient is a Python package which provides access to products (including on-demand processing) from two of ESA’s Earth Explorer missions: Swarm and Aeolus. This service is provided for ESA by EOX. For enquiries about the service and problems with accessing your account, please email info@vires.services. For help with usage, please email ashley.smith@ed.ac.uk or raise an issue on GitHub.

There are two VirES services (Virtual environments for Earth Scientists) which viresclient can communicate with:

Data and models are processed on demand on the VirES server - a combination of measurements from any time interval can be accessed. These are the same data that can be accessed by the VirES GUI. viresclient handles the returned data to allow direct loading as a single pandas.DataFrame, or xarray.Dataset.

from viresclient import SwarmRequest

# Set up connection with server
request = SwarmRequest()
# Set collection to use
# - See https://viresclient.readthedocs.io/en/latest/available_parameters.html
request.set_collection("SW_OPER_MAGA_LR_1B")
# Set mix of products to fetch:
#  measurements (variables from the given collection)
#  models (magnetic model predictions at spacecraft sampling points)
#  auxiliaries (variables available with any collection)
# Optionally set a sampling rate different from the original data
request.set_products(
    measurements=["F", "B_NEC"],
    models=["CHAOS-Core"],
    auxiliaries=["QDLat", "QDLon"],
    sampling_step="PT10S"
)
# Fetch data from a given time interval
# - Specify times as ISO-8601 strings or Python datetime
data = request.get_between(
    start_time="2014-01-01T00:00",
    end_time="2014-01-01T01:00"
)
# Load the data as an xarray.Dataset
ds = data.as_xarray()
<xarray.Dataset>
Dimensions:           (NEC: 3, Timestamp: 360)
Coordinates:
* Timestamp         (Timestamp) datetime64[ns] 2014-01-01 ... 2014-01-01T00:59:50
Dimensions without coordinates: NEC
Data variables:
  Spacecraft        (Timestamp) <U1 'A' 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'
  Latitude          (Timestamp) float64 -1.229 -1.863 -2.496 ... 48.14 48.77
  Longitude         (Timestamp) float64 -14.12 -14.13 -14.15 ... 153.6 153.6
  Radius            (Timestamp) float64 6.878e+06 6.878e+06 ... 6.868e+06
  F                 (Timestamp) float64 2.287e+04 2.281e+04 ... 4.021e+04
  F_CHAOS-Core      (Timestamp) float64 2.287e+04 2.282e+04 ... 4.02e+04
  B_NEC             (Timestamp, NEC) float64 2.01e+04 -4.126e+03 ... 3.558e+04
  B_NEC_CHAOS-Core  (Timestamp, NEC) float64 2.011e+04 ... 3.557e+04
  QDLat             (Timestamp) float64 -11.99 -12.6 -13.2 ... 41.59 42.25
  QDLon             (Timestamp) float64 58.02 57.86 57.71 ... -135.9 -136.0
Attributes:
  Sources:         ['SW_OPER_MAGA_LR_1B_20140101T000000_20140101T235959_050...
  MagneticModels:  ["CHAOS-Core = 'CHAOS-Core'(max_degree=20,min_degree=1)"]
  RangeFilters:    []
https://github.com/ESA-VirES/Swarm-VRE/raw/master/docs/images/VRE_shortest_demo.gif

How to acknowledge VirES

You can reference viresclient directly using the DOI of our zenodo record. VirES uses data from a number of different sources so please also acknowledge these appropriately.

“We use the Python package, viresclient [1], to access [ name the datasets… ] from ESA’s VirES for Swarm service [2]”

[1] Smith, A. R. A., Pačes, M., & Santillan, D. (2025). ESA-VirES/VirES-Python-Client. Zenodo. https://doi.org/10.5281/zenodo.2554162 [2] https://vires.services

(To follow best practices you should cite the specific version that you used - refer to the Zenodo page to find the correct DOI for that version)

Please refer to the Swarm handbook for product references: https://swarmhandbook.earth.esa.int/

You may also wish to cite this paper:

Smith A.R.A., Pačes M. and Swarm DISC (2022) Python tools for ESA’s Swarm mission: VirES for Swarm and surrounding ecosystem. Front. Astron. Space Sci. 9:1002697. doi: 10.3389/fspas.2022.1002697

Metadata

Release files for viresclient 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for viresclient 0.16.0
File Size Uploaded
viresclient-0.16.0.tar.gz 318.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for viresclient 0.16.0
File Interpreter ABI Platform
viresclient-0.16.0-py3-none-any.whl Python 3 none any Details

Total release size: 424.3 kB

Release files / viresclient-0.16.0.tar.gz

Download URL viresclient-0.16.0.tar.gz
Size 318.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e93d1b3b671e4353f3d008e6e5986dbc19329f809e7d9cd1011893d64e61ffee
BLAKE2b-256 checksum
How to use checksums
fedade91cb90939d30b8547c5a3b3853cae841ae8a2ed080d639d8308aa2725b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.33.1

Release files / viresclient-0.16.0-py3-none-any.whl

Download URL viresclient-0.16.0-py3-none-any.whl
Size 106.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
162cf13b74a36cc81fb0f5b5e171faacbf359d51f634aec2785541b414bcc9ba
BLAKE2b-256 checksum
How to use checksums
eca15fbd84b056f6ec167f1c1638469a4d7ba8ae2d05c7f92f94ee47c8e9b8f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.33.1

Release history Release notifications | RSS feed

This release

0.16.0 This release

2 release files

0.15.2

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.11.8

2 release files

0.11.6

2 release files

0.11.5

2 release files

0.11.4

2 release files

0.11.2

2 release files

0.11.0

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.1

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page