This splits a set of indices into evenly sized chunks and returns the indices for a given chunk number

get_index_by_chunk(ichunk, nchunk, nlon)

Arguments

ichunk

The chunk index, an integer

nchunk

The total number of chunks, an integer

nlon

The total number of indices (e.g., length of dimension) that are to be chunked

Value

A vector of indices for a given chunk