csiro-coasts / emsarray

xarray extension that supports EMS model formats
BSD 3-Clause "New" or "Revised" License
13 stars 2 forks source link

Support UGRID one-based indexing for SCHISM datasets #14

Closed mx-moth closed 1 year ago

mx-moth commented 2 years ago

SCHISM model output is a UGRID dataset that uses one-based indexing. The connectivity variables have the attribute start_index = 1. Attempting to open a SCHISM dataset failed with IndexErrors or similar.

These changes adapt the UGRID Mesh2DTopology helper to handle datasets with start_index = 1.

As part of this work the constraint that UGRID datasets must be opened with mask_and_scale=False was removed.