Skip to content

Commit a0ba317

Browse files
committed
o Add io trails notebook
1 parent fcb860d commit a0ba317

17 files changed

+9351
-0
lines changed

io_trials/Agenda

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Agenda:
2+
3+
1. Design?
4+
5+
2. Work distribution
6+
7+
3. Documentation and coding practices
8+
9+
4. Implementation as per API Document
10+
11+
12+
5. Overall goal and success defining criterion?
13+
14+
- read the structured/unstructured File
15+
- extract data, visualize and do math
16+
17+
6. How would real world applications using uxarray look like?
18+
19+
7.

io_trials/doctest.py

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import xarray as xr
2+
import numpy as np
3+
ds = xr.Dataset()
4+
ds["mesh2d"] = xr.DataArray(
5+
data=0,
6+
attrs={
7+
"cf_role": "mesh_topology",
8+
"long_name": "Topology data of 2D mesh",
9+
"topology_dimension": 2,
10+
"node_coordinates": "node_x node_y",
11+
"face_node_connectivity": "face_nodes",
12+
}
13+
)
14+
ds = ds.assign_coords(
15+
node_x=xr.DataArray(
16+
data=np.array([0.0, 10.0, 10.0, 0.0, 20.0, 20.0]),
17+
dims=["node"],
18+
)
19+
)
20+
ds = ds.assign_coords(
21+
node_y=xr.DataArray(
22+
data=np.array([0.0, 0.0, 10.0, 10.0, 0.0, 10.0]),
23+
dims=["node"],
24+
)
25+
)
26+
ds["face_nodes"] = xr.DataArray(
27+
data=np.array([
28+
[0, 1, 2, 3],
29+
[1, 4, 5, -1]
30+
]),
31+
coords={
32+
"face_x": ("face", np.array([5.0, 15.0])),
33+
"face_y": ("face", np.array([5.0, 5.0])),
34+
},
35+
dims=["face", "nmax_face"],
36+
attrs={
37+
"cf_role": "face_node_connectivity",
38+
"long_name": "Vertex nodes of mesh faces (counterclockwise)",
39+
"start_index": 0,
40+
"_FillValue": -1,
41+
}
42+
)
43+
44+
print(ds)
45+

io_trials/dssave.exo

4 KB
Binary file not shown.

io_trials/grid_fire.shp

+1,431
Large diffs are not rendered by default.

io_trials/grid_fire.shp.1

+1,498
Large diffs are not rendered by default.

io_trials/hex_2x2x2_ss.exo

3.87 KB
Binary file not shown.

0 commit comments

Comments
 (0)