open_grid

io.open_grid(file, chunk=None, subset=None, var_as_band=False, mode='r')

Open a grid source file.

This source file is lazily read.

Parameters

Name Type Description Default
file Path | str Path to the file. required
chunk tuple Chunk size in x and y direction. None
subset str In netCDF files, multiple variables are seen as subsets and can therefore not be loaded like normal bands. Specify one if one of those it wanted. None
var_as_band bool Again with netCDF files: if all variables have the same dimensions, set this flag to True to look the subsets as bands. False
mode str Open in read or write mode. 'r'

Returns

Type Description
GridSource Object that holds a connection to the source file.
Back to top