open_grid

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

Open a grid source file.

This source file is lazily read.

Parameters

Name Type Description Default
file Path | str Path to the file. required
mode str Open in read or write mode. 'r'
srs str A Spatial reference system string in case the dataset has none. None
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

Returns

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