No warnings produced when running aggregate_parallel_files.py
Current Behavior
The following warning is produced:
/glade/u/apps/opt/conda/envs/npl-2024a/lib/python3.11/site-packages/xarray/core/utils.py:494:
FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension
names in future, in order to be more consistent with `DataArray.dims`. To access a mapping
from dimension names to lengths, please use `Dataset.sizes`.
warnings.warn(
Possible Solution
Switch to Dataset.sizes like the future warning recommends. It seems to be occurring from the following section, but the warning gets cut off so it might be a different place.
if len(dims) == 1:
nt = d.dims[dims[0]]
data = np.zeros((nt))
if len(dims) == 2:
data = np.zeros((ny + y_off, nx + x_off))
if len(dims) == 3:
data = np.zeros((d.dims[dims[0]], ny + y_off, nx + x_off))
if len(dims) == 4:
nt = d.dims[dims[0]]
nz = d.dims[dims[1]]
data = np.zeros((nt, nz, ny + y_off, nx + x_off))
Steps to Reproduce (for bugs)
Run helpers/aggregate_parallel_files.py on ICAR output files.
Your Environment
Version of the code: develop branch
Operating System and version: Derecho
Compiler and version: Python 3.11.6
Other relevant information: Conda environment npl-20241
Expected Behavior
No warnings produced when running
aggregate_parallel_files.py
Current Behavior
The following warning is produced:
Possible Solution
Switch to
Dataset.sizes
like the future warning recommends. It seems to be occurring from the following section, but the warning gets cut off so it might be a different place.Steps to Reproduce (for bugs)
helpers/aggregate_parallel_files.py
on ICAR output files.Your Environment
develop
branchnpl-20241