ArcGIS 10.7.1 Notebook Server has a bug that doesn't allow to use conda for install xarray.
You need to use pip instead of conda.
!pip install --upgrade netCDF4
!pip install xarray
Use the following code to test xarray.
import xarray as xr import numpy as np data = xr.DataArray(np.random.randn(2, 3), dims=('x', 'y'), coords={'x': [10, 20]}) print(data)