JuliaDataCubes / JuliaDataCubes/YAXArrays.jl

compute on subset does not work

Open
#598 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
132
Forks
25
PR merge metrics
No merged PRs in 30d

Description

running compute on a subset of a datacube gives a warning that nothing needs to be computed even though the data has a GMWOPResult in it.

julia> outdataset.gpp[site=1].data
14245×1 DiskArrays.SubDiskArray{Float64, 2, DiskArrayEngine.GMWOPResult{Float64, 3, DiskArrayEngine.GMDWop{3, T, NT, DiskArrayEngine.UserOp{DiskArrayEngine.ElementFunction{DiskArrayEngine.CapturedArgsFunc{typeof(TEMYax), NT, NT}, DiskArrayEngine.Mutating}, NT, NT, NT, NT, NT}, DiskArrayEngine.LoopIndSplitter{(1, 2, 3), (), ((true, 1), (true, 2), (true, 3))}}, DiskArrays.Unchunked{DiskArrays.SubRanges{DiskArrays.NoStepRange}}, 1}, T, false}

Unchunked

julia> compute(outdataset.gpp[site=1])
┌ Warning: Yaxarray does not wrap a computation, nothing to do
└ @ YAXArrays.Xmap ~/Documents/SindbadAnywhere/dev/YAXArrays/src/DAT/xmap.jl:585
┌ 14245×1 YAXArray{Float64, 2} ┐
├──────────────────────────────┴ dims ┐
  ↓ Ti Sampled{DateTime} [DateTime("1979-01-01T00:00:00"), …, DateTime("2017-12-31T00:00:00")] ForwardOrdered Irregular Points,
  → depth_soilGrids Sampled{IntervalSets.ClosedInterval{Int64}} [1 .. 7] ForwardOrdered Irregular Intervals{Start}
├────────────────────── loaded lazily ┤
  data size: 111.29 KB
└─────────────────────────────────────┘

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/DAT/xmap.jl around line 585, where compute on the subset emits the warning. Reproduce the example with outdataset.gpp[site=1] and trace how the subset's GMWOPResult is detected; done means compute recognizes and processes the pending computation without reporting that nothing needs to be computed.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.