Skip to content

Implementation missing for UGRID start_index attribute #29

@platipodium

Description

@platipodium

The UGRID standard allows node connectivities to be specified as zero-based or one-based. The base is indicated by the attribute start_index of the connectivity variable.

Code Sample, a copy-pastable example if possible

	int mesh_element_node_connectivity(mesh_element, ungridded00004) ;
		mesh_element_node_connectivity:long_name = "mesh_element_node_connectivity" ;
		mesh_element_node_connectivity:standard_name = "face_node_connectivity" ;
		mesh_element_node_connectivity:start_index = 1;

Problem description

Currently, psyplot seems to handle only zero-based connectivities and disregards this attribute.

On the above example, an index-out-of-bounds error is thrown.

Workaround

As a workaround, you can decrease the index by one

    ds['mesh_element_node_connectivity'][:] = ds['mesh_element_node_connectivity'][:] - 1
    ds['mesh_element_node_connectivity'].__setitem__('start_index',0)

NOTE

This is a bug report.

For requesting new features, use this template.

For changing existing features, use this template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions