Reading one large netCDF file using xarray results in errors due to wrong arguments to read:
ArgumentError: Python argument types in
OnedataFileHandle.read(OnedataFileHandle, numpy.int64, int)
did not match C++ signature:
read(OnedataFileHandle {lvalue}, long, unsigned long)
The self.pos value was updated before by a call to seek() with a numpy.int64.
Code to reproduce:
import numpy as np
from fs.onedatafs import OnedataFS
onedata_provider_host = "plg-cyfronet-01.datahub.egi.eu"
onedata_access_token = "MDA.."
# Create connection to Oneprovider
odfs = OnedataFS(onedata_provider_host, onedata_access_token)
h = np.int64(100)
f = odfs.open('/EGI Foundation/Untitled Folder/tas_1991_2016_NLD.csv', 'rb')
f.seek(h)
f.read(10)
The original code was doing this:
import xarray as xr
f = odfs.open('/EGI Foundation/Untitled Folder/data2/ERA5_rainfall_and_temperature.nc', 'rb')
ds = xr.open_dataset(f)
Reading one large netCDF file using xarray results in errors due to wrong arguments to read:
The self.pos value was updated before by a call to seek() with a numpy.int64.
Code to reproduce:
The original code was doing this: