[yt-users] 2D Axisymmetric BoxLib Dataset Issue

Max Katz maxpkatz at gmail.com
Mon Jan 18 13:40:14 PST 2016


That results in the following:

Traceback (most recent call last):
  File "analyze.py", line 78, in <module>
    wdmerger.rho_T_scatterplot(eps_filename, output_dir + pltfile)
  File "/home/mkatz/codes/wdmerger/analysis/wdmerger.py", line 617, in
rho_T_scatterplot
    grid = ds.covering_grid(level=0, left_edge = problo, dims = [1024,
2048, 1])
  File
"/gpfs/home/mkatz/codes/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py",
line 506, in __init__
    rdx[np.where(np.array(dims) - 2 * num_ghost_zones <= 1)] = 1   # issue
602
IndexError: index 2 is out of bounds for axis 1 with size 2


Max Katz
Ph.D. Candidate, Department of Physics and Astronomy
Stony Brook University
http://astro.sunysb.edu/mkatz/

On Mon, Jan 18, 2016 at 3:32 PM, Kacper Kowalik <xarthisius.kk at gmail.com>
wrote:

> On 01/18/2016 11:59 AM, Max Katz wrote:
>
>> Hi all,
>>
>> I'm trying to use yt for analysis of a 2D axisymmetric (R-z) dataset using
>> the BoxLib frontend. After I load the dataset I am trying to make a
>> covering grid with the following commands:
>>
>>      ds = yt.load(pltfile)
>>
>>      problo = ds.domain_left_edge.v
>>      probhi = ds.domain_right_edge.v
>>      dim    = ds.domain_dimensions
>>
>>      grid = ds.covering_grid(level=0, left_edge = problo, dims = dim)
>>
>> That leads to the following output at the terminal:
>>
>> yt : [INFO     ] 2016-01-18 01:35:47,516 Parameters:
>> current_time              = 0.0
>> yt : [INFO     ] 2016-01-18 01:35:47,516 Parameters:
>> domain_dimensions         = [1024 2048]
>> yt : [INFO     ] 2016-01-18 01:35:47,517 Parameters:
>> domain_left_edge          = [  0.00000000e+00  -5.12000000e+09
>> 0.00000000e+00]
>> yt : [INFO     ] 2016-01-18 01:35:47,517 Parameters:
>> domain_right_edge         = [  5.12000000e+09   5.12000000e+09
>> 6.28318531e+00]
>> Traceback (most recent call last):
>>    File "analyze.py", line 78, in <module>
>>      wdmerger.rho_T_scatterplot(eps_filename, output_dir + pltfile)
>>    File "/home/mkatz/codes/wdmerger/analysis/wdmerger.py", line 615, in
>> rho_T_scatterplot
>>      grid = ds.covering_grid(level=0, left_edge = problo, dims = dim)
>>    File
>>
>> "/gpfs/home/mkatz/codes/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py",
>> line 503, in __init__
>>      self.ActiveDimensions = self._sanitize_dims(dims)
>>    File
>>
>> "/gpfs/home/mkatz/codes/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py",
>> line 552, in _sanitize_dims
>>      "Length of dims must match the dimensionality of the dataset")
>> RuntimeError: Length of dims must match the dimensionality of the dataset
>>
>> Thoughts? It seems like the code has some inconsistency in what the
>> dimensionality of the dataset is. The Castro plot file in question doesn't
>> provide that third angular dimension of size 2*pi.
>>
>
> Could you try dims=[1024, 2048, 1] ?
>
> Cheers,
> Kacper
>
> Max Katz
>> Ph.D. Candidate, Department of Physics and Astronomy
>> Stony Brook University
>> http://astro.sunysb.edu/mkatz/
>>
>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160118/3ac51e0c/attachment.htm>
-------------- next part --------------
_______________________________________________
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