YAXArrays.jl icon indicating copy to clipboard operation
YAXArrays.jl copied to clipboard

Opening a set of NetCDF fails

Open Sonicious opened this issue 1 year ago • 5 comments

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?

Sonicious avatar Feb 04 '24 11:02 Sonicious

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

felixcremer avatar Feb 04 '24 12:02 felixcremer

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

Sonicious avatar Feb 04 '24 16:02 Sonicious

Yes, we need to tag a new DiskArrays release.

felixcremer avatar Feb 04 '24 16:02 felixcremer

With DiskArrays 0.3.23 cat should work.

felixcremer avatar Feb 05 '24 13:02 felixcremer

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

Sonicious avatar Feb 05 '24 14:02 Sonicious

close by #470, #481

lazarusA avatar Dec 16 '24 22:12 lazarusA