Skip to content
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

Open multiple NetCDF files fails: AssertionError: length(dslist) == prod(sizeblockar) #216

Closed
dpabon opened this issue Jan 23, 2023 · 2 comments

Comments

@dpabon
Copy link
Contributor

dpabon commented Jan 23, 2023

When I try to open multiple Netcdf using:

lcc = YAXArrays.Datasets.open_mfdataset("/Net/Groups/BGI/data/DataStructureMDI/DATA/grid/Global/0d083_annual/MCD12Q1/V006/Data/MCD12Q1_*.nc")

I got:

ERROR: AssertionError: length(dslist) == prod(sizeblockar)
Stacktrace:
 [1] merge_datasets(dslist::Vector{Dataset})
   @ YAXArrays.Datasets /Net/Groups/BGI/people/dpabon/bin/julia_packages/packages/YAXArrays/Fe7F8/src/DatasetAPI/Datasets.jl:835
 [2] #open_mfdataset#49
   @ /Net/Groups/BGI/people/dpabon/bin/julia_packages/packages/YAXArrays/Fe7F8/src/DatasetAPI/Datasets.jl:245 [inlined]
 [3] open_mfdataset
   @ /Net/Groups/BGI/people/dpabon/bin/julia_packages/packages/YAXArrays/Fe7F8/src/DatasetAPI/Datasets.jl:245 [inlined]
 [4] #open_mfdataset#48
   @ /Net/Groups/BGI/people/dpabon/bin/julia_packages/packages/YAXArrays/Fe7F8/src/DatasetAPI/Datasets.jl:244 [inlined]
 [5] open_mfdataset(g::String)
   @ YAXArrays.Datasets /Net/Groups/BGI/people/dpabon/bin/julia_packages/packages/YAXArrays/Fe7F8/src/DatasetAPI/Datasets.jl:244
@lazarusA
Copy link
Collaborator

it looks like not all files have the same dimensions. Try a lower subset of files, or some of the ones that you know have exactly the same dims. Maybe that would help.

@dpabon
Copy link
Contributor Author

dpabon commented Jan 23, 2023

Ok, I did a bit of “hard-debugging” in this case the files does not have a time dimension to aggregate them. Then the merge_datasets function fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants