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

Miranda reader does not work with serial data in newer format #35

Closed
akshaysubr opened this issue Oct 23, 2017 · 3 comments
Closed

Miranda reader does not work with serial data in newer format #35

akshaysubr opened this issue Oct 23, 2017 · 3 comments
Assignees
Labels

Comments

@akshaysubr
Copy link
Collaborator

Miranda reader with the newer format and a single processor run returns a zero array for all fields including coordinates. For a 128x128x1 2D problem, looks like self.px, seld.py, self.pz == 0, 0, 1 with self.nx, seld.ny, self.nz == 128, 128, 1 and self.ax, seld.ay, self.az == 129, 129, 1. Maybe an issue with handling of ghost point indexing in the reader?

@akshaysubr akshaysubr added the bug label Oct 23, 2017
@akshaysubr
Copy link
Collaborator Author

Changing

self.ax -= numpy.minimum(self.px-1,1)
self.ay -= numpy.minimum(self.py-1,1)
self.az -= numpy.minimum(self.pz-1,1)
to

# Fix the local indices                      
if self.nx > 1:                              
    self.ax -=  1 #numpy.minimum(self.px-1,1)
if self.ny > 1:                              
    self.ay -=  1 #numpy.minimum(self.py-1,1)
if self.nz > 1:                              
    self.az -=  1 #numpy.minimum(self.pz-1,1)

seems to fix the issue. @flow-phys could you check if this fix is correct?

@flow-phys
Copy link
Collaborator

@akshaysubr , this looks about right, though I'd need to check that this doesn't break the parallel version.

@akshaysubr
Copy link
Collaborator Author

Fixed this issue in the latest pull request. Checked that the fix works with the parallel reader as well. Closing this issue.

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

No branches or pull requests

2 participants