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

Constrain BOV reader to support 3D grids, and add a check for brick size #2835

Closed
wants to merge 1 commit into from

Conversation

sgpearse
Copy link
Collaborator

This constrains the BOV reader to 3D data. I've added an enhancement to support 2D data here.

This also adds a guard to check that the BRICK_SIZE token is >0.

@sgpearse sgpearse requested a review from shaomeng July 26, 2021 22:42
@shaomeng
Copy link
Collaborator

@sgpearse I'm not sure if this PR solves the problem in issue #2826 . It's true that VAPOR no longer crashes, but VAPOR refuses to take in a volume of dimension (256x512x1) now. My understanding is that with improvements made by John, all grids are considered 3D right now and 256x512x1 is a perfectly legal volume dimension.

@clyne can clarify probably.

@sgpearse
Copy link
Collaborator Author

@shaomeng - I'm taking a fresh look at this and I think you're right. I should have a better fix in soon. Closing this for now.

@sgpearse sgpearse closed this Jul 27, 2021
@clyne
Copy link
Collaborator

clyne commented Jul 27, 2021

@sgpearse I'm not sure if this PR solves the problem in issue #2826 . It's true that VAPOR no longer crashes, but VAPOR refuses to take in a volume of dimension (256x512x1) now. My understanding is that with improvements made by John, all grids are considered 3D right now and 256x512x1 is a perfectly legal volume dimension.

@clyne can clarify probably.

The grid class support really isn't relevant. The DC class - which simply imports data in various formats - provides API for querying which variables are 1D, 2D, 3D, etc. To support grids that contain a dimension of length 1, the DCBOV class will need to know that variables with these dimensions are 2D or 1D variables. The correct behavior for the DCBOV class should probably be so simply remove any dimensions of length 1. E.g. 10x10x1 -> 10x10, and 10x1x10 -> 10x10, and so on.

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.

None yet

3 participants