We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
When the result of data-reduction (e.g. mean) is small enough to hold in memory then one can simply request the answer as a NumPy array.
import biggus import netCDF4 src_var = netCDF4.Dataset('/path/to/my/data.nc').variables['my_var'] array = biggus.ArrayAdapter(src_var) mean_array = biggus.mean(array) mean = mean_array.ndarray()
When the result of data-reduction (e.g. mean) is still too big to hold in memory then one can request the answer is "piped" to persistent storage.
import biggus import netCDF4 src_var = netCDF4.Dataset('/path/to/my/data.nc').variables['my_var'] array = biggus.ArrayAdapter(src_var) mean_array = biggus.mean(array) target_dataset = netCDF4.Dataset('/path/to/my/result.nc', mode='a') target_var = target_dataset.create_variable('my_result', mean_array.dtype, ('t', 'y', 'x')) biggus.save(mean_array, target_var)