开发者

python xarray write to netcdf file very slow

        for fname in ids['fnames'开发者_高级运维]:
            aq = xr.open_dataset(fname, chunks='auto', mask_and_scale=False)
            aq = aq[var_lists]

            aq = aq.isel(lat=slice(yoff, yoff+ysize), lon=slice(xoff, xoff+xsize))
            list_of_ds.append(aq)
            aq.close()
 
            
        all_ds = xr.concat(list_of_ds, dim='time')
        all_ds.to_netcdf('tmp.nc')

Hi all, I am making use of xarray to read netcdf files (around 1000) and save selected resutls to a temporary file, as shown above. However, the saving part runs very slow. How can I speed this up?

I also tried directly load the data, but still very slow.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜