Skip to content

Text Interface Graphing Exodus Reader

Notifications You must be signed in to change notification settings

chaibhave/TIGER

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TIGER

TIGER is a Python module for directly accessing Exodus and Nemesis file data as numpy arrays. Examples demonstrate how to generate high quality figures using matplotlib and the TIGER interface.

Querying variables

When reading multiple Exodus files, ExodusReader combines available variable names from each file. The resulting lists are exposed on the multi-file reader via nodal_var_names and elem_var_names. These attributes show all nodal and elemental variables that may be requested with APIs such as get_data_at_time. These APIs also accept an optional block_id to restrict queries to a specific element block. For example::

x, y, z, c = reader.get_data_at_time('c_Cr', time, block_id=1)

This returns coordinates and values only for block 1.

Installation instructions:

  1. Go to your installation directory
    cd ~/projects/
    
  2. Clone the TIGER repo
    git clone https://github.com/chaitanyaBhave26/TIGER.git
    

Option A - Conda installation (Recommended):

  1. If you don't already have Conda, install by following the instructions on the Conda website. Alternatively, if you are installing TIGER on a HPC with prebuilt conda module, run
    module load conda
    
  2. Install the conda-build package
    conda activate base
    conda install conda-build
    
  3. Create the TIGER environment and install dependencies
    conda create --name tiger_env "h5py=*=mpi*" "netcdf4=1.6.*=mpi*" matplotlib scipy numpy pytest cmcrameri mpi4py -c conda-forge
    
  4. Build the TIGER package in development mode
    conda develop -n tiger_env ~/projects/TIGER 
    
  5. Activate the TIGER environment. This step needs to be run whenever you want to use TIGER in a new terminal tab or window
    conda activate tiger_env
    
  6. Optionally, you can install OpenCV if you want to perform Computer Vision operations on your exodus file outputs.
    conda install -c menpo opencv
    

Option B - Pip installation :

  1. If installing on a HPC, load python module
    module load python
    
  2. Install dependencies using PIP
    pip install matplotlib numpy scipy h5py opencv-python pytest cmcrameri mpi4py
    CC=mpicc HDF5_DIR=/path/to/parallel/hdf5 pip install --no-binary=netCDF4 netCDF4==1.6.4
    
  3. Change to TIGER directory
    cd ~/projects/TIGER/
    
  4. Add TIGER directory to PYTHONPATH
    export PYTHONPATH=$PYTHONPATH:~/projects/TIGER
    
  5. Importing modules from TIGER requires you to run step #4 every time you open the window. Alternatively you can copy that command into your bash profile (~/.bash_profile) using your choice of text editor. After copying the command, either restart the terminal window or run
source ~/.bash_profile

Once added to your bash profile you can access the python module from any location on the computer.

About

Text Interface Graphing Exodus Reader

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%