postgkyl.gk.nodes_to_RZ¶
- postgkyl.gk.nodes_to_RZ(nodes, is_mapc2p)¶
Compute the major-radius/vertical-location (R, Z) variables from a grid-nodes array.
- Parameters:
nodes – Node coordinates, shape
(*cell_shape, 3)holding Cartesian (X, Y, Z) for mapc2p geometry, or(*cell_shape, 2+)holding (R, Z, [phi]) otherwise. A size-1yaxis is sliced out (at index 0) for 3-D cell shapes.is_mapc2p – Whether
nodesholds Cartesian coordinates (True) or already (R, Z, …) coordinates (False).
- Returns:
(majorR, vertZ).