3
$\begingroup$

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.

  1. How can i read this file without failure?
  2. 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.

  1. Is there a way to grab the first timestamps of the trajectories from a .nc file?
$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.