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

BoutDataArray.interpolate_parallel() result is missing regions #166

Open
johnomotani opened this issue Nov 9, 2020 · 0 comments
Open

BoutDataArray.interpolate_parallel() result is missing regions #166

johnomotani opened this issue Nov 9, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@johnomotani
Copy link
Collaborator

When using the BoutDataArray version of interpolate_parallel(), the result returned does not have the regions attribute created. regions is only created in the BoutDataset version. This means that the result does not support various useful methods, e.g. plotting on the poloidal plane.

Not sure this is easily fixable: I suspect there were reasons a full Dataset was needed to create the regions, although it may just have been convenience and to avoid duplicated code.

Possibly the best solution would be to fix #164, which should take care of this issue as a by-product.

The current workaround is to just use the BoutDataset version, and then get the DataArray out of the result. I.e. replace

n = ds["n"]
n_highres = n.bout.interpolate_parallel()

with

ds_highres = ds.bout.interpolate_parallel("n")
n_highres = ds_highres["n"]
@johnomotani johnomotani added the bug Something isn't working label Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant