Skip to content

Add more timestamps, variables to example data #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hanbyul-here opened this issue Apr 16, 2025 · 4 comments
Open

Add more timestamps, variables to example data #1

hanbyul-here opened this issue Apr 16, 2025 · 4 comments
Assignees

Comments

@hanbyul-here
Copy link
Contributor

No description provided.

@abarciauskas-bgse
Copy link

@maxrjones I would be interested in trying to do this if it is ok with you (or we could pair) - looking at https://developmentseed.org/geozarr-examples/examples/04_multiscales_as_WebMercatorQuad_ZarrV3.html it seems like, for each new time step, we would need to :

  1. add append_dim to template.to_zarr(...)`
  2. Write to the subsequent time index for the new data, za[1, y_start:y_stop, x_start:x_stop] = tile, za[2, y_start:y_stop, x_start:x_stop] = tile...

but I'm probably missing a step or 2 without trying it 😅

@maxrjones
Copy link
Member

I think rather than using append_dim(), you could construct a dataset with multiple time steps in memory since these are all pretty small. It may be as simple as changing ds = xr.open_dataset(input) to use open_mfdataset(...) with two adjacent NetCDF files.

@abarciauskas-bgse
Copy link

That makes sense, I was just wondering if for continuous appending, what would be the set of necessary operations based in your example, but perhaps that is overkill for what is currently needed - is that what you are thinking?

@maxrjones
Copy link
Member

That makes sense, I was just wondering if for continuous appending, what would be the set of necessary operations based in your example, but perhaps that is overkill for what is currently needed - is that what you are thinking?

makes sense, yes append dim would work for continuous appending to a web-optimized zarr. at the same time, it's probably not necessary for Hanbyul's request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants