JuliaClimate / JuliaClimate/ClimateBase.jl

Subselection in `ncread` does not work if an index is integer

Open
#90 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug io
Dominant language
Julia
Stars
38
Forks
3
PR merge metrics
No merged PRs in 30d

Description

E.g., ncread(file, "w", (:, :, 1)) will fail, because it tries to instantiate an array that has 3 named dimensions but only 2 actual dimensions, as w[:, :, 1] is a Matrix.

@rafaqz by the way, I think Rasters.jl has this subselection feature implemented already right? Because it first makes an "image" of the full dimensional array without actually loading numeric data, and then you could subselect this image.

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 by reproducing the ncread(file, "w", (:, :, 1)) example and inspect the ncread subselection path. Compare its handling with the image-based subselection approach mentioned for Rasters.jl; done means integer-indexed subselection succeeds without a dimension mismatch.

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
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.