Last active
February 27, 2020 21:36
-
-
Save jhamman/ad375c1b8a35388f3c591759751f4034 to your computer and use it in GitHub Desktop.
streaming-zarr-blog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
store = zarr.RedisStore(port=args.port) | |
root = zarr.group(store=store, overwrite=True) | |
t = 0 | |
while True: | |
arr = root.zeros(f"{t}", shape=grid.shape, chunks=(25, 25)) # create a new array for this timestep | |
arr[…] = grid # write data to zarr array | |
t += 1 # increment the time counter | |
time.sleep(update_interval) | |
grid = update(grid, N) # evolve the model one time step |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment