Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A simple wrapper around athena++ vtk reader #25

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Conversation

jeonggyukim
Copy link
Owner

Added simple code snippets to LoadSim for identifying athena++ vtk files and read them. Users can use load_vtk to read the data. It returns a dictionary containing arrays x1f, x2f, x3f, and other field variables. It works for both uniform grids and AMR data. The shape of x1f is (nmb, nx1_mb), field_var (nmb, nx1_mb, nx2_mb, nx3_mb). I have not tested for joined vtk files.

In its current form it's not very much useful. We can make it more useful by adding an option for converting to an xarray DataSet (especially for uniform grids data or data with a few levels of refinement). We can also improve the vanilla athena++ vtk reader (currently it doesn't even read the output time).

However, unless there are advantages of using vtk output (possibly as tarred format?) over hdf5 with athena++, it will not be worth putting much effort to improve this.

@jeonggyukim jeonggyukim self-assigned this Aug 12, 2023
@jeonggyukim jeonggyukim added the enhancement New feature or request label Aug 15, 2023
@jeonggyukim jeonggyukim merged commit 61e8284 into master Jan 3, 2024
1 check passed
@jeonggyukim jeonggyukim deleted the vtk-athenapp branch February 29, 2024 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant