University of Colorado at Boulder University of Colorado CU Home Search A to Z Index Map
Laboratory for Atmospheric and Space Physics

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.

IDLhttps://github.com/marissav06/con2020
MATLABhttps://github.com/marissav06/con2020
Pythonhttps://github.com/gabbyprovan/con2020
C++https://github.com/mattkjames7/libjupitermag
Table of Current Sheet Model Githubs

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.

Pythonhttps://github.com/mattkjames7/JupiterMagPackage
C++https://github.com/mattkjames7/libjupitermagPackage
IDLhttps://github.com/rjwilson-LASP/PSHStandalone Files
MATLABhttps://github.com/rjwilson-LASP/PSHStandalone Files
Pythonhttps://github.com/rjwilson-LASP/PSHStandalone Files
Table of Internal Field Githubs
  • 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.

Pythonhttps://github.com/mattkjames7/JupiterMagPackage
C++https://github.com/mattkjames7/libjupitermagPackage
MATLABhttps://github.com/mbrennan17/mag_traceStandalone Files
Table of Field Line Tracers

Other Codes By Other People
These are a collection of other codes we’re aware of – but are not part of this community effort.