Skip to content

Commit d5b0ce8

Browse files
Add comments about additional variables defined in generated dataset
1 parent 7e567fc commit d5b0ce8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/parcels/_datasets/unstructured/generated.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ def simple_small_delaunay(nx=10, ny=10):
3535
)
3636
uxgrid.attrs["Conventions"] = "UGRID-1.0"
3737

38-
# Define arrays U (zonal), V (meridional) and P (sea surface height)
38+
# Define arrays U (zonal), V (meridional), W (vertical), and P (sea surface height)
3939
U = np.zeros((1, nz1, uxgrid.n_face), dtype=np.float64)
4040
V = np.zeros((1, nz1, uxgrid.n_face), dtype=np.float64)
4141
W = np.zeros((1, nz, uxgrid.n_node), dtype=np.float64)
4242
P = np.zeros((1, nz1, uxgrid.n_face), dtype=np.float64)
43+
# Define Tface, a ficticious tracer field on the face centroids
4344
Tface = np.zeros((1, nz1, uxgrid.n_face), dtype=np.float64)
4445

4546
for i, (x, y) in enumerate(zip(uxgrid.face_lon, uxgrid.face_lat, strict=False)):
@@ -48,6 +49,7 @@ def simple_small_delaunay(nx=10, ny=10):
4849
V[0, :, i] = vmax * ((2.0 - x) * math.exp(-x / delta) - 1) * np.sin(math.pi * y)
4950
Tface[0, :, i] = np.sin(math.pi * y) * np.cos(math.pi * x)
5051

52+
# Define Tnode, the same ficticious tracer field as above but on the face corner vertices
5153
Tnode = np.zeros((1, nz, uxgrid.n_node), dtype=np.float64)
5254
for i, (x, y) in enumerate(zip(uxgrid.node_lon, uxgrid.node_lat, strict=False)):
5355
Tnode[0, :, i] = np.sin(math.pi * y) * np.cos(math.pi * x)

0 commit comments

Comments
 (0)