User Guide¶
Welcome to the ORION user guide! This section provides comprehensive documentation for using ORION's command-line converter and programming APIs.
Quick Navigation¶
-
Supported Formats
Learn about file formats ORION supports
-
Command-line Converter
Convert files without writing code
-
Fortran API
High-performance library for Fortran
-
Python API
Convenient scripting interface
Overview¶
ORION provides three ways to work with scientific data:
1. Command-line Converter¶
The fastest way to convert between formats without writing any code:
Best for:
- Quick one-off conversions
- Batch processing with shell scripts
- Integration into existing workflows
Learn more: Converter Guide
2. Fortran API¶
Native Fortran library for IO applications in external codes:
use Lib_ORION_data
use Lib_Tecplot
type(ORION_data) :: IOfield
integer :: E_IO
E_IO = tec_read_structured_multiblock(filename='data.dat', orion=IOfield)
Best for:
- Integration with Fortran solvers
- Direct memory management
- All format support (Tecplot, VTK, PLOT3D)
Learn more: Fortran API Guide
3. Python API¶
Convenient Python interface for scripting and analysis:
Limited IO
Python API may be used only for reading.
Best for:
- Post-processing and analysis
- Data visualization
Learn more: Python API Guide
Supported File Formats¶
ORION supports the following scientific data formats:
| Format | Description | Fortran | Python | Command-line |
|---|---|---|---|---|
| Tecplot ASCII | Text-based format | ✅ Read/Write | ✅ Read/Write | ✅ |
| Tecplot Binary | Binary format | ✅ Read/Write¹ | ❌ | ✅¹ |
| VTK | Visualization Toolkit format | ✅ Read/Write | ❌ | ✅ |
| PLOT3D | NASA structured grid format | ✅ Read/Write | ❌ | ✅ |
¹ Requires building with --use-tecio flag
Learn more: Supported Formats
Advanced Topics¶
Multi-Block Data¶
All ORION interfaces support multi-block structured grids:
- Fortran: Iterate over blocks with array indexing
- Python: Index into block dimension of NumPy arrays
- Converter: Automatically handles multi-block files
Troubleshooting¶
Common Issues¶
"Format not supported"
- Check that format is spelled correctly
- Verify file extension matches format
- For binary Tecplot, ensure TecIO is enabled
"Out of memory"
- Use the converter for very large files
- In Fortran, deallocate arrays after use
- In Python, process data in chunks
More help: Each guide has a dedicated troubleshooting section.
Best Practices¶
For Efficient Workflows¶
- Use the right tool: Converter for conversions, APIs for processing
- Cache conversions: Don't reconvert the same file repeatedly
- Choose formats wisely: Binary formats are faster for large data
- Test with small data: Verify logic before running on large files
For Code Quality¶
- Check error codes: Always verify I/O operations succeeded
- Document your code: Explain why, not just what
- Add tests: Ensure your code works as expected
- Use version control: Track changes to your scripts
For Performance¶
- Minimize I/O: Read once, process multiple times
- Use binary formats: Faster than ASCII for large datasets
- Vectorize operations: Use array operations instead of loops (Python)
Additional Resources¶
Examples¶
- Examples: Complete working examples in
src/lib/test
External Resources¶
What's Next?¶
Ready to dive deeper? Here are your next steps:
- Learn the converter - Start with command-line conversion
- Explore Fortran API - High-performance programming
- Try Python API - Convenient scripting