The context: I have a netCDF with 30 years of (daily) data. I would like to select data across years for specific months, e.g. every May to March period.
I could do it with a separate function for selection, but I'm hoping there's a straightforward way to do it with xarray. The version I have installed is 0.9.6
xarray
is not CDO or NCO, where you can just give an operator and you get a result what you want. With Python script, you have to work for your output - initialize new file with all necessary variables/dimensions, cut the data that you need, write selected data. Perhaps with cdo/nco you get what you want with much smaller effort.apply
and my own function - I said as much in the body of my question. You're welcome to write an answer if you have any other suggestions than that approach.