Skip to content

to_geodataframe() and integrate() check size==n_faces, not data_location #1616

Description

@Sevans711

Version

2026.6.0

How did you install UXarray?

Source

What happened?

UxDataArray.to_geodataframe() and .integrate() check self.values.size == self.uxgrid.n_face instead of self._face_centered() (or self.data_location=='face_centered' or self.mapping=='faces', I'm not quite sure which of these is the preferred syntax). Similarly, they check self.values.size == self.uxgrid.n_node instead of checking if the data is node centered.

I'm not sure if it is possible to have n_faces==n_nodes or n_faces==n_edges, or n_nodes==n_edges, but if it is, this code would lead to very confusing bugs for such a case.

What did you expect to happen?

I expected the code to check self._face_centered() (or self.data_location=='face_centered' or self.mapping=='faces') instead of just comparing values size and n_faces.

Can you provide a MCVE to repoduce the bug?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status
📝 To-Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions