Traceback (most recent call last):
File "/Users/chavlin/.pyenv/versions/yt_xarray/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3548, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-2-ab0c8dd2561b>", line 5, in <module>
slc = yt.SlicePlot(ds_yt, 'altitude', 'air')
File "/Users/chavlin/.pyenv/versions/3.10.11/envs/yt_xarray/lib/python3.10/site-packages/yt/visualization/plot_window.py", line 1833, in __init__
slc.get_data(fields)
File "/Users/chavlin/.pyenv/versions/3.10.11/envs/yt_xarray/lib/python3.10/site-packages/yt/data_objects/selection_objects/data_selection_objects.py", line 205, in get_data
read_fluids, gen_fluids = self.index._read_fluid_fields(
File "/Users/chavlin/.pyenv/versions/3.10.11/envs/yt_xarray/lib/python3.10/site-packages/yt/geometry/geometry_handler.py", line 241, in _read_fluid_fields
fields_to_return = self.io._read_fluid_selection(
File "/Users/chavlin/.pyenv/versions/3.10.11/envs/yt_xarray/lib/python3.10/site-packages/yt/frontends/stream/io.py", line 51, in _read_fluid_selection
ind += g.select(selector, ds, rv[field], ind) # caches
File "/Users/chavlin/.pyenv/versions/3.10.11/envs/yt_xarray/lib/python3.10/site-packages/yt/data_objects/index_subobjects/grid_patch.py", line 414, in select
dest[offset : offset + count, i] = source[tuple(sl)][np.squeeze(mask)]
IndexError: boolean index did not match indexed array along dimension 1; dimension is 0 but corresponding boolean dimension is 50
When an
isel
is applied to reduce dimensions, the callable needs to adjust the domain dims appropriately when fetching the xarray data: