Read the first matching space from netCDF files.
This function is exactly equivalent to calling the cf.read() function with the index argument set to 0. Refer to cf.read() for more details.
Note that if the first space contains other spaces as part of a coordinate transform or in a list ancillary variables, then these supplementary spaces will also be read from the file.
Parameters: | |
---|---|
Returns: | A space. |
See also
Examples
>>> cf.read('file.nc')
[<CF Space: pmsl(30, 24)>,
<CF Space: z-squared(17, 30, 24)>,
<CF Space: temperature(17, 30, 24)>
<CF Space: temperature_wind(17, 29, 24)>]
>>> cf.read1('file.nc')
<CF Space: pmsl(30, 24)>
>>> cf.read1('file.nc').extract(units='Pa')
True
>>> cf.read1('file.nc').extract(units='K')
False
>>> cf.read1('file.nc', units='K')
<CF Space: temperature(17, 30, 24)>