Git Product home page Git Product logo

Comments (7)

sayerhs avatar sayerhs commented on June 16, 2024

We have been mostly using NetCDF format for sampling output and manipulating the resulting NetCDF files with Python/matplotlib. The images you refer to in the exawind/wind-energy repo is loading the full 3D flowfield in ParaView (@gantech can confirm).

If you want to continue using native format, I have heard that yt is another option to visualize AMReX datasets? We will look at updating the native interface so that you don't have to manually copy files to load them in ParaView. @marchdf any thoughts here on why particle data won't load/render in VisIt?

from amr-wind.

rd-contr avatar rd-contr commented on June 16, 2024

I would be fine with using NetCDF and python/matplotlib. I will look at making the change so that AMR-Wind willl write out sampling data in NetCDF. That seems like the easiest path forward at this point.

I tried yt and Amvis as well, but neither worked. Amvis says that the dataset is 0D and it doesn't know how to display. yt says that it can't load the data.

I'm happy to provide any error output from the various viz tools if that would be helpful at all.

from amr-wind.

sayerhs avatar sayerhs commented on June 16, 2024

@rd-contr NetCDF support must be explicitly activated in AMR-Wind.

cmake -DAMR_WIND_ENABLE_NETCDF=ON -DNETCDF_DIR=<path_to_netcdf_install>

You can see this IPython notebook for an example of how to extract data from the netcdf files.

from amr-wind.

rd-contr avatar rd-contr commented on June 16, 2024

Copy. Thank you for the pointer on adding the NetCDF support. I'll get my binaries rebuilt. Will also check out the iPython notebooks.

from amr-wind.

sayerhs avatar sayerhs commented on June 16, 2024

@rd-contr If you are comfortable with python scripting, then you might also want to look into the AmrexParticleFile in the tools directory. I have not used it a lot after we moved to NetCDF, but you might be able to use this to process the files you already have

class AmrexParticleFile:
"""AmrexParticleFile reader
Loads AMReX Particle data in binary format for a single timestep
"""

from amrex_particle import AmrexParticleFile

# load the 10-th time index 
pfile = AmrexParticleFile.load(10)
# Process the file and return a Pandas dataframe
df10 = pfile()

The Pandas DataFrame has index which is the unique identifier for a given particle. It also has two additional columns set_id and probe_id which you can filter on to get a particular set of sampling probes and the probe_ids start from 0 for each set of sampling points. The columns xco, yco, zco are the coordinates of the particle/probe, and the remaining columns are the field data you had requested.

from amr-wind.

rd-contr avatar rd-contr commented on June 16, 2024

Thanks for the tip on the python code for interacting with AMReX particle files. I will check it out.

from amr-wind.

sayerhs avatar sayerhs commented on June 16, 2024

@rd-contr closing issue due to inactivity. Please reopen if you have follow-up questions.

from amr-wind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.