Skip to content

a robust way to determine dimensions and shape #529

@lazarusA

Description

@lazarusA

This check is too brittle:

const hasTimeChunks = is4D ? fullShape[1]/chunkShape[0] > 1 : fullShape[0]/chunkShape[0] > 1

Things work if the order is

  • time, Lon, lat or
  • p, time, Lon, lat,

but it will fail if it is

  • lon, lat, time !, which is a very common pattern.

Soon I will have use cases where things will be like

  • lon, lat, depth or depth, lon, lat.

we already have functions for getting the dimension names and shapes, we will only need maybe a permutedims function, to be applied in the GetArray values (to get proper slices also), before passing them to the shaders, or maybe apply transforms directly there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions