[yt-users] remap spherical geometry on cartesian

Matthew Turk matthewturk at gmail.com
Mon Nov 14 08:22:59 PST 2016


Hi Andrea,

Sorry for the very long delay in replying.

On Tue, Nov 1, 2016 at 4:40 AM, Andrea Negri <negri.andre at gmail.com> wrote:
> Hi all,
>
> sorry if you receive this message more than once.
> I'm still struggling in porting the my ZEUS data in spherical
> coordinates in yt. After many tests, I decided that it would by a good
> idea to interpolate all my arrays from the spherical (non uniform)
> grid to an AMR grid in cartesian (it will help me also with other
> software that accepts only cartesian coordinates).

I've tried this before, and had only really bad luck with it...

>
> I wrote a python program to create an octree, but it is quite
> unefficient. Than, I read that it is possible to create an octree with
> yt. What I REALLY would like to do is to compute the octree,  save all
> grids, all the levels in the GDF format,  than with a script open the
> GDF format and insert in every grid the interpolated density, energy
> etc...

This was basically my experience, with one minor change.  I didn't
save it as GDF, but instead I used the export_octree function to dump
it out.  My basic process was:

 * Load all data as points as a "particle" dataset
 * Vary n_ref and over_refine_factor to aim for 1:1 mapping of point/cell
 * Use export_octree on a nearest neighbor deposition field

I wasn't ever able to make it give good enough results from the data
side, but it was reasonably fast.  Maybe you could try that?

>
> I'm able to create the octree (or at least I think!) using the
> attached script, but I don't know how to save it in the GDF format.
> Could you help  me?
>
>
> Many thanks,
> Andrea
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org


More information about the yt-users mailing list