Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/iris/fileformats/cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,11 @@ def __init__(self, filename, warn=False, monotonic=False):

self._dataset = netCDF4.Dataset(self._filename, mode='r')

# Return variable data as np.ma.MaskedArray *only* when masked points
# are found in the slice requested, otherwise as 'normal' np.ndarray.
# Note: this suits us better, and was standard up to netcdf 1.3.
self._dataset.set_always_mask(False)

# Issue load optimisation warning.
if warn and self._dataset.file_format in ['NETCDF3_CLASSIC', 'NETCDF3_64BIT']:
warnings.warn('Optimise CF-netCDF loading by converting data from NetCDF3 ' \
Expand Down