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

NHFLUX reader improvement #1546

Open
aaswenson opened this issue Dec 12, 2023 · 2 comments · May be fixed by #1645
Open

NHFLUX reader improvement #1546

aaswenson opened this issue Dec 12, 2023 · 2 comments · May be fixed by #1645
Assignees
Labels
feature request Smaller user request

Comments

@aaswenson
Copy link

aaswenson commented Dec 12, 2023

The ARMI nhflux reader (nhflux.NhfluxStreamVariant.readBinary) cannot not read VARSRC binary files. This is because the VARSC files do not contain the 2D card with pointers partial flux currents. The file format description (provided by ANL) for the NHFLUX_VARIANT file indicates that a 2D card is only present if NSURF is greater than 1.

Consider modifying line 257 of the nhflux.py file:

self._rwGeodstCoordMap2D()

to only read the 2D coordinate pointers

if self._metadata['nSurf'] > 1:
    self._rwGeodstCoordMap2D() 

This should allow the reader to read the VARSRC files. I made this change locally on my installation and tested it against the CCCC_PrintTable.exe binary file reader that ships with DIF3D, I was able to read VARSRC moments successfully after implementing this change.

@john-science john-science added the feature request Smaller user request label Dec 13, 2023
@john-science
Copy link
Member

john-science commented Dec 13, 2023

@aaswenson Welcome to ARMI!

It seems like a fair request. Off the top of my head, I don't see a problem. Though I would love to be able to write a unit test to prove your code suggestion works as intended.

Just FYI: We are currently in an ARMI feature freeze until the New Year. So no PR for this ticket will get merged until then. BUT we can, of course, open a PR with the solution and get all our ducks in a row and ready for the New Year.

(Also, I took the liberty of modifying your question a little bit to make it easier to read. Feel free to holler if I have something wrong.)

@Nebbychadnezzar
Copy link
Collaborator

I can address this PR when the time comes.

@Nebbychadnezzar Nebbychadnezzar self-assigned this Jan 9, 2024
@Nebbychadnezzar Nebbychadnezzar linked a pull request Feb 6, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Smaller user request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants