SciTools / iris

A powerful, format-agnostic, and community-driven Python package for analysing and visualising Earth science data
https://scitools-iris.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
637 stars 284 forks source link

Implement UGRID default start_index #4214

Open pp-mo opened 3 years ago

pp-mo commented 3 years ago

✨ Feature Request

In the UGRID conventions, the 'start_index' property is never actually required, e.g. in this section

For the indexing one may use either 0- or 1-based indexing; the convention used should be specified using a start_index attribute to the index variable (i.e. Mesh2_face_nodes in the example below). Consistent with the CF-conventions compression option, the connectivity indices are 0-based by default. See this section on zero or one-based indexing for more details.

But in our current code, we have assumed it is always there

Notable specifically for connectivities, might possibly apply elsewhere, but at present I think not : probably just in this one place ?

trexfeathers commented 3 years ago

This should I think be fine to implement - the Connectivity class always has a start_index attribute, but defaults to =0 in line with the UGRID conventions.

pp-mo commented 3 years ago

fine to implement

Absolutely, logically it is all fine, we must just stop assuming that a file variable always has a start_index attribute.

So, I think this PR should be all that's needed

github-actions[bot] commented 1 year ago

In order to maintain a backlog of relevant issues, we automatically label them as stale after 500 days of inactivity.

If this issue is still important to you, then please comment on this issue and the stale label will be removed.

Otherwise this issue will be automatically closed in 28 days time.

github-actions[bot] commented 1 year ago

This stale issue has been automatically closed due to a lack of community activity.

If you still care about this issue, then please either: