@@ -851,13 +851,11 @@ def write(self, cube, local_keys=None, unlimited_dimensions=None,
851851
852852 * unlimited_dimensions (iterable of strings and/or
853853 :class:`iris.coords.Coord` objects):
854- Explicit list of coordinate names (or coordinate objects)
854+ List of coordinate names (or coordinate objects)
855855 corresponding to coordinate dimensions of `cube` to save with the
856- NetCDF dimension variable length 'UNLIMITED'. By default, the
857- outermost (first) dimension for each cube is used. Only the
858- 'NETCDF4' format supports multiple 'UNLIMITED' dimensions. To save
859- no unlimited dimensions, use `unlimited_dimensions=[]` (an empty
860- list).
856+ NetCDF dimension variable length 'UNLIMITED'. By default, no
857+ unlimited dimensions are saved. Only the 'NETCDF4' format
858+ supports multiple 'UNLIMITED' dimensions.
861859
862860 * zlib (bool):
863861 If `True`, the data will be compressed in the netCDF file using
@@ -942,19 +940,9 @@ def write(self, cube, local_keys=None, unlimited_dimensions=None,
942940 `chunksizes` and `endian` keywords are silently ignored for netCDF
943941 3 files that do not use HDF5.
944942
945- .. deprecated:: 1.8.0
946-
947- NetCDF default saving behaviour currently assigns the outermost
948- dimension as unlimited. This behaviour is to be deprecated, in
949- favour of no automatic assignment. To switch to the new behaviour,
950- set `iris.FUTURE.netcdf_no_unlimited` to True.
951-
952- """
943+ """
953944 if unlimited_dimensions is None :
954- if iris .FUTURE .netcdf_no_unlimited :
955945 unlimited_dimensions = []
956- else :
957- _no_unlim_dep_warning ()
958946
959947 cf_profile_available = (iris .site_configuration .get ('cf_profile' ) not
960948 in [None , False ])
@@ -1088,29 +1076,23 @@ def _create_cf_dimensions(self, cube, dimension_names,
10881076
10891077 * unlimited_dimensions (iterable of strings and/or
10901078 :class:`iris.coords.Coord` objects):
1091- List of coordinates to make unlimited. By default, the
1092- outermost dimension is made unlimited.
1079+ List of coordinates to make unlimited (None by default).
10931080
10941081 Returns:
10951082 None.
10961083
10971084 """
10981085 unlimited_dim_names = []
1099- if (unlimited_dimensions is None and
1100- not iris .FUTURE .netcdf_no_unlimited ):
1101- if dimension_names :
1102- unlimited_dim_names .append (dimension_names [0 ])
1103- else :
1104- for coord in unlimited_dimensions :
1105- try :
1106- coord = cube .coord (name_or_coord = coord , dim_coords = True )
1107- except iris .exceptions .CoordinateNotFoundError :
1108- # coordinate isn't used for this cube, but it might be
1109- # used for a different one
1110- pass
1111- else :
1112- dim_name = self ._get_coord_variable_name (cube , coord )
1113- unlimited_dim_names .append (dim_name )
1086+ for coord in unlimited_dimensions :
1087+ try :
1088+ coord = cube .coord (name_or_coord = coord , dim_coords = True )
1089+ except iris .exceptions .CoordinateNotFoundError :
1090+ # coordinate isn't used for this cube, but it might be
1091+ # used for a different one
1092+ pass
1093+ else :
1094+ dim_name = self ._get_coord_variable_name (cube , coord )
1095+ unlimited_dim_names .append (dim_name )
11141096
11151097 for dim_name in dimension_names :
11161098 if dim_name not in self ._dataset .dimensions :
@@ -2127,12 +2109,11 @@ def save(cube, filename, netcdf_format='NETCDF4', local_keys=None,
21272109
21282110 * unlimited_dimensions (iterable of strings and/or
21292111 :class:`iris.coords.Coord` objects):
2130- Explicit list of coordinate names (or coordinate objects) corresponding
2112+ List of coordinate names (or coordinate objects) corresponding
21312113 to coordinate dimensions of `cube` to save with the NetCDF dimension
2132- variable length 'UNLIMITED'. By default, the outermost (first)
2133- dimension for each cube is used. Only the 'NETCDF4' format supports
2134- multiple 'UNLIMITED' dimensions. To save no unlimited dimensions, use
2135- `unlimited_dimensions=[]` (an empty list).
2114+ variable length 'UNLIMITED'. By default, no unlimited dimensions are
2115+ saved. Only the 'NETCDF4' format supports multiple 'UNLIMITED'
2116+ dimensions.
21362117
21372118 * zlib (bool):
21382119 If `True`, the data will be compressed in the netCDF file using gzip
@@ -2225,19 +2206,9 @@ def save(cube, filename, netcdf_format='NETCDF4', local_keys=None,
22252206
22262207 NetCDF Context manager (:class:`~Saver`).
22272208
2228- .. deprecated:: 1.8.0
2229-
2230- NetCDF default saving behaviour currently assigns the outermost
2231- dimensions to unlimited. This behaviour is to be deprecated, in
2232- favour of no automatic assignment. To switch to the new behaviour,
2233- set `iris.FUTURE.netcdf_no_unlimited` to True.
2234-
22352209 """
22362210 if unlimited_dimensions is None :
2237- if iris .FUTURE .netcdf_no_unlimited :
22382211 unlimited_dimensions = []
2239- else :
2240- _no_unlim_dep_warning ()
22412212
22422213 if isinstance (cube , iris .cube .Cube ):
22432214 cubes = iris .cube .CubeList ()
@@ -2347,12 +2318,3 @@ def is_valid_packspec(p):
23472318
23482319 # Add conventions attribute.
23492320 sman .update_global_attributes (Conventions = conventions )
2350-
2351-
2352- def _no_unlim_dep_warning ():
2353- msg = ('NetCDF default saving behaviour currently assigns the '
2354- 'outermost dimensions to unlimited. This behaviour is to be '
2355- 'deprecated, in favour of no automatic assignment. To switch '
2356- 'to the new behaviour, set iris.FUTURE.netcdf_no_unlimited to '
2357- 'True.' )
2358- warn_deprecated (msg )
0 commit comments