concat_each_time_coordinate
- typhon.utils.concat_each_time_coordinate(*datasets)[source]
Concatenate xarray datasets along each time coordinate
Given two or more xarray datasets, concatenate seperately data variables with different time coordinates. For example, one might have dimensions ‘scanline’ and ‘calibration_cycle’ that are each along time coordinates. Data variables may have dimension either scanline or calibration_cycle or neither, but not both. Both correspond to coordinates a datetime index. Ordinary xarray.concat along either dimension will broadcast the other one in a way similar to repmat, thus exploding memory usage (test case for one FCDR HIRS granule: 89 MB to 81 GB). Instead, here, for each data variable, we will concatenate only along at most one time coordinate.
- Parameters:
*datasets – xarray.Dataset objects to be concatenated