[FLASH-USERS] Extraction of data from HDF5 files to python
Gabriel Rigon
grigon at mit.edu
Fri Jan 24 07:39:47 EST 2025
Hi,
I’m not sure using VisIt is what you want to do here. If you want to access FLASH produced data (hdf5) using python, I would suggest you check the “yt” library. (import yt) then use some covering grid if you want to manipulate the data directly.
Best,
Gabriel Rigon
==============
Postdoctoral Associate
MIT - PSFC
167 Albany Street, NW 17-264
Cambridge, MA 02139
TEL: (+1) 617-324-0638
Email: grigon at mit.edu
On Jan 24, 2025, at 11:35, Adrien Da Ros <adrien.da-ros at u-bordeaux.fr> wrote:
Dear Flash users,
I am trying to extract some data from an .hdf file created with VisIt from FLASH simulations to use them with python.
A colleague of mine (Meirielen Caetano de Sousa at CELIA) is using it from a few months Flash and VisIt but we are still beginners.
The issue that I am encountering is that the meshgrid is adaptative during the whole simulation, and also non-uniform on the different axes.
In order to use correctly and efficiently the extracted data, I should need to recreate the meshgrid that is produced by Flash and to do so, I would need the accurate parameters that are stored in the .hdf file.
There are many variables that can be stored in the output files, such as 'block size', 'coordinates', or 'tele' (electron temperature).
My issue is that I do not know how to recreate the meshgrid (example given attached) with the variables I have access.
To explain more specifically my issue, the data array 'tele' that I want to use has a shape (294, 1, 16, 16).
The data array 'coordinates' of shape (294, 3) seems to give the location of a group of pixels of size (16, 16) according to the shape of 'tele' but the information about the size of the group, contained in 'block size' I suppose, is difficult to be used.
In the end, it is a puzzle that I do not have all the keys to finish.
Does it exist a specific python package that permits to use more easily such .hdf files ?
Do I have to use VisIt to save in a different format the data to properly use them with python ?
Do you have some documentation about how the data are plotted with VisIt ?
Thank you for your help.
With my sincere salutations,
Adrien Da Ros, PhD
Post-doctorant
CELIA - Université de Bordeaux
Mail: adrien.da-ros at u-bordeaux.fr
<meshgrid_example_obtained_with_Flash_VisIt.png>_______________________________________________
flash-users mailing list
flash-users at flash.rochester.edu
For list info, including unsubscribe:
https://flash.rochester.edu/mailman/listinfo/flash-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20250124/5c379d78/attachment.htm>
More information about the flash-users
mailing list