PnetCDF-python is a Python interface to PnetCDF, a high-performance parallel I/O library for accessing netCDF files. This package allows Python users to access netCDF data using the rich ecosystem of Python's scientific computing libraries, making it a valuable tool for applications that require parallel access to netCDF files.
- Python 3.9 or above
- MPI libraries
- PnetCDF C library, built with shared libraries.
- Python library mpi4py
- Python library numpy
- Clone this GitHub repository
- Make sure the above dependent software are installed.
- In addition, Cython, packaging and 'wheel' are required for developer installation.
- Set the environment variable
PNETCDF_DIRto PnetCDF's installation path. - Make sure utility program
pnetcdf-configis available in$PNETCDF_DIR/bin. - Run command below to install.
CC=/path/to/mpicc PNETCDF_DIR=/path/to/pnetcdf/dir pip install --no-build-isolation -e . - Testing
- Run command
make checkto test all the programs available in folderstestandexamplesin parallel on 4 MPI processes. - In addition, command
make ptestsruns the same tests but using 3, 4, and 8 MPI processes. - To run any individual programs in folders
testandexamples, use command below. For example,mpiexec -n [num_process] python examples/create_open.py [output_dir]
- The optional
output_dirargument is the folder for storing the output files created by the programs The default is the current folder.
- The optional
- Run command
- PnetCDF-python User Guide
- Data objects in PnetCDF python programming
- Comparison between NetCDF4-python and PnetCDF-python
- This project is under active development. The current status of API implementation can be found in dev_status.md.
- PnetCDF
Ongoing development and maintenance of PnetCDF-python is supported by the U.S. Department of Energy's Office of Science, Scientific Discovery through Advanced Computing (SciDAC) program, OASIS Institute.