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.2.tar.gz (26.7 kB view details)

Uploaded Source

File details

Details for the file swarmpyfac-0.2.2.tar.gz.

File metadata

  • Download URL: swarmpyfac-0.2.2.tar.gz
  • Upload date:
  • Size: 26.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.7

File hashes

Hashes for swarmpyfac-0.2.2.tar.gz
Algorithm Hash digest
SHA256 924e5f47d0f6a5ebc199685f07bc7756926c390e33e70b5a005254fcb9603a99
MD5 04830350c8b70f48454303dad4e607b6
BLAKE2b-256 fe813bc01a98b955939a48259ab2004d2b91c4808d3301695710cb771c8a603e

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