Skip to content

Commit

Permalink
add DiskArrays forwarding to Variable
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Aug 13, 2024
1 parent ba9a735 commit d952655
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ Base.parent(var::Variable) = var.values
Base.size(var::Variable) = _size_dims(var.dims)
Base.getindex(var::Variable, I...) = getindex(parent(var), I...)

DA.eachchunk(A::Variable) = DA.eachchunks(parent(A))
DA.haschunks(A::Variable) = DA.haschunks(parent(A))
DA.readblock!(A::Variable, aout, i::AbstractUnitRange...) =
DA.readblock!(parent(A), aout, i...)

ndims(::AbstractGRIBVariable{T,N}) where {T,N} = N
varname(var::Variable) = var.name
dims(var::Variable) = var.dims
Expand Down

0 comments on commit d952655

Please sign in to comment.