nimpy

Python utilities for NIMROD. Docs here: https://nimrodteam.gitlab.io/open/nimpy/index.html Icon from K. Bunkers and C. Sovinec NIMROD external kink computation used for the snake-like, ouroboros resemblance

Active Pure Nim score 65/100 · last commit 2026-07-16 · 4 stars · tests present · no docs generated

Summary

Latest Version Unknown
License Unknown
CI Status Failing
Stars 4
Forks 0
Open Issues 0
Last Commit 2026-07-16
Downloads 0
Last Indexed 2026-07-21 05:25

Installation

nimble install nimpy
choosenim install nimpy
git clone https://gitlab.com/NIMRODteam/open/nimpy

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
nimpy - - - - - - -

README

nimpy

Python utilities for NIMROD.

Installation

Install nimpy using venv

At NERSC skip the next section and use conda.

It is recommended to use python virtual environments, but the first and second steps can be skipped for system-wide installation. It is recommended that these commands are executed in the nimpack directory, if used, or in a directory adjacent to the nimpy source.

$ python -m venv ./nimrod_venv
$ source ./nimrod_venv/bin/activate
$ python -m pip install --upgrade pip # Only needed once
$ pip install -e <path to nimpy source root>

Installing with the -e option makes changes to the source immediately available within the install.

Testing and developer dependencies can be installed with

$ pip install -e <path to nimpy source root>[test,dev]

Sourcing the activate script is required with each new terminal. It could be added to your .bash_rc file.

Install nimpy using conda

Commands for a conda environment follow, as appropriate for NERSC. It is recommended that these commands are executed in the nimpack directory, if used, or in a directory adjacent to the nimpy source.

$ module load conda
$ conda create --prefix ./nimrod_conda_env
$ conda activate ./nimrod_conda_env
$ conda install pip
$ pip install -e <path to nimpy source root>

The module load and activate command is required with each new terminal. It could be added to your .bash_rc file.

Usage

On Linux, append to the environment variable LD_LIBRARY_PATH to the lib directory in your serial nimdevel installation. This will find the required libraries for some nimpy functionality. This can be done via a version of this command:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/full_path_to_nimrod_libraries/

Examples are includes in the scripts/ directory. Create a custom python script - potentially starting from an example.

Installed commands (invoke with -h for command line argument help): - nimplot2D - plot field contours in an RZ plane (uses element interpolation) - nimplotfield - quick plotting of field contours in an RZ plane (uses nodal data) - nimglobaleq - calculate standard equilibrium quantities - nimpy-xdraw - plot 1D xdraw files - nimgrowth - compute growth rate and frequency data

API Documentation is generated with Sphinx: https://nimrodteam.gitlab.io/open/nimpy/index.html.