# Convert vtu output from aspect from cartesian to spherical

**URL:** <https://community.geodynamics.org/t/convert-vtu-output-from-aspect-from-cartesian-to-spherical/4176>\
**Category:** ASPECT\
**Created:** [June 18, 2025, 9:56pm UTC](https://community.geodynamics.org/t/convert-vtu-output-from-aspect-from-cartesian-to-spherical/4176 "2025-06-18T21:56:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mibillen](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/mibillen/32/169_2.png) [@mibillen](https://community.geodynamics.org/u/mibillen)\
**Post date:** [June 18, 2025, 9:56pm UTC](https://community.geodynamics.org/t/convert-vtu-output-from-aspect-from-cartesian-to-spherical/4176/1 "2025-06-18T21:56:40Z")

</div>

Hello,  
We have an existing aspect model result that was run in a 3D chunk but was not output with spherical coordinates (it is not feasible to rerun the model for this purpose). We would like to use bounds in longitude, latitude and depth too crop the data that we are using in further analysis. We want to make sure we are using the same cartesian to spherical transformation used in Aspect. Can someone point us to where this information is (perhaps a file in deal.ii)? I tried searching myself but only found this for a 2D example (I think? - step75). Thank you for your help! - Magali

---

<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:** [June 18, 2025, 10:25pm UTC](https://community.geodynamics.org/t/convert-vtu-output-from-aspect-from-cartesian-to-spherical/4176/2 "2025-06-18T22:25:44Z")

</div>

Hi Magali:  
I think that this is the function you are looking for: [aspect/source/utilities.cc at main · geodynamics/aspect · GitHub](https://github.com/geodynamics/aspect/blob/main/source/utilities.cc#L657-L682)  
Best  
W.

---

<div class="post-metadata">

**Author:** ![mibillen](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/mibillen/32/169_2.png) [@mibillen](https://community.geodynamics.org/u/mibillen)\
**Post date:** [June 19, 2025, 12:02am UTC](https://community.geodynamics.org/t/convert-vtu-output-from-aspect-from-cartesian-to-spherical/4176/3 "2025-06-19T00:02:00Z")

</div>

Thank you!

Magali
