def test_remote(self): import s3fs endpoint_url = "https://s3.eu-central-1.amazonaws.com" s3 = s3fs.S3FileSystem(anon=True, client_kwargs=dict(endpoint_url=endpoint_url)) s3_store = s3fs.S3Map(root="xcube-examples/OLCI-SNS-RAW-CUBE-2.zarr", s3=s3, check=False) diagnostic_store = DiagnosticStore( s3_store, logging_observer(log_path='remote-cube.log')) xr.open_zarr(diagnostic_store)
def test_remote(self): import s3fs endpoint_url = "http://obs.eu-de.otc.t-systems.com" s3 = s3fs.S3FileSystem(anon=True, client_kwargs=dict(endpoint_url=endpoint_url)) s3_store = s3fs.S3Map( root="cyanoalert/cyanoalert-olci-lswe-l2c-v1.zarr", s3=s3, check=False) diagnostic_store = DiagnosticStore( s3_store, logging_observer(log_path='remote-cube.log')) xr.open_zarr(diagnostic_store)
def test_local(self): cube = new_cube(time_periods=10, time_start='2019-01-01', variables=dict(precipitation=0.1, temperature=270.5, soil_moisture=0.2)) cube = chunk_dataset(cube, dict(time=1, lat=90, lon=90), format_name='zarr') cube.to_zarr(self.CUBE_PATH) cube.close() diagnostic_store = DiagnosticStore( zarr.DirectoryStore(self.CUBE_PATH), logging_observer(log_path='local-cube.log')) xr.open_zarr(diagnostic_store)