-
Notifications
You must be signed in to change notification settings - Fork 312
Fix small bugs/edge cases in the parthenon frontend #5276
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
Changes from 6 commits
dbd582d
93e0160
62a5289
ad28ef0
f7d27e7
fd336c3
d7453ae
2b3b9b3
2503878
a39fbd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,7 +52,10 @@ def _read_fluid_selection(self, chunks, selector, fields, size): | |
| for gs in grid_sequences(chunk.objs): | ||
| start = gs[0].id - gs[0]._id_offset | ||
| end = gs[-1].id - gs[-1]._id_offset + 1 | ||
| data = ds[start:end, fdi, :, :, :].transpose() | ||
| if len(ds.shape) == 4: | ||
| data = ds[start:end, :, :, :].transpose() | ||
| else: | ||
| data = ds[start:end, fdi, :, :, :].transpose() | ||
|
Comment on lines
+55
to
+58
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Parthenon's python reader can always split a variable into a flat index space, so I think this is now generic.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand this change. What's exactly happening here?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In riot's current format scalar fields are only 4D with the leading index the block. AthenaPK doesn't see this because it has a prim vector, but riot and phoebus do. That's what's this change is. I didn't modify the piece with prim vector, just special case scalars. |
||
| for i, g in enumerate(gs): | ||
| ind += g.select(selector, data[..., i], rv[field], ind) | ||
| last_dname = dname | ||
|
|
@@ -72,7 +75,10 @@ def _read_chunk_data(self, chunk, fields): | |
| for gs in grid_sequences(chunk.objs): | ||
| start = gs[0].id - gs[0]._id_offset | ||
| end = gs[-1].id - gs[-1]._id_offset + 1 | ||
| data = ds[start:end, fdi, :, :, :].transpose() | ||
| if len(ds.shape) == 4: | ||
| data = ds[start:end, :, :, :].transpose() | ||
| else: | ||
| data = ds[start:end, fdi, :, :, :].transpose() | ||
| for i, g in enumerate(gs): | ||
| rv[g.id][field] = np.asarray(data[..., i], "=f8") | ||
| return rv | ||
Uh oh!
There was an error while loading. Please reload this page.