subsetting with xc.open_mfdataset #439
Replies: 2 comments 2 replies
-
xarray doesn't load data on open, so you can subset that data after open with something like |
Beta Was this translation helpful? Give feedback.
-
Thanks SP. I was thinking along these lines but in doing so the time and time_bnds in "f" (=xc.mfopen) would span the entire time series whereas the ds_sub would have the desired chunk. This would mean I could not use f for subsequent operations, e.g., f = f.bounds.add_missing_bounds() ... I guess the answer involves adding bounds to ds_sub |
Beta Was this translation helpful? Give feedback.
-
I am dealing with a large TXY dataset that requires memory management (10000,3600,1800). I am imagining a possibility such as:
f = xc.open_mfdataset(path+'/*.nc', decode_times=False, combine='nested', concat_dim='time', preprocess=extract_date, date_range('1980-1-1','1980-2-1'))
but don't see via xr or xc how to accomplish something akin to the date_range part. I'm sure I'm missing something. Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions