mewamuwa commited on
Commit
f04c276
·
verified ·
1 Parent(s): 3fd28f1

Kode til CNN'er: temp, vel_x og vel_y

Browse files
conv_antarctis_randomsearch_temp.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
conv_antarctis_randomsearch_velocity_x.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
conv_antarctis_randomsearch_velocity_y.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
make_conv_train_philip_temperature_ithbm.ipynb ADDED
@@ -0,0 +1,1107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "id": "0dd2c5d4",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "import xarray as xr\n",
11
+ "import geopandas as gpd\n",
12
+ "from shapely.geometry import box\n",
13
+ "import rioxarray as rxr # Make sure you have rioxarray installed (pip install rioxarray)\n",
14
+ "import numpy as np\n",
15
+ "import ibis\n",
16
+ "ibis.options.interactive = True"
17
+ ]
18
+ },
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": 2,
22
+ "id": "d615f835",
23
+ "metadata": {},
24
+ "outputs": [
25
+ {
26
+ "data": {
27
+ "text/plain": [
28
+ "<duckdb.duckdb.DuckDBPyConnection at 0x15589e6b0>"
29
+ ]
30
+ },
31
+ "execution_count": 2,
32
+ "metadata": {},
33
+ "output_type": "execute_result"
34
+ }
35
+ ],
36
+ "source": [
37
+ "con = ibis.duckdb.connect()\n",
38
+ "con.raw_sql('INSTALL spatial;')\n",
39
+ "con.raw_sql('LOAD spatial;')"
40
+ ]
41
+ },
42
+ {
43
+ "cell_type": "markdown",
44
+ "id": "700cf1f9",
45
+ "metadata": {},
46
+ "source": [
47
+ "- The .rio accessor: https://corteva.github.io/rioxarray/html/rioxarray.html#rioxarray-rio-accessors\n",
48
+ "\n",
49
+ "- Affine( pixel_width, 0, top_left_x_coord,\n",
50
+ " 0, -pixel_height, top_left_y_coord)\n",
51
+ "\n",
52
+ "- Rasterio Affine Docs (https://affine.readthedocs.io/en/latest/)"
53
+ ]
54
+ },
55
+ {
56
+ "cell_type": "code",
57
+ "execution_count": 3,
58
+ "id": "cf514138",
59
+ "metadata": {},
60
+ "outputs": [
61
+ {
62
+ "name": "stdout",
63
+ "output_type": "stream",
64
+ "text": [
65
+ "<xarray.DataArray 't2m' (band: 1, y: 1801, x: 3600)> Size: 52MB\n",
66
+ "[6483600 values with dtype=float64]\n",
67
+ "Coordinates:\n",
68
+ " * band (band) int64 8B 1\n",
69
+ " * x (x) float64 29kB -179.9 -179.8 -179.7 ... 179.8 179.9 180.0\n",
70
+ " * y (y) float64 14kB 90.0 89.9 89.8 89.7 ... -89.8 -89.9 -90.0\n",
71
+ " spatial_ref int64 8B 0\n",
72
+ "Attributes:\n",
73
+ " _FillValue: nan\n",
74
+ " scale_factor: 1.0\n",
75
+ " add_offset: 0.0\n"
76
+ ]
77
+ }
78
+ ],
79
+ "source": [
80
+ "filename = 'era5land_era5.nc'\n",
81
+ "sat_im = rxr.open_rasterio(filename)\n",
82
+ "#sat_im = sat_im.rio.reproject(\"EPSG:3031\")\n",
83
+ "transform = sat_im.rio.transform()\n",
84
+ "print(sat_im)"
85
+ ]
86
+ },
87
+ {
88
+ "cell_type": "code",
89
+ "execution_count": 4,
90
+ "id": "106bf063",
91
+ "metadata": {},
92
+ "outputs": [
93
+ {
94
+ "name": "stdout",
95
+ "output_type": "stream",
96
+ "text": [
97
+ "EPSG:4326\n"
98
+ ]
99
+ }
100
+ ],
101
+ "source": [
102
+ "print(sat_im.rio.crs)"
103
+ ]
104
+ },
105
+ {
106
+ "cell_type": "code",
107
+ "execution_count": 5,
108
+ "id": "7cc14869",
109
+ "metadata": {},
110
+ "outputs": [],
111
+ "source": [
112
+ "tab = con.read_parquet('punkter_til_CNN.parquet')"
113
+ ]
114
+ },
115
+ {
116
+ "cell_type": "code",
117
+ "execution_count": 6,
118
+ "id": "0fec2bb7",
119
+ "metadata": {},
120
+ "outputs": [],
121
+ "source": [
122
+ "# Let's create a dummy GeoPandas DataFrame for demonstration\n",
123
+ "#num_points = 200_000\n",
124
+ "#frac_points = num_points/30_000_000\n",
125
+ "# Generate random points within a reasonable Antarctica extent (approx for EPSG:3031)\n",
126
+ "# min_x, max_x = -2000000, 2000000\n",
127
+ "# min_y, max_y = -2000000, 2000000\n",
128
+ "# random_x = np.random.uniform(min_x, max_x, num_points)\n",
129
+ "# random_y = np.random.uniform(min_y, max_y, num_points)\n",
130
+ "# ice_thickness_data = np.random.uniform(100, 5000, num_points) # Example ice thickness\n",
131
+ "# v_data = np.random.uniform(0, 1, num_points) # Example velocity\n",
132
+ "# temp_data = np.random.uniform(0, 1000, num_points) # Example temperature\n",
133
+ "\n",
134
+ "# gdf = gpd.GeoDataFrame(\n",
135
+ "# {'ice_thickness': ice_thickness_data,\n",
136
+ "# 'v': v_data,\n",
137
+ "# 'temp': temp_data\n",
138
+ "# },\n",
139
+ "# geometry=gpd.points_from_xy(random_x, random_y),\n",
140
+ "# crs=\"EPSG:3031\"\n",
141
+ "# )\n",
142
+ "#data = tab.drop(['LON','LAT'])\n",
143
+ "data = tab\n",
144
+ "#random_data = data.sample(frac_points)\n",
145
+ "\n",
146
+ "# 3.1. Create a spatial index for your GeoDataFrame\n",
147
+ "gdf = data.to_pandas()\n",
148
+ "gdf.crs = \"EPSG:4326\"\n",
149
+ "gdf_sindex = gdf.sindex"
150
+ ]
151
+ },
152
+ {
153
+ "cell_type": "code",
154
+ "execution_count": 7,
155
+ "id": "88b2eb18",
156
+ "metadata": {},
157
+ "outputs": [],
158
+ "source": [
159
+ "#gdf.to_parquet(\"punkter_til_CNN.parquet\")"
160
+ ]
161
+ },
162
+ {
163
+ "cell_type": "code",
164
+ "execution_count": 8,
165
+ "id": "ae2f315d",
166
+ "metadata": {},
167
+ "outputs": [
168
+ {
169
+ "data": {
170
+ "text/html": [
171
+ "<div>\n",
172
+ "<style scoped>\n",
173
+ " .dataframe tbody tr th:only-of-type {\n",
174
+ " vertical-align: middle;\n",
175
+ " }\n",
176
+ "\n",
177
+ " .dataframe tbody tr th {\n",
178
+ " vertical-align: top;\n",
179
+ " }\n",
180
+ "\n",
181
+ " .dataframe thead th {\n",
182
+ " text-align: right;\n",
183
+ " }\n",
184
+ "</style>\n",
185
+ "<table border=\"1\" class=\"dataframe\">\n",
186
+ " <thead>\n",
187
+ " <tr style=\"text-align: right;\">\n",
188
+ " <th></th>\n",
189
+ " <th>THICK</th>\n",
190
+ " <th>geometry</th>\n",
191
+ " <th>EAST</th>\n",
192
+ " <th>NORTH</th>\n",
193
+ " <th>vx</th>\n",
194
+ " <th>vy</th>\n",
195
+ " <th>v</th>\n",
196
+ " <th>ith_bm</th>\n",
197
+ " <th>smb</th>\n",
198
+ " <th>z</th>\n",
199
+ " <th>s</th>\n",
200
+ " <th>temp</th>\n",
201
+ " <th>gridCellId</th>\n",
202
+ " </tr>\n",
203
+ " </thead>\n",
204
+ " <tbody>\n",
205
+ " <tr>\n",
206
+ " <th>0</th>\n",
207
+ " <td>721.812000</td>\n",
208
+ " <td>POINT (2526549.10533 144908.31682)</td>\n",
209
+ " <td>2.526549e+06</td>\n",
210
+ " <td>1.449083e+05</td>\n",
211
+ " <td>153.634560</td>\n",
212
+ " <td>2.790444</td>\n",
213
+ " <td>153.659899</td>\n",
214
+ " <td>721.467940</td>\n",
215
+ " <td>346.598053</td>\n",
216
+ " <td>77.386441</td>\n",
217
+ " <td>0.007674</td>\n",
218
+ " <td>260.754211</td>\n",
219
+ " <td>142</td>\n",
220
+ " </tr>\n",
221
+ " <tr>\n",
222
+ " <th>1</th>\n",
223
+ " <td>2486.400000</td>\n",
224
+ " <td>POINT (1521616.52708 -1469968.82491)</td>\n",
225
+ " <td>1.521617e+06</td>\n",
226
+ " <td>-1.469969e+06</td>\n",
227
+ " <td>-2.169074</td>\n",
228
+ " <td>-4.493365</td>\n",
229
+ " <td>4.989510</td>\n",
230
+ " <td>2398.450355</td>\n",
231
+ " <td>134.622343</td>\n",
232
+ " <td>2677.818154</td>\n",
233
+ " <td>0.002828</td>\n",
234
+ " <td>233.461512</td>\n",
235
+ " <td>49</td>\n",
236
+ " </tr>\n",
237
+ " <tr>\n",
238
+ " <th>2</th>\n",
239
+ " <td>802.200000</td>\n",
240
+ " <td>POINT (2404674.36981 -1067011.29092)</td>\n",
241
+ " <td>2.404674e+06</td>\n",
242
+ " <td>-1.067011e+06</td>\n",
243
+ " <td>60.294909</td>\n",
244
+ " <td>-142.512808</td>\n",
245
+ " <td>154.742937</td>\n",
246
+ " <td>688.203481</td>\n",
247
+ " <td>1586.881584</td>\n",
248
+ " <td>249.042803</td>\n",
249
+ " <td>0.011071</td>\n",
250
+ " <td>261.087043</td>\n",
251
+ " <td>70</td>\n",
252
+ " </tr>\n",
253
+ " <tr>\n",
254
+ " <th>3</th>\n",
255
+ " <td>3023.950000</td>\n",
256
+ " <td>POINT (1699952.88986 99913.87625)</td>\n",
257
+ " <td>1.699953e+06</td>\n",
258
+ " <td>9.991388e+04</td>\n",
259
+ " <td>0.934968</td>\n",
260
+ " <td>2.743626</td>\n",
261
+ " <td>2.898560</td>\n",
262
+ " <td>3014.002473</td>\n",
263
+ " <td>64.349997</td>\n",
264
+ " <td>3356.340342</td>\n",
265
+ " <td>0.002495</td>\n",
266
+ " <td>230.660568</td>\n",
267
+ " <td>140</td>\n",
268
+ " </tr>\n",
269
+ " <tr>\n",
270
+ " <th>4</th>\n",
271
+ " <td>1390.175481</td>\n",
272
+ " <td>POINT (1113434.26992 1790978.98662)</td>\n",
273
+ " <td>1.113434e+06</td>\n",
274
+ " <td>1.790979e+06</td>\n",
275
+ " <td>0.057320</td>\n",
276
+ " <td>7.032495</td>\n",
277
+ " <td>7.032729</td>\n",
278
+ " <td>1235.187350</td>\n",
279
+ " <td>178.636116</td>\n",
280
+ " <td>892.512017</td>\n",
281
+ " <td>0.002860</td>\n",
282
+ " <td>253.317246</td>\n",
283
+ " <td>246</td>\n",
284
+ " </tr>\n",
285
+ " <tr>\n",
286
+ " <th>...</th>\n",
287
+ " <td>...</td>\n",
288
+ " <td>...</td>\n",
289
+ " <td>...</td>\n",
290
+ " <td>...</td>\n",
291
+ " <td>...</td>\n",
292
+ " <td>...</td>\n",
293
+ " <td>...</td>\n",
294
+ " <td>...</td>\n",
295
+ " <td>...</td>\n",
296
+ " <td>...</td>\n",
297
+ " <td>...</td>\n",
298
+ " <td>...</td>\n",
299
+ " <td>...</td>\n",
300
+ " </tr>\n",
301
+ " <tr>\n",
302
+ " <th>199738</th>\n",
303
+ " <td>1919.390000</td>\n",
304
+ " <td>POINT (-1486478.85277 -414384.66781)</td>\n",
305
+ " <td>-1.486479e+06</td>\n",
306
+ " <td>-4.143847e+05</td>\n",
307
+ " <td>-301.083286</td>\n",
308
+ " <td>-156.749208</td>\n",
309
+ " <td>339.442867</td>\n",
310
+ " <td>1897.753276</td>\n",
311
+ " <td>630.135663</td>\n",
312
+ " <td>825.209678</td>\n",
313
+ " <td>0.011550</td>\n",
314
+ " <td>254.742781</td>\n",
315
+ " <td>93</td>\n",
316
+ " </tr>\n",
317
+ " <tr>\n",
318
+ " <th>199739</th>\n",
319
+ " <td>601.280000</td>\n",
320
+ " <td>POINT (-1726950.88714 238389.96168)</td>\n",
321
+ " <td>-1.726951e+06</td>\n",
322
+ " <td>2.383900e+05</td>\n",
323
+ " <td>-33.293658</td>\n",
324
+ " <td>7.757353</td>\n",
325
+ " <td>34.185438</td>\n",
326
+ " <td>726.883071</td>\n",
327
+ " <td>1334.391422</td>\n",
328
+ " <td>632.884411</td>\n",
329
+ " <td>0.025015</td>\n",
330
+ " <td>256.262266</td>\n",
331
+ " <td>128</td>\n",
332
+ " </tr>\n",
333
+ " <tr>\n",
334
+ " <th>199740</th>\n",
335
+ " <td>3022.010000</td>\n",
336
+ " <td>POINT (1265667.68011 -1049619.52903)</td>\n",
337
+ " <td>1.265668e+06</td>\n",
338
+ " <td>-1.049620e+06</td>\n",
339
+ " <td>-0.757103</td>\n",
340
+ " <td>-1.348858</td>\n",
341
+ " <td>1.546810</td>\n",
342
+ " <td>2749.802718</td>\n",
343
+ " <td>34.202691</td>\n",
344
+ " <td>3065.901918</td>\n",
345
+ " <td>0.000934</td>\n",
346
+ " <td>225.997403</td>\n",
347
+ " <td>66</td>\n",
348
+ " </tr>\n",
349
+ " <tr>\n",
350
+ " <th>199741</th>\n",
351
+ " <td>1503.770000</td>\n",
352
+ " <td>POINT (-934393.81087 251856.89214)</td>\n",
353
+ " <td>-9.343938e+05</td>\n",
354
+ " <td>2.518569e+05</td>\n",
355
+ " <td>-250.500161</td>\n",
356
+ " <td>186.584424</td>\n",
357
+ " <td>312.352490</td>\n",
358
+ " <td>1464.022580</td>\n",
359
+ " <td>158.329718</td>\n",
360
+ " <td>211.082870</td>\n",
361
+ " <td>0.007703</td>\n",
362
+ " <td>248.743671</td>\n",
363
+ " <td>131</td>\n",
364
+ " </tr>\n",
365
+ " <tr>\n",
366
+ " <th>199742</th>\n",
367
+ " <td>2781.140000</td>\n",
368
+ " <td>POINT (1792527.87148 317702.83796)</td>\n",
369
+ " <td>1.792528e+06</td>\n",
370
+ " <td>3.177028e+05</td>\n",
371
+ " <td>0.805005</td>\n",
372
+ " <td>5.014312</td>\n",
373
+ " <td>5.078519</td>\n",
374
+ " <td>2736.503206</td>\n",
375
+ " <td>79.982648</td>\n",
376
+ " <td>2865.923339</td>\n",
377
+ " <td>0.002951</td>\n",
378
+ " <td>236.933552</td>\n",
379
+ " <td>158</td>\n",
380
+ " </tr>\n",
381
+ " </tbody>\n",
382
+ "</table>\n",
383
+ "<p>199743 rows × 13 columns</p>\n",
384
+ "</div>"
385
+ ],
386
+ "text/plain": [
387
+ " THICK geometry EAST \\\n",
388
+ "0 721.812000 POINT (2526549.10533 144908.31682) 2.526549e+06 \n",
389
+ "1 2486.400000 POINT (1521616.52708 -1469968.82491) 1.521617e+06 \n",
390
+ "2 802.200000 POINT (2404674.36981 -1067011.29092) 2.404674e+06 \n",
391
+ "3 3023.950000 POINT (1699952.88986 99913.87625) 1.699953e+06 \n",
392
+ "4 1390.175481 POINT (1113434.26992 1790978.98662) 1.113434e+06 \n",
393
+ "... ... ... ... \n",
394
+ "199738 1919.390000 POINT (-1486478.85277 -414384.66781) -1.486479e+06 \n",
395
+ "199739 601.280000 POINT (-1726950.88714 238389.96168) -1.726951e+06 \n",
396
+ "199740 3022.010000 POINT (1265667.68011 -1049619.52903) 1.265668e+06 \n",
397
+ "199741 1503.770000 POINT (-934393.81087 251856.89214) -9.343938e+05 \n",
398
+ "199742 2781.140000 POINT (1792527.87148 317702.83796) 1.792528e+06 \n",
399
+ "\n",
400
+ " NORTH vx vy v ith_bm \\\n",
401
+ "0 1.449083e+05 153.634560 2.790444 153.659899 721.467940 \n",
402
+ "1 -1.469969e+06 -2.169074 -4.493365 4.989510 2398.450355 \n",
403
+ "2 -1.067011e+06 60.294909 -142.512808 154.742937 688.203481 \n",
404
+ "3 9.991388e+04 0.934968 2.743626 2.898560 3014.002473 \n",
405
+ "4 1.790979e+06 0.057320 7.032495 7.032729 1235.187350 \n",
406
+ "... ... ... ... ... ... \n",
407
+ "199738 -4.143847e+05 -301.083286 -156.749208 339.442867 1897.753276 \n",
408
+ "199739 2.383900e+05 -33.293658 7.757353 34.185438 726.883071 \n",
409
+ "199740 -1.049620e+06 -0.757103 -1.348858 1.546810 2749.802718 \n",
410
+ "199741 2.518569e+05 -250.500161 186.584424 312.352490 1464.022580 \n",
411
+ "199742 3.177028e+05 0.805005 5.014312 5.078519 2736.503206 \n",
412
+ "\n",
413
+ " smb z s temp gridCellId \n",
414
+ "0 346.598053 77.386441 0.007674 260.754211 142 \n",
415
+ "1 134.622343 2677.818154 0.002828 233.461512 49 \n",
416
+ "2 1586.881584 249.042803 0.011071 261.087043 70 \n",
417
+ "3 64.349997 3356.340342 0.002495 230.660568 140 \n",
418
+ "4 178.636116 892.512017 0.002860 253.317246 246 \n",
419
+ "... ... ... ... ... ... \n",
420
+ "199738 630.135663 825.209678 0.011550 254.742781 93 \n",
421
+ "199739 1334.391422 632.884411 0.025015 256.262266 128 \n",
422
+ "199740 34.202691 3065.901918 0.000934 225.997403 66 \n",
423
+ "199741 158.329718 211.082870 0.007703 248.743671 131 \n",
424
+ "199742 79.982648 2865.923339 0.002951 236.933552 158 \n",
425
+ "\n",
426
+ "[199743 rows x 13 columns]"
427
+ ]
428
+ },
429
+ "execution_count": 8,
430
+ "metadata": {},
431
+ "output_type": "execute_result"
432
+ }
433
+ ],
434
+ "source": [
435
+ "gdf"
436
+ ]
437
+ },
438
+ {
439
+ "cell_type": "code",
440
+ "execution_count": 9,
441
+ "id": "8cd3bb9e",
442
+ "metadata": {},
443
+ "outputs": [
444
+ {
445
+ "data": {
446
+ "text/plain": [
447
+ "199743"
448
+ ]
449
+ },
450
+ "execution_count": 9,
451
+ "metadata": {},
452
+ "output_type": "execute_result"
453
+ }
454
+ ],
455
+ "source": [
456
+ "len(gdf)"
457
+ ]
458
+ },
459
+ {
460
+ "cell_type": "code",
461
+ "execution_count": 10,
462
+ "id": "3f8fbde2",
463
+ "metadata": {},
464
+ "outputs": [
465
+ {
466
+ "name": "stderr",
467
+ "output_type": "stream",
468
+ "text": [
469
+ "/var/folders/44/y59xjnbx6fqfgz896mcmxfw80000gn/T/ipykernel_4818/1954644510.py:34: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.\n",
470
+ " if (x_idx - half < 0 or x_idx + half + 1 > ds.dims[\"x\"] or\n",
471
+ "/var/folders/44/y59xjnbx6fqfgz896mcmxfw80000gn/T/ipykernel_4818/1954644510.py:35: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.\n",
472
+ " y_idx - half < 0 or y_idx + half + 1 > ds.dims[\"y\"]):\n"
473
+ ]
474
+ },
475
+ {
476
+ "name": "stdout",
477
+ "output_type": "stream",
478
+ "text": [
479
+ "Brugte 198407 punkter, skippede 1336.\n"
480
+ ]
481
+ }
482
+ ],
483
+ "source": [
484
+ "import xarray as xr\n",
485
+ "import numpy as np\n",
486
+ "import geopandas as gpd\n",
487
+ "from shapely.geometry import Point\n",
488
+ "\n",
489
+ "# Åbn temperaturdata (ingen rioxarray nødvendig)\n",
490
+ "ds = xr.open_dataset(\"era5land_era5.nc\")\n",
491
+ "t2m = ds[\"t2m\"] # (y, x)\n",
492
+ "\n",
493
+ "# Åbn dine punkter i EPSG:4326 (forudsat det passer – ellers transformér det)\n",
494
+ "gdf = gpd.read_parquet(\"punkter_til_CNN.parquet\")\n",
495
+ "gdf = gdf.to_crs(\"EPSG:4326\") # Sørg for at punkter er i geografisk koordinatsystem\n",
496
+ "\n",
497
+ "# Billedstørrelse (27 pixels dækker 2.7° × 2.7°)\n",
498
+ "size = 27\n",
499
+ "half = size // 2\n",
500
+ "pixel_deg = 0.1 # resolution pr. pixel i grader\n",
501
+ "\n",
502
+ "images = []\n",
503
+ "scalar_feats = ['THICK', 'vx', 'vy', 'v', 'smb', 'z', 's', 'temp', 'ith_bm', 'gridCellId']\n",
504
+ "im_data = {feat: [] for feat in scalar_feats}\n",
505
+ "\n",
506
+ "used = 0\n",
507
+ "skipped = 0\n",
508
+ "\n",
509
+ "for idx, row in gdf.iterrows():\n",
510
+ " lon, lat = row.geometry.x, row.geometry.y\n",
511
+ "\n",
512
+ " # Find indeks i datasættet tættest på punktets koordinater\n",
513
+ " x_idx = int(np.argmin(np.abs(ds[\"x\"].values - lon)))\n",
514
+ " y_idx = int(np.argmin(np.abs(ds[\"y\"].values - lat)))\n",
515
+ "\n",
516
+ " # Tjek om vi kan trække et 27×27 udsnit uden at gå ud over kanter\n",
517
+ " if (x_idx - half < 0 or x_idx + half + 1 > ds.dims[\"x\"] or\n",
518
+ " y_idx - half < 0 or y_idx + half + 1 > ds.dims[\"y\"]):\n",
519
+ " skipped += 1\n",
520
+ " continue\n",
521
+ "\n",
522
+ " patch = t2m.isel(\n",
523
+ " y=slice(y_idx - half, y_idx + half + 1),\n",
524
+ " x=slice(x_idx - half, x_idx + half + 1)\n",
525
+ " )\n",
526
+ "\n",
527
+ " images.append(patch.values)\n",
528
+ " for feat in scalar_feats:\n",
529
+ " im_data[feat].append(row[feat])\n",
530
+ " used += 1\n",
531
+ "\n",
532
+ "print(f\"Brugte {used} punkter, skippede {skipped}.\")"
533
+ ]
534
+ },
535
+ {
536
+ "cell_type": "code",
537
+ "execution_count": 11,
538
+ "id": "0c5e8c24",
539
+ "metadata": {},
540
+ "outputs": [
541
+ {
542
+ "name": "stdout",
543
+ "output_type": "stream",
544
+ "text": [
545
+ "✅ Gemte dataset med labels som 'conv_temp_ithbm_4326.nc'\n"
546
+ ]
547
+ }
548
+ ],
549
+ "source": [
550
+ "# Konverter billeder til en samlet 3D-array\n",
551
+ "image_array = np.stack(images)\n",
552
+ "\n",
553
+ "# Vælg hvilken feature du vil bruge som label\n",
554
+ "label_feature = \"THICK\" # ← Skift dette hvis du ønsker noget andet\n",
555
+ "\n",
556
+ "# Lav DataArray til billeder\n",
557
+ "images_da = xr.DataArray(\n",
558
+ " image_array,\n",
559
+ " dims=[\"sample\", \"x\", \"y\"],\n",
560
+ " coords={\"sample\": np.arange(image_array.shape[0]),\n",
561
+ " \"x\": np.arange(27),\n",
562
+ " \"y\": np.arange(27)},\n",
563
+ " name=\"images\"\n",
564
+ ")\n",
565
+ "\n",
566
+ "# Scalar-variabler og label\n",
567
+ "scalar_data = {\n",
568
+ " feat: xr.DataArray(\n",
569
+ " np.array(im_data[feat]),\n",
570
+ " dims=[\"sample\"],\n",
571
+ " coords={\"sample\": np.arange(image_array.shape[0])},\n",
572
+ " name=feat\n",
573
+ " )\n",
574
+ " for feat in scalar_feats\n",
575
+ "}\n",
576
+ "\n",
577
+ "# Tilføj label som separat variabel (samme som label_feature)\n",
578
+ "labels_da = xr.DataArray(\n",
579
+ " np.array(im_data[label_feature]),\n",
580
+ " dims=[\"sample\"],\n",
581
+ " coords={\"sample\": np.arange(image_array.shape[0])},\n",
582
+ " name=\"labels\"\n",
583
+ ")\n",
584
+ "\n",
585
+ "# Saml alt i ét dataset\n",
586
+ "final_ds = xr.Dataset(\n",
587
+ " data_vars={\n",
588
+ " \"images\": images_da,\n",
589
+ " \"labels\": labels_da,\n",
590
+ " **scalar_data\n",
591
+ " },\n",
592
+ " attrs={\n",
593
+ " \"description\": f\"CNN data med temperaturbilleder og '{label_feature}' som labels.\"\n",
594
+ " }\n",
595
+ ")\n",
596
+ "\n",
597
+ "# Gem som NetCDF\n",
598
+ "final_ds.to_netcdf(\"conv_temp_ithbm_4326.nc\")\n",
599
+ "print(\"✅ Gemte dataset med labels som 'conv_temp_ithbm_4326.nc'\")\n"
600
+ ]
601
+ },
602
+ {
603
+ "cell_type": "code",
604
+ "execution_count": 12,
605
+ "id": "6cc1c242",
606
+ "metadata": {},
607
+ "outputs": [
608
+ {
609
+ "ename": "NameError",
610
+ "evalue": "name 'training_data_ds' is not defined",
611
+ "output_type": "error",
612
+ "traceback": [
613
+ "\u001b[31m---------------------------------------------------------------------------\u001b[39m",
614
+ "\u001b[31mNameError\u001b[39m Traceback (most recent call last)",
615
+ "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[12]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[43mtraining_data_ds\u001b[49m\n",
616
+ "\u001b[31mNameError\u001b[39m: name 'training_data_ds' is not defined"
617
+ ]
618
+ }
619
+ ],
620
+ "source": [
621
+ "training_data_ds"
622
+ ]
623
+ },
624
+ {
625
+ "cell_type": "code",
626
+ "execution_count": null,
627
+ "id": "c0812faa",
628
+ "metadata": {},
629
+ "outputs": [],
630
+ "source": [
631
+ "training_data_ds.to_netcdf('conv_temp_1_01.nc')"
632
+ ]
633
+ },
634
+ {
635
+ "cell_type": "code",
636
+ "execution_count": null,
637
+ "id": "bdb4d03a",
638
+ "metadata": {},
639
+ "outputs": [],
640
+ "source": [
641
+ "test_import = xr.open_dataset('conv_temp.nc') "
642
+ ]
643
+ },
644
+ {
645
+ "cell_type": "code",
646
+ "execution_count": null,
647
+ "id": "6bf789a6",
648
+ "metadata": {},
649
+ "outputs": [
650
+ {
651
+ "data": {
652
+ "text/html": [
653
+ "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
654
+ "<defs>\n",
655
+ "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
656
+ "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
657
+ "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
658
+ "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
659
+ "</symbol>\n",
660
+ "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
661
+ "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
662
+ "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
663
+ "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
664
+ "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
665
+ "</symbol>\n",
666
+ "</defs>\n",
667
+ "</svg>\n",
668
+ "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
669
+ " *\n",
670
+ " */\n",
671
+ "\n",
672
+ ":root {\n",
673
+ " --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
674
+ " --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
675
+ " --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
676
+ " --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
677
+ " --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
678
+ " --xr-background-color: var(--jp-layout-color0, white);\n",
679
+ " --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
680
+ " --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
681
+ "}\n",
682
+ "\n",
683
+ "html[theme=\"dark\"],\n",
684
+ "html[data-theme=\"dark\"],\n",
685
+ "body[data-theme=\"dark\"],\n",
686
+ "body.vscode-dark {\n",
687
+ " --xr-font-color0: rgba(255, 255, 255, 1);\n",
688
+ " --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
689
+ " --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
690
+ " --xr-border-color: #1f1f1f;\n",
691
+ " --xr-disabled-color: #515151;\n",
692
+ " --xr-background-color: #111111;\n",
693
+ " --xr-background-color-row-even: #111111;\n",
694
+ " --xr-background-color-row-odd: #313131;\n",
695
+ "}\n",
696
+ "\n",
697
+ ".xr-wrap {\n",
698
+ " display: block !important;\n",
699
+ " min-width: 300px;\n",
700
+ " max-width: 700px;\n",
701
+ "}\n",
702
+ "\n",
703
+ ".xr-text-repr-fallback {\n",
704
+ " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
705
+ " display: none;\n",
706
+ "}\n",
707
+ "\n",
708
+ ".xr-header {\n",
709
+ " padding-top: 6px;\n",
710
+ " padding-bottom: 6px;\n",
711
+ " margin-bottom: 4px;\n",
712
+ " border-bottom: solid 1px var(--xr-border-color);\n",
713
+ "}\n",
714
+ "\n",
715
+ ".xr-header > div,\n",
716
+ ".xr-header > ul {\n",
717
+ " display: inline;\n",
718
+ " margin-top: 0;\n",
719
+ " margin-bottom: 0;\n",
720
+ "}\n",
721
+ "\n",
722
+ ".xr-obj-type,\n",
723
+ ".xr-array-name {\n",
724
+ " margin-left: 2px;\n",
725
+ " margin-right: 10px;\n",
726
+ "}\n",
727
+ "\n",
728
+ ".xr-obj-type {\n",
729
+ " color: var(--xr-font-color2);\n",
730
+ "}\n",
731
+ "\n",
732
+ ".xr-sections {\n",
733
+ " padding-left: 0 !important;\n",
734
+ " display: grid;\n",
735
+ " grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n",
736
+ "}\n",
737
+ "\n",
738
+ ".xr-section-item {\n",
739
+ " display: contents;\n",
740
+ "}\n",
741
+ "\n",
742
+ ".xr-section-item input {\n",
743
+ " display: inline-block;\n",
744
+ " opacity: 0;\n",
745
+ " height: 0;\n",
746
+ "}\n",
747
+ "\n",
748
+ ".xr-section-item input + label {\n",
749
+ " color: var(--xr-disabled-color);\n",
750
+ "}\n",
751
+ "\n",
752
+ ".xr-section-item input:enabled + label {\n",
753
+ " cursor: pointer;\n",
754
+ " color: var(--xr-font-color2);\n",
755
+ "}\n",
756
+ "\n",
757
+ ".xr-section-item input:focus + label {\n",
758
+ " border: 2px solid var(--xr-font-color0);\n",
759
+ "}\n",
760
+ "\n",
761
+ ".xr-section-item input:enabled + label:hover {\n",
762
+ " color: var(--xr-font-color0);\n",
763
+ "}\n",
764
+ "\n",
765
+ ".xr-section-summary {\n",
766
+ " grid-column: 1;\n",
767
+ " color: var(--xr-font-color2);\n",
768
+ " font-weight: 500;\n",
769
+ "}\n",
770
+ "\n",
771
+ ".xr-section-summary > span {\n",
772
+ " display: inline-block;\n",
773
+ " padding-left: 0.5em;\n",
774
+ "}\n",
775
+ "\n",
776
+ ".xr-section-summary-in:disabled + label {\n",
777
+ " color: var(--xr-font-color2);\n",
778
+ "}\n",
779
+ "\n",
780
+ ".xr-section-summary-in + label:before {\n",
781
+ " display: inline-block;\n",
782
+ " content: \"►\";\n",
783
+ " font-size: 11px;\n",
784
+ " width: 15px;\n",
785
+ " text-align: center;\n",
786
+ "}\n",
787
+ "\n",
788
+ ".xr-section-summary-in:disabled + label:before {\n",
789
+ " color: var(--xr-disabled-color);\n",
790
+ "}\n",
791
+ "\n",
792
+ ".xr-section-summary-in:checked + label:before {\n",
793
+ " content: \"▼\";\n",
794
+ "}\n",
795
+ "\n",
796
+ ".xr-section-summary-in:checked + label > span {\n",
797
+ " display: none;\n",
798
+ "}\n",
799
+ "\n",
800
+ ".xr-section-summary,\n",
801
+ ".xr-section-inline-details {\n",
802
+ " padding-top: 4px;\n",
803
+ " padding-bottom: 4px;\n",
804
+ "}\n",
805
+ "\n",
806
+ ".xr-section-inline-details {\n",
807
+ " grid-column: 2 / -1;\n",
808
+ "}\n",
809
+ "\n",
810
+ ".xr-section-details {\n",
811
+ " display: none;\n",
812
+ " grid-column: 1 / -1;\n",
813
+ " margin-bottom: 5px;\n",
814
+ "}\n",
815
+ "\n",
816
+ ".xr-section-summary-in:checked ~ .xr-section-details {\n",
817
+ " display: contents;\n",
818
+ "}\n",
819
+ "\n",
820
+ ".xr-array-wrap {\n",
821
+ " grid-column: 1 / -1;\n",
822
+ " display: grid;\n",
823
+ " grid-template-columns: 20px auto;\n",
824
+ "}\n",
825
+ "\n",
826
+ ".xr-array-wrap > label {\n",
827
+ " grid-column: 1;\n",
828
+ " vertical-align: top;\n",
829
+ "}\n",
830
+ "\n",
831
+ ".xr-preview {\n",
832
+ " color: var(--xr-font-color3);\n",
833
+ "}\n",
834
+ "\n",
835
+ ".xr-array-preview,\n",
836
+ ".xr-array-data {\n",
837
+ " padding: 0 5px !important;\n",
838
+ " grid-column: 2;\n",
839
+ "}\n",
840
+ "\n",
841
+ ".xr-array-data,\n",
842
+ ".xr-array-in:checked ~ .xr-array-preview {\n",
843
+ " display: none;\n",
844
+ "}\n",
845
+ "\n",
846
+ ".xr-array-in:checked ~ .xr-array-data,\n",
847
+ ".xr-array-preview {\n",
848
+ " display: inline-block;\n",
849
+ "}\n",
850
+ "\n",
851
+ ".xr-dim-list {\n",
852
+ " display: inline-block !important;\n",
853
+ " list-style: none;\n",
854
+ " padding: 0 !important;\n",
855
+ " margin: 0;\n",
856
+ "}\n",
857
+ "\n",
858
+ ".xr-dim-list li {\n",
859
+ " display: inline-block;\n",
860
+ " padding: 0;\n",
861
+ " margin: 0;\n",
862
+ "}\n",
863
+ "\n",
864
+ ".xr-dim-list:before {\n",
865
+ " content: \"(\";\n",
866
+ "}\n",
867
+ "\n",
868
+ ".xr-dim-list:after {\n",
869
+ " content: \")\";\n",
870
+ "}\n",
871
+ "\n",
872
+ ".xr-dim-list li:not(:last-child):after {\n",
873
+ " content: \",\";\n",
874
+ " padding-right: 5px;\n",
875
+ "}\n",
876
+ "\n",
877
+ ".xr-has-index {\n",
878
+ " font-weight: bold;\n",
879
+ "}\n",
880
+ "\n",
881
+ ".xr-var-list,\n",
882
+ ".xr-var-item {\n",
883
+ " display: contents;\n",
884
+ "}\n",
885
+ "\n",
886
+ ".xr-var-item > div,\n",
887
+ ".xr-var-item label,\n",
888
+ ".xr-var-item > .xr-var-name span {\n",
889
+ " background-color: var(--xr-background-color-row-even);\n",
890
+ " margin-bottom: 0;\n",
891
+ "}\n",
892
+ "\n",
893
+ ".xr-var-item > .xr-var-name:hover span {\n",
894
+ " padding-right: 5px;\n",
895
+ "}\n",
896
+ "\n",
897
+ ".xr-var-list > li:nth-child(odd) > div,\n",
898
+ ".xr-var-list > li:nth-child(odd) > label,\n",
899
+ ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
900
+ " background-color: var(--xr-background-color-row-odd);\n",
901
+ "}\n",
902
+ "\n",
903
+ ".xr-var-name {\n",
904
+ " grid-column: 1;\n",
905
+ "}\n",
906
+ "\n",
907
+ ".xr-var-dims {\n",
908
+ " grid-column: 2;\n",
909
+ "}\n",
910
+ "\n",
911
+ ".xr-var-dtype {\n",
912
+ " grid-column: 3;\n",
913
+ " text-align: right;\n",
914
+ " color: var(--xr-font-color2);\n",
915
+ "}\n",
916
+ "\n",
917
+ ".xr-var-preview {\n",
918
+ " grid-column: 4;\n",
919
+ "}\n",
920
+ "\n",
921
+ ".xr-index-preview {\n",
922
+ " grid-column: 2 / 5;\n",
923
+ " color: var(--xr-font-color2);\n",
924
+ "}\n",
925
+ "\n",
926
+ ".xr-var-name,\n",
927
+ ".xr-var-dims,\n",
928
+ ".xr-var-dtype,\n",
929
+ ".xr-preview,\n",
930
+ ".xr-attrs dt {\n",
931
+ " white-space: nowrap;\n",
932
+ " overflow: hidden;\n",
933
+ " text-overflow: ellipsis;\n",
934
+ " padding-right: 10px;\n",
935
+ "}\n",
936
+ "\n",
937
+ ".xr-var-name:hover,\n",
938
+ ".xr-var-dims:hover,\n",
939
+ ".xr-var-dtype:hover,\n",
940
+ ".xr-attrs dt:hover {\n",
941
+ " overflow: visible;\n",
942
+ " width: auto;\n",
943
+ " z-index: 1;\n",
944
+ "}\n",
945
+ "\n",
946
+ ".xr-var-attrs,\n",
947
+ ".xr-var-data,\n",
948
+ ".xr-index-data {\n",
949
+ " display: none;\n",
950
+ " background-color: var(--xr-background-color) !important;\n",
951
+ " padding-bottom: 5px !important;\n",
952
+ "}\n",
953
+ "\n",
954
+ ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
955
+ ".xr-var-data-in:checked ~ .xr-var-data,\n",
956
+ ".xr-index-data-in:checked ~ .xr-index-data {\n",
957
+ " display: block;\n",
958
+ "}\n",
959
+ "\n",
960
+ ".xr-var-data > table {\n",
961
+ " float: right;\n",
962
+ "}\n",
963
+ "\n",
964
+ ".xr-var-name span,\n",
965
+ ".xr-var-data,\n",
966
+ ".xr-index-name div,\n",
967
+ ".xr-index-data,\n",
968
+ ".xr-attrs {\n",
969
+ " padding-left: 25px !important;\n",
970
+ "}\n",
971
+ "\n",
972
+ ".xr-attrs,\n",
973
+ ".xr-var-attrs,\n",
974
+ ".xr-var-data,\n",
975
+ ".xr-index-data {\n",
976
+ " grid-column: 1 / -1;\n",
977
+ "}\n",
978
+ "\n",
979
+ "dl.xr-attrs {\n",
980
+ " padding: 0;\n",
981
+ " margin: 0;\n",
982
+ " display: grid;\n",
983
+ " grid-template-columns: 125px auto;\n",
984
+ "}\n",
985
+ "\n",
986
+ ".xr-attrs dt,\n",
987
+ ".xr-attrs dd {\n",
988
+ " padding: 0;\n",
989
+ " margin: 0;\n",
990
+ " float: left;\n",
991
+ " padding-right: 10px;\n",
992
+ " width: auto;\n",
993
+ "}\n",
994
+ "\n",
995
+ ".xr-attrs dt {\n",
996
+ " font-weight: normal;\n",
997
+ " grid-column: 1;\n",
998
+ "}\n",
999
+ "\n",
1000
+ ".xr-attrs dt:hover span {\n",
1001
+ " display: inline-block;\n",
1002
+ " background: var(--xr-background-color);\n",
1003
+ " padding-right: 10px;\n",
1004
+ "}\n",
1005
+ "\n",
1006
+ ".xr-attrs dd {\n",
1007
+ " grid-column: 2;\n",
1008
+ " white-space: pre-wrap;\n",
1009
+ " word-break: break-all;\n",
1010
+ "}\n",
1011
+ "\n",
1012
+ ".xr-icon-database,\n",
1013
+ ".xr-icon-file-text2,\n",
1014
+ ".xr-no-icon {\n",
1015
+ " display: inline-block;\n",
1016
+ " vertical-align: middle;\n",
1017
+ " width: 1em;\n",
1018
+ " height: 1.5em !important;\n",
1019
+ " stroke-width: 0;\n",
1020
+ " stroke: currentColor;\n",
1021
+ " fill: currentColor;\n",
1022
+ "}\n",
1023
+ "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 1GB\n",
1024
+ "Dimensions: (x: 27, y: 27, sample: 199743)\n",
1025
+ "Coordinates:\n",
1026
+ " * x (x) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1027
+ " * y (y) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1028
+ " * sample (sample) int64 2MB 0 1 2 3 4 ... 199739 199740 199741 199742\n",
1029
+ "Data variables:\n",
1030
+ " images (sample, x, y) float64 1GB ...\n",
1031
+ " labels (sample) float64 2MB ...\n",
1032
+ " vx (sample) float64 2MB ...\n",
1033
+ " vy (sample) float64 2MB ...\n",
1034
+ " v (sample) float64 2MB ...\n",
1035
+ " smb (sample) float64 2MB ...\n",
1036
+ " z (sample) float64 2MB ...\n",
1037
+ " s (sample) float64 2MB ...\n",
1038
+ " temp (sample) float64 2MB ...\n",
1039
+ " gridCellId (sample) int64 2MB ...\n",
1040
+ "Attributes:\n",
1041
+ " description: CNN data with temperature images. Scalar features are every...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-32afea32-8b45-428a-8c12-4e71e277b1d7' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-32afea32-8b45-428a-8c12-4e71e277b1d7' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>x</span>: 27</li><li><span class='xr-has-index'>y</span>: 27</li><li><span class='xr-has-index'>sample</span>: 199743</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-93ccc5b2-3e12-4732-82f2-c36ccdb2b8d5' class='xr-section-summary-in' type='checkbox' checked><label for='section-93ccc5b2-3e12-4732-82f2-c36ccdb2b8d5' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 21 22 23 24 25 26</div><input id='attrs-454a7bea-1038-465a-90f0-9b923fa0327a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-454a7bea-1038-465a-90f0-9b923fa0327a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-52fc74dc-e224-4af0-8dc6-f421e43b3ec1' class='xr-var-data-in' type='checkbox'><label for='data-52fc74dc-e224-4af0-8dc6-f421e43b3ec1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1042
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 21 22 23 24 25 26</div><input id='attrs-168b7022-9a3f-496e-a859-f1ed0d6bfb94' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-168b7022-9a3f-496e-a859-f1ed0d6bfb94' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-13dca837-362d-4557-a8c5-e3e4371b1c49' class='xr-var-data-in' type='checkbox'><label for='data-13dca837-362d-4557-a8c5-e3e4371b1c49' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1043
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>sample</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 ... 199740 199741 199742</div><input id='attrs-419a2d7c-6807-40cd-8f2a-67a6ecff8470' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-419a2d7c-6807-40cd-8f2a-67a6ecff8470' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3582f8a2-2a23-47f3-84b7-55c883c1cad0' class='xr-var-data-in' type='checkbox'><label for='data-3582f8a2-2a23-47f3-84b7-55c883c1cad0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, ..., 199740, 199741, 199742])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-9e48a2cb-873b-4224-a788-a68b8c3850a5' class='xr-section-summary-in' type='checkbox' checked><label for='section-9e48a2cb-873b-4224-a788-a68b8c3850a5' class='xr-section-summary' >Data variables: <span>(10)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>images</span></div><div class='xr-var-dims'>(sample, x, y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-b0ec4c73-a25c-4bc7-b758-6d19bc9a5f98' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b0ec4c73-a25c-4bc7-b758-6d19bc9a5f98' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-809d1aee-dd44-413d-8f79-a146b49131e7' class='xr-var-data-in' type='checkbox'><label for='data-809d1aee-dd44-413d-8f79-a146b49131e7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[145612647 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>labels</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-9a10d2f6-94ca-49fd-9369-5ae670d0abfd' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9a10d2f6-94ca-49fd-9369-5ae670d0abfd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8f853efd-ce54-488d-be45-cc26321734bd' class='xr-var-data-in' type='checkbox'><label for='data-8f853efd-ce54-488d-be45-cc26321734bd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>vx</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-fbcce912-9d8a-46ad-93ca-bde6aff5ac74' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fbcce912-9d8a-46ad-93ca-bde6aff5ac74' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7fe33aac-7116-4842-aeaa-02d5741980e0' class='xr-var-data-in' type='checkbox'><label for='data-7fe33aac-7116-4842-aeaa-02d5741980e0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>vy</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-0518c3b0-4bf5-4c42-9f93-d63bf053031c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0518c3b0-4bf5-4c42-9f93-d63bf053031c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-dbf0324c-d5a1-4135-8b61-e6b36bf714ff' class='xr-var-data-in' type='checkbox'><label for='data-dbf0324c-d5a1-4135-8b61-e6b36bf714ff' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>v</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-260f6549-cfea-4dcb-9b34-832528731bc5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-260f6549-cfea-4dcb-9b34-832528731bc5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-dfd18aa1-db6f-4af7-87a1-d2624c9a564d' class='xr-var-data-in' type='checkbox'><label for='data-dfd18aa1-db6f-4af7-87a1-d2624c9a564d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smb</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-751b016c-2007-4093-b95d-5d80f53eb969' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-751b016c-2007-4093-b95d-5d80f53eb969' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-16246d6e-6bd1-49a5-96d6-f56830790fd0' class='xr-var-data-in' type='checkbox'><label for='data-16246d6e-6bd1-49a5-96d6-f56830790fd0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>z</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-463545b9-a9d2-4d5e-85b0-a87d7f6cecf8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-463545b9-a9d2-4d5e-85b0-a87d7f6cecf8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d74e9d7a-be0a-44cc-8b2a-732b2e8d3982' class='xr-var-data-in' type='checkbox'><label for='data-d74e9d7a-be0a-44cc-8b2a-732b2e8d3982' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>s</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-d585db01-05fd-47c4-8491-497d5f8570b0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d585db01-05fd-47c4-8491-497d5f8570b0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-091afb11-929d-4f53-bf69-002dd449b309' class='xr-var-data-in' type='checkbox'><label for='data-091afb11-929d-4f53-bf69-002dd449b309' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>temp</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-54d69425-21ea-4145-a2df-e67a99313680' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-54d69425-21ea-4145-a2df-e67a99313680' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-70e2e118-1c06-4cf0-9f43-b112e323adcc' class='xr-var-data-in' type='checkbox'><label for='data-70e2e118-1c06-4cf0-9f43-b112e323adcc' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>gridCellId</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-a4fcc5ff-8f22-46a8-bfc5-95e4b9bcc4cd' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a4fcc5ff-8f22-46a8-bfc5-95e4b9bcc4cd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0bd44784-d467-4c9f-8c88-f7231cea581f' class='xr-var-data-in' type='checkbox'><label for='data-0bd44784-d467-4c9f-8c88-f7231cea581f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=int64]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-318c3fa4-ea81-4638-8d49-6abffe30f8e7' class='xr-section-summary-in' type='checkbox' ><label for='section-318c3fa4-ea81-4638-8d49-6abffe30f8e7' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>x</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-8556ae75-116b-4231-9520-5ac6ead2852c' class='xr-index-data-in' type='checkbox'/><label for='index-8556ae75-116b-4231-9520-5ac6ead2852c' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1044
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26],\n",
1045
+ " dtype=&#x27;int64&#x27;, name=&#x27;x&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>y</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-f36debc0-7425-4433-90f0-75ebf4f9d672' class='xr-index-data-in' type='checkbox'/><label for='index-f36debc0-7425-4433-90f0-75ebf4f9d672' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1046
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26],\n",
1047
+ " dtype=&#x27;int64&#x27;, name=&#x27;y&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>sample</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-fbf8a665-4b05-4f34-bc7e-eff455d180d7' class='xr-index-data-in' type='checkbox'/><label for='index-fbf8a665-4b05-4f34-bc7e-eff455d180d7' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8,\n",
1048
+ " 9,\n",
1049
+ " ...\n",
1050
+ " 199733, 199734, 199735, 199736, 199737, 199738, 199739, 199740, 199741,\n",
1051
+ " 199742],\n",
1052
+ " dtype=&#x27;int64&#x27;, name=&#x27;sample&#x27;, length=199743))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1afca40d-f97a-4bab-803c-2c410a3b3c77' class='xr-section-summary-in' type='checkbox' checked><label for='section-1afca40d-f97a-4bab-803c-2c410a3b3c77' class='xr-section-summary' >Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>description :</span></dt><dd>CNN data with temperature images. Scalar features are everything from our dataset punkter_til_CNN. Images are 27x27 pixels.</dd></dl></div></li></ul></div></div>"
1053
+ ],
1054
+ "text/plain": [
1055
+ "<xarray.Dataset> Size: 1GB\n",
1056
+ "Dimensions: (x: 27, y: 27, sample: 199743)\n",
1057
+ "Coordinates:\n",
1058
+ " * x (x) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1059
+ " * y (y) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1060
+ " * sample (sample) int64 2MB 0 1 2 3 4 ... 199739 199740 199741 199742\n",
1061
+ "Data variables:\n",
1062
+ " images (sample, x, y) float64 1GB ...\n",
1063
+ " labels (sample) float64 2MB ...\n",
1064
+ " vx (sample) float64 2MB ...\n",
1065
+ " vy (sample) float64 2MB ...\n",
1066
+ " v (sample) float64 2MB ...\n",
1067
+ " smb (sample) float64 2MB ...\n",
1068
+ " z (sample) float64 2MB ...\n",
1069
+ " s (sample) float64 2MB ...\n",
1070
+ " temp (sample) float64 2MB ...\n",
1071
+ " gridCellId (sample) int64 2MB ...\n",
1072
+ "Attributes:\n",
1073
+ " description: CNN data with temperature images. Scalar features are every..."
1074
+ ]
1075
+ },
1076
+ "execution_count": 16,
1077
+ "metadata": {},
1078
+ "output_type": "execute_result"
1079
+ }
1080
+ ],
1081
+ "source": [
1082
+ "test_import"
1083
+ ]
1084
+ }
1085
+ ],
1086
+ "metadata": {
1087
+ "kernelspec": {
1088
+ "display_name": "appml",
1089
+ "language": "python",
1090
+ "name": "python3"
1091
+ },
1092
+ "language_info": {
1093
+ "codemirror_mode": {
1094
+ "name": "ipython",
1095
+ "version": 3
1096
+ },
1097
+ "file_extension": ".py",
1098
+ "mimetype": "text/x-python",
1099
+ "name": "python",
1100
+ "nbconvert_exporter": "python",
1101
+ "pygments_lexer": "ipython3",
1102
+ "version": "3.12.9"
1103
+ }
1104
+ },
1105
+ "nbformat": 4,
1106
+ "nbformat_minor": 5
1107
+ }
make_conv_train_philip_velocity_x_ithbm.ipynb ADDED
@@ -0,0 +1,1719 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 24,
6
+ "id": "0dd2c5d4",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "import xarray as xr\n",
11
+ "import geopandas as gpd\n",
12
+ "from shapely.geometry import box\n",
13
+ "import rioxarray as rxr # Make sure you have rioxarray installed (pip install rioxarray)\n",
14
+ "import numpy as np\n",
15
+ "import ibis\n",
16
+ "ibis.options.interactive = True"
17
+ ]
18
+ },
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": 25,
22
+ "id": "d615f835",
23
+ "metadata": {},
24
+ "outputs": [
25
+ {
26
+ "data": {
27
+ "text/plain": [
28
+ "<duckdb.duckdb.DuckDBPyConnection at 0x172f530f0>"
29
+ ]
30
+ },
31
+ "execution_count": 25,
32
+ "metadata": {},
33
+ "output_type": "execute_result"
34
+ }
35
+ ],
36
+ "source": [
37
+ "con = ibis.duckdb.connect()\n",
38
+ "con.raw_sql('INSTALL spatial;')\n",
39
+ "con.raw_sql('LOAD spatial;')"
40
+ ]
41
+ },
42
+ {
43
+ "cell_type": "markdown",
44
+ "id": "700cf1f9",
45
+ "metadata": {},
46
+ "source": [
47
+ "- The .rio accessor: https://corteva.github.io/rioxarray/html/rioxarray.html#rioxarray-rio-accessors\n",
48
+ "\n",
49
+ "- Affine( pixel_width, 0, top_left_x_coord,\n",
50
+ " 0, -pixel_height, top_left_y_coord)\n",
51
+ "\n",
52
+ "- Rasterio Affine Docs (https://affine.readthedocs.io/en/latest/)"
53
+ ]
54
+ },
55
+ {
56
+ "cell_type": "code",
57
+ "execution_count": 26,
58
+ "id": "cf514138",
59
+ "metadata": {},
60
+ "outputs": [
61
+ {
62
+ "name": "stdout",
63
+ "output_type": "stream",
64
+ "text": [
65
+ "<xarray.DataArray 'VX' (band: 1, y: 12445, x: 12445)> Size: 620MB\n",
66
+ "[154878025 values with dtype=float32]\n",
67
+ "Coordinates:\n",
68
+ " * band (band) int64 8B 1\n",
69
+ " * x (x) float64 100kB -2.8e+06 -2.8e+06 ... 2.799e+06 2.8e+06\n",
70
+ " * y (y) float64 100kB 2.8e+06 2.8e+06 ... -2.799e+06 -2.8e+06\n",
71
+ " spatial_ref int64 8B 0\n",
72
+ " coord_system int64 8B 0\n",
73
+ "Attributes:\n",
74
+ " coordinates: lon lat\n",
75
+ " long_name: Ice velocity in x direction\n",
76
+ " standard_name: land_ice_x_velocity\n",
77
+ " units: meter/year\n",
78
+ " _FillValue: 0.0\n",
79
+ " scale_factor: 1.0\n",
80
+ " add_offset: 0.0\n"
81
+ ]
82
+ }
83
+ ],
84
+ "source": [
85
+ "filename = 'antarctic_ice_vel_phase_map_v01.nc'\n",
86
+ "sat_im = rxr.open_rasterio(filename)\n",
87
+ "sat_im = sat_im['VX']\n",
88
+ "#sat_im = sat_im.rio.reproject(\"EPSG:3031\")\n",
89
+ "transform = sat_im.rio.transform()\n",
90
+ "print(sat_im)"
91
+ ]
92
+ },
93
+ {
94
+ "cell_type": "code",
95
+ "execution_count": 14,
96
+ "id": "106bf063",
97
+ "metadata": {},
98
+ "outputs": [
99
+ {
100
+ "name": "stdout",
101
+ "output_type": "stream",
102
+ "text": [
103
+ "EPSG:3031\n"
104
+ ]
105
+ }
106
+ ],
107
+ "source": [
108
+ "print(sat_im.rio.crs)"
109
+ ]
110
+ },
111
+ {
112
+ "cell_type": "code",
113
+ "execution_count": 27,
114
+ "id": "7cc14869",
115
+ "metadata": {},
116
+ "outputs": [],
117
+ "source": [
118
+ "tab = con.read_parquet('punkter_til_CNN.parquet')"
119
+ ]
120
+ },
121
+ {
122
+ "cell_type": "code",
123
+ "execution_count": 28,
124
+ "id": "0fec2bb7",
125
+ "metadata": {},
126
+ "outputs": [],
127
+ "source": [
128
+ "# Let's create a dummy GeoPandas DataFrame for demonstration\n",
129
+ "#num_points = 200_000\n",
130
+ "#frac_points = num_points/30_000_000\n",
131
+ "# Generate random points within a reasonable Antarctica extent (approx for EPSG:3031)\n",
132
+ "# min_x, max_x = -2000000, 2000000\n",
133
+ "# min_y, max_y = -2000000, 2000000\n",
134
+ "# random_x = np.random.uniform(min_x, max_x, num_points)\n",
135
+ "# random_y = np.random.uniform(min_y, max_y, num_points)\n",
136
+ "# ice_thickness_data = np.random.uniform(100, 5000, num_points) # Example ice thickness\n",
137
+ "# v_data = np.random.uniform(0, 1, num_points) # Example velocity\n",
138
+ "# temp_data = np.random.uniform(0, 1000, num_points) # Example temperature\n",
139
+ "\n",
140
+ "# gdf = gpd.GeoDataFrame(\n",
141
+ "# {'ice_thickness': ice_thickness_data,\n",
142
+ "# 'v': v_data,\n",
143
+ "# 'temp': temp_data\n",
144
+ "# },\n",
145
+ "# geometry=gpd.points_from_xy(random_x, random_y),\n",
146
+ "# crs=\"EPSG:3031\"\n",
147
+ "# )\n",
148
+ "#data = tab.drop(['LON','LAT'])\n",
149
+ "data = tab\n",
150
+ "#random_data = data.sample(frac_points)\n",
151
+ "\n",
152
+ "# 3.1. Create a spatial index for your GeoDataFrame\n",
153
+ "gdf = data.to_pandas()\n",
154
+ "gdf.crs = \"EPSG:3031\"\n",
155
+ "gdf_sindex = gdf.sindex"
156
+ ]
157
+ },
158
+ {
159
+ "cell_type": "code",
160
+ "execution_count": 74,
161
+ "id": "88b2eb18",
162
+ "metadata": {},
163
+ "outputs": [],
164
+ "source": [
165
+ "#gdf.to_parquet(\"punkter_til_CNN.parquet\")"
166
+ ]
167
+ },
168
+ {
169
+ "cell_type": "code",
170
+ "execution_count": 29,
171
+ "id": "ae2f315d",
172
+ "metadata": {},
173
+ "outputs": [
174
+ {
175
+ "data": {
176
+ "text/html": [
177
+ "<div>\n",
178
+ "<style scoped>\n",
179
+ " .dataframe tbody tr th:only-of-type {\n",
180
+ " vertical-align: middle;\n",
181
+ " }\n",
182
+ "\n",
183
+ " .dataframe tbody tr th {\n",
184
+ " vertical-align: top;\n",
185
+ " }\n",
186
+ "\n",
187
+ " .dataframe thead th {\n",
188
+ " text-align: right;\n",
189
+ " }\n",
190
+ "</style>\n",
191
+ "<table border=\"1\" class=\"dataframe\">\n",
192
+ " <thead>\n",
193
+ " <tr style=\"text-align: right;\">\n",
194
+ " <th></th>\n",
195
+ " <th>THICK</th>\n",
196
+ " <th>geometry</th>\n",
197
+ " <th>EAST</th>\n",
198
+ " <th>NORTH</th>\n",
199
+ " <th>vx</th>\n",
200
+ " <th>vy</th>\n",
201
+ " <th>v</th>\n",
202
+ " <th>ith_bm</th>\n",
203
+ " <th>smb</th>\n",
204
+ " <th>z</th>\n",
205
+ " <th>s</th>\n",
206
+ " <th>temp</th>\n",
207
+ " <th>gridCellId</th>\n",
208
+ " </tr>\n",
209
+ " </thead>\n",
210
+ " <tbody>\n",
211
+ " <tr>\n",
212
+ " <th>0</th>\n",
213
+ " <td>721.812000</td>\n",
214
+ " <td>POINT (2526549.105 144908.317)</td>\n",
215
+ " <td>2.526549e+06</td>\n",
216
+ " <td>1.449083e+05</td>\n",
217
+ " <td>153.634560</td>\n",
218
+ " <td>2.790444</td>\n",
219
+ " <td>153.659899</td>\n",
220
+ " <td>721.467940</td>\n",
221
+ " <td>346.598053</td>\n",
222
+ " <td>77.386441</td>\n",
223
+ " <td>0.007674</td>\n",
224
+ " <td>260.754211</td>\n",
225
+ " <td>142</td>\n",
226
+ " </tr>\n",
227
+ " <tr>\n",
228
+ " <th>1</th>\n",
229
+ " <td>2486.400000</td>\n",
230
+ " <td>POINT (1521616.527 -1469968.825)</td>\n",
231
+ " <td>1.521617e+06</td>\n",
232
+ " <td>-1.469969e+06</td>\n",
233
+ " <td>-2.169074</td>\n",
234
+ " <td>-4.493365</td>\n",
235
+ " <td>4.989510</td>\n",
236
+ " <td>2398.450355</td>\n",
237
+ " <td>134.622343</td>\n",
238
+ " <td>2677.818154</td>\n",
239
+ " <td>0.002828</td>\n",
240
+ " <td>233.461512</td>\n",
241
+ " <td>49</td>\n",
242
+ " </tr>\n",
243
+ " <tr>\n",
244
+ " <th>2</th>\n",
245
+ " <td>802.200000</td>\n",
246
+ " <td>POINT (2404674.37 -1067011.291)</td>\n",
247
+ " <td>2.404674e+06</td>\n",
248
+ " <td>-1.067011e+06</td>\n",
249
+ " <td>60.294909</td>\n",
250
+ " <td>-142.512808</td>\n",
251
+ " <td>154.742937</td>\n",
252
+ " <td>688.203481</td>\n",
253
+ " <td>1586.881584</td>\n",
254
+ " <td>249.042803</td>\n",
255
+ " <td>0.011071</td>\n",
256
+ " <td>261.087043</td>\n",
257
+ " <td>70</td>\n",
258
+ " </tr>\n",
259
+ " <tr>\n",
260
+ " <th>3</th>\n",
261
+ " <td>3023.950000</td>\n",
262
+ " <td>POINT (1699952.89 99913.876)</td>\n",
263
+ " <td>1.699953e+06</td>\n",
264
+ " <td>9.991388e+04</td>\n",
265
+ " <td>0.934968</td>\n",
266
+ " <td>2.743626</td>\n",
267
+ " <td>2.898560</td>\n",
268
+ " <td>3014.002473</td>\n",
269
+ " <td>64.349997</td>\n",
270
+ " <td>3356.340342</td>\n",
271
+ " <td>0.002495</td>\n",
272
+ " <td>230.660568</td>\n",
273
+ " <td>140</td>\n",
274
+ " </tr>\n",
275
+ " <tr>\n",
276
+ " <th>4</th>\n",
277
+ " <td>1390.175481</td>\n",
278
+ " <td>POINT (1113434.27 1790978.987)</td>\n",
279
+ " <td>1.113434e+06</td>\n",
280
+ " <td>1.790979e+06</td>\n",
281
+ " <td>0.057320</td>\n",
282
+ " <td>7.032495</td>\n",
283
+ " <td>7.032729</td>\n",
284
+ " <td>1235.187350</td>\n",
285
+ " <td>178.636116</td>\n",
286
+ " <td>892.512017</td>\n",
287
+ " <td>0.002860</td>\n",
288
+ " <td>253.317246</td>\n",
289
+ " <td>246</td>\n",
290
+ " </tr>\n",
291
+ " <tr>\n",
292
+ " <th>...</th>\n",
293
+ " <td>...</td>\n",
294
+ " <td>...</td>\n",
295
+ " <td>...</td>\n",
296
+ " <td>...</td>\n",
297
+ " <td>...</td>\n",
298
+ " <td>...</td>\n",
299
+ " <td>...</td>\n",
300
+ " <td>...</td>\n",
301
+ " <td>...</td>\n",
302
+ " <td>...</td>\n",
303
+ " <td>...</td>\n",
304
+ " <td>...</td>\n",
305
+ " <td>...</td>\n",
306
+ " </tr>\n",
307
+ " <tr>\n",
308
+ " <th>199738</th>\n",
309
+ " <td>1919.390000</td>\n",
310
+ " <td>POINT (-1486478.853 -414384.668)</td>\n",
311
+ " <td>-1.486479e+06</td>\n",
312
+ " <td>-4.143847e+05</td>\n",
313
+ " <td>-301.083286</td>\n",
314
+ " <td>-156.749208</td>\n",
315
+ " <td>339.442867</td>\n",
316
+ " <td>1897.753276</td>\n",
317
+ " <td>630.135663</td>\n",
318
+ " <td>825.209678</td>\n",
319
+ " <td>0.011550</td>\n",
320
+ " <td>254.742781</td>\n",
321
+ " <td>93</td>\n",
322
+ " </tr>\n",
323
+ " <tr>\n",
324
+ " <th>199739</th>\n",
325
+ " <td>601.280000</td>\n",
326
+ " <td>POINT (-1726950.887 238389.962)</td>\n",
327
+ " <td>-1.726951e+06</td>\n",
328
+ " <td>2.383900e+05</td>\n",
329
+ " <td>-33.293658</td>\n",
330
+ " <td>7.757353</td>\n",
331
+ " <td>34.185438</td>\n",
332
+ " <td>726.883071</td>\n",
333
+ " <td>1334.391422</td>\n",
334
+ " <td>632.884411</td>\n",
335
+ " <td>0.025015</td>\n",
336
+ " <td>256.262266</td>\n",
337
+ " <td>128</td>\n",
338
+ " </tr>\n",
339
+ " <tr>\n",
340
+ " <th>199740</th>\n",
341
+ " <td>3022.010000</td>\n",
342
+ " <td>POINT (1265667.68 -1049619.529)</td>\n",
343
+ " <td>1.265668e+06</td>\n",
344
+ " <td>-1.049620e+06</td>\n",
345
+ " <td>-0.757103</td>\n",
346
+ " <td>-1.348858</td>\n",
347
+ " <td>1.546810</td>\n",
348
+ " <td>2749.802718</td>\n",
349
+ " <td>34.202691</td>\n",
350
+ " <td>3065.901918</td>\n",
351
+ " <td>0.000934</td>\n",
352
+ " <td>225.997403</td>\n",
353
+ " <td>66</td>\n",
354
+ " </tr>\n",
355
+ " <tr>\n",
356
+ " <th>199741</th>\n",
357
+ " <td>1503.770000</td>\n",
358
+ " <td>POINT (-934393.811 251856.892)</td>\n",
359
+ " <td>-9.343938e+05</td>\n",
360
+ " <td>2.518569e+05</td>\n",
361
+ " <td>-250.500161</td>\n",
362
+ " <td>186.584424</td>\n",
363
+ " <td>312.352490</td>\n",
364
+ " <td>1464.022580</td>\n",
365
+ " <td>158.329718</td>\n",
366
+ " <td>211.082870</td>\n",
367
+ " <td>0.007703</td>\n",
368
+ " <td>248.743671</td>\n",
369
+ " <td>131</td>\n",
370
+ " </tr>\n",
371
+ " <tr>\n",
372
+ " <th>199742</th>\n",
373
+ " <td>2781.140000</td>\n",
374
+ " <td>POINT (1792527.871 317702.838)</td>\n",
375
+ " <td>1.792528e+06</td>\n",
376
+ " <td>3.177028e+05</td>\n",
377
+ " <td>0.805005</td>\n",
378
+ " <td>5.014312</td>\n",
379
+ " <td>5.078519</td>\n",
380
+ " <td>2736.503206</td>\n",
381
+ " <td>79.982648</td>\n",
382
+ " <td>2865.923339</td>\n",
383
+ " <td>0.002951</td>\n",
384
+ " <td>236.933552</td>\n",
385
+ " <td>158</td>\n",
386
+ " </tr>\n",
387
+ " </tbody>\n",
388
+ "</table>\n",
389
+ "<p>199743 rows × 13 columns</p>\n",
390
+ "</div>"
391
+ ],
392
+ "text/plain": [
393
+ " THICK geometry EAST \\\n",
394
+ "0 721.812000 POINT (2526549.105 144908.317) 2.526549e+06 \n",
395
+ "1 2486.400000 POINT (1521616.527 -1469968.825) 1.521617e+06 \n",
396
+ "2 802.200000 POINT (2404674.37 -1067011.291) 2.404674e+06 \n",
397
+ "3 3023.950000 POINT (1699952.89 99913.876) 1.699953e+06 \n",
398
+ "4 1390.175481 POINT (1113434.27 1790978.987) 1.113434e+06 \n",
399
+ "... ... ... ... \n",
400
+ "199738 1919.390000 POINT (-1486478.853 -414384.668) -1.486479e+06 \n",
401
+ "199739 601.280000 POINT (-1726950.887 238389.962) -1.726951e+06 \n",
402
+ "199740 3022.010000 POINT (1265667.68 -1049619.529) 1.265668e+06 \n",
403
+ "199741 1503.770000 POINT (-934393.811 251856.892) -9.343938e+05 \n",
404
+ "199742 2781.140000 POINT (1792527.871 317702.838) 1.792528e+06 \n",
405
+ "\n",
406
+ " NORTH vx vy v ith_bm \\\n",
407
+ "0 1.449083e+05 153.634560 2.790444 153.659899 721.467940 \n",
408
+ "1 -1.469969e+06 -2.169074 -4.493365 4.989510 2398.450355 \n",
409
+ "2 -1.067011e+06 60.294909 -142.512808 154.742937 688.203481 \n",
410
+ "3 9.991388e+04 0.934968 2.743626 2.898560 3014.002473 \n",
411
+ "4 1.790979e+06 0.057320 7.032495 7.032729 1235.187350 \n",
412
+ "... ... ... ... ... ... \n",
413
+ "199738 -4.143847e+05 -301.083286 -156.749208 339.442867 1897.753276 \n",
414
+ "199739 2.383900e+05 -33.293658 7.757353 34.185438 726.883071 \n",
415
+ "199740 -1.049620e+06 -0.757103 -1.348858 1.546810 2749.802718 \n",
416
+ "199741 2.518569e+05 -250.500161 186.584424 312.352490 1464.022580 \n",
417
+ "199742 3.177028e+05 0.805005 5.014312 5.078519 2736.503206 \n",
418
+ "\n",
419
+ " smb z s temp gridCellId \n",
420
+ "0 346.598053 77.386441 0.007674 260.754211 142 \n",
421
+ "1 134.622343 2677.818154 0.002828 233.461512 49 \n",
422
+ "2 1586.881584 249.042803 0.011071 261.087043 70 \n",
423
+ "3 64.349997 3356.340342 0.002495 230.660568 140 \n",
424
+ "4 178.636116 892.512017 0.002860 253.317246 246 \n",
425
+ "... ... ... ... ... ... \n",
426
+ "199738 630.135663 825.209678 0.011550 254.742781 93 \n",
427
+ "199739 1334.391422 632.884411 0.025015 256.262266 128 \n",
428
+ "199740 34.202691 3065.901918 0.000934 225.997403 66 \n",
429
+ "199741 158.329718 211.082870 0.007703 248.743671 131 \n",
430
+ "199742 79.982648 2865.923339 0.002951 236.933552 158 \n",
431
+ "\n",
432
+ "[199743 rows x 13 columns]"
433
+ ]
434
+ },
435
+ "execution_count": 29,
436
+ "metadata": {},
437
+ "output_type": "execute_result"
438
+ }
439
+ ],
440
+ "source": [
441
+ "gdf"
442
+ ]
443
+ },
444
+ {
445
+ "cell_type": "code",
446
+ "execution_count": 42,
447
+ "id": "8cd3bb9e",
448
+ "metadata": {},
449
+ "outputs": [
450
+ {
451
+ "data": {
452
+ "text/plain": [
453
+ "199743"
454
+ ]
455
+ },
456
+ "execution_count": 42,
457
+ "metadata": {},
458
+ "output_type": "execute_result"
459
+ }
460
+ ],
461
+ "source": [
462
+ "len(gdf)"
463
+ ]
464
+ },
465
+ {
466
+ "cell_type": "code",
467
+ "execution_count": 30,
468
+ "id": "3f8fbde2",
469
+ "metadata": {},
470
+ "outputs": [
471
+ {
472
+ "name": "stderr",
473
+ "output_type": "stream",
474
+ "text": [
475
+ "/var/folders/44/y59xjnbx6fqfgz896mcmxfw80000gn/T/ipykernel_96267/1356645550.py:34: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.\n",
476
+ " if (x_idx - half < 0 or x_idx + half + 1 > ds.dims[\"x\"] or\n",
477
+ "/var/folders/44/y59xjnbx6fqfgz896mcmxfw80000gn/T/ipykernel_96267/1356645550.py:35: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.\n",
478
+ " y_idx - half < 0 or y_idx + half + 1 > ds.dims[\"y\"]):\n"
479
+ ]
480
+ },
481
+ {
482
+ "name": "stdout",
483
+ "output_type": "stream",
484
+ "text": [
485
+ "Brugte 199743 punkter, skippede 0.\n"
486
+ ]
487
+ }
488
+ ],
489
+ "source": [
490
+ "import xarray as xr\n",
491
+ "import numpy as np\n",
492
+ "import geopandas as gpd\n",
493
+ "from shapely.geometry import Point\n",
494
+ "\n",
495
+ "# Åbn velocity data (ingen rioxarray nødvendig)\n",
496
+ "ds = xr.open_dataset(\"antarctic_ice_vel_phase_map_v01.nc\")\n",
497
+ "vx = ds[\"VX\"] # (y, x)\n",
498
+ "\n",
499
+ "# Åbn dine punkter i EPSG:4326 (forudsat det passer – ellers transformér det)\n",
500
+ "gdf = gpd.read_parquet(\"punkter_til_CNN.parquet\")\n",
501
+ "gdf = gdf.to_crs(\"EPSG:3031\") # Sørg for at punkter er i geografisk koordinatsystem\n",
502
+ "\n",
503
+ "# Billedstørrelse (27 pixels dækker 2.7° × 2.7°)\n",
504
+ "size = 27\n",
505
+ "half = size // 2\n",
506
+ "pixel_deg = 0.1 # resolution pr. pixel i grader\n",
507
+ "\n",
508
+ "images = []\n",
509
+ "scalar_feats = ['THICK', 'vx', 'vy', 'v', 'smb', 'z', 's', 'temp', 'gridCellId']\n",
510
+ "im_data = {feat: [] for feat in scalar_feats}\n",
511
+ "\n",
512
+ "used = 0\n",
513
+ "skipped = 0\n",
514
+ "\n",
515
+ "for idx, row in gdf.iterrows():\n",
516
+ " lon, lat = row.geometry.x, row.geometry.y\n",
517
+ "\n",
518
+ " # Find indeks i datasættet tættest på punktets koordinater\n",
519
+ " x_idx = int(np.argmin(np.abs(ds[\"x\"].values - lon)))\n",
520
+ " y_idx = int(np.argmin(np.abs(ds[\"y\"].values - lat)))\n",
521
+ "\n",
522
+ " # Tjek om vi kan trække et 27×27 udsnit uden at gå ud over kanter\n",
523
+ " if (x_idx - half < 0 or x_idx + half + 1 > ds.dims[\"x\"] or\n",
524
+ " y_idx - half < 0 or y_idx + half + 1 > ds.dims[\"y\"]):\n",
525
+ " skipped += 1\n",
526
+ " continue\n",
527
+ "\n",
528
+ " patch = vx.isel(\n",
529
+ " y=slice(y_idx - half, y_idx + half + 1),\n",
530
+ " x=slice(x_idx - half, x_idx + half + 1)\n",
531
+ " )\n",
532
+ "\n",
533
+ " images.append(patch.values)\n",
534
+ " for feat in scalar_feats:\n",
535
+ " im_data[feat].append(row[feat])\n",
536
+ " used += 1\n",
537
+ "\n",
538
+ "print(f\"Brugte {used} punkter, skippede {skipped}.\")"
539
+ ]
540
+ },
541
+ {
542
+ "cell_type": "code",
543
+ "execution_count": 19,
544
+ "id": "22da645d",
545
+ "metadata": {},
546
+ "outputs": [
547
+ {
548
+ "name": "stdout",
549
+ "output_type": "stream",
550
+ "text": [
551
+ "✅ Gemte dataset som 'conv_velocity_x_3031.nc'\n"
552
+ ]
553
+ }
554
+ ],
555
+ "source": [
556
+ "# Konverter liste af billeder til en 3D-array (samples, x, y)\n",
557
+ "image_array = np.stack(images) # shape: (N, 27, 27)\n",
558
+ "\n",
559
+ "# Lav DataArray til billederne\n",
560
+ "images_da = xr.DataArray(\n",
561
+ " image_array,\n",
562
+ " dims=[\"sample\", \"x\", \"y\"],\n",
563
+ " coords={\"sample\": np.arange(image_array.shape[0]),\n",
564
+ " \"x\": np.arange(27),\n",
565
+ " \"y\": np.arange(27)},\n",
566
+ " name=\"images\"\n",
567
+ ")\n",
568
+ "\n",
569
+ "# Lav DataArrays til de scalar-variabler\n",
570
+ "scalar_data = {\n",
571
+ " feat: xr.DataArray(\n",
572
+ " np.array(im_data[feat]),\n",
573
+ " dims=[\"sample\"],\n",
574
+ " coords={\"sample\": np.arange(image_array.shape[0])},\n",
575
+ " name=feat\n",
576
+ " )\n",
577
+ " for feat in scalar_feats\n",
578
+ "}\n",
579
+ "\n",
580
+ "# Saml alt i et dataset\n",
581
+ "final_ds = xr.Dataset(\n",
582
+ " data_vars={\n",
583
+ " \"images\": images_da,\n",
584
+ " **scalar_data\n",
585
+ " },\n",
586
+ " attrs={\n",
587
+ " \"description\": \"CNN data med velocity x billeder i EPSG:3031 uden reprojektion.\"\n",
588
+ " }\n",
589
+ ")\n",
590
+ "\n",
591
+ "# Gem til NetCDF\n",
592
+ "final_ds.to_netcdf(\"conv_velocity_x_3031.nc\")\n",
593
+ "print(\"✅ Gemte dataset som 'conv_velocity_x_3031.nc'\")\n"
594
+ ]
595
+ },
596
+ {
597
+ "cell_type": "code",
598
+ "execution_count": 31,
599
+ "id": "0c5e8c24",
600
+ "metadata": {},
601
+ "outputs": [
602
+ {
603
+ "name": "stdout",
604
+ "output_type": "stream",
605
+ "text": [
606
+ "✅ Gemte dataset med labels som 'conv_velocity_x_3031.nc'\n"
607
+ ]
608
+ }
609
+ ],
610
+ "source": [
611
+ "# Konverter billeder til en samlet 3D-array\n",
612
+ "image_array = np.stack(images)\n",
613
+ "\n",
614
+ "# Vælg hvilken feature du vil bruge som label\n",
615
+ "label_feature = \"THICK\" # ← Skift dette hvis du ønsker noget andet\n",
616
+ "\n",
617
+ "# Lav DataArray til billeder\n",
618
+ "images_da = xr.DataArray(\n",
619
+ " image_array,\n",
620
+ " dims=[\"sample\", \"x\", \"y\"],\n",
621
+ " coords={\"sample\": np.arange(image_array.shape[0]),\n",
622
+ " \"x\": np.arange(27),\n",
623
+ " \"y\": np.arange(27)},\n",
624
+ " name=\"images\"\n",
625
+ ")\n",
626
+ "\n",
627
+ "# Scalar-variabler og label\n",
628
+ "scalar_data = {\n",
629
+ " feat: xr.DataArray(\n",
630
+ " np.array(im_data[feat]),\n",
631
+ " dims=[\"sample\"],\n",
632
+ " coords={\"sample\": np.arange(image_array.shape[0])},\n",
633
+ " name=feat\n",
634
+ " )\n",
635
+ " for feat in scalar_feats\n",
636
+ "}\n",
637
+ "\n",
638
+ "# Tilføj label som separat variabel (samme som label_feature)\n",
639
+ "labels_da = xr.DataArray(\n",
640
+ " np.array(im_data[label_feature]),\n",
641
+ " dims=[\"sample\"],\n",
642
+ " coords={\"sample\": np.arange(image_array.shape[0])},\n",
643
+ " name=\"labels\"\n",
644
+ ")\n",
645
+ "\n",
646
+ "# Saml alt i ét dataset\n",
647
+ "final_ds = xr.Dataset(\n",
648
+ " data_vars={\n",
649
+ " \"images\": images_da,\n",
650
+ " \"labels\": labels_da,\n",
651
+ " **scalar_data\n",
652
+ " },\n",
653
+ " attrs={\n",
654
+ " \"description\": f\"CNN data med velocity x billeder og '{label_feature}' som labels.\"\n",
655
+ " }\n",
656
+ ")\n",
657
+ "\n",
658
+ "# Gem som NetCDF\n",
659
+ "final_ds.to_netcdf(\"conv_velocity_x_3031.nc\")\n",
660
+ "print(\"✅ Gemte dataset med labels som 'conv_velocity_x_3031.nc'\")\n"
661
+ ]
662
+ },
663
+ {
664
+ "cell_type": "code",
665
+ "execution_count": 21,
666
+ "id": "6cc1c242",
667
+ "metadata": {},
668
+ "outputs": [
669
+ {
670
+ "data": {
671
+ "text/html": [
672
+ "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
673
+ "<defs>\n",
674
+ "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
675
+ "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
676
+ "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
677
+ "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
678
+ "</symbol>\n",
679
+ "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
680
+ "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
681
+ "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
682
+ "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
683
+ "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
684
+ "</symbol>\n",
685
+ "</defs>\n",
686
+ "</svg>\n",
687
+ "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
688
+ " *\n",
689
+ " */\n",
690
+ "\n",
691
+ ":root {\n",
692
+ " --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
693
+ " --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
694
+ " --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
695
+ " --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
696
+ " --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
697
+ " --xr-background-color: var(--jp-layout-color0, white);\n",
698
+ " --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
699
+ " --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
700
+ "}\n",
701
+ "\n",
702
+ "html[theme=\"dark\"],\n",
703
+ "html[data-theme=\"dark\"],\n",
704
+ "body[data-theme=\"dark\"],\n",
705
+ "body.vscode-dark {\n",
706
+ " --xr-font-color0: rgba(255, 255, 255, 1);\n",
707
+ " --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
708
+ " --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
709
+ " --xr-border-color: #1f1f1f;\n",
710
+ " --xr-disabled-color: #515151;\n",
711
+ " --xr-background-color: #111111;\n",
712
+ " --xr-background-color-row-even: #111111;\n",
713
+ " --xr-background-color-row-odd: #313131;\n",
714
+ "}\n",
715
+ "\n",
716
+ ".xr-wrap {\n",
717
+ " display: block !important;\n",
718
+ " min-width: 300px;\n",
719
+ " max-width: 700px;\n",
720
+ "}\n",
721
+ "\n",
722
+ ".xr-text-repr-fallback {\n",
723
+ " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
724
+ " display: none;\n",
725
+ "}\n",
726
+ "\n",
727
+ ".xr-header {\n",
728
+ " padding-top: 6px;\n",
729
+ " padding-bottom: 6px;\n",
730
+ " margin-bottom: 4px;\n",
731
+ " border-bottom: solid 1px var(--xr-border-color);\n",
732
+ "}\n",
733
+ "\n",
734
+ ".xr-header > div,\n",
735
+ ".xr-header > ul {\n",
736
+ " display: inline;\n",
737
+ " margin-top: 0;\n",
738
+ " margin-bottom: 0;\n",
739
+ "}\n",
740
+ "\n",
741
+ ".xr-obj-type,\n",
742
+ ".xr-array-name {\n",
743
+ " margin-left: 2px;\n",
744
+ " margin-right: 10px;\n",
745
+ "}\n",
746
+ "\n",
747
+ ".xr-obj-type {\n",
748
+ " color: var(--xr-font-color2);\n",
749
+ "}\n",
750
+ "\n",
751
+ ".xr-sections {\n",
752
+ " padding-left: 0 !important;\n",
753
+ " display: grid;\n",
754
+ " grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n",
755
+ "}\n",
756
+ "\n",
757
+ ".xr-section-item {\n",
758
+ " display: contents;\n",
759
+ "}\n",
760
+ "\n",
761
+ ".xr-section-item input {\n",
762
+ " display: inline-block;\n",
763
+ " opacity: 0;\n",
764
+ " height: 0;\n",
765
+ "}\n",
766
+ "\n",
767
+ ".xr-section-item input + label {\n",
768
+ " color: var(--xr-disabled-color);\n",
769
+ "}\n",
770
+ "\n",
771
+ ".xr-section-item input:enabled + label {\n",
772
+ " cursor: pointer;\n",
773
+ " color: var(--xr-font-color2);\n",
774
+ "}\n",
775
+ "\n",
776
+ ".xr-section-item input:focus + label {\n",
777
+ " border: 2px solid var(--xr-font-color0);\n",
778
+ "}\n",
779
+ "\n",
780
+ ".xr-section-item input:enabled + label:hover {\n",
781
+ " color: var(--xr-font-color0);\n",
782
+ "}\n",
783
+ "\n",
784
+ ".xr-section-summary {\n",
785
+ " grid-column: 1;\n",
786
+ " color: var(--xr-font-color2);\n",
787
+ " font-weight: 500;\n",
788
+ "}\n",
789
+ "\n",
790
+ ".xr-section-summary > span {\n",
791
+ " display: inline-block;\n",
792
+ " padding-left: 0.5em;\n",
793
+ "}\n",
794
+ "\n",
795
+ ".xr-section-summary-in:disabled + label {\n",
796
+ " color: var(--xr-font-color2);\n",
797
+ "}\n",
798
+ "\n",
799
+ ".xr-section-summary-in + label:before {\n",
800
+ " display: inline-block;\n",
801
+ " content: \"►\";\n",
802
+ " font-size: 11px;\n",
803
+ " width: 15px;\n",
804
+ " text-align: center;\n",
805
+ "}\n",
806
+ "\n",
807
+ ".xr-section-summary-in:disabled + label:before {\n",
808
+ " color: var(--xr-disabled-color);\n",
809
+ "}\n",
810
+ "\n",
811
+ ".xr-section-summary-in:checked + label:before {\n",
812
+ " content: \"▼\";\n",
813
+ "}\n",
814
+ "\n",
815
+ ".xr-section-summary-in:checked + label > span {\n",
816
+ " display: none;\n",
817
+ "}\n",
818
+ "\n",
819
+ ".xr-section-summary,\n",
820
+ ".xr-section-inline-details {\n",
821
+ " padding-top: 4px;\n",
822
+ " padding-bottom: 4px;\n",
823
+ "}\n",
824
+ "\n",
825
+ ".xr-section-inline-details {\n",
826
+ " grid-column: 2 / -1;\n",
827
+ "}\n",
828
+ "\n",
829
+ ".xr-section-details {\n",
830
+ " display: none;\n",
831
+ " grid-column: 1 / -1;\n",
832
+ " margin-bottom: 5px;\n",
833
+ "}\n",
834
+ "\n",
835
+ ".xr-section-summary-in:checked ~ .xr-section-details {\n",
836
+ " display: contents;\n",
837
+ "}\n",
838
+ "\n",
839
+ ".xr-array-wrap {\n",
840
+ " grid-column: 1 / -1;\n",
841
+ " display: grid;\n",
842
+ " grid-template-columns: 20px auto;\n",
843
+ "}\n",
844
+ "\n",
845
+ ".xr-array-wrap > label {\n",
846
+ " grid-column: 1;\n",
847
+ " vertical-align: top;\n",
848
+ "}\n",
849
+ "\n",
850
+ ".xr-preview {\n",
851
+ " color: var(--xr-font-color3);\n",
852
+ "}\n",
853
+ "\n",
854
+ ".xr-array-preview,\n",
855
+ ".xr-array-data {\n",
856
+ " padding: 0 5px !important;\n",
857
+ " grid-column: 2;\n",
858
+ "}\n",
859
+ "\n",
860
+ ".xr-array-data,\n",
861
+ ".xr-array-in:checked ~ .xr-array-preview {\n",
862
+ " display: none;\n",
863
+ "}\n",
864
+ "\n",
865
+ ".xr-array-in:checked ~ .xr-array-data,\n",
866
+ ".xr-array-preview {\n",
867
+ " display: inline-block;\n",
868
+ "}\n",
869
+ "\n",
870
+ ".xr-dim-list {\n",
871
+ " display: inline-block !important;\n",
872
+ " list-style: none;\n",
873
+ " padding: 0 !important;\n",
874
+ " margin: 0;\n",
875
+ "}\n",
876
+ "\n",
877
+ ".xr-dim-list li {\n",
878
+ " display: inline-block;\n",
879
+ " padding: 0;\n",
880
+ " margin: 0;\n",
881
+ "}\n",
882
+ "\n",
883
+ ".xr-dim-list:before {\n",
884
+ " content: \"(\";\n",
885
+ "}\n",
886
+ "\n",
887
+ ".xr-dim-list:after {\n",
888
+ " content: \")\";\n",
889
+ "}\n",
890
+ "\n",
891
+ ".xr-dim-list li:not(:last-child):after {\n",
892
+ " content: \",\";\n",
893
+ " padding-right: 5px;\n",
894
+ "}\n",
895
+ "\n",
896
+ ".xr-has-index {\n",
897
+ " font-weight: bold;\n",
898
+ "}\n",
899
+ "\n",
900
+ ".xr-var-list,\n",
901
+ ".xr-var-item {\n",
902
+ " display: contents;\n",
903
+ "}\n",
904
+ "\n",
905
+ ".xr-var-item > div,\n",
906
+ ".xr-var-item label,\n",
907
+ ".xr-var-item > .xr-var-name span {\n",
908
+ " background-color: var(--xr-background-color-row-even);\n",
909
+ " margin-bottom: 0;\n",
910
+ "}\n",
911
+ "\n",
912
+ ".xr-var-item > .xr-var-name:hover span {\n",
913
+ " padding-right: 5px;\n",
914
+ "}\n",
915
+ "\n",
916
+ ".xr-var-list > li:nth-child(odd) > div,\n",
917
+ ".xr-var-list > li:nth-child(odd) > label,\n",
918
+ ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
919
+ " background-color: var(--xr-background-color-row-odd);\n",
920
+ "}\n",
921
+ "\n",
922
+ ".xr-var-name {\n",
923
+ " grid-column: 1;\n",
924
+ "}\n",
925
+ "\n",
926
+ ".xr-var-dims {\n",
927
+ " grid-column: 2;\n",
928
+ "}\n",
929
+ "\n",
930
+ ".xr-var-dtype {\n",
931
+ " grid-column: 3;\n",
932
+ " text-align: right;\n",
933
+ " color: var(--xr-font-color2);\n",
934
+ "}\n",
935
+ "\n",
936
+ ".xr-var-preview {\n",
937
+ " grid-column: 4;\n",
938
+ "}\n",
939
+ "\n",
940
+ ".xr-index-preview {\n",
941
+ " grid-column: 2 / 5;\n",
942
+ " color: var(--xr-font-color2);\n",
943
+ "}\n",
944
+ "\n",
945
+ ".xr-var-name,\n",
946
+ ".xr-var-dims,\n",
947
+ ".xr-var-dtype,\n",
948
+ ".xr-preview,\n",
949
+ ".xr-attrs dt {\n",
950
+ " white-space: nowrap;\n",
951
+ " overflow: hidden;\n",
952
+ " text-overflow: ellipsis;\n",
953
+ " padding-right: 10px;\n",
954
+ "}\n",
955
+ "\n",
956
+ ".xr-var-name:hover,\n",
957
+ ".xr-var-dims:hover,\n",
958
+ ".xr-var-dtype:hover,\n",
959
+ ".xr-attrs dt:hover {\n",
960
+ " overflow: visible;\n",
961
+ " width: auto;\n",
962
+ " z-index: 1;\n",
963
+ "}\n",
964
+ "\n",
965
+ ".xr-var-attrs,\n",
966
+ ".xr-var-data,\n",
967
+ ".xr-index-data {\n",
968
+ " display: none;\n",
969
+ " background-color: var(--xr-background-color) !important;\n",
970
+ " padding-bottom: 5px !important;\n",
971
+ "}\n",
972
+ "\n",
973
+ ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
974
+ ".xr-var-data-in:checked ~ .xr-var-data,\n",
975
+ ".xr-index-data-in:checked ~ .xr-index-data {\n",
976
+ " display: block;\n",
977
+ "}\n",
978
+ "\n",
979
+ ".xr-var-data > table {\n",
980
+ " float: right;\n",
981
+ "}\n",
982
+ "\n",
983
+ ".xr-var-name span,\n",
984
+ ".xr-var-data,\n",
985
+ ".xr-index-name div,\n",
986
+ ".xr-index-data,\n",
987
+ ".xr-attrs {\n",
988
+ " padding-left: 25px !important;\n",
989
+ "}\n",
990
+ "\n",
991
+ ".xr-attrs,\n",
992
+ ".xr-var-attrs,\n",
993
+ ".xr-var-data,\n",
994
+ ".xr-index-data {\n",
995
+ " grid-column: 1 / -1;\n",
996
+ "}\n",
997
+ "\n",
998
+ "dl.xr-attrs {\n",
999
+ " padding: 0;\n",
1000
+ " margin: 0;\n",
1001
+ " display: grid;\n",
1002
+ " grid-template-columns: 125px auto;\n",
1003
+ "}\n",
1004
+ "\n",
1005
+ ".xr-attrs dt,\n",
1006
+ ".xr-attrs dd {\n",
1007
+ " padding: 0;\n",
1008
+ " margin: 0;\n",
1009
+ " float: left;\n",
1010
+ " padding-right: 10px;\n",
1011
+ " width: auto;\n",
1012
+ "}\n",
1013
+ "\n",
1014
+ ".xr-attrs dt {\n",
1015
+ " font-weight: normal;\n",
1016
+ " grid-column: 1;\n",
1017
+ "}\n",
1018
+ "\n",
1019
+ ".xr-attrs dt:hover span {\n",
1020
+ " display: inline-block;\n",
1021
+ " background: var(--xr-background-color);\n",
1022
+ " padding-right: 10px;\n",
1023
+ "}\n",
1024
+ "\n",
1025
+ ".xr-attrs dd {\n",
1026
+ " grid-column: 2;\n",
1027
+ " white-space: pre-wrap;\n",
1028
+ " word-break: break-all;\n",
1029
+ "}\n",
1030
+ "\n",
1031
+ ".xr-icon-database,\n",
1032
+ ".xr-icon-file-text2,\n",
1033
+ ".xr-no-icon {\n",
1034
+ " display: inline-block;\n",
1035
+ " vertical-align: middle;\n",
1036
+ " width: 1em;\n",
1037
+ " height: 1.5em !important;\n",
1038
+ " stroke-width: 0;\n",
1039
+ " stroke: currentColor;\n",
1040
+ " fill: currentColor;\n",
1041
+ "}\n",
1042
+ "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 600MB\n",
1043
+ "Dimensions: (sample: 199743, x: 27, y: 27)\n",
1044
+ "Coordinates:\n",
1045
+ " * sample (sample) int64 2MB 0 1 2 3 4 ... 199739 199740 199741 199742\n",
1046
+ " * x (x) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1047
+ " * y (y) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1048
+ "Data variables:\n",
1049
+ " images (sample, x, y) float32 582MB 113.8 114.1 114.2 ... 1.296 1.321\n",
1050
+ " labels (sample) float64 2MB 721.8 2.486e+03 ... 1.504e+03 2.781e+03\n",
1051
+ " THICK (sample) float64 2MB 721.8 2.486e+03 ... 1.504e+03 2.781e+03\n",
1052
+ " vx (sample) float64 2MB 153.6 -2.169 60.29 ... -0.7571 -250.5 0.805\n",
1053
+ " vy (sample) float64 2MB 2.79 -4.493 -142.5 ... -1.349 186.6 5.014\n",
1054
+ " v (sample) float64 2MB 153.7 4.99 154.7 ... 1.547 312.4 5.079\n",
1055
+ " smb (sample) float64 2MB 346.6 134.6 1.587e+03 ... 34.2 158.3 79.98\n",
1056
+ " z (sample) float64 2MB 77.39 2.678e+03 249.0 ... 211.1 2.866e+03\n",
1057
+ " s (sample) float64 2MB 0.007674 0.002828 ... 0.007703 0.002951\n",
1058
+ " temp (sample) float64 2MB 260.8 233.5 261.1 ... 226.0 248.7 236.9\n",
1059
+ " gridCellId (sample) int64 2MB 142 49 70 140 246 131 ... 93 128 66 131 158\n",
1060
+ "Attributes:\n",
1061
+ " description: CNN data med velocity x billeder og &#x27;THICK&#x27; som labels.</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-c31daed4-d078-4343-891e-69cf05fb9fd6' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-c31daed4-d078-4343-891e-69cf05fb9fd6' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>sample</span>: 199743</li><li><span class='xr-has-index'>x</span>: 27</li><li><span class='xr-has-index'>y</span>: 27</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-af51c41d-f6bd-4c24-b438-3ffab1db2fc2' class='xr-section-summary-in' type='checkbox' checked><label for='section-af51c41d-f6bd-4c24-b438-3ffab1db2fc2' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>sample</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 ... 199740 199741 199742</div><input id='attrs-98912183-2271-4e2d-8c15-71f4561758a1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-98912183-2271-4e2d-8c15-71f4561758a1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5844a1c6-4d41-419d-b97f-e9bf55e7aaa2' class='xr-var-data-in' type='checkbox'><label for='data-5844a1c6-4d41-419d-b97f-e9bf55e7aaa2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, ..., 199740, 199741, 199742])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 21 22 23 24 25 26</div><input id='attrs-297a84b2-d60a-427f-96c7-3f4cceee0bc9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-297a84b2-d60a-427f-96c7-3f4cceee0bc9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-caadb80d-9941-401c-905f-dd79230872ef' class='xr-var-data-in' type='checkbox'><label for='data-caadb80d-9941-401c-905f-dd79230872ef' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1062
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 21 22 23 24 25 26</div><input id='attrs-ca699560-9932-4e8d-b041-5902b4393798' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ca699560-9932-4e8d-b041-5902b4393798' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ba1af50b-eab0-45b7-85e1-f418358318a7' class='xr-var-data-in' type='checkbox'><label for='data-ba1af50b-eab0-45b7-85e1-f418358318a7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1063
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-80a75cc5-e25b-4aeb-b1b7-d351667fb86a' class='xr-section-summary-in' type='checkbox' checked><label for='section-80a75cc5-e25b-4aeb-b1b7-d351667fb86a' class='xr-section-summary' >Data variables: <span>(11)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>images</span></div><div class='xr-var-dims'>(sample, x, y)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>113.8 114.1 114.2 ... 1.296 1.321</div><input id='attrs-638831f4-8145-42ea-ae0e-2fa0345da7b0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-638831f4-8145-42ea-ae0e-2fa0345da7b0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c3265c54-f958-4367-b2a6-de7607eeca2e' class='xr-var-data-in' type='checkbox'><label for='data-c3265c54-f958-4367-b2a6-de7607eeca2e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[ 1.13815742e+02, 1.14090073e+02, 1.14205917e+02, ...,\n",
1064
+ " 1.18899887e+02, 1.18346306e+02, 1.18346306e+02],\n",
1065
+ " [ 1.16361526e+02, 1.16609947e+02, 1.16611443e+02, ...,\n",
1066
+ " 1.21061974e+02, 1.20903374e+02, 1.20421089e+02],\n",
1067
+ " [ 1.18281624e+02, 1.18281624e+02, 1.18489662e+02, ...,\n",
1068
+ " 1.24099602e+02, 1.23985657e+02, 1.23503845e+02],\n",
1069
+ " ...,\n",
1070
+ " [ 9.14228363e+01, 9.39703217e+01, 9.62005997e+01, ...,\n",
1071
+ " 1.50322281e+02, 1.49470535e+02, 1.49470535e+02],\n",
1072
+ " [ 9.01940384e+01, 9.23575592e+01, 9.47291794e+01, ...,\n",
1073
+ " 1.47361603e+02, 1.46512024e+02, 1.46472488e+02],\n",
1074
+ " [ 8.95807343e+01, 9.05099335e+01, 9.29048538e+01, ...,\n",
1075
+ " 1.43713608e+02, 1.43467789e+02, 1.43467789e+02]],\n",
1076
+ "\n",
1077
+ " [[-1.87307584e+00, -1.88124275e+00, -1.88985848e+00, ...,\n",
1078
+ " -1.46787810e+00, -1.19338572e+00, -9.19949055e-01],\n",
1079
+ " [-1.87636387e+00, -1.89453006e+00, -1.90235853e+00, ...,\n",
1080
+ " -1.46787810e+00, -1.26956642e+00, -1.04392040e+00],\n",
1081
+ " [-1.90328860e+00, -1.91141713e+00, -1.92574573e+00, ...,\n",
1082
+ " -1.45450795e+00, -1.32607234e+00, -1.13332295e+00],\n",
1083
+ "...\n",
1084
+ " -2.14296524e+02, -2.14254974e+02, -2.13557602e+02],\n",
1085
+ " [-2.01113632e+02, -2.03467453e+02, -2.06090622e+02, ...,\n",
1086
+ " -2.10541702e+02, -2.10541702e+02, -2.09905792e+02],\n",
1087
+ " [-1.94735641e+02, -1.97596817e+02, -2.00999390e+02, ...,\n",
1088
+ " -2.06227997e+02, -2.06227997e+02, -2.06227997e+02]],\n",
1089
+ "\n",
1090
+ " [[ 2.98075914e-01, 3.19875926e-01, 3.48597676e-01, ...,\n",
1091
+ " 1.48188472e+00, 1.51140320e+00, 1.53428113e+00],\n",
1092
+ " [ 2.08085492e-01, 2.08085492e-01, 2.24453256e-01, ...,\n",
1093
+ " 1.51140320e+00, 1.53428113e+00, 1.55372393e+00],\n",
1094
+ " [ 1.26666024e-01, 1.26666024e-01, 1.31457075e-01, ...,\n",
1095
+ " 1.52837682e+00, 1.54196572e+00, 1.55372393e+00],\n",
1096
+ " ...,\n",
1097
+ " [ 9.86931324e-02, 1.63984776e-01, 2.20422819e-01, ...,\n",
1098
+ " 1.29952860e+00, 1.33197272e+00, 1.35958600e+00],\n",
1099
+ " [ 1.02333196e-01, 1.63984776e-01, 2.04046756e-01, ...,\n",
1100
+ " 1.28426981e+00, 1.31837499e+00, 1.34536994e+00],\n",
1101
+ " [ 1.08834639e-01, 1.57097727e-01, 1.85580358e-01, ...,\n",
1102
+ " 1.26059866e+00, 1.29567838e+00, 1.32105374e+00]]],\n",
1103
+ " dtype=float32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>labels</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>721.8 2.486e+03 ... 2.781e+03</div><input id='attrs-b2857638-7ac9-4920-bc25-ffef55581b69' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b2857638-7ac9-4920-bc25-ffef55581b69' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bfa59085-4012-4f49-a5f3-beb7ef41a05d' class='xr-var-data-in' type='checkbox'><label for='data-bfa59085-4012-4f49-a5f3-beb7ef41a05d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 721.812, 2486.4 , 802.2 , ..., 3022.01 , 1503.77 , 2781.14 ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>THICK</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>721.8 2.486e+03 ... 2.781e+03</div><input id='attrs-2f379dec-c760-4c02-accb-a245a8d1c8eb' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2f379dec-c760-4c02-accb-a245a8d1c8eb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-821560d2-3727-4649-ab89-b7538ead5348' class='xr-var-data-in' type='checkbox'><label for='data-821560d2-3727-4649-ab89-b7538ead5348' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 721.812, 2486.4 , 802.2 , ..., 3022.01 , 1503.77 , 2781.14 ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>vx</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>153.6 -2.169 60.29 ... -250.5 0.805</div><input id='attrs-7b63ae9c-28df-47f5-a611-5e90828c0f97' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7b63ae9c-28df-47f5-a611-5e90828c0f97' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-923566f2-e41a-4e37-9c57-692b274e5b09' class='xr-var-data-in' type='checkbox'><label for='data-923566f2-e41a-4e37-9c57-692b274e5b09' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 153.63455986, -2.16907366, 60.29490924, ..., -0.75710255,\n",
1104
+ " -250.50016102, 0.8050054 ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>vy</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.79 -4.493 -142.5 ... 186.6 5.014</div><input id='attrs-e9977dd6-2ad4-4b9a-a466-1bf3373a62a5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e9977dd6-2ad4-4b9a-a466-1bf3373a62a5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ef7c6952-7b36-49d2-93ca-6a6ac5f0bee3' class='xr-var-data-in' type='checkbox'><label for='data-ef7c6952-7b36-49d2-93ca-6a6ac5f0bee3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 2.79044394, -4.49336514, -142.51280816, ..., -1.34885798,\n",
1105
+ " 186.58442352, 5.01431202])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>v</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>153.7 4.99 154.7 ... 312.4 5.079</div><input id='attrs-7b99edbc-b9d6-4c66-803e-b7920e5ad18a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7b99edbc-b9d6-4c66-803e-b7920e5ad18a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-100e4ed4-f9fe-4fef-bb7e-b783a48723a1' class='xr-var-data-in' type='checkbox'><label for='data-100e4ed4-f9fe-4fef-bb7e-b783a48723a1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([153.659899 , 4.98951008, 154.74293706, ..., 1.5468103 ,\n",
1106
+ " 312.35248962, 5.07851935])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smb</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>346.6 134.6 ... 158.3 79.98</div><input id='attrs-39d22848-f898-4b40-82c6-d498cb417aec' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-39d22848-f898-4b40-82c6-d498cb417aec' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-871becab-bce0-43d5-8062-8f07f5c7612c' class='xr-var-data-in' type='checkbox'><label for='data-871becab-bce0-43d5-8062-8f07f5c7612c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 346.59805282, 134.62234314, 1586.88158369, ..., 34.202691 ,\n",
1107
+ " 158.32971838, 79.98264846])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>z</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>77.39 2.678e+03 ... 211.1 2.866e+03</div><input id='attrs-02978c78-9dec-4d8c-a2a0-17bc87a7fc5a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-02978c78-9dec-4d8c-a2a0-17bc87a7fc5a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ef2f57db-d901-4a93-9355-601190d0ec55' class='xr-var-data-in' type='checkbox'><label for='data-ef2f57db-d901-4a93-9355-601190d0ec55' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 77.38644071, 2677.81815429, 249.04280287, ..., 3065.9019181 ,\n",
1108
+ " 211.0828696 , 2865.92333866])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>s</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.007674 0.002828 ... 0.002951</div><input id='attrs-99dc8451-5c7e-411f-93c4-2fef1a2ed872' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-99dc8451-5c7e-411f-93c4-2fef1a2ed872' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c6fd66ac-19e2-42f2-825f-1528a20de4d2' class='xr-var-data-in' type='checkbox'><label for='data-c6fd66ac-19e2-42f2-825f-1528a20de4d2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0.00767374, 0.00282843, 0.01107067, ..., 0.00093371, 0.00770311,\n",
1109
+ " 0.00295122])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>temp</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>260.8 233.5 261.1 ... 248.7 236.9</div><input id='attrs-1947e836-de4e-494b-953b-ed78ad531a58' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1947e836-de4e-494b-953b-ed78ad531a58' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ca2bcb18-7d33-4c8e-a258-71bdaa9c49ca' class='xr-var-data-in' type='checkbox'><label for='data-ca2bcb18-7d33-4c8e-a258-71bdaa9c49ca' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([260.75421146, 233.4615118 , 261.08704331, ..., 225.9974035 ,\n",
1110
+ " 248.74367106, 236.93355205])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>gridCellId</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>142 49 70 140 ... 128 66 131 158</div><input id='attrs-95b9fefa-56bd-4946-9848-be597b3909ab' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-95b9fefa-56bd-4946-9848-be597b3909ab' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3850a397-c2fa-4926-803e-919c27451029' class='xr-var-data-in' type='checkbox'><label for='data-3850a397-c2fa-4926-803e-919c27451029' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([142, 49, 70, ..., 66, 131, 158])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-6f99a56e-2cdd-4f2a-96da-b973acc4ad6a' class='xr-section-summary-in' type='checkbox' ><label for='section-6f99a56e-2cdd-4f2a-96da-b973acc4ad6a' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>sample</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-184f528c-0b41-49ca-8513-9a02571384d4' class='xr-index-data-in' type='checkbox'/><label for='index-184f528c-0b41-49ca-8513-9a02571384d4' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8,\n",
1111
+ " 9,\n",
1112
+ " ...\n",
1113
+ " 199733, 199734, 199735, 199736, 199737, 199738, 199739, 199740, 199741,\n",
1114
+ " 199742],\n",
1115
+ " dtype=&#x27;int64&#x27;, name=&#x27;sample&#x27;, length=199743))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>x</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-f75993e9-897f-4d91-9d93-7e85a487a9bb' class='xr-index-data-in' type='checkbox'/><label for='index-f75993e9-897f-4d91-9d93-7e85a487a9bb' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1116
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26],\n",
1117
+ " dtype=&#x27;int64&#x27;, name=&#x27;x&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>y</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-492bac11-11eb-45a5-959b-347c76244472' class='xr-index-data-in' type='checkbox'/><label for='index-492bac11-11eb-45a5-959b-347c76244472' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1118
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26],\n",
1119
+ " dtype=&#x27;int64&#x27;, name=&#x27;y&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-a81631fc-7793-4169-9392-90e22aad1413' class='xr-section-summary-in' type='checkbox' checked><label for='section-a81631fc-7793-4169-9392-90e22aad1413' class='xr-section-summary' >Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>description :</span></dt><dd>CNN data med velocity x billeder og &#x27;THICK&#x27; som labels.</dd></dl></div></li></ul></div></div>"
1120
+ ],
1121
+ "text/plain": [
1122
+ "<xarray.Dataset> Size: 600MB\n",
1123
+ "Dimensions: (sample: 199743, x: 27, y: 27)\n",
1124
+ "Coordinates:\n",
1125
+ " * sample (sample) int64 2MB 0 1 2 3 4 ... 199739 199740 199741 199742\n",
1126
+ " * x (x) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1127
+ " * y (y) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1128
+ "Data variables:\n",
1129
+ " images (sample, x, y) float32 582MB 113.8 114.1 114.2 ... 1.296 1.321\n",
1130
+ " labels (sample) float64 2MB 721.8 2.486e+03 ... 1.504e+03 2.781e+03\n",
1131
+ " THICK (sample) float64 2MB 721.8 2.486e+03 ... 1.504e+03 2.781e+03\n",
1132
+ " vx (sample) float64 2MB 153.6 -2.169 60.29 ... -0.7571 -250.5 0.805\n",
1133
+ " vy (sample) float64 2MB 2.79 -4.493 -142.5 ... -1.349 186.6 5.014\n",
1134
+ " v (sample) float64 2MB 153.7 4.99 154.7 ... 1.547 312.4 5.079\n",
1135
+ " smb (sample) float64 2MB 346.6 134.6 1.587e+03 ... 34.2 158.3 79.98\n",
1136
+ " z (sample) float64 2MB 77.39 2.678e+03 249.0 ... 211.1 2.866e+03\n",
1137
+ " s (sample) float64 2MB 0.007674 0.002828 ... 0.007703 0.002951\n",
1138
+ " temp (sample) float64 2MB 260.8 233.5 261.1 ... 226.0 248.7 236.9\n",
1139
+ " gridCellId (sample) int64 2MB 142 49 70 140 246 131 ... 93 128 66 131 158\n",
1140
+ "Attributes:\n",
1141
+ " description: CNN data med velocity x billeder og 'THICK' som labels."
1142
+ ]
1143
+ },
1144
+ "execution_count": 21,
1145
+ "metadata": {},
1146
+ "output_type": "execute_result"
1147
+ }
1148
+ ],
1149
+ "source": [
1150
+ "final_ds"
1151
+ ]
1152
+ },
1153
+ {
1154
+ "cell_type": "code",
1155
+ "execution_count": 22,
1156
+ "id": "bdb4d03a",
1157
+ "metadata": {},
1158
+ "outputs": [],
1159
+ "source": [
1160
+ "test_import = xr.open_dataset('conv_velocity_x_3031.nc') "
1161
+ ]
1162
+ },
1163
+ {
1164
+ "cell_type": "code",
1165
+ "execution_count": 23,
1166
+ "id": "6bf789a6",
1167
+ "metadata": {},
1168
+ "outputs": [
1169
+ {
1170
+ "data": {
1171
+ "text/html": [
1172
+ "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
1173
+ "<defs>\n",
1174
+ "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
1175
+ "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
1176
+ "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
1177
+ "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
1178
+ "</symbol>\n",
1179
+ "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
1180
+ "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
1181
+ "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
1182
+ "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
1183
+ "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
1184
+ "</symbol>\n",
1185
+ "</defs>\n",
1186
+ "</svg>\n",
1187
+ "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
1188
+ " *\n",
1189
+ " */\n",
1190
+ "\n",
1191
+ ":root {\n",
1192
+ " --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
1193
+ " --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
1194
+ " --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
1195
+ " --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
1196
+ " --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
1197
+ " --xr-background-color: var(--jp-layout-color0, white);\n",
1198
+ " --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
1199
+ " --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
1200
+ "}\n",
1201
+ "\n",
1202
+ "html[theme=\"dark\"],\n",
1203
+ "html[data-theme=\"dark\"],\n",
1204
+ "body[data-theme=\"dark\"],\n",
1205
+ "body.vscode-dark {\n",
1206
+ " --xr-font-color0: rgba(255, 255, 255, 1);\n",
1207
+ " --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
1208
+ " --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
1209
+ " --xr-border-color: #1f1f1f;\n",
1210
+ " --xr-disabled-color: #515151;\n",
1211
+ " --xr-background-color: #111111;\n",
1212
+ " --xr-background-color-row-even: #111111;\n",
1213
+ " --xr-background-color-row-odd: #313131;\n",
1214
+ "}\n",
1215
+ "\n",
1216
+ ".xr-wrap {\n",
1217
+ " display: block !important;\n",
1218
+ " min-width: 300px;\n",
1219
+ " max-width: 700px;\n",
1220
+ "}\n",
1221
+ "\n",
1222
+ ".xr-text-repr-fallback {\n",
1223
+ " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
1224
+ " display: none;\n",
1225
+ "}\n",
1226
+ "\n",
1227
+ ".xr-header {\n",
1228
+ " padding-top: 6px;\n",
1229
+ " padding-bottom: 6px;\n",
1230
+ " margin-bottom: 4px;\n",
1231
+ " border-bottom: solid 1px var(--xr-border-color);\n",
1232
+ "}\n",
1233
+ "\n",
1234
+ ".xr-header > div,\n",
1235
+ ".xr-header > ul {\n",
1236
+ " display: inline;\n",
1237
+ " margin-top: 0;\n",
1238
+ " margin-bottom: 0;\n",
1239
+ "}\n",
1240
+ "\n",
1241
+ ".xr-obj-type,\n",
1242
+ ".xr-array-name {\n",
1243
+ " margin-left: 2px;\n",
1244
+ " margin-right: 10px;\n",
1245
+ "}\n",
1246
+ "\n",
1247
+ ".xr-obj-type {\n",
1248
+ " color: var(--xr-font-color2);\n",
1249
+ "}\n",
1250
+ "\n",
1251
+ ".xr-sections {\n",
1252
+ " padding-left: 0 !important;\n",
1253
+ " display: grid;\n",
1254
+ " grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n",
1255
+ "}\n",
1256
+ "\n",
1257
+ ".xr-section-item {\n",
1258
+ " display: contents;\n",
1259
+ "}\n",
1260
+ "\n",
1261
+ ".xr-section-item input {\n",
1262
+ " display: inline-block;\n",
1263
+ " opacity: 0;\n",
1264
+ " height: 0;\n",
1265
+ "}\n",
1266
+ "\n",
1267
+ ".xr-section-item input + label {\n",
1268
+ " color: var(--xr-disabled-color);\n",
1269
+ "}\n",
1270
+ "\n",
1271
+ ".xr-section-item input:enabled + label {\n",
1272
+ " cursor: pointer;\n",
1273
+ " color: var(--xr-font-color2);\n",
1274
+ "}\n",
1275
+ "\n",
1276
+ ".xr-section-item input:focus + label {\n",
1277
+ " border: 2px solid var(--xr-font-color0);\n",
1278
+ "}\n",
1279
+ "\n",
1280
+ ".xr-section-item input:enabled + label:hover {\n",
1281
+ " color: var(--xr-font-color0);\n",
1282
+ "}\n",
1283
+ "\n",
1284
+ ".xr-section-summary {\n",
1285
+ " grid-column: 1;\n",
1286
+ " color: var(--xr-font-color2);\n",
1287
+ " font-weight: 500;\n",
1288
+ "}\n",
1289
+ "\n",
1290
+ ".xr-section-summary > span {\n",
1291
+ " display: inline-block;\n",
1292
+ " padding-left: 0.5em;\n",
1293
+ "}\n",
1294
+ "\n",
1295
+ ".xr-section-summary-in:disabled + label {\n",
1296
+ " color: var(--xr-font-color2);\n",
1297
+ "}\n",
1298
+ "\n",
1299
+ ".xr-section-summary-in + label:before {\n",
1300
+ " display: inline-block;\n",
1301
+ " content: \"►\";\n",
1302
+ " font-size: 11px;\n",
1303
+ " width: 15px;\n",
1304
+ " text-align: center;\n",
1305
+ "}\n",
1306
+ "\n",
1307
+ ".xr-section-summary-in:disabled + label:before {\n",
1308
+ " color: var(--xr-disabled-color);\n",
1309
+ "}\n",
1310
+ "\n",
1311
+ ".xr-section-summary-in:checked + label:before {\n",
1312
+ " content: \"▼\";\n",
1313
+ "}\n",
1314
+ "\n",
1315
+ ".xr-section-summary-in:checked + label > span {\n",
1316
+ " display: none;\n",
1317
+ "}\n",
1318
+ "\n",
1319
+ ".xr-section-summary,\n",
1320
+ ".xr-section-inline-details {\n",
1321
+ " padding-top: 4px;\n",
1322
+ " padding-bottom: 4px;\n",
1323
+ "}\n",
1324
+ "\n",
1325
+ ".xr-section-inline-details {\n",
1326
+ " grid-column: 2 / -1;\n",
1327
+ "}\n",
1328
+ "\n",
1329
+ ".xr-section-details {\n",
1330
+ " display: none;\n",
1331
+ " grid-column: 1 / -1;\n",
1332
+ " margin-bottom: 5px;\n",
1333
+ "}\n",
1334
+ "\n",
1335
+ ".xr-section-summary-in:checked ~ .xr-section-details {\n",
1336
+ " display: contents;\n",
1337
+ "}\n",
1338
+ "\n",
1339
+ ".xr-array-wrap {\n",
1340
+ " grid-column: 1 / -1;\n",
1341
+ " display: grid;\n",
1342
+ " grid-template-columns: 20px auto;\n",
1343
+ "}\n",
1344
+ "\n",
1345
+ ".xr-array-wrap > label {\n",
1346
+ " grid-column: 1;\n",
1347
+ " vertical-align: top;\n",
1348
+ "}\n",
1349
+ "\n",
1350
+ ".xr-preview {\n",
1351
+ " color: var(--xr-font-color3);\n",
1352
+ "}\n",
1353
+ "\n",
1354
+ ".xr-array-preview,\n",
1355
+ ".xr-array-data {\n",
1356
+ " padding: 0 5px !important;\n",
1357
+ " grid-column: 2;\n",
1358
+ "}\n",
1359
+ "\n",
1360
+ ".xr-array-data,\n",
1361
+ ".xr-array-in:checked ~ .xr-array-preview {\n",
1362
+ " display: none;\n",
1363
+ "}\n",
1364
+ "\n",
1365
+ ".xr-array-in:checked ~ .xr-array-data,\n",
1366
+ ".xr-array-preview {\n",
1367
+ " display: inline-block;\n",
1368
+ "}\n",
1369
+ "\n",
1370
+ ".xr-dim-list {\n",
1371
+ " display: inline-block !important;\n",
1372
+ " list-style: none;\n",
1373
+ " padding: 0 !important;\n",
1374
+ " margin: 0;\n",
1375
+ "}\n",
1376
+ "\n",
1377
+ ".xr-dim-list li {\n",
1378
+ " display: inline-block;\n",
1379
+ " padding: 0;\n",
1380
+ " margin: 0;\n",
1381
+ "}\n",
1382
+ "\n",
1383
+ ".xr-dim-list:before {\n",
1384
+ " content: \"(\";\n",
1385
+ "}\n",
1386
+ "\n",
1387
+ ".xr-dim-list:after {\n",
1388
+ " content: \")\";\n",
1389
+ "}\n",
1390
+ "\n",
1391
+ ".xr-dim-list li:not(:last-child):after {\n",
1392
+ " content: \",\";\n",
1393
+ " padding-right: 5px;\n",
1394
+ "}\n",
1395
+ "\n",
1396
+ ".xr-has-index {\n",
1397
+ " font-weight: bold;\n",
1398
+ "}\n",
1399
+ "\n",
1400
+ ".xr-var-list,\n",
1401
+ ".xr-var-item {\n",
1402
+ " display: contents;\n",
1403
+ "}\n",
1404
+ "\n",
1405
+ ".xr-var-item > div,\n",
1406
+ ".xr-var-item label,\n",
1407
+ ".xr-var-item > .xr-var-name span {\n",
1408
+ " background-color: var(--xr-background-color-row-even);\n",
1409
+ " margin-bottom: 0;\n",
1410
+ "}\n",
1411
+ "\n",
1412
+ ".xr-var-item > .xr-var-name:hover span {\n",
1413
+ " padding-right: 5px;\n",
1414
+ "}\n",
1415
+ "\n",
1416
+ ".xr-var-list > li:nth-child(odd) > div,\n",
1417
+ ".xr-var-list > li:nth-child(odd) > label,\n",
1418
+ ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
1419
+ " background-color: var(--xr-background-color-row-odd);\n",
1420
+ "}\n",
1421
+ "\n",
1422
+ ".xr-var-name {\n",
1423
+ " grid-column: 1;\n",
1424
+ "}\n",
1425
+ "\n",
1426
+ ".xr-var-dims {\n",
1427
+ " grid-column: 2;\n",
1428
+ "}\n",
1429
+ "\n",
1430
+ ".xr-var-dtype {\n",
1431
+ " grid-column: 3;\n",
1432
+ " text-align: right;\n",
1433
+ " color: var(--xr-font-color2);\n",
1434
+ "}\n",
1435
+ "\n",
1436
+ ".xr-var-preview {\n",
1437
+ " grid-column: 4;\n",
1438
+ "}\n",
1439
+ "\n",
1440
+ ".xr-index-preview {\n",
1441
+ " grid-column: 2 / 5;\n",
1442
+ " color: var(--xr-font-color2);\n",
1443
+ "}\n",
1444
+ "\n",
1445
+ ".xr-var-name,\n",
1446
+ ".xr-var-dims,\n",
1447
+ ".xr-var-dtype,\n",
1448
+ ".xr-preview,\n",
1449
+ ".xr-attrs dt {\n",
1450
+ " white-space: nowrap;\n",
1451
+ " overflow: hidden;\n",
1452
+ " text-overflow: ellipsis;\n",
1453
+ " padding-right: 10px;\n",
1454
+ "}\n",
1455
+ "\n",
1456
+ ".xr-var-name:hover,\n",
1457
+ ".xr-var-dims:hover,\n",
1458
+ ".xr-var-dtype:hover,\n",
1459
+ ".xr-attrs dt:hover {\n",
1460
+ " overflow: visible;\n",
1461
+ " width: auto;\n",
1462
+ " z-index: 1;\n",
1463
+ "}\n",
1464
+ "\n",
1465
+ ".xr-var-attrs,\n",
1466
+ ".xr-var-data,\n",
1467
+ ".xr-index-data {\n",
1468
+ " display: none;\n",
1469
+ " background-color: var(--xr-background-color) !important;\n",
1470
+ " padding-bottom: 5px !important;\n",
1471
+ "}\n",
1472
+ "\n",
1473
+ ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
1474
+ ".xr-var-data-in:checked ~ .xr-var-data,\n",
1475
+ ".xr-index-data-in:checked ~ .xr-index-data {\n",
1476
+ " display: block;\n",
1477
+ "}\n",
1478
+ "\n",
1479
+ ".xr-var-data > table {\n",
1480
+ " float: right;\n",
1481
+ "}\n",
1482
+ "\n",
1483
+ ".xr-var-name span,\n",
1484
+ ".xr-var-data,\n",
1485
+ ".xr-index-name div,\n",
1486
+ ".xr-index-data,\n",
1487
+ ".xr-attrs {\n",
1488
+ " padding-left: 25px !important;\n",
1489
+ "}\n",
1490
+ "\n",
1491
+ ".xr-attrs,\n",
1492
+ ".xr-var-attrs,\n",
1493
+ ".xr-var-data,\n",
1494
+ ".xr-index-data {\n",
1495
+ " grid-column: 1 / -1;\n",
1496
+ "}\n",
1497
+ "\n",
1498
+ "dl.xr-attrs {\n",
1499
+ " padding: 0;\n",
1500
+ " margin: 0;\n",
1501
+ " display: grid;\n",
1502
+ " grid-template-columns: 125px auto;\n",
1503
+ "}\n",
1504
+ "\n",
1505
+ ".xr-attrs dt,\n",
1506
+ ".xr-attrs dd {\n",
1507
+ " padding: 0;\n",
1508
+ " margin: 0;\n",
1509
+ " float: left;\n",
1510
+ " padding-right: 10px;\n",
1511
+ " width: auto;\n",
1512
+ "}\n",
1513
+ "\n",
1514
+ ".xr-attrs dt {\n",
1515
+ " font-weight: normal;\n",
1516
+ " grid-column: 1;\n",
1517
+ "}\n",
1518
+ "\n",
1519
+ ".xr-attrs dt:hover span {\n",
1520
+ " display: inline-block;\n",
1521
+ " background: var(--xr-background-color);\n",
1522
+ " padding-right: 10px;\n",
1523
+ "}\n",
1524
+ "\n",
1525
+ ".xr-attrs dd {\n",
1526
+ " grid-column: 2;\n",
1527
+ " white-space: pre-wrap;\n",
1528
+ " word-break: break-all;\n",
1529
+ "}\n",
1530
+ "\n",
1531
+ ".xr-icon-database,\n",
1532
+ ".xr-icon-file-text2,\n",
1533
+ ".xr-no-icon {\n",
1534
+ " display: inline-block;\n",
1535
+ " vertical-align: middle;\n",
1536
+ " width: 1em;\n",
1537
+ " height: 1.5em !important;\n",
1538
+ " stroke-width: 0;\n",
1539
+ " stroke: currentColor;\n",
1540
+ " fill: currentColor;\n",
1541
+ "}\n",
1542
+ "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 600MB\n",
1543
+ "Dimensions: (sample: 199743, x: 27, y: 27)\n",
1544
+ "Coordinates:\n",
1545
+ " * sample (sample) int64 2MB 0 1 2 3 4 ... 199739 199740 199741 199742\n",
1546
+ " * x (x) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1547
+ " * y (y) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1548
+ "Data variables:\n",
1549
+ " images (sample, x, y) float32 582MB ...\n",
1550
+ " labels (sample) float64 2MB ...\n",
1551
+ " THICK (sample) float64 2MB ...\n",
1552
+ " vx (sample) float64 2MB ...\n",
1553
+ " vy (sample) float64 2MB ...\n",
1554
+ " v (sample) float64 2MB ...\n",
1555
+ " smb (sample) float64 2MB ...\n",
1556
+ " z (sample) float64 2MB ...\n",
1557
+ " s (sample) float64 2MB ...\n",
1558
+ " temp (sample) float64 2MB ...\n",
1559
+ " gridCellId (sample) int64 2MB ...\n",
1560
+ "Attributes:\n",
1561
+ " description: CNN data med velocity x billeder og &#x27;THICK&#x27; som labels.</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-c5a736f4-2f6b-4aff-9873-dae737c98646' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-c5a736f4-2f6b-4aff-9873-dae737c98646' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>sample</span>: 199743</li><li><span class='xr-has-index'>x</span>: 27</li><li><span class='xr-has-index'>y</span>: 27</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-897a309e-35c8-48a0-9b8c-ce02d45b2af7' class='xr-section-summary-in' type='checkbox' checked><label for='section-897a309e-35c8-48a0-9b8c-ce02d45b2af7' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>sample</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 ... 199740 199741 199742</div><input id='attrs-f7428a0c-7524-4cdd-b292-1743e5193ffa' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f7428a0c-7524-4cdd-b292-1743e5193ffa' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5070d733-9008-40e7-8d61-c9f35c4eec8b' class='xr-var-data-in' type='checkbox'><label for='data-5070d733-9008-40e7-8d61-c9f35c4eec8b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, ..., 199740, 199741, 199742])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 21 22 23 24 25 26</div><input id='attrs-32d2352f-1ee8-485e-9c14-0f22628b7c44' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-32d2352f-1ee8-485e-9c14-0f22628b7c44' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-61f90fa4-09e6-4958-91bd-62b2d9a78aa8' class='xr-var-data-in' type='checkbox'><label for='data-61f90fa4-09e6-4958-91bd-62b2d9a78aa8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1562
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 21 22 23 24 25 26</div><input id='attrs-5c356178-ee07-4c92-9007-607a1e8bb466' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5c356178-ee07-4c92-9007-607a1e8bb466' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-846a80a8-da19-4d6e-a147-baa352a7856c' class='xr-var-data-in' type='checkbox'><label for='data-846a80a8-da19-4d6e-a147-baa352a7856c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1563
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-3c38f167-3f0b-486d-b895-c48b3d7ab043' class='xr-section-summary-in' type='checkbox' checked><label for='section-3c38f167-3f0b-486d-b895-c48b3d7ab043' class='xr-section-summary' >Data variables: <span>(11)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>images</span></div><div class='xr-var-dims'>(sample, x, y)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-2d135129-57a2-4eb7-9ece-286e45bd9958' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2d135129-57a2-4eb7-9ece-286e45bd9958' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a52de7ad-a583-4ebc-bfd1-c6b7733100be' class='xr-var-data-in' type='checkbox'><label for='data-a52de7ad-a583-4ebc-bfd1-c6b7733100be' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[145612647 values with dtype=float32]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>labels</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-805bd29c-9a49-4d5c-bac9-c520abed4a40' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-805bd29c-9a49-4d5c-bac9-c520abed4a40' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a4d7f96e-86df-42da-9709-19e1e6cc0f58' class='xr-var-data-in' type='checkbox'><label for='data-a4d7f96e-86df-42da-9709-19e1e6cc0f58' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>THICK</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-8a315509-476a-4e6e-95e4-f93fd1a77d2b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8a315509-476a-4e6e-95e4-f93fd1a77d2b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8a90aa3c-3639-4f7d-a7c7-051ac3fe84d8' class='xr-var-data-in' type='checkbox'><label for='data-8a90aa3c-3639-4f7d-a7c7-051ac3fe84d8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>vx</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-b8d4351b-1b1a-4be6-a045-98d201da4322' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b8d4351b-1b1a-4be6-a045-98d201da4322' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f4a34e47-7f7b-4aa8-aceb-5269ea8d8c92' class='xr-var-data-in' type='checkbox'><label for='data-f4a34e47-7f7b-4aa8-aceb-5269ea8d8c92' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>vy</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-37a9b40d-0dfb-4007-b5ab-9dff423f24d7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-37a9b40d-0dfb-4007-b5ab-9dff423f24d7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-440eccea-e341-482d-acfe-80f75f862541' class='xr-var-data-in' type='checkbox'><label for='data-440eccea-e341-482d-acfe-80f75f862541' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>v</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-1d6e9d11-7646-4153-b50e-bf80b537763e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1d6e9d11-7646-4153-b50e-bf80b537763e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8f7c6484-a32a-4e97-a3c7-c0c31650f6e9' class='xr-var-data-in' type='checkbox'><label for='data-8f7c6484-a32a-4e97-a3c7-c0c31650f6e9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smb</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-086ab6dd-0ecc-41bf-a0bd-90f26e5436a3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-086ab6dd-0ecc-41bf-a0bd-90f26e5436a3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-531ce6ff-c2bb-4a28-8380-a9f06edfc8a6' class='xr-var-data-in' type='checkbox'><label for='data-531ce6ff-c2bb-4a28-8380-a9f06edfc8a6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>z</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-61184683-910d-4415-80f9-381ecfedda48' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-61184683-910d-4415-80f9-381ecfedda48' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4b33cd99-f9df-4d10-b73e-f629633bccc8' class='xr-var-data-in' type='checkbox'><label for='data-4b33cd99-f9df-4d10-b73e-f629633bccc8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>s</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-d84f024c-8f3e-439b-bbc7-8a709cc2d57e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d84f024c-8f3e-439b-bbc7-8a709cc2d57e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-09a9a457-45b8-4611-b3d0-4c8cfdaa388f' class='xr-var-data-in' type='checkbox'><label for='data-09a9a457-45b8-4611-b3d0-4c8cfdaa388f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>temp</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-e24df826-acc7-4d1e-a0cc-650884e62fdd' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e24df826-acc7-4d1e-a0cc-650884e62fdd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f295995e-0815-40b5-8c2d-b510f2baf790' class='xr-var-data-in' type='checkbox'><label for='data-f295995e-0815-40b5-8c2d-b510f2baf790' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>gridCellId</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-5b773d11-0f51-4933-99a1-1af8fcf5b63b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5b773d11-0f51-4933-99a1-1af8fcf5b63b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d6f6c147-573f-4d8a-a236-5f85765ff7c4' class='xr-var-data-in' type='checkbox'><label for='data-d6f6c147-573f-4d8a-a236-5f85765ff7c4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=int64]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-981494bc-80ea-47ee-9f10-1672256f9b1d' class='xr-section-summary-in' type='checkbox' ><label for='section-981494bc-80ea-47ee-9f10-1672256f9b1d' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>sample</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-08ee7b96-8e66-4157-bd93-414c1d933d69' class='xr-index-data-in' type='checkbox'/><label for='index-08ee7b96-8e66-4157-bd93-414c1d933d69' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8,\n",
1564
+ " 9,\n",
1565
+ " ...\n",
1566
+ " 199733, 199734, 199735, 199736, 199737, 199738, 199739, 199740, 199741,\n",
1567
+ " 199742],\n",
1568
+ " dtype=&#x27;int64&#x27;, name=&#x27;sample&#x27;, length=199743))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>x</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-d2ee535b-6fff-4259-a858-0ff453f74b5b' class='xr-index-data-in' type='checkbox'/><label for='index-d2ee535b-6fff-4259-a858-0ff453f74b5b' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1569
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26],\n",
1570
+ " dtype=&#x27;int64&#x27;, name=&#x27;x&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>y</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-87c261a9-f46a-4816-bc29-3fbce8437f58' class='xr-index-data-in' type='checkbox'/><label for='index-87c261a9-f46a-4816-bc29-3fbce8437f58' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1571
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26],\n",
1572
+ " dtype=&#x27;int64&#x27;, name=&#x27;y&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-d432f0c6-fba7-4be8-9e68-6a7e871b1894' class='xr-section-summary-in' type='checkbox' checked><label for='section-d432f0c6-fba7-4be8-9e68-6a7e871b1894' class='xr-section-summary' >Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>description :</span></dt><dd>CNN data med velocity x billeder og &#x27;THICK&#x27; som labels.</dd></dl></div></li></ul></div></div>"
1573
+ ],
1574
+ "text/plain": [
1575
+ "<xarray.Dataset> Size: 600MB\n",
1576
+ "Dimensions: (sample: 199743, x: 27, y: 27)\n",
1577
+ "Coordinates:\n",
1578
+ " * sample (sample) int64 2MB 0 1 2 3 4 ... 199739 199740 199741 199742\n",
1579
+ " * x (x) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1580
+ " * y (y) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1581
+ "Data variables:\n",
1582
+ " images (sample, x, y) float32 582MB ...\n",
1583
+ " labels (sample) float64 2MB ...\n",
1584
+ " THICK (sample) float64 2MB ...\n",
1585
+ " vx (sample) float64 2MB ...\n",
1586
+ " vy (sample) float64 2MB ...\n",
1587
+ " v (sample) float64 2MB ...\n",
1588
+ " smb (sample) float64 2MB ...\n",
1589
+ " z (sample) float64 2MB ...\n",
1590
+ " s (sample) float64 2MB ...\n",
1591
+ " temp (sample) float64 2MB ...\n",
1592
+ " gridCellId (sample) int64 2MB ...\n",
1593
+ "Attributes:\n",
1594
+ " description: CNN data med velocity x billeder og 'THICK' som labels."
1595
+ ]
1596
+ },
1597
+ "execution_count": 23,
1598
+ "metadata": {},
1599
+ "output_type": "execute_result"
1600
+ }
1601
+ ],
1602
+ "source": [
1603
+ "test_import"
1604
+ ]
1605
+ },
1606
+ {
1607
+ "cell_type": "code",
1608
+ "execution_count": 19,
1609
+ "id": "4a1e044e",
1610
+ "metadata": {},
1611
+ "outputs": [
1612
+ {
1613
+ "name": "stdout",
1614
+ "output_type": "stream",
1615
+ "text": [
1616
+ "2526549.105328181 144908.31682322195\n",
1617
+ "<xarray.DataArray 'x' ()> Size: 8B\n",
1618
+ "array(2458435.62499475)\n",
1619
+ "Coordinates:\n",
1620
+ " x float64 8B 2.458e+06\n",
1621
+ " y float64 8B 1.364e+05\n",
1622
+ " band int64 8B 1\n",
1623
+ " spatial_ref int64 8B 0\n",
1624
+ "Attributes:\n",
1625
+ " axis: X\n",
1626
+ " long_name: x coordinate of projection\n",
1627
+ " standard_name: projection_x_coordinate\n",
1628
+ " units: metre <xarray.DataArray 'y' ()> Size: 8B\n",
1629
+ "array(136396.0348264)\n",
1630
+ "Coordinates:\n",
1631
+ " x float64 8B 2.458e+06\n",
1632
+ " y float64 8B 1.364e+05\n",
1633
+ " band int64 8B 1\n",
1634
+ " spatial_ref int64 8B 0\n",
1635
+ "Attributes:\n",
1636
+ " axis: Y\n",
1637
+ " long_name: y coordinate of projection\n",
1638
+ " standard_name: projection_y_coordinate\n",
1639
+ " units: metre\n"
1640
+ ]
1641
+ }
1642
+ ],
1643
+ "source": [
1644
+ "p = gdf.iloc[0].geometry\n",
1645
+ "\n",
1646
+ "transform = sat_im.rio.transform()\n",
1647
+ "\n",
1648
+ "col, row = ~transform * (p.x, p.y)\n",
1649
+ "\n",
1650
+ "col, row = int(np.floor(col)), int(np.floor(row))\n",
1651
+ "\n",
1652
+ "print(p.x, p.y)\n",
1653
+ "\n",
1654
+ "print(sat_im[0][row][col].x, sat_im[0][row][col].y)"
1655
+ ]
1656
+ },
1657
+ {
1658
+ "cell_type": "code",
1659
+ "execution_count": null,
1660
+ "id": "9ac2f290",
1661
+ "metadata": {},
1662
+ "outputs": [
1663
+ {
1664
+ "name": "stdout",
1665
+ "output_type": "stream",
1666
+ "text": [
1667
+ "\n",
1668
+ "Source file path for Affine class: c:\\Users\\Cap\\Documents\\Python_Scripts\\AppML\\.geoMLvenv\\Lib\\site-packages\\affine\\__init__.py\n"
1669
+ ]
1670
+ }
1671
+ ],
1672
+ "source": [
1673
+ "import inspect\n",
1674
+ "\n",
1675
+ "source_file_path = inspect.getsourcefile(type(sat_im.surface.rio.transform()))\n",
1676
+ "print(f\"\\nSource file path for Affine class: {source_file_path}\")"
1677
+ ]
1678
+ },
1679
+ {
1680
+ "cell_type": "code",
1681
+ "execution_count": 33,
1682
+ "id": "5faf0630",
1683
+ "metadata": {},
1684
+ "outputs": [
1685
+ {
1686
+ "name": "stdout",
1687
+ "output_type": "stream",
1688
+ "text": [
1689
+ "(199594.11626899874, -199594.11626899874)\n"
1690
+ ]
1691
+ }
1692
+ ],
1693
+ "source": [
1694
+ "print(sat_im.rio.resolution())"
1695
+ ]
1696
+ }
1697
+ ],
1698
+ "metadata": {
1699
+ "kernelspec": {
1700
+ "display_name": "appml",
1701
+ "language": "python",
1702
+ "name": "python3"
1703
+ },
1704
+ "language_info": {
1705
+ "codemirror_mode": {
1706
+ "name": "ipython",
1707
+ "version": 3
1708
+ },
1709
+ "file_extension": ".py",
1710
+ "mimetype": "text/x-python",
1711
+ "name": "python",
1712
+ "nbconvert_exporter": "python",
1713
+ "pygments_lexer": "ipython3",
1714
+ "version": "3.12.9"
1715
+ }
1716
+ },
1717
+ "nbformat": 4,
1718
+ "nbformat_minor": 5
1719
+ }
make_conv_train_philip_velocity_y_ithbm.ipynb ADDED
@@ -0,0 +1,1578 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "id": "0dd2c5d4",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "import xarray as xr\n",
11
+ "import geopandas as gpd\n",
12
+ "from shapely.geometry import box\n",
13
+ "import rioxarray as rxr # Make sure you have rioxarray installed (pip install rioxarray)\n",
14
+ "import numpy as np\n",
15
+ "import ibis\n",
16
+ "ibis.options.interactive = True"
17
+ ]
18
+ },
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": 2,
22
+ "id": "d615f835",
23
+ "metadata": {},
24
+ "outputs": [
25
+ {
26
+ "data": {
27
+ "text/plain": [
28
+ "<duckdb.duckdb.DuckDBPyConnection at 0x16aa47070>"
29
+ ]
30
+ },
31
+ "execution_count": 2,
32
+ "metadata": {},
33
+ "output_type": "execute_result"
34
+ }
35
+ ],
36
+ "source": [
37
+ "con = ibis.duckdb.connect()\n",
38
+ "con.raw_sql('INSTALL spatial;')\n",
39
+ "con.raw_sql('LOAD spatial;')"
40
+ ]
41
+ },
42
+ {
43
+ "cell_type": "markdown",
44
+ "id": "700cf1f9",
45
+ "metadata": {},
46
+ "source": [
47
+ "- The .rio accessor: https://corteva.github.io/rioxarray/html/rioxarray.html#rioxarray-rio-accessors\n",
48
+ "\n",
49
+ "- Affine( pixel_width, 0, top_left_x_coord,\n",
50
+ " 0, -pixel_height, top_left_y_coord)\n",
51
+ "\n",
52
+ "- Rasterio Affine Docs (https://affine.readthedocs.io/en/latest/)"
53
+ ]
54
+ },
55
+ {
56
+ "cell_type": "code",
57
+ "execution_count": 3,
58
+ "id": "cf514138",
59
+ "metadata": {},
60
+ "outputs": [
61
+ {
62
+ "name": "stdout",
63
+ "output_type": "stream",
64
+ "text": [
65
+ "<xarray.DataArray 'VY' (band: 1, y: 12445, x: 12445)> Size: 620MB\n",
66
+ "[154878025 values with dtype=float32]\n",
67
+ "Coordinates:\n",
68
+ " * band (band) int64 8B 1\n",
69
+ " * x (x) float64 100kB -2.8e+06 -2.8e+06 ... 2.799e+06 2.8e+06\n",
70
+ " * y (y) float64 100kB 2.8e+06 2.8e+06 ... -2.799e+06 -2.8e+06\n",
71
+ " spatial_ref int64 8B 0\n",
72
+ " coord_system int64 8B 0\n",
73
+ "Attributes:\n",
74
+ " coordinates: lon lat\n",
75
+ " long_name: Ice velocity in y direction\n",
76
+ " standard_name: land_ice_y_velocity\n",
77
+ " units: meter/year\n",
78
+ " _FillValue: 0.0\n",
79
+ " scale_factor: 1.0\n",
80
+ " add_offset: 0.0\n"
81
+ ]
82
+ }
83
+ ],
84
+ "source": [
85
+ "filename = 'antarctic_ice_vel_phase_map_v01.nc'\n",
86
+ "sat_im = rxr.open_rasterio(filename)\n",
87
+ "sat_im = sat_im['VY']\n",
88
+ "#sat_im = sat_im.rio.reproject(\"EPSG:3031\")\n",
89
+ "transform = sat_im.rio.transform()\n",
90
+ "print(sat_im)"
91
+ ]
92
+ },
93
+ {
94
+ "cell_type": "code",
95
+ "execution_count": 4,
96
+ "id": "106bf063",
97
+ "metadata": {},
98
+ "outputs": [
99
+ {
100
+ "name": "stdout",
101
+ "output_type": "stream",
102
+ "text": [
103
+ "EPSG:3031\n"
104
+ ]
105
+ }
106
+ ],
107
+ "source": [
108
+ "print(sat_im.rio.crs)"
109
+ ]
110
+ },
111
+ {
112
+ "cell_type": "code",
113
+ "execution_count": 5,
114
+ "id": "7cc14869",
115
+ "metadata": {},
116
+ "outputs": [],
117
+ "source": [
118
+ "tab = con.read_parquet('punkter_til_CNN.parquet')"
119
+ ]
120
+ },
121
+ {
122
+ "cell_type": "code",
123
+ "execution_count": 6,
124
+ "id": "0fec2bb7",
125
+ "metadata": {},
126
+ "outputs": [],
127
+ "source": [
128
+ "# Let's create a dummy GeoPandas DataFrame for demonstration\n",
129
+ "#num_points = 200_000\n",
130
+ "#frac_points = num_points/30_000_000\n",
131
+ "# Generate random points within a reasonable Antarctica extent (approx for EPSG:3031)\n",
132
+ "# min_x, max_x = -2000000, 2000000\n",
133
+ "# min_y, max_y = -2000000, 2000000\n",
134
+ "# random_x = np.random.uniform(min_x, max_x, num_points)\n",
135
+ "# random_y = np.random.uniform(min_y, max_y, num_points)\n",
136
+ "# ice_thickness_data = np.random.uniform(100, 5000, num_points) # Example ice thickness\n",
137
+ "# v_data = np.random.uniform(0, 1, num_points) # Example velocity\n",
138
+ "# temp_data = np.random.uniform(0, 1000, num_points) # Example temperature\n",
139
+ "\n",
140
+ "# gdf = gpd.GeoDataFrame(\n",
141
+ "# {'ice_thickness': ice_thickness_data,\n",
142
+ "# 'v': v_data,\n",
143
+ "# 'temp': temp_data\n",
144
+ "# },\n",
145
+ "# geometry=gpd.points_from_xy(random_x, random_y),\n",
146
+ "# crs=\"EPSG:3031\"\n",
147
+ "# )\n",
148
+ "#data = tab.drop(['LON','LAT'])\n",
149
+ "data = tab\n",
150
+ "#random_data = data.sample(frac_points)\n",
151
+ "\n",
152
+ "# 3.1. Create a spatial index for your GeoDataFrame\n",
153
+ "gdf = data.to_pandas()\n",
154
+ "gdf.crs = \"EPSG:3031\"\n",
155
+ "gdf_sindex = gdf.sindex"
156
+ ]
157
+ },
158
+ {
159
+ "cell_type": "code",
160
+ "execution_count": 7,
161
+ "id": "88b2eb18",
162
+ "metadata": {},
163
+ "outputs": [],
164
+ "source": [
165
+ "#gdf.to_parquet(\"punkter_til_CNN.parquet\")"
166
+ ]
167
+ },
168
+ {
169
+ "cell_type": "code",
170
+ "execution_count": 8,
171
+ "id": "ae2f315d",
172
+ "metadata": {},
173
+ "outputs": [
174
+ {
175
+ "data": {
176
+ "text/html": [
177
+ "<div>\n",
178
+ "<style scoped>\n",
179
+ " .dataframe tbody tr th:only-of-type {\n",
180
+ " vertical-align: middle;\n",
181
+ " }\n",
182
+ "\n",
183
+ " .dataframe tbody tr th {\n",
184
+ " vertical-align: top;\n",
185
+ " }\n",
186
+ "\n",
187
+ " .dataframe thead th {\n",
188
+ " text-align: right;\n",
189
+ " }\n",
190
+ "</style>\n",
191
+ "<table border=\"1\" class=\"dataframe\">\n",
192
+ " <thead>\n",
193
+ " <tr style=\"text-align: right;\">\n",
194
+ " <th></th>\n",
195
+ " <th>THICK</th>\n",
196
+ " <th>geometry</th>\n",
197
+ " <th>EAST</th>\n",
198
+ " <th>NORTH</th>\n",
199
+ " <th>vx</th>\n",
200
+ " <th>vy</th>\n",
201
+ " <th>v</th>\n",
202
+ " <th>ith_bm</th>\n",
203
+ " <th>smb</th>\n",
204
+ " <th>z</th>\n",
205
+ " <th>s</th>\n",
206
+ " <th>temp</th>\n",
207
+ " <th>gridCellId</th>\n",
208
+ " </tr>\n",
209
+ " </thead>\n",
210
+ " <tbody>\n",
211
+ " <tr>\n",
212
+ " <th>0</th>\n",
213
+ " <td>721.812000</td>\n",
214
+ " <td>POINT (2526549.105 144908.317)</td>\n",
215
+ " <td>2.526549e+06</td>\n",
216
+ " <td>1.449083e+05</td>\n",
217
+ " <td>153.634560</td>\n",
218
+ " <td>2.790444</td>\n",
219
+ " <td>153.659899</td>\n",
220
+ " <td>721.467940</td>\n",
221
+ " <td>346.598053</td>\n",
222
+ " <td>77.386441</td>\n",
223
+ " <td>0.007674</td>\n",
224
+ " <td>260.754211</td>\n",
225
+ " <td>142</td>\n",
226
+ " </tr>\n",
227
+ " <tr>\n",
228
+ " <th>1</th>\n",
229
+ " <td>2486.400000</td>\n",
230
+ " <td>POINT (1521616.527 -1469968.825)</td>\n",
231
+ " <td>1.521617e+06</td>\n",
232
+ " <td>-1.469969e+06</td>\n",
233
+ " <td>-2.169074</td>\n",
234
+ " <td>-4.493365</td>\n",
235
+ " <td>4.989510</td>\n",
236
+ " <td>2398.450355</td>\n",
237
+ " <td>134.622343</td>\n",
238
+ " <td>2677.818154</td>\n",
239
+ " <td>0.002828</td>\n",
240
+ " <td>233.461512</td>\n",
241
+ " <td>49</td>\n",
242
+ " </tr>\n",
243
+ " <tr>\n",
244
+ " <th>2</th>\n",
245
+ " <td>802.200000</td>\n",
246
+ " <td>POINT (2404674.37 -1067011.291)</td>\n",
247
+ " <td>2.404674e+06</td>\n",
248
+ " <td>-1.067011e+06</td>\n",
249
+ " <td>60.294909</td>\n",
250
+ " <td>-142.512808</td>\n",
251
+ " <td>154.742937</td>\n",
252
+ " <td>688.203481</td>\n",
253
+ " <td>1586.881584</td>\n",
254
+ " <td>249.042803</td>\n",
255
+ " <td>0.011071</td>\n",
256
+ " <td>261.087043</td>\n",
257
+ " <td>70</td>\n",
258
+ " </tr>\n",
259
+ " <tr>\n",
260
+ " <th>3</th>\n",
261
+ " <td>3023.950000</td>\n",
262
+ " <td>POINT (1699952.89 99913.876)</td>\n",
263
+ " <td>1.699953e+06</td>\n",
264
+ " <td>9.991388e+04</td>\n",
265
+ " <td>0.934968</td>\n",
266
+ " <td>2.743626</td>\n",
267
+ " <td>2.898560</td>\n",
268
+ " <td>3014.002473</td>\n",
269
+ " <td>64.349997</td>\n",
270
+ " <td>3356.340342</td>\n",
271
+ " <td>0.002495</td>\n",
272
+ " <td>230.660568</td>\n",
273
+ " <td>140</td>\n",
274
+ " </tr>\n",
275
+ " <tr>\n",
276
+ " <th>4</th>\n",
277
+ " <td>1390.175481</td>\n",
278
+ " <td>POINT (1113434.27 1790978.987)</td>\n",
279
+ " <td>1.113434e+06</td>\n",
280
+ " <td>1.790979e+06</td>\n",
281
+ " <td>0.057320</td>\n",
282
+ " <td>7.032495</td>\n",
283
+ " <td>7.032729</td>\n",
284
+ " <td>1235.187350</td>\n",
285
+ " <td>178.636116</td>\n",
286
+ " <td>892.512017</td>\n",
287
+ " <td>0.002860</td>\n",
288
+ " <td>253.317246</td>\n",
289
+ " <td>246</td>\n",
290
+ " </tr>\n",
291
+ " <tr>\n",
292
+ " <th>...</th>\n",
293
+ " <td>...</td>\n",
294
+ " <td>...</td>\n",
295
+ " <td>...</td>\n",
296
+ " <td>...</td>\n",
297
+ " <td>...</td>\n",
298
+ " <td>...</td>\n",
299
+ " <td>...</td>\n",
300
+ " <td>...</td>\n",
301
+ " <td>...</td>\n",
302
+ " <td>...</td>\n",
303
+ " <td>...</td>\n",
304
+ " <td>...</td>\n",
305
+ " <td>...</td>\n",
306
+ " </tr>\n",
307
+ " <tr>\n",
308
+ " <th>199738</th>\n",
309
+ " <td>1919.390000</td>\n",
310
+ " <td>POINT (-1486478.853 -414384.668)</td>\n",
311
+ " <td>-1.486479e+06</td>\n",
312
+ " <td>-4.143847e+05</td>\n",
313
+ " <td>-301.083286</td>\n",
314
+ " <td>-156.749208</td>\n",
315
+ " <td>339.442867</td>\n",
316
+ " <td>1897.753276</td>\n",
317
+ " <td>630.135663</td>\n",
318
+ " <td>825.209678</td>\n",
319
+ " <td>0.011550</td>\n",
320
+ " <td>254.742781</td>\n",
321
+ " <td>93</td>\n",
322
+ " </tr>\n",
323
+ " <tr>\n",
324
+ " <th>199739</th>\n",
325
+ " <td>601.280000</td>\n",
326
+ " <td>POINT (-1726950.887 238389.962)</td>\n",
327
+ " <td>-1.726951e+06</td>\n",
328
+ " <td>2.383900e+05</td>\n",
329
+ " <td>-33.293658</td>\n",
330
+ " <td>7.757353</td>\n",
331
+ " <td>34.185438</td>\n",
332
+ " <td>726.883071</td>\n",
333
+ " <td>1334.391422</td>\n",
334
+ " <td>632.884411</td>\n",
335
+ " <td>0.025015</td>\n",
336
+ " <td>256.262266</td>\n",
337
+ " <td>128</td>\n",
338
+ " </tr>\n",
339
+ " <tr>\n",
340
+ " <th>199740</th>\n",
341
+ " <td>3022.010000</td>\n",
342
+ " <td>POINT (1265667.68 -1049619.529)</td>\n",
343
+ " <td>1.265668e+06</td>\n",
344
+ " <td>-1.049620e+06</td>\n",
345
+ " <td>-0.757103</td>\n",
346
+ " <td>-1.348858</td>\n",
347
+ " <td>1.546810</td>\n",
348
+ " <td>2749.802718</td>\n",
349
+ " <td>34.202691</td>\n",
350
+ " <td>3065.901918</td>\n",
351
+ " <td>0.000934</td>\n",
352
+ " <td>225.997403</td>\n",
353
+ " <td>66</td>\n",
354
+ " </tr>\n",
355
+ " <tr>\n",
356
+ " <th>199741</th>\n",
357
+ " <td>1503.770000</td>\n",
358
+ " <td>POINT (-934393.811 251856.892)</td>\n",
359
+ " <td>-9.343938e+05</td>\n",
360
+ " <td>2.518569e+05</td>\n",
361
+ " <td>-250.500161</td>\n",
362
+ " <td>186.584424</td>\n",
363
+ " <td>312.352490</td>\n",
364
+ " <td>1464.022580</td>\n",
365
+ " <td>158.329718</td>\n",
366
+ " <td>211.082870</td>\n",
367
+ " <td>0.007703</td>\n",
368
+ " <td>248.743671</td>\n",
369
+ " <td>131</td>\n",
370
+ " </tr>\n",
371
+ " <tr>\n",
372
+ " <th>199742</th>\n",
373
+ " <td>2781.140000</td>\n",
374
+ " <td>POINT (1792527.871 317702.838)</td>\n",
375
+ " <td>1.792528e+06</td>\n",
376
+ " <td>3.177028e+05</td>\n",
377
+ " <td>0.805005</td>\n",
378
+ " <td>5.014312</td>\n",
379
+ " <td>5.078519</td>\n",
380
+ " <td>2736.503206</td>\n",
381
+ " <td>79.982648</td>\n",
382
+ " <td>2865.923339</td>\n",
383
+ " <td>0.002951</td>\n",
384
+ " <td>236.933552</td>\n",
385
+ " <td>158</td>\n",
386
+ " </tr>\n",
387
+ " </tbody>\n",
388
+ "</table>\n",
389
+ "<p>199743 rows × 13 columns</p>\n",
390
+ "</div>"
391
+ ],
392
+ "text/plain": [
393
+ " THICK geometry EAST \\\n",
394
+ "0 721.812000 POINT (2526549.105 144908.317) 2.526549e+06 \n",
395
+ "1 2486.400000 POINT (1521616.527 -1469968.825) 1.521617e+06 \n",
396
+ "2 802.200000 POINT (2404674.37 -1067011.291) 2.404674e+06 \n",
397
+ "3 3023.950000 POINT (1699952.89 99913.876) 1.699953e+06 \n",
398
+ "4 1390.175481 POINT (1113434.27 1790978.987) 1.113434e+06 \n",
399
+ "... ... ... ... \n",
400
+ "199738 1919.390000 POINT (-1486478.853 -414384.668) -1.486479e+06 \n",
401
+ "199739 601.280000 POINT (-1726950.887 238389.962) -1.726951e+06 \n",
402
+ "199740 3022.010000 POINT (1265667.68 -1049619.529) 1.265668e+06 \n",
403
+ "199741 1503.770000 POINT (-934393.811 251856.892) -9.343938e+05 \n",
404
+ "199742 2781.140000 POINT (1792527.871 317702.838) 1.792528e+06 \n",
405
+ "\n",
406
+ " NORTH vx vy v ith_bm \\\n",
407
+ "0 1.449083e+05 153.634560 2.790444 153.659899 721.467940 \n",
408
+ "1 -1.469969e+06 -2.169074 -4.493365 4.989510 2398.450355 \n",
409
+ "2 -1.067011e+06 60.294909 -142.512808 154.742937 688.203481 \n",
410
+ "3 9.991388e+04 0.934968 2.743626 2.898560 3014.002473 \n",
411
+ "4 1.790979e+06 0.057320 7.032495 7.032729 1235.187350 \n",
412
+ "... ... ... ... ... ... \n",
413
+ "199738 -4.143847e+05 -301.083286 -156.749208 339.442867 1897.753276 \n",
414
+ "199739 2.383900e+05 -33.293658 7.757353 34.185438 726.883071 \n",
415
+ "199740 -1.049620e+06 -0.757103 -1.348858 1.546810 2749.802718 \n",
416
+ "199741 2.518569e+05 -250.500161 186.584424 312.352490 1464.022580 \n",
417
+ "199742 3.177028e+05 0.805005 5.014312 5.078519 2736.503206 \n",
418
+ "\n",
419
+ " smb z s temp gridCellId \n",
420
+ "0 346.598053 77.386441 0.007674 260.754211 142 \n",
421
+ "1 134.622343 2677.818154 0.002828 233.461512 49 \n",
422
+ "2 1586.881584 249.042803 0.011071 261.087043 70 \n",
423
+ "3 64.349997 3356.340342 0.002495 230.660568 140 \n",
424
+ "4 178.636116 892.512017 0.002860 253.317246 246 \n",
425
+ "... ... ... ... ... ... \n",
426
+ "199738 630.135663 825.209678 0.011550 254.742781 93 \n",
427
+ "199739 1334.391422 632.884411 0.025015 256.262266 128 \n",
428
+ "199740 34.202691 3065.901918 0.000934 225.997403 66 \n",
429
+ "199741 158.329718 211.082870 0.007703 248.743671 131 \n",
430
+ "199742 79.982648 2865.923339 0.002951 236.933552 158 \n",
431
+ "\n",
432
+ "[199743 rows x 13 columns]"
433
+ ]
434
+ },
435
+ "execution_count": 8,
436
+ "metadata": {},
437
+ "output_type": "execute_result"
438
+ }
439
+ ],
440
+ "source": [
441
+ "gdf"
442
+ ]
443
+ },
444
+ {
445
+ "cell_type": "code",
446
+ "execution_count": 9,
447
+ "id": "8cd3bb9e",
448
+ "metadata": {},
449
+ "outputs": [
450
+ {
451
+ "data": {
452
+ "text/plain": [
453
+ "199743"
454
+ ]
455
+ },
456
+ "execution_count": 9,
457
+ "metadata": {},
458
+ "output_type": "execute_result"
459
+ }
460
+ ],
461
+ "source": [
462
+ "len(gdf)"
463
+ ]
464
+ },
465
+ {
466
+ "cell_type": "code",
467
+ "execution_count": 11,
468
+ "id": "3f8fbde2",
469
+ "metadata": {},
470
+ "outputs": [
471
+ {
472
+ "name": "stderr",
473
+ "output_type": "stream",
474
+ "text": [
475
+ "/var/folders/44/y59xjnbx6fqfgz896mcmxfw80000gn/T/ipykernel_3814/2297924111.py:34: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.\n",
476
+ " if (x_idx - half < 0 or x_idx + half + 1 > ds.dims[\"x\"] or\n",
477
+ "/var/folders/44/y59xjnbx6fqfgz896mcmxfw80000gn/T/ipykernel_3814/2297924111.py:35: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.\n",
478
+ " y_idx - half < 0 or y_idx + half + 1 > ds.dims[\"y\"]):\n"
479
+ ]
480
+ },
481
+ {
482
+ "name": "stdout",
483
+ "output_type": "stream",
484
+ "text": [
485
+ "Brugte 199743 punkter, skippede 0.\n"
486
+ ]
487
+ }
488
+ ],
489
+ "source": [
490
+ "import xarray as xr\n",
491
+ "import numpy as np\n",
492
+ "import geopandas as gpd\n",
493
+ "from shapely.geometry import Point\n",
494
+ "\n",
495
+ "# Åbn velocity data (ingen rioxarray nødvendig)\n",
496
+ "ds = xr.open_dataset(\"antarctic_ice_vel_phase_map_v01.nc\")\n",
497
+ "vy = ds[\"VY\"] # (y, x)\n",
498
+ "\n",
499
+ "# Åbn dine punkter i EPSG:4326 (forudsat det passer – ellers transformér det)\n",
500
+ "gdf = gpd.read_parquet(\"punkter_til_CNN.parquet\")\n",
501
+ "gdf = gdf.to_crs(\"EPSG:3031\") # Sørg for at punkter er i geografisk koordinatsystem\n",
502
+ "\n",
503
+ "# Billedstørrelse (27 pixels dækker 2.7° × 2.7°)\n",
504
+ "size = 27\n",
505
+ "half = size // 2\n",
506
+ "pixel_deg = 0.1 # resolution pr. pixel i grader\n",
507
+ "\n",
508
+ "images = []\n",
509
+ "scalar_feats = ['THICK', 'vx', 'vy', 'v', 'smb', 'z', 's', 'temp', 'ith_bm', 'gridCellId']\n",
510
+ "im_data = {feat: [] for feat in scalar_feats}\n",
511
+ "\n",
512
+ "used = 0\n",
513
+ "skipped = 0\n",
514
+ "\n",
515
+ "for idx, row in gdf.iterrows():\n",
516
+ " lon, lat = row.geometry.x, row.geometry.y\n",
517
+ "\n",
518
+ " # Find indeks i datasættet tættest på punktets koordinater\n",
519
+ " x_idx = int(np.argmin(np.abs(ds[\"x\"].values - lon)))\n",
520
+ " y_idx = int(np.argmin(np.abs(ds[\"y\"].values - lat)))\n",
521
+ "\n",
522
+ " # Tjek om vi kan trække et 27×27 udsnit uden at gå ud over kanter\n",
523
+ " if (x_idx - half < 0 or x_idx + half + 1 > ds.dims[\"x\"] or\n",
524
+ " y_idx - half < 0 or y_idx + half + 1 > ds.dims[\"y\"]):\n",
525
+ " skipped += 1\n",
526
+ " continue\n",
527
+ "\n",
528
+ " patch = vy.isel(\n",
529
+ " y=slice(y_idx - half, y_idx + half + 1),\n",
530
+ " x=slice(x_idx - half, x_idx + half + 1)\n",
531
+ " )\n",
532
+ "\n",
533
+ " images.append(patch.values)\n",
534
+ " for feat in scalar_feats:\n",
535
+ " im_data[feat].append(row[feat])\n",
536
+ " used += 1\n",
537
+ "\n",
538
+ "print(f\"Brugte {used} punkter, skippede {skipped}.\")"
539
+ ]
540
+ },
541
+ {
542
+ "cell_type": "code",
543
+ "execution_count": 13,
544
+ "id": "0c5e8c24",
545
+ "metadata": {},
546
+ "outputs": [
547
+ {
548
+ "name": "stdout",
549
+ "output_type": "stream",
550
+ "text": [
551
+ "✅ Gemte dataset med labels som 'conv_velocity_y_ithbm_3031.nc'\n"
552
+ ]
553
+ }
554
+ ],
555
+ "source": [
556
+ "# Konverter billeder til en samlet 3D-array\n",
557
+ "image_array = np.stack(images)\n",
558
+ "\n",
559
+ "# Vælg hvilken feature du vil bruge som label\n",
560
+ "label_feature = \"THICK\" # ← Skift dette hvis du ønsker noget andet\n",
561
+ "\n",
562
+ "# Lav DataArray til billeder\n",
563
+ "images_da = xr.DataArray(\n",
564
+ " image_array,\n",
565
+ " dims=[\"sample\", \"x\", \"y\"],\n",
566
+ " coords={\"sample\": np.arange(image_array.shape[0]),\n",
567
+ " \"x\": np.arange(27),\n",
568
+ " \"y\": np.arange(27)},\n",
569
+ " name=\"images\"\n",
570
+ ")\n",
571
+ "\n",
572
+ "# Scalar-variabler og label\n",
573
+ "scalar_data = {\n",
574
+ " feat: xr.DataArray(\n",
575
+ " np.array(im_data[feat]),\n",
576
+ " dims=[\"sample\"],\n",
577
+ " coords={\"sample\": np.arange(image_array.shape[0])},\n",
578
+ " name=feat\n",
579
+ " )\n",
580
+ " for feat in scalar_feats\n",
581
+ "}\n",
582
+ "\n",
583
+ "# Tilføj label som separat variabel (samme som label_feature)\n",
584
+ "labels_da = xr.DataArray(\n",
585
+ " np.array(im_data[label_feature]),\n",
586
+ " dims=[\"sample\"],\n",
587
+ " coords={\"sample\": np.arange(image_array.shape[0])},\n",
588
+ " name=\"labels\"\n",
589
+ ")\n",
590
+ "\n",
591
+ "# Saml alt i ét dataset\n",
592
+ "final_ds = xr.Dataset(\n",
593
+ " data_vars={\n",
594
+ " \"images\": images_da,\n",
595
+ " \"labels\": labels_da,\n",
596
+ " **scalar_data\n",
597
+ " },\n",
598
+ " attrs={\n",
599
+ " \"description\": f\"CNN data med velocity y billeder og '{label_feature}' som labels.\"\n",
600
+ " }\n",
601
+ ")\n",
602
+ "\n",
603
+ "# Gem som NetCDF\n",
604
+ "final_ds.to_netcdf(\"conv_velocity_y_ithbm_3031.nc\")\n",
605
+ "print(\"✅ Gemte dataset med labels som 'conv_velocity_y_ithbm_3031.nc'\")\n"
606
+ ]
607
+ },
608
+ {
609
+ "cell_type": "code",
610
+ "execution_count": 14,
611
+ "id": "6cc1c242",
612
+ "metadata": {},
613
+ "outputs": [
614
+ {
615
+ "data": {
616
+ "text/html": [
617
+ "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
618
+ "<defs>\n",
619
+ "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
620
+ "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
621
+ "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
622
+ "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
623
+ "</symbol>\n",
624
+ "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
625
+ "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
626
+ "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
627
+ "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
628
+ "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
629
+ "</symbol>\n",
630
+ "</defs>\n",
631
+ "</svg>\n",
632
+ "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
633
+ " *\n",
634
+ " */\n",
635
+ "\n",
636
+ ":root {\n",
637
+ " --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
638
+ " --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
639
+ " --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
640
+ " --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
641
+ " --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
642
+ " --xr-background-color: var(--jp-layout-color0, white);\n",
643
+ " --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
644
+ " --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
645
+ "}\n",
646
+ "\n",
647
+ "html[theme=\"dark\"],\n",
648
+ "html[data-theme=\"dark\"],\n",
649
+ "body[data-theme=\"dark\"],\n",
650
+ "body.vscode-dark {\n",
651
+ " --xr-font-color0: rgba(255, 255, 255, 1);\n",
652
+ " --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
653
+ " --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
654
+ " --xr-border-color: #1f1f1f;\n",
655
+ " --xr-disabled-color: #515151;\n",
656
+ " --xr-background-color: #111111;\n",
657
+ " --xr-background-color-row-even: #111111;\n",
658
+ " --xr-background-color-row-odd: #313131;\n",
659
+ "}\n",
660
+ "\n",
661
+ ".xr-wrap {\n",
662
+ " display: block !important;\n",
663
+ " min-width: 300px;\n",
664
+ " max-width: 700px;\n",
665
+ "}\n",
666
+ "\n",
667
+ ".xr-text-repr-fallback {\n",
668
+ " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
669
+ " display: none;\n",
670
+ "}\n",
671
+ "\n",
672
+ ".xr-header {\n",
673
+ " padding-top: 6px;\n",
674
+ " padding-bottom: 6px;\n",
675
+ " margin-bottom: 4px;\n",
676
+ " border-bottom: solid 1px var(--xr-border-color);\n",
677
+ "}\n",
678
+ "\n",
679
+ ".xr-header > div,\n",
680
+ ".xr-header > ul {\n",
681
+ " display: inline;\n",
682
+ " margin-top: 0;\n",
683
+ " margin-bottom: 0;\n",
684
+ "}\n",
685
+ "\n",
686
+ ".xr-obj-type,\n",
687
+ ".xr-array-name {\n",
688
+ " margin-left: 2px;\n",
689
+ " margin-right: 10px;\n",
690
+ "}\n",
691
+ "\n",
692
+ ".xr-obj-type {\n",
693
+ " color: var(--xr-font-color2);\n",
694
+ "}\n",
695
+ "\n",
696
+ ".xr-sections {\n",
697
+ " padding-left: 0 !important;\n",
698
+ " display: grid;\n",
699
+ " grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n",
700
+ "}\n",
701
+ "\n",
702
+ ".xr-section-item {\n",
703
+ " display: contents;\n",
704
+ "}\n",
705
+ "\n",
706
+ ".xr-section-item input {\n",
707
+ " display: inline-block;\n",
708
+ " opacity: 0;\n",
709
+ " height: 0;\n",
710
+ "}\n",
711
+ "\n",
712
+ ".xr-section-item input + label {\n",
713
+ " color: var(--xr-disabled-color);\n",
714
+ "}\n",
715
+ "\n",
716
+ ".xr-section-item input:enabled + label {\n",
717
+ " cursor: pointer;\n",
718
+ " color: var(--xr-font-color2);\n",
719
+ "}\n",
720
+ "\n",
721
+ ".xr-section-item input:focus + label {\n",
722
+ " border: 2px solid var(--xr-font-color0);\n",
723
+ "}\n",
724
+ "\n",
725
+ ".xr-section-item input:enabled + label:hover {\n",
726
+ " color: var(--xr-font-color0);\n",
727
+ "}\n",
728
+ "\n",
729
+ ".xr-section-summary {\n",
730
+ " grid-column: 1;\n",
731
+ " color: var(--xr-font-color2);\n",
732
+ " font-weight: 500;\n",
733
+ "}\n",
734
+ "\n",
735
+ ".xr-section-summary > span {\n",
736
+ " display: inline-block;\n",
737
+ " padding-left: 0.5em;\n",
738
+ "}\n",
739
+ "\n",
740
+ ".xr-section-summary-in:disabled + label {\n",
741
+ " color: var(--xr-font-color2);\n",
742
+ "}\n",
743
+ "\n",
744
+ ".xr-section-summary-in + label:before {\n",
745
+ " display: inline-block;\n",
746
+ " content: \"►\";\n",
747
+ " font-size: 11px;\n",
748
+ " width: 15px;\n",
749
+ " text-align: center;\n",
750
+ "}\n",
751
+ "\n",
752
+ ".xr-section-summary-in:disabled + label:before {\n",
753
+ " color: var(--xr-disabled-color);\n",
754
+ "}\n",
755
+ "\n",
756
+ ".xr-section-summary-in:checked + label:before {\n",
757
+ " content: \"▼\";\n",
758
+ "}\n",
759
+ "\n",
760
+ ".xr-section-summary-in:checked + label > span {\n",
761
+ " display: none;\n",
762
+ "}\n",
763
+ "\n",
764
+ ".xr-section-summary,\n",
765
+ ".xr-section-inline-details {\n",
766
+ " padding-top: 4px;\n",
767
+ " padding-bottom: 4px;\n",
768
+ "}\n",
769
+ "\n",
770
+ ".xr-section-inline-details {\n",
771
+ " grid-column: 2 / -1;\n",
772
+ "}\n",
773
+ "\n",
774
+ ".xr-section-details {\n",
775
+ " display: none;\n",
776
+ " grid-column: 1 / -1;\n",
777
+ " margin-bottom: 5px;\n",
778
+ "}\n",
779
+ "\n",
780
+ ".xr-section-summary-in:checked ~ .xr-section-details {\n",
781
+ " display: contents;\n",
782
+ "}\n",
783
+ "\n",
784
+ ".xr-array-wrap {\n",
785
+ " grid-column: 1 / -1;\n",
786
+ " display: grid;\n",
787
+ " grid-template-columns: 20px auto;\n",
788
+ "}\n",
789
+ "\n",
790
+ ".xr-array-wrap > label {\n",
791
+ " grid-column: 1;\n",
792
+ " vertical-align: top;\n",
793
+ "}\n",
794
+ "\n",
795
+ ".xr-preview {\n",
796
+ " color: var(--xr-font-color3);\n",
797
+ "}\n",
798
+ "\n",
799
+ ".xr-array-preview,\n",
800
+ ".xr-array-data {\n",
801
+ " padding: 0 5px !important;\n",
802
+ " grid-column: 2;\n",
803
+ "}\n",
804
+ "\n",
805
+ ".xr-array-data,\n",
806
+ ".xr-array-in:checked ~ .xr-array-preview {\n",
807
+ " display: none;\n",
808
+ "}\n",
809
+ "\n",
810
+ ".xr-array-in:checked ~ .xr-array-data,\n",
811
+ ".xr-array-preview {\n",
812
+ " display: inline-block;\n",
813
+ "}\n",
814
+ "\n",
815
+ ".xr-dim-list {\n",
816
+ " display: inline-block !important;\n",
817
+ " list-style: none;\n",
818
+ " padding: 0 !important;\n",
819
+ " margin: 0;\n",
820
+ "}\n",
821
+ "\n",
822
+ ".xr-dim-list li {\n",
823
+ " display: inline-block;\n",
824
+ " padding: 0;\n",
825
+ " margin: 0;\n",
826
+ "}\n",
827
+ "\n",
828
+ ".xr-dim-list:before {\n",
829
+ " content: \"(\";\n",
830
+ "}\n",
831
+ "\n",
832
+ ".xr-dim-list:after {\n",
833
+ " content: \")\";\n",
834
+ "}\n",
835
+ "\n",
836
+ ".xr-dim-list li:not(:last-child):after {\n",
837
+ " content: \",\";\n",
838
+ " padding-right: 5px;\n",
839
+ "}\n",
840
+ "\n",
841
+ ".xr-has-index {\n",
842
+ " font-weight: bold;\n",
843
+ "}\n",
844
+ "\n",
845
+ ".xr-var-list,\n",
846
+ ".xr-var-item {\n",
847
+ " display: contents;\n",
848
+ "}\n",
849
+ "\n",
850
+ ".xr-var-item > div,\n",
851
+ ".xr-var-item label,\n",
852
+ ".xr-var-item > .xr-var-name span {\n",
853
+ " background-color: var(--xr-background-color-row-even);\n",
854
+ " margin-bottom: 0;\n",
855
+ "}\n",
856
+ "\n",
857
+ ".xr-var-item > .xr-var-name:hover span {\n",
858
+ " padding-right: 5px;\n",
859
+ "}\n",
860
+ "\n",
861
+ ".xr-var-list > li:nth-child(odd) > div,\n",
862
+ ".xr-var-list > li:nth-child(odd) > label,\n",
863
+ ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
864
+ " background-color: var(--xr-background-color-row-odd);\n",
865
+ "}\n",
866
+ "\n",
867
+ ".xr-var-name {\n",
868
+ " grid-column: 1;\n",
869
+ "}\n",
870
+ "\n",
871
+ ".xr-var-dims {\n",
872
+ " grid-column: 2;\n",
873
+ "}\n",
874
+ "\n",
875
+ ".xr-var-dtype {\n",
876
+ " grid-column: 3;\n",
877
+ " text-align: right;\n",
878
+ " color: var(--xr-font-color2);\n",
879
+ "}\n",
880
+ "\n",
881
+ ".xr-var-preview {\n",
882
+ " grid-column: 4;\n",
883
+ "}\n",
884
+ "\n",
885
+ ".xr-index-preview {\n",
886
+ " grid-column: 2 / 5;\n",
887
+ " color: var(--xr-font-color2);\n",
888
+ "}\n",
889
+ "\n",
890
+ ".xr-var-name,\n",
891
+ ".xr-var-dims,\n",
892
+ ".xr-var-dtype,\n",
893
+ ".xr-preview,\n",
894
+ ".xr-attrs dt {\n",
895
+ " white-space: nowrap;\n",
896
+ " overflow: hidden;\n",
897
+ " text-overflow: ellipsis;\n",
898
+ " padding-right: 10px;\n",
899
+ "}\n",
900
+ "\n",
901
+ ".xr-var-name:hover,\n",
902
+ ".xr-var-dims:hover,\n",
903
+ ".xr-var-dtype:hover,\n",
904
+ ".xr-attrs dt:hover {\n",
905
+ " overflow: visible;\n",
906
+ " width: auto;\n",
907
+ " z-index: 1;\n",
908
+ "}\n",
909
+ "\n",
910
+ ".xr-var-attrs,\n",
911
+ ".xr-var-data,\n",
912
+ ".xr-index-data {\n",
913
+ " display: none;\n",
914
+ " background-color: var(--xr-background-color) !important;\n",
915
+ " padding-bottom: 5px !important;\n",
916
+ "}\n",
917
+ "\n",
918
+ ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
919
+ ".xr-var-data-in:checked ~ .xr-var-data,\n",
920
+ ".xr-index-data-in:checked ~ .xr-index-data {\n",
921
+ " display: block;\n",
922
+ "}\n",
923
+ "\n",
924
+ ".xr-var-data > table {\n",
925
+ " float: right;\n",
926
+ "}\n",
927
+ "\n",
928
+ ".xr-var-name span,\n",
929
+ ".xr-var-data,\n",
930
+ ".xr-index-name div,\n",
931
+ ".xr-index-data,\n",
932
+ ".xr-attrs {\n",
933
+ " padding-left: 25px !important;\n",
934
+ "}\n",
935
+ "\n",
936
+ ".xr-attrs,\n",
937
+ ".xr-var-attrs,\n",
938
+ ".xr-var-data,\n",
939
+ ".xr-index-data {\n",
940
+ " grid-column: 1 / -1;\n",
941
+ "}\n",
942
+ "\n",
943
+ "dl.xr-attrs {\n",
944
+ " padding: 0;\n",
945
+ " margin: 0;\n",
946
+ " display: grid;\n",
947
+ " grid-template-columns: 125px auto;\n",
948
+ "}\n",
949
+ "\n",
950
+ ".xr-attrs dt,\n",
951
+ ".xr-attrs dd {\n",
952
+ " padding: 0;\n",
953
+ " margin: 0;\n",
954
+ " float: left;\n",
955
+ " padding-right: 10px;\n",
956
+ " width: auto;\n",
957
+ "}\n",
958
+ "\n",
959
+ ".xr-attrs dt {\n",
960
+ " font-weight: normal;\n",
961
+ " grid-column: 1;\n",
962
+ "}\n",
963
+ "\n",
964
+ ".xr-attrs dt:hover span {\n",
965
+ " display: inline-block;\n",
966
+ " background: var(--xr-background-color);\n",
967
+ " padding-right: 10px;\n",
968
+ "}\n",
969
+ "\n",
970
+ ".xr-attrs dd {\n",
971
+ " grid-column: 2;\n",
972
+ " white-space: pre-wrap;\n",
973
+ " word-break: break-all;\n",
974
+ "}\n",
975
+ "\n",
976
+ ".xr-icon-database,\n",
977
+ ".xr-icon-file-text2,\n",
978
+ ".xr-no-icon {\n",
979
+ " display: inline-block;\n",
980
+ " vertical-align: middle;\n",
981
+ " width: 1em;\n",
982
+ " height: 1.5em !important;\n",
983
+ " stroke-width: 0;\n",
984
+ " stroke: currentColor;\n",
985
+ " fill: currentColor;\n",
986
+ "}\n",
987
+ "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 602MB\n",
988
+ "Dimensions: (sample: 199743, x: 27, y: 27)\n",
989
+ "Coordinates:\n",
990
+ " * sample (sample) int64 2MB 0 1 2 3 4 ... 199739 199740 199741 199742\n",
991
+ " * x (x) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
992
+ " * y (y) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
993
+ "Data variables:\n",
994
+ " images (sample, x, y) float32 582MB -24.8 -26.14 -26.14 ... 5.298 5.325\n",
995
+ " labels (sample) float64 2MB 721.8 2.486e+03 ... 1.504e+03 2.781e+03\n",
996
+ " THICK (sample) float64 2MB 721.8 2.486e+03 ... 1.504e+03 2.781e+03\n",
997
+ " vx (sample) float64 2MB 153.6 -2.169 60.29 ... -0.7571 -250.5 0.805\n",
998
+ " vy (sample) float64 2MB 2.79 -4.493 -142.5 ... -1.349 186.6 5.014\n",
999
+ " v (sample) float64 2MB 153.7 4.99 154.7 ... 1.547 312.4 5.079\n",
1000
+ " smb (sample) float64 2MB 346.6 134.6 1.587e+03 ... 34.2 158.3 79.98\n",
1001
+ " z (sample) float64 2MB 77.39 2.678e+03 249.0 ... 211.1 2.866e+03\n",
1002
+ " s (sample) float64 2MB 0.007674 0.002828 ... 0.007703 0.002951\n",
1003
+ " temp (sample) float64 2MB 260.8 233.5 261.1 ... 226.0 248.7 236.9\n",
1004
+ " ith_bm (sample) float64 2MB 721.5 2.398e+03 ... 1.464e+03 2.737e+03\n",
1005
+ " gridCellId (sample) int64 2MB 142 49 70 140 246 131 ... 93 128 66 131 158\n",
1006
+ "Attributes:\n",
1007
+ " description: CNN data med velocity y billeder og &#x27;THICK&#x27; som labels.</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-5c623644-bace-4097-a215-a8308b6d960c' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-5c623644-bace-4097-a215-a8308b6d960c' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>sample</span>: 199743</li><li><span class='xr-has-index'>x</span>: 27</li><li><span class='xr-has-index'>y</span>: 27</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-efb5316e-dec7-44bc-9870-4421776f66ec' class='xr-section-summary-in' type='checkbox' checked><label for='section-efb5316e-dec7-44bc-9870-4421776f66ec' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>sample</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 ... 199740 199741 199742</div><input id='attrs-53bc0625-257b-4d22-97b5-ab8a3159d52e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-53bc0625-257b-4d22-97b5-ab8a3159d52e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6c302518-afa7-48f6-9309-542b695542c1' class='xr-var-data-in' type='checkbox'><label for='data-6c302518-afa7-48f6-9309-542b695542c1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, ..., 199740, 199741, 199742])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 21 22 23 24 25 26</div><input id='attrs-dd9f6d72-27be-4d91-9aa8-4cc48dde33b9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dd9f6d72-27be-4d91-9aa8-4cc48dde33b9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-da9f4b31-a278-40a2-8143-bc833a31eed9' class='xr-var-data-in' type='checkbox'><label for='data-da9f4b31-a278-40a2-8143-bc833a31eed9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1008
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 21 22 23 24 25 26</div><input id='attrs-9ac61c33-3913-4fd6-80e1-f4ef823d685b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9ac61c33-3913-4fd6-80e1-f4ef823d685b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-91374cfe-0e8c-4bf4-976b-90856562daec' class='xr-var-data-in' type='checkbox'><label for='data-91374cfe-0e8c-4bf4-976b-90856562daec' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1009
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-46f7426d-993d-4ff4-8679-5b987f58d4b9' class='xr-section-summary-in' type='checkbox' checked><label for='section-46f7426d-993d-4ff4-8679-5b987f58d4b9' class='xr-section-summary' >Data variables: <span>(12)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>images</span></div><div class='xr-var-dims'>(sample, x, y)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>-24.8 -26.14 -26.14 ... 5.298 5.325</div><input id='attrs-7e065e17-a993-40ad-82ec-868dc5ace902' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7e065e17-a993-40ad-82ec-868dc5ace902' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3956b88e-6a3e-4f93-9f4b-82df4f89f57c' class='xr-var-data-in' type='checkbox'><label for='data-3956b88e-6a3e-4f93-9f4b-82df4f89f57c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[ -24.799807 , -26.135286 , -26.135286 , ..., 13.455515 ,\n",
1010
+ " 13.98404 , 14.545469 ],\n",
1011
+ " [ -26.135286 , -27.155676 , -27.343094 , ..., 13.131123 ,\n",
1012
+ " 13.698674 , 13.98404 ],\n",
1013
+ " [ -27.155676 , -28.43307 , -28.43307 , ..., 13.131123 ,\n",
1014
+ " 13.591631 , 13.816688 ],\n",
1015
+ " ...,\n",
1016
+ " [ 26.812248 , 29.012577 , 32.59299 , ..., 8.254437 ,\n",
1017
+ " 5.7658763, 3.4984245],\n",
1018
+ " [ 27.45772 , 32.59299 , 36.64383 , ..., 8.315132 ,\n",
1019
+ " 5.794109 , 3.969142 ],\n",
1020
+ " [ 29.077293 , 34.10318 , 39.19159 , ..., 8.900702 ,\n",
1021
+ " 6.3087554, 4.178577 ]],\n",
1022
+ "\n",
1023
+ " [[ -4.963394 , -4.9265018, -4.897467 , ..., -3.7544744,\n",
1024
+ " -3.6070323, -3.6070323],\n",
1025
+ " [ -4.987354 , -4.963394 , -4.926109 , ..., -3.7544744,\n",
1026
+ " -3.6167762, -3.6167762],\n",
1027
+ " [ -5.0174165, -4.9848547, -4.943872 , ..., -3.7544744,\n",
1028
+ " -3.73255 , -3.6752112],\n",
1029
+ "...\n",
1030
+ " [ 161.14764 , 162.54997 , 163.3627 , ..., 195.00664 ,\n",
1031
+ " 196.68521 , 197.9451 ],\n",
1032
+ " [ 158.69185 , 160.31963 , 161.49341 , ..., 194.14435 ,\n",
1033
+ " 195.94392 , 197.45715 ],\n",
1034
+ " [ 154.92838 , 156.8253 , 158.25111 , ..., 193.19746 ,\n",
1035
+ " 194.94556 , 196.63599 ]],\n",
1036
+ "\n",
1037
+ " [[ 4.7060533, 4.754837 , 4.803118 , ..., 5.5028234,\n",
1038
+ " 5.5390887, 5.5763907],\n",
1039
+ " [ 4.7060533, 4.7525525, 4.803118 , ..., 5.528059 ,\n",
1040
+ " 5.562705 , 5.5991898],\n",
1041
+ " [ 4.714839 , 4.7525525, 4.807532 , ..., 5.5432553,\n",
1042
+ " 5.5751224, 5.602625 ],\n",
1043
+ " ...,\n",
1044
+ " [ 4.4667544, 4.4911814, 4.5288105, ..., 5.3275647,\n",
1045
+ " 5.352216 , 5.3788004],\n",
1046
+ " [ 4.426362 , 4.456049 , 4.4911814, ..., 5.300851 ,\n",
1047
+ " 5.3275647, 5.352216 ],\n",
1048
+ " [ 4.385785 , 4.4232802, 4.456049 , ..., 5.268609 ,\n",
1049
+ " 5.2975974, 5.325445 ]]], dtype=float32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>labels</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>721.8 2.486e+03 ... 2.781e+03</div><input id='attrs-9a4cd1bd-032d-4143-bcc0-f26541c0d1f3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9a4cd1bd-032d-4143-bcc0-f26541c0d1f3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e40a390c-343d-45c3-8702-630aeed7ed74' class='xr-var-data-in' type='checkbox'><label for='data-e40a390c-343d-45c3-8702-630aeed7ed74' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 721.812, 2486.4 , 802.2 , ..., 3022.01 , 1503.77 , 2781.14 ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>THICK</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>721.8 2.486e+03 ... 2.781e+03</div><input id='attrs-ee1a7d3d-5f56-42dc-a0ef-d82c1d17c036' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ee1a7d3d-5f56-42dc-a0ef-d82c1d17c036' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-87516c43-b341-400b-8cc7-c511053b1d7f' class='xr-var-data-in' type='checkbox'><label for='data-87516c43-b341-400b-8cc7-c511053b1d7f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 721.812, 2486.4 , 802.2 , ..., 3022.01 , 1503.77 , 2781.14 ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>vx</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>153.6 -2.169 60.29 ... -250.5 0.805</div><input id='attrs-0235d6dd-4db7-439e-9992-fde0d2f844c8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0235d6dd-4db7-439e-9992-fde0d2f844c8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0bde91db-2a18-4bc2-999e-6cc5bd4bdb47' class='xr-var-data-in' type='checkbox'><label for='data-0bde91db-2a18-4bc2-999e-6cc5bd4bdb47' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 153.63455986, -2.16907366, 60.29490924, ..., -0.75710255,\n",
1050
+ " -250.50016102, 0.8050054 ])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>vy</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.79 -4.493 -142.5 ... 186.6 5.014</div><input id='attrs-dc3529c2-d2b3-446a-adf6-ca8791e70238' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dc3529c2-d2b3-446a-adf6-ca8791e70238' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d03c4057-0497-4de6-beba-39abf877ae78' class='xr-var-data-in' type='checkbox'><label for='data-d03c4057-0497-4de6-beba-39abf877ae78' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 2.79044394, -4.49336514, -142.51280816, ..., -1.34885798,\n",
1051
+ " 186.58442352, 5.01431202])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>v</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>153.7 4.99 154.7 ... 312.4 5.079</div><input id='attrs-2aaf86d2-32a5-4b3e-b474-d93c7b5307d2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2aaf86d2-32a5-4b3e-b474-d93c7b5307d2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-31399727-5428-4ed3-842a-9940471b8a90' class='xr-var-data-in' type='checkbox'><label for='data-31399727-5428-4ed3-842a-9940471b8a90' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([153.659899 , 4.98951008, 154.74293706, ..., 1.5468103 ,\n",
1052
+ " 312.35248962, 5.07851935])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smb</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>346.6 134.6 ... 158.3 79.98</div><input id='attrs-ddf7f438-ddab-48f6-81d1-d802fec28c13' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ddf7f438-ddab-48f6-81d1-d802fec28c13' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-51f3ad48-f465-44d4-b754-21ba11043941' class='xr-var-data-in' type='checkbox'><label for='data-51f3ad48-f465-44d4-b754-21ba11043941' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 346.59805282, 134.62234314, 1586.88158369, ..., 34.202691 ,\n",
1053
+ " 158.32971838, 79.98264846])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>z</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>77.39 2.678e+03 ... 211.1 2.866e+03</div><input id='attrs-d3113e65-6bc0-4648-a4fe-58215c142de8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d3113e65-6bc0-4648-a4fe-58215c142de8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c77f03eb-d74a-42a8-9de3-18ecb3e78edf' class='xr-var-data-in' type='checkbox'><label for='data-c77f03eb-d74a-42a8-9de3-18ecb3e78edf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 77.38644071, 2677.81815429, 249.04280287, ..., 3065.9019181 ,\n",
1054
+ " 211.0828696 , 2865.92333866])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>s</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.007674 0.002828 ... 0.002951</div><input id='attrs-32407f2b-e0db-4e33-8b98-e7c54bb87724' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-32407f2b-e0db-4e33-8b98-e7c54bb87724' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e230e8df-cffd-4645-9efb-19a1d91d2436' class='xr-var-data-in' type='checkbox'><label for='data-e230e8df-cffd-4645-9efb-19a1d91d2436' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0.00767374, 0.00282843, 0.01107067, ..., 0.00093371, 0.00770311,\n",
1055
+ " 0.00295122])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>temp</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>260.8 233.5 261.1 ... 248.7 236.9</div><input id='attrs-cac70d76-d9d4-4890-b147-802174c01023' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cac70d76-d9d4-4890-b147-802174c01023' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6c4070e0-5638-4127-808c-7cb1db85d342' class='xr-var-data-in' type='checkbox'><label for='data-6c4070e0-5638-4127-808c-7cb1db85d342' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([260.75421146, 233.4615118 , 261.08704331, ..., 225.9974035 ,\n",
1056
+ " 248.74367106, 236.93355205])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>ith_bm</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>721.5 2.398e+03 ... 2.737e+03</div><input id='attrs-3458bf79-d8c5-4579-884a-fe5e975505ac' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3458bf79-d8c5-4579-884a-fe5e975505ac' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9c2e218d-95b8-4455-893c-88bccad785e3' class='xr-var-data-in' type='checkbox'><label for='data-9c2e218d-95b8-4455-893c-88bccad785e3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 721.46793968, 2398.45035469, 688.20348145, ..., 2749.80271761,\n",
1057
+ " 1464.02257956, 2736.50320639])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>gridCellId</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>142 49 70 140 ... 128 66 131 158</div><input id='attrs-e11236b1-22bd-4ff1-b428-af2b3296b65b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e11236b1-22bd-4ff1-b428-af2b3296b65b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ab1fa7c5-3ef6-49e7-b5db-100ae413cf64' class='xr-var-data-in' type='checkbox'><label for='data-ab1fa7c5-3ef6-49e7-b5db-100ae413cf64' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([142, 49, 70, ..., 66, 131, 158])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1b75d912-12c4-45e1-ab5f-d2f40bef0eb5' class='xr-section-summary-in' type='checkbox' ><label for='section-1b75d912-12c4-45e1-ab5f-d2f40bef0eb5' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>sample</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-c680bf37-f218-424d-a518-bd39f8d3aa58' class='xr-index-data-in' type='checkbox'/><label for='index-c680bf37-f218-424d-a518-bd39f8d3aa58' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8,\n",
1058
+ " 9,\n",
1059
+ " ...\n",
1060
+ " 199733, 199734, 199735, 199736, 199737, 199738, 199739, 199740, 199741,\n",
1061
+ " 199742],\n",
1062
+ " dtype=&#x27;int64&#x27;, name=&#x27;sample&#x27;, length=199743))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>x</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-7d1d4789-f714-4c30-a1d0-b9ed3785ab64' class='xr-index-data-in' type='checkbox'/><label for='index-7d1d4789-f714-4c30-a1d0-b9ed3785ab64' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1063
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26],\n",
1064
+ " dtype=&#x27;int64&#x27;, name=&#x27;x&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>y</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-79ca11d8-eb8d-4f22-af1f-d42777e4504a' class='xr-index-data-in' type='checkbox'/><label for='index-79ca11d8-eb8d-4f22-af1f-d42777e4504a' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1065
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26],\n",
1066
+ " dtype=&#x27;int64&#x27;, name=&#x27;y&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-255d52d4-f521-45bb-9530-c4e2af4212fa' class='xr-section-summary-in' type='checkbox' checked><label for='section-255d52d4-f521-45bb-9530-c4e2af4212fa' class='xr-section-summary' >Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>description :</span></dt><dd>CNN data med velocity y billeder og &#x27;THICK&#x27; som labels.</dd></dl></div></li></ul></div></div>"
1067
+ ],
1068
+ "text/plain": [
1069
+ "<xarray.Dataset> Size: 602MB\n",
1070
+ "Dimensions: (sample: 199743, x: 27, y: 27)\n",
1071
+ "Coordinates:\n",
1072
+ " * sample (sample) int64 2MB 0 1 2 3 4 ... 199739 199740 199741 199742\n",
1073
+ " * x (x) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1074
+ " * y (y) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1075
+ "Data variables:\n",
1076
+ " images (sample, x, y) float32 582MB -24.8 -26.14 -26.14 ... 5.298 5.325\n",
1077
+ " labels (sample) float64 2MB 721.8 2.486e+03 ... 1.504e+03 2.781e+03\n",
1078
+ " THICK (sample) float64 2MB 721.8 2.486e+03 ... 1.504e+03 2.781e+03\n",
1079
+ " vx (sample) float64 2MB 153.6 -2.169 60.29 ... -0.7571 -250.5 0.805\n",
1080
+ " vy (sample) float64 2MB 2.79 -4.493 -142.5 ... -1.349 186.6 5.014\n",
1081
+ " v (sample) float64 2MB 153.7 4.99 154.7 ... 1.547 312.4 5.079\n",
1082
+ " smb (sample) float64 2MB 346.6 134.6 1.587e+03 ... 34.2 158.3 79.98\n",
1083
+ " z (sample) float64 2MB 77.39 2.678e+03 249.0 ... 211.1 2.866e+03\n",
1084
+ " s (sample) float64 2MB 0.007674 0.002828 ... 0.007703 0.002951\n",
1085
+ " temp (sample) float64 2MB 260.8 233.5 261.1 ... 226.0 248.7 236.9\n",
1086
+ " ith_bm (sample) float64 2MB 721.5 2.398e+03 ... 1.464e+03 2.737e+03\n",
1087
+ " gridCellId (sample) int64 2MB 142 49 70 140 246 131 ... 93 128 66 131 158\n",
1088
+ "Attributes:\n",
1089
+ " description: CNN data med velocity y billeder og 'THICK' som labels."
1090
+ ]
1091
+ },
1092
+ "execution_count": 14,
1093
+ "metadata": {},
1094
+ "output_type": "execute_result"
1095
+ }
1096
+ ],
1097
+ "source": [
1098
+ "final_ds"
1099
+ ]
1100
+ },
1101
+ {
1102
+ "cell_type": "code",
1103
+ "execution_count": 16,
1104
+ "id": "bdb4d03a",
1105
+ "metadata": {},
1106
+ "outputs": [],
1107
+ "source": [
1108
+ "test_import = xr.open_dataset('conv_velocity_y_ithbm_3031.nc') "
1109
+ ]
1110
+ },
1111
+ {
1112
+ "cell_type": "code",
1113
+ "execution_count": 17,
1114
+ "id": "6bf789a6",
1115
+ "metadata": {},
1116
+ "outputs": [
1117
+ {
1118
+ "data": {
1119
+ "text/html": [
1120
+ "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
1121
+ "<defs>\n",
1122
+ "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
1123
+ "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
1124
+ "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
1125
+ "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
1126
+ "</symbol>\n",
1127
+ "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
1128
+ "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
1129
+ "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
1130
+ "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
1131
+ "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
1132
+ "</symbol>\n",
1133
+ "</defs>\n",
1134
+ "</svg>\n",
1135
+ "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
1136
+ " *\n",
1137
+ " */\n",
1138
+ "\n",
1139
+ ":root {\n",
1140
+ " --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
1141
+ " --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
1142
+ " --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
1143
+ " --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
1144
+ " --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
1145
+ " --xr-background-color: var(--jp-layout-color0, white);\n",
1146
+ " --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
1147
+ " --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
1148
+ "}\n",
1149
+ "\n",
1150
+ "html[theme=\"dark\"],\n",
1151
+ "html[data-theme=\"dark\"],\n",
1152
+ "body[data-theme=\"dark\"],\n",
1153
+ "body.vscode-dark {\n",
1154
+ " --xr-font-color0: rgba(255, 255, 255, 1);\n",
1155
+ " --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
1156
+ " --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
1157
+ " --xr-border-color: #1f1f1f;\n",
1158
+ " --xr-disabled-color: #515151;\n",
1159
+ " --xr-background-color: #111111;\n",
1160
+ " --xr-background-color-row-even: #111111;\n",
1161
+ " --xr-background-color-row-odd: #313131;\n",
1162
+ "}\n",
1163
+ "\n",
1164
+ ".xr-wrap {\n",
1165
+ " display: block !important;\n",
1166
+ " min-width: 300px;\n",
1167
+ " max-width: 700px;\n",
1168
+ "}\n",
1169
+ "\n",
1170
+ ".xr-text-repr-fallback {\n",
1171
+ " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
1172
+ " display: none;\n",
1173
+ "}\n",
1174
+ "\n",
1175
+ ".xr-header {\n",
1176
+ " padding-top: 6px;\n",
1177
+ " padding-bottom: 6px;\n",
1178
+ " margin-bottom: 4px;\n",
1179
+ " border-bottom: solid 1px var(--xr-border-color);\n",
1180
+ "}\n",
1181
+ "\n",
1182
+ ".xr-header > div,\n",
1183
+ ".xr-header > ul {\n",
1184
+ " display: inline;\n",
1185
+ " margin-top: 0;\n",
1186
+ " margin-bottom: 0;\n",
1187
+ "}\n",
1188
+ "\n",
1189
+ ".xr-obj-type,\n",
1190
+ ".xr-array-name {\n",
1191
+ " margin-left: 2px;\n",
1192
+ " margin-right: 10px;\n",
1193
+ "}\n",
1194
+ "\n",
1195
+ ".xr-obj-type {\n",
1196
+ " color: var(--xr-font-color2);\n",
1197
+ "}\n",
1198
+ "\n",
1199
+ ".xr-sections {\n",
1200
+ " padding-left: 0 !important;\n",
1201
+ " display: grid;\n",
1202
+ " grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n",
1203
+ "}\n",
1204
+ "\n",
1205
+ ".xr-section-item {\n",
1206
+ " display: contents;\n",
1207
+ "}\n",
1208
+ "\n",
1209
+ ".xr-section-item input {\n",
1210
+ " display: inline-block;\n",
1211
+ " opacity: 0;\n",
1212
+ " height: 0;\n",
1213
+ "}\n",
1214
+ "\n",
1215
+ ".xr-section-item input + label {\n",
1216
+ " color: var(--xr-disabled-color);\n",
1217
+ "}\n",
1218
+ "\n",
1219
+ ".xr-section-item input:enabled + label {\n",
1220
+ " cursor: pointer;\n",
1221
+ " color: var(--xr-font-color2);\n",
1222
+ "}\n",
1223
+ "\n",
1224
+ ".xr-section-item input:focus + label {\n",
1225
+ " border: 2px solid var(--xr-font-color0);\n",
1226
+ "}\n",
1227
+ "\n",
1228
+ ".xr-section-item input:enabled + label:hover {\n",
1229
+ " color: var(--xr-font-color0);\n",
1230
+ "}\n",
1231
+ "\n",
1232
+ ".xr-section-summary {\n",
1233
+ " grid-column: 1;\n",
1234
+ " color: var(--xr-font-color2);\n",
1235
+ " font-weight: 500;\n",
1236
+ "}\n",
1237
+ "\n",
1238
+ ".xr-section-summary > span {\n",
1239
+ " display: inline-block;\n",
1240
+ " padding-left: 0.5em;\n",
1241
+ "}\n",
1242
+ "\n",
1243
+ ".xr-section-summary-in:disabled + label {\n",
1244
+ " color: var(--xr-font-color2);\n",
1245
+ "}\n",
1246
+ "\n",
1247
+ ".xr-section-summary-in + label:before {\n",
1248
+ " display: inline-block;\n",
1249
+ " content: \"►\";\n",
1250
+ " font-size: 11px;\n",
1251
+ " width: 15px;\n",
1252
+ " text-align: center;\n",
1253
+ "}\n",
1254
+ "\n",
1255
+ ".xr-section-summary-in:disabled + label:before {\n",
1256
+ " color: var(--xr-disabled-color);\n",
1257
+ "}\n",
1258
+ "\n",
1259
+ ".xr-section-summary-in:checked + label:before {\n",
1260
+ " content: \"▼\";\n",
1261
+ "}\n",
1262
+ "\n",
1263
+ ".xr-section-summary-in:checked + label > span {\n",
1264
+ " display: none;\n",
1265
+ "}\n",
1266
+ "\n",
1267
+ ".xr-section-summary,\n",
1268
+ ".xr-section-inline-details {\n",
1269
+ " padding-top: 4px;\n",
1270
+ " padding-bottom: 4px;\n",
1271
+ "}\n",
1272
+ "\n",
1273
+ ".xr-section-inline-details {\n",
1274
+ " grid-column: 2 / -1;\n",
1275
+ "}\n",
1276
+ "\n",
1277
+ ".xr-section-details {\n",
1278
+ " display: none;\n",
1279
+ " grid-column: 1 / -1;\n",
1280
+ " margin-bottom: 5px;\n",
1281
+ "}\n",
1282
+ "\n",
1283
+ ".xr-section-summary-in:checked ~ .xr-section-details {\n",
1284
+ " display: contents;\n",
1285
+ "}\n",
1286
+ "\n",
1287
+ ".xr-array-wrap {\n",
1288
+ " grid-column: 1 / -1;\n",
1289
+ " display: grid;\n",
1290
+ " grid-template-columns: 20px auto;\n",
1291
+ "}\n",
1292
+ "\n",
1293
+ ".xr-array-wrap > label {\n",
1294
+ " grid-column: 1;\n",
1295
+ " vertical-align: top;\n",
1296
+ "}\n",
1297
+ "\n",
1298
+ ".xr-preview {\n",
1299
+ " color: var(--xr-font-color3);\n",
1300
+ "}\n",
1301
+ "\n",
1302
+ ".xr-array-preview,\n",
1303
+ ".xr-array-data {\n",
1304
+ " padding: 0 5px !important;\n",
1305
+ " grid-column: 2;\n",
1306
+ "}\n",
1307
+ "\n",
1308
+ ".xr-array-data,\n",
1309
+ ".xr-array-in:checked ~ .xr-array-preview {\n",
1310
+ " display: none;\n",
1311
+ "}\n",
1312
+ "\n",
1313
+ ".xr-array-in:checked ~ .xr-array-data,\n",
1314
+ ".xr-array-preview {\n",
1315
+ " display: inline-block;\n",
1316
+ "}\n",
1317
+ "\n",
1318
+ ".xr-dim-list {\n",
1319
+ " display: inline-block !important;\n",
1320
+ " list-style: none;\n",
1321
+ " padding: 0 !important;\n",
1322
+ " margin: 0;\n",
1323
+ "}\n",
1324
+ "\n",
1325
+ ".xr-dim-list li {\n",
1326
+ " display: inline-block;\n",
1327
+ " padding: 0;\n",
1328
+ " margin: 0;\n",
1329
+ "}\n",
1330
+ "\n",
1331
+ ".xr-dim-list:before {\n",
1332
+ " content: \"(\";\n",
1333
+ "}\n",
1334
+ "\n",
1335
+ ".xr-dim-list:after {\n",
1336
+ " content: \")\";\n",
1337
+ "}\n",
1338
+ "\n",
1339
+ ".xr-dim-list li:not(:last-child):after {\n",
1340
+ " content: \",\";\n",
1341
+ " padding-right: 5px;\n",
1342
+ "}\n",
1343
+ "\n",
1344
+ ".xr-has-index {\n",
1345
+ " font-weight: bold;\n",
1346
+ "}\n",
1347
+ "\n",
1348
+ ".xr-var-list,\n",
1349
+ ".xr-var-item {\n",
1350
+ " display: contents;\n",
1351
+ "}\n",
1352
+ "\n",
1353
+ ".xr-var-item > div,\n",
1354
+ ".xr-var-item label,\n",
1355
+ ".xr-var-item > .xr-var-name span {\n",
1356
+ " background-color: var(--xr-background-color-row-even);\n",
1357
+ " margin-bottom: 0;\n",
1358
+ "}\n",
1359
+ "\n",
1360
+ ".xr-var-item > .xr-var-name:hover span {\n",
1361
+ " padding-right: 5px;\n",
1362
+ "}\n",
1363
+ "\n",
1364
+ ".xr-var-list > li:nth-child(odd) > div,\n",
1365
+ ".xr-var-list > li:nth-child(odd) > label,\n",
1366
+ ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
1367
+ " background-color: var(--xr-background-color-row-odd);\n",
1368
+ "}\n",
1369
+ "\n",
1370
+ ".xr-var-name {\n",
1371
+ " grid-column: 1;\n",
1372
+ "}\n",
1373
+ "\n",
1374
+ ".xr-var-dims {\n",
1375
+ " grid-column: 2;\n",
1376
+ "}\n",
1377
+ "\n",
1378
+ ".xr-var-dtype {\n",
1379
+ " grid-column: 3;\n",
1380
+ " text-align: right;\n",
1381
+ " color: var(--xr-font-color2);\n",
1382
+ "}\n",
1383
+ "\n",
1384
+ ".xr-var-preview {\n",
1385
+ " grid-column: 4;\n",
1386
+ "}\n",
1387
+ "\n",
1388
+ ".xr-index-preview {\n",
1389
+ " grid-column: 2 / 5;\n",
1390
+ " color: var(--xr-font-color2);\n",
1391
+ "}\n",
1392
+ "\n",
1393
+ ".xr-var-name,\n",
1394
+ ".xr-var-dims,\n",
1395
+ ".xr-var-dtype,\n",
1396
+ ".xr-preview,\n",
1397
+ ".xr-attrs dt {\n",
1398
+ " white-space: nowrap;\n",
1399
+ " overflow: hidden;\n",
1400
+ " text-overflow: ellipsis;\n",
1401
+ " padding-right: 10px;\n",
1402
+ "}\n",
1403
+ "\n",
1404
+ ".xr-var-name:hover,\n",
1405
+ ".xr-var-dims:hover,\n",
1406
+ ".xr-var-dtype:hover,\n",
1407
+ ".xr-attrs dt:hover {\n",
1408
+ " overflow: visible;\n",
1409
+ " width: auto;\n",
1410
+ " z-index: 1;\n",
1411
+ "}\n",
1412
+ "\n",
1413
+ ".xr-var-attrs,\n",
1414
+ ".xr-var-data,\n",
1415
+ ".xr-index-data {\n",
1416
+ " display: none;\n",
1417
+ " background-color: var(--xr-background-color) !important;\n",
1418
+ " padding-bottom: 5px !important;\n",
1419
+ "}\n",
1420
+ "\n",
1421
+ ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
1422
+ ".xr-var-data-in:checked ~ .xr-var-data,\n",
1423
+ ".xr-index-data-in:checked ~ .xr-index-data {\n",
1424
+ " display: block;\n",
1425
+ "}\n",
1426
+ "\n",
1427
+ ".xr-var-data > table {\n",
1428
+ " float: right;\n",
1429
+ "}\n",
1430
+ "\n",
1431
+ ".xr-var-name span,\n",
1432
+ ".xr-var-data,\n",
1433
+ ".xr-index-name div,\n",
1434
+ ".xr-index-data,\n",
1435
+ ".xr-attrs {\n",
1436
+ " padding-left: 25px !important;\n",
1437
+ "}\n",
1438
+ "\n",
1439
+ ".xr-attrs,\n",
1440
+ ".xr-var-attrs,\n",
1441
+ ".xr-var-data,\n",
1442
+ ".xr-index-data {\n",
1443
+ " grid-column: 1 / -1;\n",
1444
+ "}\n",
1445
+ "\n",
1446
+ "dl.xr-attrs {\n",
1447
+ " padding: 0;\n",
1448
+ " margin: 0;\n",
1449
+ " display: grid;\n",
1450
+ " grid-template-columns: 125px auto;\n",
1451
+ "}\n",
1452
+ "\n",
1453
+ ".xr-attrs dt,\n",
1454
+ ".xr-attrs dd {\n",
1455
+ " padding: 0;\n",
1456
+ " margin: 0;\n",
1457
+ " float: left;\n",
1458
+ " padding-right: 10px;\n",
1459
+ " width: auto;\n",
1460
+ "}\n",
1461
+ "\n",
1462
+ ".xr-attrs dt {\n",
1463
+ " font-weight: normal;\n",
1464
+ " grid-column: 1;\n",
1465
+ "}\n",
1466
+ "\n",
1467
+ ".xr-attrs dt:hover span {\n",
1468
+ " display: inline-block;\n",
1469
+ " background: var(--xr-background-color);\n",
1470
+ " padding-right: 10px;\n",
1471
+ "}\n",
1472
+ "\n",
1473
+ ".xr-attrs dd {\n",
1474
+ " grid-column: 2;\n",
1475
+ " white-space: pre-wrap;\n",
1476
+ " word-break: break-all;\n",
1477
+ "}\n",
1478
+ "\n",
1479
+ ".xr-icon-database,\n",
1480
+ ".xr-icon-file-text2,\n",
1481
+ ".xr-no-icon {\n",
1482
+ " display: inline-block;\n",
1483
+ " vertical-align: middle;\n",
1484
+ " width: 1em;\n",
1485
+ " height: 1.5em !important;\n",
1486
+ " stroke-width: 0;\n",
1487
+ " stroke: currentColor;\n",
1488
+ " fill: currentColor;\n",
1489
+ "}\n",
1490
+ "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 602MB\n",
1491
+ "Dimensions: (sample: 199743, x: 27, y: 27)\n",
1492
+ "Coordinates:\n",
1493
+ " * sample (sample) int64 2MB 0 1 2 3 4 ... 199739 199740 199741 199742\n",
1494
+ " * x (x) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1495
+ " * y (y) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1496
+ "Data variables:\n",
1497
+ " images (sample, x, y) float32 582MB ...\n",
1498
+ " labels (sample) float64 2MB ...\n",
1499
+ " THICK (sample) float64 2MB ...\n",
1500
+ " vx (sample) float64 2MB ...\n",
1501
+ " vy (sample) float64 2MB ...\n",
1502
+ " v (sample) float64 2MB ...\n",
1503
+ " smb (sample) float64 2MB ...\n",
1504
+ " z (sample) float64 2MB ...\n",
1505
+ " s (sample) float64 2MB ...\n",
1506
+ " temp (sample) float64 2MB ...\n",
1507
+ " ith_bm (sample) float64 2MB ...\n",
1508
+ " gridCellId (sample) int64 2MB ...\n",
1509
+ "Attributes:\n",
1510
+ " description: CNN data med velocity y billeder og &#x27;THICK&#x27; som labels.</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-335875ea-7809-414f-9d3a-10ac4606072b' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-335875ea-7809-414f-9d3a-10ac4606072b' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>sample</span>: 199743</li><li><span class='xr-has-index'>x</span>: 27</li><li><span class='xr-has-index'>y</span>: 27</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-db5434eb-d27d-4347-ab0f-fad4bce58dad' class='xr-section-summary-in' type='checkbox' checked><label for='section-db5434eb-d27d-4347-ab0f-fad4bce58dad' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>sample</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 ... 199740 199741 199742</div><input id='attrs-8baedae4-32c3-4b6a-bfe3-8e6e0c404c3b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8baedae4-32c3-4b6a-bfe3-8e6e0c404c3b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b06a7142-bcdc-4d3b-ab63-85dc346bb3dd' class='xr-var-data-in' type='checkbox'><label for='data-b06a7142-bcdc-4d3b-ab63-85dc346bb3dd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, ..., 199740, 199741, 199742])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 21 22 23 24 25 26</div><input id='attrs-5f1cb7b6-7e1c-472d-9f2c-3c4b526ae57a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5f1cb7b6-7e1c-472d-9f2c-3c4b526ae57a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-da4cc508-faa2-46b8-956b-32ca8d0055fa' class='xr-var-data-in' type='checkbox'><label for='data-da4cc508-faa2-46b8-956b-32ca8d0055fa' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1511
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 21 22 23 24 25 26</div><input id='attrs-86bb660d-16bc-446f-813a-8a6c7e2aa9a2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-86bb660d-16bc-446f-813a-8a6c7e2aa9a2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fec05039-de5c-4655-9262-8c6a0ac59452' class='xr-var-data-in' type='checkbox'><label for='data-fec05039-de5c-4655-9262-8c6a0ac59452' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1512
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-16c1a110-53cd-4ea4-9d22-b64adc53f8de' class='xr-section-summary-in' type='checkbox' checked><label for='section-16c1a110-53cd-4ea4-9d22-b64adc53f8de' class='xr-section-summary' >Data variables: <span>(12)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>images</span></div><div class='xr-var-dims'>(sample, x, y)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-e784adca-220a-4768-a31a-a014025d489d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e784adca-220a-4768-a31a-a014025d489d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1da3a75b-00c0-4341-ac66-1d2a98d565cb' class='xr-var-data-in' type='checkbox'><label for='data-1da3a75b-00c0-4341-ac66-1d2a98d565cb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[145612647 values with dtype=float32]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>labels</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-cb070b6e-df07-48f1-a7ba-e4a556960ca6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cb070b6e-df07-48f1-a7ba-e4a556960ca6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a33756f7-d323-44df-ae1d-4e3848bdd9a1' class='xr-var-data-in' type='checkbox'><label for='data-a33756f7-d323-44df-ae1d-4e3848bdd9a1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>THICK</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-7176c23c-20a0-4f39-83fb-72ffca7fb590' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7176c23c-20a0-4f39-83fb-72ffca7fb590' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c48e521b-5d63-4533-9206-2bd92a85a939' class='xr-var-data-in' type='checkbox'><label for='data-c48e521b-5d63-4533-9206-2bd92a85a939' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>vx</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-e1ff81ce-11db-4578-be59-3a2dccbbc8f3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e1ff81ce-11db-4578-be59-3a2dccbbc8f3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5ee77473-7695-49e4-ba35-64c60218097e' class='xr-var-data-in' type='checkbox'><label for='data-5ee77473-7695-49e4-ba35-64c60218097e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>vy</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-acf2a83b-5e41-4966-abe2-c6d65db39459' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-acf2a83b-5e41-4966-abe2-c6d65db39459' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6d47b999-6a80-4365-a3f1-b1056bcb926a' class='xr-var-data-in' type='checkbox'><label for='data-6d47b999-6a80-4365-a3f1-b1056bcb926a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>v</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-717f79db-2d66-4397-96f1-958e5ad8a04a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-717f79db-2d66-4397-96f1-958e5ad8a04a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d37fcc1e-b992-4a96-b69e-06eaaea42161' class='xr-var-data-in' type='checkbox'><label for='data-d37fcc1e-b992-4a96-b69e-06eaaea42161' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smb</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-95b5e6c4-f5a6-437c-87a2-ef922f6ee901' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-95b5e6c4-f5a6-437c-87a2-ef922f6ee901' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6baeea75-2fe2-4d63-8f75-07db4b5fab79' class='xr-var-data-in' type='checkbox'><label for='data-6baeea75-2fe2-4d63-8f75-07db4b5fab79' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>z</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-dcc66aec-d71c-4338-a66b-053477f1e79a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dcc66aec-d71c-4338-a66b-053477f1e79a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d16bc7ac-7690-4da6-99d4-a829fbf42a4d' class='xr-var-data-in' type='checkbox'><label for='data-d16bc7ac-7690-4da6-99d4-a829fbf42a4d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>s</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-1b79655d-bb50-4b29-a0dc-2c11433774ac' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1b79655d-bb50-4b29-a0dc-2c11433774ac' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-70a6ac45-d945-426f-910c-26f13e7cacae' class='xr-var-data-in' type='checkbox'><label for='data-70a6ac45-d945-426f-910c-26f13e7cacae' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>temp</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-a923326a-7661-4582-be40-8f2f1243de15' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a923326a-7661-4582-be40-8f2f1243de15' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-20bdcfc7-fa92-4189-82a9-2096cd81f7c3' class='xr-var-data-in' type='checkbox'><label for='data-20bdcfc7-fa92-4189-82a9-2096cd81f7c3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>ith_bm</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-89536c41-74fa-4576-af5b-04abefd0d841' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-89536c41-74fa-4576-af5b-04abefd0d841' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2a3a5d12-1b80-4d86-9c5f-b2960f49dcf8' class='xr-var-data-in' type='checkbox'><label for='data-2a3a5d12-1b80-4d86-9c5f-b2960f49dcf8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=float64]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>gridCellId</span></div><div class='xr-var-dims'>(sample)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-bc313217-0f04-4964-a114-96c42d9f17e4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bc313217-0f04-4964-a114-96c42d9f17e4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-35c82e4b-bec9-4c7c-825a-63cb8b3b3a1b' class='xr-var-data-in' type='checkbox'><label for='data-35c82e4b-bec9-4c7c-825a-63cb8b3b3a1b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>[199743 values with dtype=int64]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f9ba1bd7-8415-4115-94ad-f3b494b8890c' class='xr-section-summary-in' type='checkbox' ><label for='section-f9ba1bd7-8415-4115-94ad-f3b494b8890c' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>sample</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-6ed47c76-b204-42b0-9b23-579e3343c142' class='xr-index-data-in' type='checkbox'/><label for='index-6ed47c76-b204-42b0-9b23-579e3343c142' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8,\n",
1513
+ " 9,\n",
1514
+ " ...\n",
1515
+ " 199733, 199734, 199735, 199736, 199737, 199738, 199739, 199740, 199741,\n",
1516
+ " 199742],\n",
1517
+ " dtype=&#x27;int64&#x27;, name=&#x27;sample&#x27;, length=199743))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>x</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-6ed60ee4-840c-4c44-b4f8-72368e33737a' class='xr-index-data-in' type='checkbox'/><label for='index-6ed60ee4-840c-4c44-b4f8-72368e33737a' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1518
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26],\n",
1519
+ " dtype=&#x27;int64&#x27;, name=&#x27;x&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>y</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-b58bff00-a6fc-4329-984f-3c1aba501a1e' class='xr-index-data-in' type='checkbox'/><label for='index-b58bff00-a6fc-4329-984f-3c1aba501a1e' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
1520
+ " 18, 19, 20, 21, 22, 23, 24, 25, 26],\n",
1521
+ " dtype=&#x27;int64&#x27;, name=&#x27;y&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-a757c469-3905-4ad3-a706-4ff4877652e5' class='xr-section-summary-in' type='checkbox' checked><label for='section-a757c469-3905-4ad3-a706-4ff4877652e5' class='xr-section-summary' >Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>description :</span></dt><dd>CNN data med velocity y billeder og &#x27;THICK&#x27; som labels.</dd></dl></div></li></ul></div></div>"
1522
+ ],
1523
+ "text/plain": [
1524
+ "<xarray.Dataset> Size: 602MB\n",
1525
+ "Dimensions: (sample: 199743, x: 27, y: 27)\n",
1526
+ "Coordinates:\n",
1527
+ " * sample (sample) int64 2MB 0 1 2 3 4 ... 199739 199740 199741 199742\n",
1528
+ " * x (x) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1529
+ " * y (y) int64 216B 0 1 2 3 4 5 6 7 8 ... 18 19 20 21 22 23 24 25 26\n",
1530
+ "Data variables:\n",
1531
+ " images (sample, x, y) float32 582MB ...\n",
1532
+ " labels (sample) float64 2MB ...\n",
1533
+ " THICK (sample) float64 2MB ...\n",
1534
+ " vx (sample) float64 2MB ...\n",
1535
+ " vy (sample) float64 2MB ...\n",
1536
+ " v (sample) float64 2MB ...\n",
1537
+ " smb (sample) float64 2MB ...\n",
1538
+ " z (sample) float64 2MB ...\n",
1539
+ " s (sample) float64 2MB ...\n",
1540
+ " temp (sample) float64 2MB ...\n",
1541
+ " ith_bm (sample) float64 2MB ...\n",
1542
+ " gridCellId (sample) int64 2MB ...\n",
1543
+ "Attributes:\n",
1544
+ " description: CNN data med velocity y billeder og 'THICK' som labels."
1545
+ ]
1546
+ },
1547
+ "execution_count": 17,
1548
+ "metadata": {},
1549
+ "output_type": "execute_result"
1550
+ }
1551
+ ],
1552
+ "source": [
1553
+ "test_import"
1554
+ ]
1555
+ }
1556
+ ],
1557
+ "metadata": {
1558
+ "kernelspec": {
1559
+ "display_name": "appml",
1560
+ "language": "python",
1561
+ "name": "python3"
1562
+ },
1563
+ "language_info": {
1564
+ "codemirror_mode": {
1565
+ "name": "ipython",
1566
+ "version": 3
1567
+ },
1568
+ "file_extension": ".py",
1569
+ "mimetype": "text/x-python",
1570
+ "name": "python",
1571
+ "nbconvert_exporter": "python",
1572
+ "pygments_lexer": "ipython3",
1573
+ "version": "3.12.9"
1574
+ }
1575
+ },
1576
+ "nbformat": 4,
1577
+ "nbformat_minor": 5
1578
+ }