cfdm.Domain.node_coordinates¶
- Domain.node_coordinates(persist=False)[source]¶
Create the node coordinates for a UGRID mesh topology.
For face and edge cells, the nodes are the cell vertices. For point cells, the nodes are the same points.
Added in version (cfdm): 1.13.1.0
See also
(cfdm)
domain_topology- Parameters:
- persist:
bool, optional If True then persist into memory the data of the returned node coordinates. If False (the default) then don’t do this.
- persist:
- Returns:
listThe node coordinates, stored in zero or more
cfdm.AuxiliaryCoordinatecontructs.
Examples:
Face cells:
>>> f = cfdm.example_field(8) >>> print(f) Field: air_temperature (ncvar%ta) --------------------------------- Data : air_temperature(time(2), ncdim%nMesh2_face(3)) K Cell methods : time(2): point (interval: 3600 s) Dimension coords: time(2) = [2016-01-02 01:00:00, 2016-01-02 11:00:00] gregorian Auxiliary coords: longitude(ncdim%nMesh2_face(3)) = [-44.0, -44.0, -42.0] degrees_east : latitude(ncdim%nMesh2_face(3)) = [34.0, 32.0, 34.0] degrees_north Topologies : cell:face(ncdim%nMesh2_face(3), 4) = [[2, ..., --]] Connectivities : connectivity:edge(ncdim%nMesh2_face(3), 5) = [[0, ..., --]] >>> f.node_coordinates() [<AuxiliaryCoordinate: longitude(7) degrees_east>, <AuxiliaryCoordinate: latitude(7) degrees_north>]
Point cells:
>>> f = cfdm.example_field(10) >>> print(f) Field: air_pressure (ncvar%pa) ------------------------------ Data : air_pressure(time(2), ncdim%nMesh2_node(7)) hPa Cell methods : time(2): point (interval: 3600 s) Dimension coords: time(2) = [2016-01-02 01:00:00, 2016-01-02 11:00:00] gregorian Auxiliary coords: longitude(ncdim%nMesh2_node(7)) = [-45.0, ..., -40.0] degrees_east : latitude(ncdim%nMesh2_node(7)) = [35.0, ..., 34.0] degrees_north Topologies : cell:point(ncdim%nMesh2_node(7), 5) = [[0, ..., --]] >>> f.node_coordinates() [<AuxiliaryCoordinate: longitude(7) degrees_east>, <AuxiliaryCoordinate: latitude(7) degrees_north>]