_read_esmf casts elementConn to INT_DTYPE and only then compares against INT_FILL_VALUE, so the padding is recognized in neither of the two ways xarray can hand it over. With CF decoding on (mask_and_scale=True, the default), xarray replaces ESMF's -1 with NaN and promotes the array to float; casting NaN to an integer dtype is platform-dependent, and on arm64 it yields 0, so the padding decodes to -1. With decoding off, the raw -1 survives the cast and decodes to -2. Both are negative indices that silently wrap to the end of the coordinate arrays instead of being treated as fill.
_read_esmf casts elementConn to INT_DTYPE and only then compares against INT_FILL_VALUE, so the padding is recognized in neither of the two ways xarray can hand it over. With CF decoding on (mask_and_scale=True, the default), xarray replaces ESMF's -1 with NaN and promotes the array to float; casting NaN to an integer dtype is platform-dependent, and on arm64 it yields 0, so the padding decodes to -1. With decoding off, the raw -1 survives the cast and decodes to -2. Both are negative indices that silently wrap to the end of the coordinate arrays instead of being treated as fill.