Skip to content

Negative values in some connectivity arrays breaking UXarray #481

@erogluorhan

Description

@erogluorhan

Describe the bug
Some datasets might have negative index values in their connectivity array (likely for NaN representation?), e.g. "https://web.lcrc.anl.gov/public/e3sm/inputdata/share/meshes/mpas/ocean/oQU480.230422.nc" as shown in the example below, which can break the code.

To Reproduce
Steps to reproduce the behavior:

  1. Open the dataset
import requests

small_file_480km = requests.get("https://web.lcrc.anl.gov/public/e3sm/inputdata/share/meshes/mpas/ocean/oQU480.230422.nc").content

ds_small_480km = ux.open_dataset(small_file_480km, small_file_480km)
  1. Look into the minimum value of ds_small_480km.uxgrid.Mesh2_node_faces

Expected behavior
Such values should be properly read in (i.e. np.nan etc.) when digesting the dataset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    📚 Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions