CliMA / CliMA/ClimaAnalysis.jl

Add DimDict

Open
#339 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
12
Forks
5
Avg merge
7d 2h
Merged PRs (30d)
2

Description

Related to #321 - Dealing with dimensions is painful as you need to worry about the name of each dimension. This makes it difficult as you need to standardize the names of the dimensions or if you are working with multiple `OutputVar`s, you choose one `OutputVar` and use the naming of those dimensions to standardize. Furthermore, there could potentially be type instability from the number of dimensions not being known unless you use `ndims(var.data)`.

To improve on all these issues, it would be nice to make another struct called `DimDict` whose purpose is to map dimension name to dimension vectors. This could used tuples or some other container as the keys and values with linear search instead of hashing. Lastly, type stability can be improved as information about the length can be included in the struct.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading related issue #321 and the existing OutputVar handling, including how dimension names and var.data are currently accessed. Define what the proposed DimDict must map and how it should encode dimension length; done means the design addresses name lookup, multiple OutputVars, and type stability without relying on ndims(var.data).

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.