determine_good_chunksize

HSTB.kluster.xarray_conversion.determine_good_chunksize(fil, minchunksize=40000000, max_chunks=20)

With given file, determine the best size of the chunk to read from it, given a minimum chunksize and a max number of chunks.

Parameters
  • fil (str) – path to file we want to analyze

  • minchunksize (int) – minimum size in bytes for the chunksize

  • max_chunks (int) – maximum number of chunks desired

Returns

Size in bytes for the recommended chunk size

Return type

int