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

Added read_variable_shaped to automate the read_variable reshaping chore #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alhom
Copy link
Contributor

@alhom alhom commented Nov 10, 2020

No description provided.

@ursg
Copy link
Contributor

ursg commented Nov 10, 2020

That cellids parameter is a bit confusing, I would say. If it is -1, it reads the whole dataset and everything should go well. But If you only give it a limited subset, doesn't the argsort with the complete cellID dataset go belly-up?

@alhom
Copy link
Contributor Author

alhom commented Nov 10, 2020

ooh, true. So I'll disable subset reading from that for now, so the functionality will at least exist for full datasets.

@@ -1004,6 +1004,25 @@ def calcLocalSize(globalCells, ntasks, my_n):

return np.squeeze(orderedData)


def read_variable_shaped(self, name, operator="pass"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add variable name checking here so that if someone accidentally uses this for a fg_ variable, things won't break. Also, an AMR check would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants