xarray.DataArray.dt.hour

DataArray.dt.hour

The hours of the datetime