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

Opening a set of NetCDF fails #365

Closed
Sonicious opened this issue Feb 4, 2024 · 6 comments
Closed

Opening a set of NetCDF fails #365

Sonicious opened this issue Feb 4, 2024 · 6 comments
Labels
breaking documentation Improvements or additions to documentation

Comments

@Sonicious
Copy link
Collaborator

Sonicious commented Feb 4, 2024

Opening a set of NetCDF results in error through multiple ways:

using YAXArrays, NetCDF

filelist = readdir("Path/to/NetCDF/directory", join = true)
Cube = YAXArrays.Datasets.open_mfdataset(filelist) # ERROR: KeyError: key :Ti not found
using YAXArrays, NetCDF
filelist = readdir("Path/to/NetCDF/directory", join = true)
cubes = Cube.(filelist)
cat(cubes...,dims=Ti) # ERROR: TypeError: in keyword argument dims, expected Int64, got a value of type Tuple{Int64}

Is there a way to use a bunch of netcdf and open them? Is there an alternative way to convert these to a zarr archive?

@felixcremer
Copy link
Member

On what version of DiskArrays are you? With DiskArrays master the last version should work.

@Sonicious
Copy link
Collaborator Author

According to Manifest.toml I use version = "0.3.22" which is the latest release coupled with YAXArrays 0.5.3

@felixcremer
Copy link
Member

Yes, we need to tag a new DiskArrays release.

@felixcremer
Copy link
Member

With DiskArrays 0.3.23 cat should work.

@Sonicious
Copy link
Collaborator Author

Sonicious commented Feb 5, 2024

In case of cat(cubes...,dims=Ti) I now get ERROR: KeyError: key :Ti not found

  [3c3547ce] DiskArrays v0.3.23
  [30363a11] NetCDF v0.11.7
  [c21b50f5] YAXArrays v0.5.3
  [0a941bbe] Zarr v0.9.1
julia> using YAXArrays, NetCDF
julia> filelist = readdir("D:\\LAI\\LAI_AVHRR", join = true);
julia> cubes = Cube.(filelist);
julia> cat(cubes...,dims=Ti)
ERROR: UndefVarError: `Ti` not defined
Stacktrace:
 [1] top-level scope
   @ REPL[22]:1

@lazarusA
Copy link
Collaborator

close by #470, #481

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

No branches or pull requests

3 participants