ecmwf / cfgrib.jl

Apache License 2.0
8 stars 7 forks source link

Use DiskArrays to boost OnDiskArray type #21

Open meggart opened 3 years ago

meggart commented 3 years ago

Currently a Variable has its data represented as an OnDiskArray which implements a convenient getindex method. However, this method does not follow all of Julia's getindex rules (e.g. a[1:1,:,:] returns a 2d instead of 3d array), is not type stable, because the element type and array dimensionality are not encoded and does not allow for simple operations like sums, maxima, minima etc. All this would be solved by making OnDiskArray a subtype of AbstractDiskArray from DiskArrays.jl.

Currently NetCDF.jl Zarr.jl and ArchGDAL use the DIskArrays interface to provide an interface for indexing into arrays that live on Disk. If package maintainers think this might be an option, I can prepare a PR.

meggart commented 3 years ago

Ping

Any activity on this repo?