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

Fix gizmo frontend #3234

Merged
merged 2 commits into from Apr 29, 2021
Merged

Fix gizmo frontend #3234

merged 2 commits into from Apr 29, 2021

Conversation

chummels
Copy link
Member

Two small changes to fix the gizmo frontend.

One, gizmo is still expecting the H_number_density field to exist to calculate the free electron content. Recently H_number_density got swapped to H_nuclei_density. This corrects that.

Another issue is that increasingly the FIRE datasets are using variable numbers of metallicity fields above 11 elements. When the gizmo frontend was first created, it was set to accept 11 and 17 metallicity fields to indicate it was a FIRE (i.e., gizmo) dataset to differentiate it from Gadget datasets. This has been somewhat relaxed and there are a number of FIRE datasets with 12, 13, etc. metallicity fields floating around. This fixes this so any gadget-like dataset with more than 11 metallicity fields gets flagged as a gizmo dataset.

In the long run, it seems like it might be more appropriate to change the gizmo frontend to be the FIRE frontend, since gizmo is meant to just use the same format as gadget and have the same modularity to have many different code_units set. Currently the gizmo frontend is really acting to set the code units according to the FIRE defaults. After all, we have an EAGLE and an OWL frontend, which are just extensions of the Gadget frontend for those datasets. Furthermore, Phil has updated gizmo so the newest datasets have HDF attributes to describe the code_unit conversion to physical units, but those aren't widespread yet. The correction in this PR is just a stop-gap.

@chummels chummels added bug yt-4.0 feature targeted for the yt-4.0 release labels Apr 29, 2021
@neutrinoceros
Copy link
Member

One, gizmo is still expecting the H_number_density field to exist to calculate the free electron content. Recently H_number_density got swapped to H_nuclei_density. This corrects that.

This change doesn't look like it preserves backwards compatibility. Does it ?

@neutrinoceros neutrinoceros added the code frontends Things related to specific frontends label Apr 29, 2021
Copy link
Member

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

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

LGTM, except for my one concern expressed above, which might not be relevant

@jzuhone
Copy link
Contributor

jzuhone commented Apr 29, 2021

The scheme for number density and nuclei density fields was adjusted about 2 years ago (I think that's when it was). The rules are here. I just want to make sure that this is consistent with that. Can you check this if you haven't already @chummels?

Copy link
Member

@brittonsmith brittonsmith left a comment

Choose a reason for hiding this comment

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

To my eye, this does the correct thing with N_nuclei_density.

@neutrinoceros neutrinoceros merged commit cb92ba2 into yt-project:main Apr 29, 2021
@chummels chummels deleted the H_number_density branch August 25, 2022 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug code frontends Things related to specific frontends yt-4.0 feature targeted for the yt-4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants