Community Code
The following links are for community code that may be useful to the wider Jovian community, replicated in MATLAB, IDL and Python. All inputs are expected to be in a right handed System III (1965) co-ordinates, where RJ = 71,492 km.
In 2023, our efforts were published in Space Science Reviews. If using these codes, please reference this SSR paper and the DOI of the particular codes.
Here’s a NASA ADS list of papers currently known to cite these codes (based off DOI or citing the SSR paper), while here’s the separate ADS entries for each release.
Current Sheet Model: Con2020 Code
These codes will take inputs in Cartesian ([x,y,z] in units of RJ) or Spherical ([r, Co-Lat., East Long.] in units of RJ and radians) and return the Con2020 Current Sheet field model values ([Bx, By, Bz] or [Br, Btheta, Bphi] respectively, in units of nT). The codes and instructions are on GitHub(s), see below.
IDL | https://github.com/marissav06/con2020 |
MATLAB | https://github.com/marissav06/con2020 |
Python | https://github.com/gabbyprovan/con2020 |
C++ | https://github.com/mattkjames7/libjupitermag |
Magnetodisc current and radial current values fitted to individual perijoves are given up to perijove 24 in the Connerney et al. (2020) (Table 2) and up to perijove 34 in Vogt et al. (2022); digital values from both papers are here.
Internal Field Codes (JRM33 + others)
These codes will take inputs in Cartesian ([x,y,z] in units of RJ) or Spherical ([r, Co-Lat., East Long.]
in units of RJ and radians) and return the internal planetary field model values ([Bx, By, Bz] or
[Br, Btheta, Bphi] respectively, in units of nT). Codes are available for JRM33, JRM09, ISaAC, VIPAL, VIT4, VIP4 and O6. There are two sets of options for you, the JupiterMag Python package and the PSH standalone codes, all available for PC, Mac or Linux. For older models that used different values of RJ, our codes below still expect inputs where RJ = 71,492 km, and will adjust the RJ for you within the code.
Python | https://github.com/mattkjames7/JupiterMag | Package | |
C++ | https://github.com/mattkjames7/libjupitermag | Package | |
IDL | https://github.com/rjwilson-LASP/PSH | Standalone Files | |
MATLAB | https://github.com/rjwilson-LASP/PSH | Standalone Files | |
Python | https://github.com/rjwilson-LASP/PSH | Standalone Files |
- The JupiterMag Python code is available from https://github.com/mattkjames7/JupiterMag for install, and includes extra models, field line tracing and more flexible options. It also includes a Con2020 option. It is a Python wrapper that uses the libjupitermag C++ objects.
- The PSH codes are available in MATLAB, IDL or Python (all essentially line for line translations of each other). Just download the file you want from https://github.com/rjwilson-LASP/PSH and run.
Field Line Tracing Codes
These codes will do field line tracing using the above models. Due to the different ODE solvers (i.e. different step sizes), their outputs should be very similar, but not perfectly identical.
Python | https://github.com/mattkjames7/JupiterMag | Package | |
C++ | https://github.com/mattkjames7/libjupitermag | Package | |
MATLAB | https://github.com/mbrennan17/mag_trace | Standalone Files |
Other Codes By Other People
These are a collection of other codes we’re aware of – but are not part of this community effort.
- Krishan Khurana’s Magnetic Field Model from 2022 in Fortran on Zenodo,
or on the PDS with Fortran and Python codes.- Previous Krishan Khurana’s Magnetic Field Model from 2009 converted to IDL.
- planetMagFields in Python (doi: 10.5281/zenodo.5140421): https://github.com/AnkitBarik/planetMagFields.
- The Planetary Data Reader (pdr) is an open-source Python library for reading PDS data.
- PlanetMapper: A Python package for visualising, navigating and mapping Solar System observations. [GitHub / Zenodo code] [Journal of Open Source Software paper]
- PlanetMag: MATLAB package for ‘Software for Evaluation of Outer Planet Magnetic Fields and Corresponding Excitations at Their Moons’ [GitHub / Zenodo code] [AGU ESS paper]
- Saturn-Mag-Model: FORTRAN source code for a Saturnian magnetospheric empirical magnetic field model derived from Cassini magnetometer data [GitHub]