Skip to content
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

Rename V2 datacubes to have names consistent with composites #21

Open
mliukis opened this issue Nov 14, 2023 · 0 comments
Open

Rename V2 datacubes to have names consistent with composites #21

mliukis opened this issue Nov 14, 2023 · 0 comments
Assignees

Comments

@mliukis
Copy link
Collaborator

mliukis commented Nov 14, 2023

Currently used naming convention for the datacubes
http://its-live-data.s3.amazonaws.com/datacubes/v2/S50W070/ITS_LIVE_vel_EPSG32718_G0120_X450000_Y4450000.zarr
should be changed to be consistent with corresponding composites:
http://its-live-data.s3.amazonaws.com/datacubes/v2/S50W070/ITS_LIVE_**velocity**_EPSG32718_**120m**_X450000_Y4450000.zarr

To change global attributes within each of the datacubes in place (thanks to Alex Goodman: I think actually you might not even need to specify mode and the cube will just be writable by default):

import s3fs
import zarr
fs = s3fs.S3FileSystem(key=<aws_access_key_id>, 
                       secret=<aws_secret_access_key>,
                       token=<aws_session_token>)
mapper = fs.get_mapper(<new_s3_url>)
g = zarr.open(mapper, mode='a')
g.attrs['s3'] = <new_s3_url>
g.attrs['url'] = <new_https_url>
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

1 participant