Skip to main content

PyGemini

ci

A Python interface to Gemini3D, funded in part by NASA HDEE.

Setup PyGemini by:

git clone https://github.com/gemini3d/pygemini

pip install -e pygemini

Developers

For those working with GEMINI Fortran code itself or to work with non-release versions of GEMINI Fortran code:

  1. install PyGemini in development mode as above
  2. set environment variable GEMINI_ROOT to the Gemini3D Fortran code directory, otherwise PyGemini will Git clone a new copy.

Run simulation

  1. make a config.nml with desired parameters for an equilibrium sim.

  2. setup and/or run the equilibrium sim:

    python -m gemini3d.model /sim_equil/config.nml /path_to/sim_eq/
    # or
    python -m gemini3d.run /sim_equil/config.nml /path_to/sim_eq/
    
  3. create a new config.nml for the actual simulation and run

    python -m gemini3d.model /sim/config.nml /path_to/sim_out/
    # or
    python -m gemini3d.run /sim/config.nml /path_to/sim_out/
    

Plots

An important part of any simulation is viewing the output. Because of the large data involved, most plotting functions automatically save PNG stacks to disk for quick flipping through with your preferred image viewing program.

Grid

Help ensure the simulation grid is what you intended by the following, which can be used before or after running the simulation.

import gemini3d.plot

gemini3d.plot.grid("path/to/sim")

simulation outputs

These commands create plots and save to disk under the "plots/" directory under the specified data directory.

command line:

python -m gemini3d.plot path/to/data -save png

or from within Python:

import gemini3d.plot as plot

plot.frame("path/to/data", datetime(2020, 1, 2, 1, 2, 3), saveplot_fmt="png")

# or

plot.plot_all("path/to/data", saveplot_fmt="png")

Convert data files to HDF5

There is a a script to convert data to HDF5, and another to convert grids to HDF5. The scripts convert from {raw, Matlab, NetCDF4} to HDF5. The benefits of doing this are especially significant for raw data, and HDF5 may compress by 50% or more, and make the data self-describing.

python scripts/convert_data.py h5 ~/mysim
python scripts/convert_grid.py h5 ~/mysim/inputs/simgrid.dat

Metadata

Release files for gemini3d 1.7.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 gemini3d 1.7.0
File Size Uploaded
gemini3d-1.7.0.tar.gz 86.6 kB Details

Built distribution (wheel)

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

Total release size: 200.7 kB

Release files / gemini3d-1.7.0.tar.gz

Download URL gemini3d-1.7.0.tar.gz
Size 86.6 kB
Tags Source
SHA-256 checksum
How to use checksums
316340fc21759c05bbff87101e24b5736dd4ee33f817f550eaeea6b9e94d9a21
BLAKE2b-256 checksum
How to use checksums
0ec69180dae32fd5e8f8f12193ad2de6e159deabafa8cb326fcdb53415373521
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.9

Release files / gemini3d-1.7.0-py3-none-any.whl

Download URL gemini3d-1.7.0-py3-none-any.whl
Size 114.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
133b0a15d28fdd83348a2097ff083f64661d3b5ee1e3a355c4c79a75dbf7f431
BLAKE2b-256 checksum
How to use checksums
27bbb40f4ef7f59ddd3561181f0e111ecf35f5b863905fc5ac69953cad9e4d0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.9

Release history Release notifications | RSS feed

This release

1.7.0 This release

2 release files

1.5.1

1 release file

1.4.0

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.1.0

1 release file

1.0.1

1 release file

0.3.1

1 release file

0.3.0

1 release file

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