File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,16 @@ gcloud auth application-default login
9
9
import xarray as xr
10
10
import xarray_sql as qr
11
11
12
- # TODO(alxmrs): Add coiled or dask cluster code.
12
+ from coiled import Cluster
13
+
14
+ cluster = Cluster (
15
+ region = 'us-central1' ,
16
+ worker_memory = '16 GiB' ,
17
+ spot_policy = 'spot_with_fallback' ,
18
+ arm = True ,
19
+ )
20
+ client = cluster .get_client ()
21
+ cluster .adapt (minimum = 1 , maximum = 100 )
13
22
14
23
era5_ds = xr .open_zarr (
15
24
'gs://gcp-public-data-arco-era5/ar/'
@@ -22,7 +31,7 @@ era5_sst_ds = era5_ds[['sea_surface_temperature']].sel(
22
31
level = 1000 , # surface level only.
23
32
)
24
33
25
- # chunk sizes determined from VM memory limit of 16 GB .
34
+ # chunk sizes determined from VM memory limit of 16 GiB .
26
35
c = qr .Context ()
27
36
c .create_table ('era5' , era5_sst_ds , chunks = dict (time = 24 ))
28
37
You can’t perform that action at this time.
0 commit comments