JuliaDataCubes / JuliaDataCubes/YAXArrays.jl

renaming dimensions?

Open
#500 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

Hi recently I came across this issue:

sentinel_3_cube = Cube(open_dataset("/Net/Groups/BGI/work_3/OEMC/oemc_sif/data/OLCI_Sentinel3_gridded_1km_europe_2018-01-04_2020-12-29.zarr/"))

produce:

┌ 4800×4800×138×10 YAXArray{Float32, 4} ┐
├───────────────────────────────────────┴──────────────── dims ┐
  ↓ X         Sampled{Int64} 1:1:4800 ForwardOrdered Regular Points,
  → Y         Sampled{Int64} 1:1:4800 ForwardOrdered Regular Points,
  ↗ time      Sampled{DateTime} [2018-01-04T00:00:00, …, 2020-12-29T00:00:00] ForwardOrdered Irregular Points,
  ⬔ Variables Categorical{String} [RC865, lat, …, OGVI_sigma, RC681_sigma] Unordered

if I do:

### selecting only OGVI and 2018-07

ogvi_cube_high = sentinel_3_cube[Variable = At("OGVI"), Ti = Between(DateTime("2018-07-01"),DateTime("2018-07-31"))]

This works!!

The expected behaviour should be:

Error: Variable and Ti dimensions not found. check for typos

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

Reproduce the issue with the shown Julia dataset and indexing expressions. Inspect the dimension-name lookup and selection entry points to determine why Variable and Ti are accepted when the displayed dimensions are Variables and time; done when invalid dimension names produce the stated error without breaking valid selection.

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.