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

Group access with xFELTOR #7

Open
RaulGerru opened this issue Sep 19, 2022 · 3 comments
Open

Group access with xFELTOR #7

RaulGerru opened this issue Sep 19, 2022 · 3 comments

Comments

@RaulGerru
Copy link

Hi Gregor,

I am trying to use xFELTOR to work with groups for probe analysis. However, when accessing the group with xFELTOR, I only see the dimensions and keys of the group, but not the data. Any way of improving it? I can start working on it if you cannot do it.

Best

@gregordecristoforo
Copy link
Collaborator

Hi Raul,

Thanks for showing interest in this. Feel free to write an implementation that works for you and create a pull request to merge it into the main branch. I am at a workshop in Princeton this week and on holiday the weeks after that so I won't be able to take a look at it anytime soon.

If you want to hear my opinion on this specific issue could you please provide a more detailed explanation on what you are trying to do and maybe provide some code snippets?

@RaulGerru
Copy link
Author

Hi Gregor,

We are implementing a synthetic probe data output in FELTOR 3D simulations, where the outputs are the fields in some timesteps smaller than the usual time outputs. This outputs are saved in a group called "Probes", where arrays of data are saved. When trying to access the probe, I get the following:

ds=open_feltordataset(DIR_MEMORY+"*.nc")
ds.probes
Output:
{'R_probe': [620.6,
620.6,
620.6,
646.6,
564.6,
944.8,
957.9,
971,
984.1,
997.2,
525.72,
512.62,
499.52,
486.42,
473.32],
'Z_probe': [-445.17,
-418.17,
471.17,
-445.17,
-445.17,
44,
44,
44,
44,
44,
44,
44,
44,
44,
44],
'num_pins': 15,
'phi_probe': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]};

Which are fundamentally the coordinates of the probes, but not the data in them.

Don't worry about the holidays, I'll try to make it work.

@gregordecristoforo
Copy link
Collaborator

gregordecristoforo commented Sep 19, 2022

We have been working on something similar with BOUT++ simulations. The implementation of reading probe_data is done here https://github.com/boutproject/xBOUT/blob/master/xbout/fastoutput.py. Not sure whether you can apply the same approach to xFELTOR but it might be worth taking a look once.

Good luck with the implementation!

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

No branches or pull requests

2 participants