|
89 | 89 | "name": "stdout", |
90 | 90 | "output_type": "stream", |
91 | 91 | "text": [ |
92 | | - "Key(offsets={'lat': 0, 'lon': 0, 'time': 0}, vars=None) \u003cclass 'xarray.core.dataset.Dataset'\u003e\n", |
93 | | - "Key(offsets={'lat': 0, 'lon': 0, 'time': 1000}, vars=None) \u003cclass 'xarray.core.dataset.Dataset'\u003e\n", |
94 | | - "Key(offsets={'lat': 0, 'lon': 0, 'time': 2000}, vars=None) \u003cclass 'xarray.core.dataset.Dataset'\u003e\n" |
| 92 | + "Key(offsets={'lat': 0, 'lon': 0, 'time': 0}, vars=None) <class 'xarray.core.dataset.Dataset'>\n", |
| 93 | + "Key(offsets={'lat': 0, 'lon': 0, 'time': 1000}, vars=None) <class 'xarray.core.dataset.Dataset'>\n", |
| 94 | + "Key(offsets={'lat': 0, 'lon': 0, 'time': 2000}, vars=None) <class 'xarray.core.dataset.Dataset'>\n" |
95 | 95 | ] |
96 | 96 | } |
97 | 97 | ], |
|
141 | 141 | "name": "stdout", |
142 | 142 | "output_type": "stream", |
143 | 143 | "text": [ |
144 | | - "\u003cxarray.Dataset\u003e\n", |
| 144 | + "<xarray.Dataset>\n", |
145 | 145 | "Dimensions: (time: 2920, lat: 25, lon: 53)\n", |
146 | 146 | "Coordinates:\n", |
147 | 147 | " * lat (lat) float32 75.0 72.5 70.0 67.5 65.0 ... 25.0 22.5 20.0 17.5 15.0\n", |
|
195 | 195 | "name": "stdout", |
196 | 196 | "output_type": "stream", |
197 | 197 | "text": [ |
198 | | - "Key(offsets={'lat': 0, 'lon': 0, 'time': 0}, vars=None) \u003cclass 'xarray.core.dataset.Dataset'\u003e\n", |
199 | | - "Key(offsets={'lat': 0, 'lon': 0, 'time': 1000}, vars=None) \u003cclass 'xarray.core.dataset.Dataset'\u003e\n", |
200 | | - "Key(offsets={'lat': 0, 'lon': 0, 'time': 2000}, vars=None) \u003cclass 'xarray.core.dataset.Dataset'\u003e\n" |
| 198 | + "Key(offsets={'lat': 0, 'lon': 0, 'time': 0}, vars=None) <class 'xarray.core.dataset.Dataset'>\n", |
| 199 | + "Key(offsets={'lat': 0, 'lon': 0, 'time': 1000}, vars=None) <class 'xarray.core.dataset.Dataset'>\n", |
| 200 | + "Key(offsets={'lat': 0, 'lon': 0, 'time': 2000}, vars=None) <class 'xarray.core.dataset.Dataset'>\n" |
201 | 201 | ] |
202 | 202 | } |
203 | 203 | ], |
|
245 | 245 | "name": "stdout", |
246 | 246 | "output_type": "stream", |
247 | 247 | "text": [ |
248 | | - "\u003cxarray.Dataset\u003e\n", |
| 248 | + "<xarray.Dataset>\n", |
249 | 249 | "Dimensions: (time: 2920, lat: 25, lon: 53)\n", |
250 | 250 | "Coordinates:\n", |
251 | 251 | " * lat (lat) float32 75.0 72.5 70.0 67.5 65.0 ... 25.0 22.5 20.0 17.5 15.0\n", |
252 | 252 | " * lon (lon) float32 200.0 202.5 205.0 207.5 ... 322.5 325.0 327.5 330.0\n", |
253 | 253 | " * time (time) datetime64[ns] 2013-01-01 ... 2014-12-31T18:00:00\n", |
254 | 254 | "Data variables:\n", |
255 | | - " air (time, lat, lon) float32 dask.array\u003cchunksize=(2920, 25, 53), meta=np.ndarray\u003e\n", |
| 255 | + " air (time, lat, lon) float32 dask.array<chunksize=(2920, 25, 53), meta=np.ndarray>\n", |
256 | 256 | "Attributes:\n", |
257 | 257 | " Conventions: COARDS\n", |
258 | 258 | " description: Data is from NMC initialized reanalysis\\n(4x/day). These a...\n", |
|
352 | 352 | "name": "stderr", |
353 | 353 | "output_type": "stream", |
354 | 354 | "text": [ |
355 | | - "WARNING:apache_beam.coders.coder_impl:Using fallback deterministic coder for type '\u003cclass 'xarray_beam._src.core.Key'\u003e' in '[11]: ConsolidateChunks/GroupByTempKeys'. \n", |
356 | | - "WARNING:apache_beam.coders.coder_impl:Using fallback deterministic coder for type '\u003cclass 'xarray_beam._src.core.Key'\u003e' in '[11]: ConsolidateChunks/GroupByTempKeys'. \n" |
| 355 | + "WARNING:apache_beam.coders.coder_impl:Using fallback deterministic coder for type '<class 'xarray_beam._src.core.Key'>' in '[11]: ConsolidateChunks/GroupByTempKeys'. \n", |
| 356 | + "WARNING:apache_beam.coders.coder_impl:Using fallback deterministic coder for type '<class 'xarray_beam._src.core.Key'>' in '[11]: ConsolidateChunks/GroupByTempKeys'. \n" |
357 | 357 | ] |
358 | 358 | } |
359 | 359 | ], |
360 | 360 | "source": [ |
361 | 361 | "all_days = pd.date_range('2013-01-01', '2014-01-01', freq='1D')\n", |
362 | 362 | "\n", |
363 | | - "def load_one_example(time: pd.Timestamp) -\u003e tuple[xbeam.Key, xarray.Dataset]:\n", |
| 363 | + "def load_one_example(time: pd.Timestamp) -> tuple[xbeam.Key, xarray.Dataset]:\n", |
364 | 364 | " key = xbeam.Key({'time': (time - all_days[0]).days})\n", |
365 | 365 | " dataset = ds.sel(time=[time]) # replace with your code to create one example\n", |
366 | 366 | " return key, dataset\n", |
|
428 | 428 | "name": "stdout", |
429 | 429 | "output_type": "stream", |
430 | 430 | "text": [ |
431 | | - "Key(offsets={'lat': 0, 'lon': 0, 'time': 0}, vars=None) \u003cclass 'xarray.core.dataset.Dataset'\u003e\n", |
432 | | - "Key(offsets={'lat': 0, 'lon': 0, 'time': 1000}, vars=None) \u003cclass 'xarray.core.dataset.Dataset'\u003e\n", |
433 | | - "Key(offsets={'lat': 0, 'lon': 0, 'time': 2000}, vars=None) \u003cclass 'xarray.core.dataset.Dataset'\u003e\n" |
| 431 | + "Key(offsets={'lat': 0, 'lon': 0, 'time': 0}, vars=None) <class 'xarray.core.dataset.Dataset'>\n", |
| 432 | + "Key(offsets={'lat': 0, 'lon': 0, 'time': 1000}, vars=None) <class 'xarray.core.dataset.Dataset'>\n", |
| 433 | + "Key(offsets={'lat': 0, 'lon': 0, 'time': 2000}, vars=None) <class 'xarray.core.dataset.Dataset'>\n" |
434 | 434 | ] |
435 | 435 | } |
436 | 436 | ], |
|
0 commit comments