Replicating Enzo test problem output in jupyter notebook
I've built Enzo in ubuntu and I've successfully run the first test problem in terminal mode and also used $ yt plot DD0000/DD0000 in the terminal to generate the output slice plots, as per the enzo guide. I'm trying to replicate the slice plotting in a jupyter notebook. When I try to load the DD data using ds = yt.load('/home/ian/enzo-dev/run/Hydro/Hydro-3D/CollapseTestNonCosmological/DD0000') I get the error YTUnidentifiedDataType: Could not determine input format from /home/ian/enzo-dev/run/Hydro/Hydro-3D/CollapseTestNonCosmological/DD0000' By looking at the CollapseTestNonCosmological.enzo file, I see that the data is an AMR format. I therefore tried to load it using ds = yt.load_amr_grids('/home/ian/enzo-dev/run/Hydro/Hydro-3D/CollapseTestNonCosmological/DD0000') but this failed because it was missing the domain_dimensions argument. I think this means it needs to have grid_data added as the first argument: ds = yt.load_amr_grids(grid_data, '/home/ian/enzo-dev/run/Hydro/Hydro-3D/CollapseTestNonCosmological/DD0000') I can try and work out how to define the grid_data but I don't understand why doing so wasn't necessary when I simply ran $ yt plot DD0000/DD0000 in terminal mode. Does yt plot extract the domain_dimensions automatically from the outputs, and if so is there an easy way of doing this in jupyter's yt.load_amr_grids, without having to manually set up grid_data?
Hi Ian, I think all you need to do is change the load call to: ds = yt.load('/home/ian/enzo-dev/run/Hydro/Hydro-3D/CollapseTestNonCosmological/DD0000/DD0000') The data directory is called DD0000, but the file to pass to yt is the ascii file contained within that directory, which often (but not always) has the same name. Britton On Thu, Aug 19, 2021 at 1:37 PM Ian Woodward <ianww@iinet.net.au> wrote:
I've built Enzo in ubuntu and I've successfully run the first test problem in terminal mode and also used $ yt plot DD0000/DD0000 in the terminal to generate the output slice plots, as per the enzo guide.
I'm trying to replicate the slice plotting in a jupyter notebook.
When I try to load the DD data using
ds = yt.load('/home/ian/enzo-dev/run/Hydro/Hydro-3D/CollapseTestNonCosmological/DD0000')
I get the error
YTUnidentifiedDataType: Could not determine input format from /home/ian/enzo-dev/run/Hydro/Hydro-3D/CollapseTestNonCosmological/DD0000'
By looking at the CollapseTestNonCosmological.enzo file, I see that the data is an AMR format.
I therefore tried to load it using
ds = yt.load_amr_grids('/home/ian/enzo-dev/run/Hydro/Hydro-3D/CollapseTestNonCosmological/DD0000')
but this failed because it was missing the domain_dimensions argument. I think this means it needs to have grid_data added as the first argument:
ds = yt.load_amr_grids(grid_data, '/home/ian/enzo-dev/run/Hydro/Hydro-3D/CollapseTestNonCosmological/DD0000')
I can try and work out how to define the grid_data but I don't understand why doing so wasn't necessary when I simply ran $ yt plot DD0000/DD0000 in terminal mode. Does yt plot extract the domain_dimensions automatically from the outputs, and if so is there an easy way of doing this in jupyter's yt.load_amr_grids, without having to manually set up grid_data? _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org https://mail.python.org/mailman3/lists/yt-users.python.org/ Member address: brittonsmith@gmail.com
participants (2)
-
Britton Smith
-
Ian Woodward