Skip to main content

Calculate Field Aligned Currents based on swarm data, mainly through the ViRES python interface viresclient. Some utilities for these kinds of scientific calculations are also provided.

Project description

Overview

Documentation Status PyPI Package latest release

The SwarmPyFAC package is used for calculating Geomagnetic Field-Aligned Currents based on cdf-files possibly downloaded via viresclient.

Geomagnetic Field-Aligned Currents are current systems that connect the magnetosphere to the ionosphere, and one of the fundamental interactions between these two regions. These currents, as their name suggests, flow in a direction aligned with the local magnetic field. Swarm is able to estimate these currents using the horizontal component of the magnetic field information alongside a baseline magnetic field estimation. These can then be used with Ampere’s law to determine the currents that flowing in the field-aligned direction. More detailed information on this formulation can be found in Ritter et. al. (2013).

The SwarmPyFAC package contains 2 modules:

  • swarmpyfac.fac, the main module. It contains functions to calculate field aligned currents, and related scientific steps. It is rolled into the main package, so you can call its functionality directly from there.

  • swarmpyfac.utils, the utility module. It contains functions for the underlaying mathematics, and should also be usefull for computing other products.

Installation

Using pip:

pip install swarmpyfac

Dependencies:

  • numpy

  • cdflib

  • viresclient

  • matplotlib

  • scipy

Extra dependencies for handling the source version:

  • sphinx

  • numpydoc

  • hypothesis

Quick Start

The package handle imports of its own modules, so it is sufficient to import the base package. The different packages can be access from there:

>>> import swarmpyfac as fc
>>> fc  # count as swarmpyfac.fac
>>> fc.utils  # count as swarmpyfac.utils

Calculating the field aligned currents based on swarm data for some periode:

>>> import swarmpyfac as fc
>>> import datetime as date
>>> start = date.datetime(2016, 1, 1)
>>> end = date.datetime(2016, 1, 2)
>>> output, input_data = fc.fac_from_file(start=start, end=end, user_file=None)
>>> time, position, __, fac, *___ = output

The steps in fc.fac_from_file is broken down into other functions, which one can use and replace for their own needs.

Documentation

See swarmpyfac.readthedocs.io.

References

Ritter, P., H. Lühr, and J. Rauberg (2013), Determining field-aligned currents with the Swarm constellation mission, Earth Planets Space, 65(11), 1285-1294. doi: 10.5047/eps.2013.09.006

See also: Swarm Level 2 product description: Swarm_L2_FAC_single_product_description.

Acknowledgments

The code is produced with support from ESA through the Swarm Data Innovation and Science Cluster (Swarm DISC). For more information on Swarm DISC, please visit https://earth.esa.int/web/guest/missions/esa-eo-missions/swarm/disc

The project is based on the matlab program for caclulating the fac product level 2 product for the swarm mission, which is written by GFZ.

Badges

docs

Documentation Status

package

PyPI Package latest release

Changelog

Version 0.0.1: Initial version

To be decided

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

swarmpyfac-0.2.1.linux-x86_64.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

swarmpyfac-0.2.1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file swarmpyfac-0.2.1.linux-x86_64.tar.gz.

File metadata

  • Download URL: swarmpyfac-0.2.1.linux-x86_64.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for swarmpyfac-0.2.1.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 4a39b08cbb8291ec0f7cd6b27c55fca952e727302efce0869bcafcd8a209b7dd
MD5 bd358848d600cf2610030cc046d6ae78
BLAKE2b-256 db66e4ccab25c017bf7259001fd9ec5d2ed3ab67dae81f861670191e708c391a

See more details on using hashes here.

File details

Details for the file swarmpyfac-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: swarmpyfac-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.8

File hashes

Hashes for swarmpyfac-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 265b0144924957912854db3e0e0b9dd0e74b0301f5a2a79fdb7024d80ab7c604
MD5 19824cd441e72704c18d24700bec5df7
BLAKE2b-256 bb120746a725ecc92ad18970103df03dafd0be88593db62ff71b3af5a848e68b

See more details on using hashes here.

Supported by

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