python-xarray: open_mfdataset concat along two dimensions

前端 未结 3 1031
忘了有多久
忘了有多久 2020-12-17 00:26

I have files which are made of 10 ensembles and 35 time files. One of these files looks like:

>>> xr.open_dataset(\'ens1/CCSM4_ens1_07ic_19820701-19         


        
3条回答
  •  忘掉有多难
    2020-12-17 00:54

    I wrote the following function as a workaround for my own use case: https://gist.github.com/jnhansen/fa474a536201561653f60ea33045f4e2

    It works with arbitrary dimensions, but currently requires that the same variables exist in each file/dataset.

    In my case I have a number of tiles (split along e.g. lat, lon, and time):

    ds = auto_merge('data/part*.nc')

    This will execute immediately as it returns only a view of the data (just like xarray.open_mfdataset would do).

提交回复
热议问题