# Re: \[aspect-devel\] Postprocessing scripts

**URL:** <https://community.geodynamics.org/t/re-aspect-devel-postprocessing-scripts/148>\
**Category:** ASPECT\
**Created:** [October 30, 2018, 5:11pm UTC](https://community.geodynamics.org/t/re-aspect-devel-postprocessing-scripts/148 "2018-10-30T17:11:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bangerth](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/bangerth/32/52_2.png) [@bangerth](https://community.geodynamics.org/u/bangerth)\
**Post date:** [October 30, 2018, 5:11pm UTC](https://community.geodynamics.org/t/re-aspect-devel-postprocessing-scripts/148/1 "2018-10-30T17:11:14Z")

</div>

Marine,  
I'm not sure anyone ever answered this email -- so let me do this 3  
months late...

> But to be able to do a good comparisons with existing results, I'll need  
> things like horizontal averages (of composition, temperature,  
> velocities) and difference between the field and the horizontal average  
> (of composition, temperature). But the horizontal here is average over a  
> sphere, so I am guessing the post-processors are not so easy. (to get  
> average radial profiles)

This is actually what our 'depth average' postprocessor does -- average  
over all points at a certain depth where depth is defined differently  
for each geometry.

> I'm definitely not used to paraview, and I'm more used to do all my data  
> processing by hand... So a good tutorial on how to implement that with  
> paraview or equivalent, with a scripting (I usually have several dozens  
> of runs to process at a time) would be nice 🙂 But so far, I think that  
> a way to obtain a list of the points and values in the volume (without  
> duplicates), and maybe something to do the interpolation at required  
> points would be nice.

This isn't going to be efficient. There may be tens of millions of  
points in a simulation, and they are stored by maybe hundreds of  
processors, and the interpolation between individual points is really  
quite complicated if you have a non-trivial geometry. There are really  
only two efficient ways to deal with this much data: by outputting the  
data in specialized file formats for visualization, and by implementing  
postprocessors within ASPECT. I know that you'd like to do this by hand  
in some scripting language, but don't do it -- you won't be happy this  
way if the data just becomes too large.

Best  
&nbsp;&nbsp;W.

---

<div class="post-metadata">

**Author:** ![jbnaliboff](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jbnaliboff](https://community.geodynamics.org/u/jbnaliboff)\
**Post date:** [October 30, 2018, 8:29pm UTC](https://community.geodynamics.org/t/re-aspect-devel-postprocessing-scripts/148/3 "2018-10-30T20:29:28Z")

</div>

Hi all,

```
    I agree with Jonathan that a repository containing post processing scripts (Paraview, Visit, Python, etc, etc) would be incredibly useful. In fact, Max Rudolph raised this question on the mailing with respect to post processing scripts developed at CIDER. I believe the consensus was that we should include this type of script collection in the main repository.

    Marine - If you prefer to work outside of Paraview, you can also import unstructured VTK data into numpy arrays in python.

             Here is a link to an example of doing this data conversion (VTK to numpy):

         

                Happy to send over some of my own scripts as well.

                  However, as Wolfgang noted for very large data sets this will be prohibitively time consuming and memory intensive. Perhaps there are way to speed this up through cython and python's openmp functionality, but I have not looked into it. Paraview can be run in parallel and it really is the most efficient way to process and explore large data sets.

    Cheers,

    John
```

---

<div class="post-metadata">

**Author:** ![maxrudolph](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/maxrudolph/32/248_2.png) [@maxrudolph](https://community.geodynamics.org/u/maxrudolph)\
**Post date:** [October 30, 2018, 8:35pm UTC](https://community.geodynamics.org/t/re-aspect-devel-postprocessing-scripts/148/4 "2018-10-30T20:35:17Z")

</div>

I am happy to open a pull request containing my python scripts to interpolate output. They won’t work for all conceivable cases, especially DG elements where nodal values can be multiply defined.

Max

---

<div class="post-metadata">

**Author:** ![jbnaliboff](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jbnaliboff](https://community.geodynamics.org/u/jbnaliboff)\
**Post date:** [October 30, 2018, 11:00pm UTC](https://community.geodynamics.org/t/re-aspect-devel-postprocessing-scripts/148/5 "2018-10-30T23:00:02Z")

</div>

Hi Max,

```
    That would be great, thank you!

    Cheers,

    John
```
