Skip to content

Advice on how to append multiple dimensions when to_zarr #9950

Answered by dcherian
songhan89 asked this question in General
Discussion options

You must be logged in to vote

A few points:

  1. time and step are the orthogonal dimensions here, valid_time = time + step . You should not need to add it to the expand_dims call.
  2. append_dim only works along a single dimension.

IIUC you should only need to append along time. Here's how:

  1. construct a schema dataset for the update with chunking that matches what's on disk. This doesn't need to contain real values and can be done using dask.array.ones or similar. The shape of this dataset should match the size of latitude ,longitude, step dimensions on disk. The size of the time dimension is 1 assuming you are ingesting a single forecast run. Make sure the time coordinate has the appropriate timestamp. https://github.com/e…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by songhan89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants