Wei Ji Leong: CuPy-Xarray: towards direct to GPU decoding of raster file formats
Weather and climate datasets are gradually defaulting to being processed by accelerated hardware such as Graphical Processing Units (GPUs) for AI-assisted forecasting models. Loading the data however, remains challenging due to the inherent complexity of handling multi-variate time-series datasets, compounded by the fact that reading from disk file formats like NetCDF typically require CPU-based decoders. CuPy-Xarray is an open source Python library that aims to improve the situation on the front of better usability and solving I/O bottlenecks. Integration with xarray enables n-dimensional data handling in a more user-friendly fashion via label-based indexing of coordinates, and intuitive handling of time coordinates. In terms of I/O improvements, cupy-xarray has experimental GPU-native drivers wrapping nvTIFF and kvikIO which accelerate data reads from TIFF and Zarr formats respectively. The usage of nvCOMP also helps to offload decompression to the GPU and free-up CPU time for other logic. Overall throughput increases as smaller compressed data is sent to the GPU, while CPU memory usage decreases when direct memory access patterns are used. We envision cupy-xarray as an easy entrypoint for performing GPU-native computations more efficiently on large volumes of Weather/Climate datasets, and hope to guide researchers towards more GPU-friendly data access patterns.

