Relative Content

Tag Archive for pythonpython-xarraynetcdf

How to preprocess dataset to assign coordinates before opening with xarray.open_mfdataset?

The xarray documentation for the open_mfdataset function states that you can use the preprocess argument to apply a function to each dataset before concatenation. The NetCDF datasets I have do not have coordinates assigned when you open them one-by-one, so I was attempting to assign them before concatenation with combine='by_coords' in the open_mfdataset function.