I have a 11GB .nc file with lon/lat positions, and particle trajectories on the ocean surface for a timespan of 40 days. For small files (Approx 140MB) i use xarray, netCDF4, matplotlib and cartopy to create a visual out of this. When reading the 11GB file it fails - currently i read it from a blob in Azure.
- How can i read this file without failure?
- Will it work if i download the file locally?
blob_data = blob_client.download_blob().readall() data = xr.open_dataset(BytesIO(blob_data)) print(data)
with xarray it is possible to read the file in chuncks, eg:
data = xr.open_dataset(BytesIO(blob_data), chunks={'time': 100})
However, that still reads the whole file only it does it batch-wise.
- Is there a way to grab the first timestamps of the trajectories from a .nc file?