-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when reading multiple files of ROMS_native #1467
Comments
You can also merge the files manually with xarray.open_mfdataset, and then
create a reader from this dataset:
ds = xr.open_mfdataset(.....)
r = Reader(ds)
…On Fri, Dec 27, 2024, 17:04 MarianoTonini ***@***.***> wrote:
Hello everyone,
when I try to read several files with the ROMS_native.py reader from the
same simulation (example: croco_avg_00*.nc), it fails to concatenate them.
Apparently it does not find the correctly time dimension.
The files already have several records each, they are not single-record
files.
I would appreciatte any help on this matter.
The output error is as follows:
Traceback (most recent call last):
File "/home/ubuntu/opendrift/opendrift/readers/reader_ROMS_native.py",
line 160, in *init*
self.Dataset = xr.open_mfdataset(filename,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/ubuntu/miniconda3/envs/opendrift/lib/python3.11/site-packages/xarray/backends/api.py",
line 1607, in open_mfdataset
combined = combine_by_coords(
^^^^^^^^^^^^^^^^^^
File
"/home/ubuntu/miniconda3/envs/opendrift/lib/python3.11/site-packages/xarray/core/combine.py",
line 973, in combine_by_coords
concatenated_grouped_by_data_vars = tuple(
^^^^^^
File
"/home/ubuntu/miniconda3/envs/opendrift/lib/python3.11/site-packages/xarray/core/combine.py",
line 974, in
_combine_single_variable_hypercube(
File
"/home/ubuntu/miniconda3/envs/opendrift/lib/python3.11/site-packages/xarray/core/combine.py",
line 634, in _combine_single_variable_hypercube
combined_ids, concat_dims = _infer_concat_order_from_coords(list(datasets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/ubuntu/miniconda3/envs/opendrift/lib/python3.11/site-packages/xarray/core/combine.py",
line 159, in _infer_concat_order_from_coords
raise ValueError(
ValueError: Could not find any dimension coordinates to use to order the
datasets for concatenation
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/home/ubuntu/opendrift/examples/./CROCO_romsnative_drift03_hourly.py",
line 27, in
croco_native =
reader_ROMS_native.Reader('/media/ubuntu/SATA3/CROCO/croco_v121/GN_GSJOS_22/nest_avg_drift03hourly_opendrift*.nc');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/opendrift/opendrift/readers/reader_ROMS_native.py",
line 168, in *init*
raise ValueError(e)
ValueError: Could not find any dimension coordinates to use to order the
datasets for concatenation
—
Reply to this email directly, view it on GitHub
<#1467>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABH25IZXSCIEE7EL7SN33XT2HV3ANAVCNFSM6AAAAABUIZVZ6SVHI2DSMVQWIX3LMV43ASLTON2WKOZSG43DCMBUGU3DIMY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello everyone,
when I try to read several files with the ROMS_native.py reader from the same simulation (example: croco_avg_00*.nc), it fails to concatenate them. Apparently it does not find the correctly time dimension.
The files already have several records each, they are not single-record files.
I would appreciatte any help on this matter.
The output error is as follows:
Traceback (most recent call last):
File "/home/ubuntu/opendrift/opendrift/readers/reader_ROMS_native.py", line 160, in init
self.Dataset = xr.open_mfdataset(filename,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/miniconda3/envs/opendrift/lib/python3.11/site-packages/xarray/backends/api.py", line 1607, in open_mfdataset
combined = combine_by_coords(
^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/miniconda3/envs/opendrift/lib/python3.11/site-packages/xarray/core/combine.py", line 973, in combine_by_coords
concatenated_grouped_by_data_vars = tuple(
^^^^^^
File "/home/ubuntu/miniconda3/envs/opendrift/lib/python3.11/site-packages/xarray/core/combine.py", line 974, in
_combine_single_variable_hypercube(
File "/home/ubuntu/miniconda3/envs/opendrift/lib/python3.11/site-packages/xarray/core/combine.py", line 634, in _combine_single_variable_hypercube
combined_ids, concat_dims = _infer_concat_order_from_coords(list(datasets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/miniconda3/envs/opendrift/lib/python3.11/site-packages/xarray/core/combine.py", line 159, in _infer_concat_order_from_coords
raise ValueError(
ValueError: Could not find any dimension coordinates to use to order the datasets for concatenation
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/opendrift/examples/./CROCO_romsnative_drift03_hourly.py", line 27, in
croco_native = reader_ROMS_native.Reader('/media/ubuntu/SATA3/CROCO/croco_v121/GN_GSJOS_22/nest_avg_drift03hourly_opendrift*.nc');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/opendrift/opendrift/readers/reader_ROMS_native.py", line 168, in init
raise ValueError(e)
ValueError: Could not find any dimension coordinates to use to order the datasets for concatenation
The text was updated successfully, but these errors were encountered: