MITgcm / xmitgcm

Read MITgcm mds binary files into xarray
http://xmitgcm.readthedocs.io
MIT License
56 stars 65 forks source link

Timeout error when using llcreader to download subsets of LLC4320 data #336

Open rcmusgrave opened 3 months ago

rcmusgrave commented 3 months ago

In the past I have successfully been able to use code as pasted below to download tiles from the LLC4320 simulation. However, when I tried again this morning it no longer seems to work, the issue being that when I go to download the data and write the file, I seem to be downloading "everything" and getting a timeout. In reality I'm not sure what "everything" is, other than it is far more than the one timeslice of one tile (i.e. many minutes of 10Mb/s download for what should be a 70Mb file).

I am no python/xmitgcm expert, so looking for help here.

Thanks in advance.


import xarray as xr
from xmitgcm import llcreader
model = llcreader.ECCOPortalLLC4320Model()

ds = model.get_dataset(varnames=['Eta'],k_levels=[1]) #,type='latlon')
region_slice = {'face': slice(7,8)}
region = ds.isel(**region_slice,k=0,time=1)
iters, datasets = zip(*region.groupby('k_l'))

fname= 'test.nc'
xr.save_mfdataset(datasets, [fname], engine='netcdf4')
cspencerjones commented 3 months ago

Hi Ruth,

After I updated my environment, I could get this code to work on my server, and it indeed leads to a (fairly) large download of multiple GB. Part of this is that you are downloading the grid information, which is large. If you set read_grid=False in get_dataset, the amount of data downloaded will be a lot smaller, though still about 10 times bigger than your ultimate filesize of ~70MB, because at the moment you cannot download individual faces of data from the ECCO data portal.

rcmusgrave commented 3 months ago

Ok thanks Spencer, good to know it's not just me. I'll miss the ability to download faces (or specific grid indices) from the ECCO data portal using xmitgcm.