-
Notifications
You must be signed in to change notification settings - Fork 300
Futures netcdf no unlimited #2838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d027557
6ebcfcd
1b9dae7
da6e2b2
142d018
6683383
a6c3c9c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| * Deprecated FUTURE flag :attr:`iris.Future.netcdf_no_unlimited`. | ||
|
|
||
| * Removed deprecated behaviour that automatically set the length of the outer netCDF variable to 'UNLIMITED' on save. | ||
| This change means that no cube dimension coordinates will be automatically saved as netCDF variables with 'UNLIMITED' length. | ||
| You can manually specify cube dimension coordinates to save with 'UNLIMITED' length. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I find using the second-person a bit jarring in a technical context. Can you change this to the passive voice? Something like 'Cube dimension coordinates to save with 'UNLIMITED' length can be manually specified.'
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or 'It's possible to manually specify...' |
||
|
|
||
| For example:: | ||
| >>> iris.save(my_cube, 'my_result_file.nc', unlimited_dimensions=['latitude']) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -144,7 +144,7 @@ class Future(threading.local): | |
| """Run-time configuration controller.""" | ||
|
|
||
| def __init__(self, cell_datetime_objects=True, netcdf_promote=True, | ||
| netcdf_no_unlimited=False, clip_latitudes=True): | ||
| netcdf_no_unlimited=True, clip_latitudes=True): | ||
| """ | ||
| A container for run-time options controls. | ||
|
|
||
|
|
@@ -182,10 +182,15 @@ def __init__(self, cell_datetime_objects=True, netcdf_promote=True, | |
| exposed variables that defined reference surfaces for | ||
| dimensionless vertical coordinates as independent Cubes. | ||
|
|
||
| The option `netcdf_no_unlimited`, when True, changes the | ||
| behaviour of the netCDF saver, such that no dimensions are set to | ||
| unlimited. The current default is that the leading dimension is | ||
| unlimited unless otherwise specified. | ||
| .. deprecated:: 2.0.0 | ||
|
|
||
| The option `netcdf_no_unlimited` is deprecated and will be removed | ||
| in a future release. The deprecated code paths this option used to | ||
| toggle have been removed. | ||
|
|
||
| The option `netcdf_no_unlimited` changed the behaviour of the | ||
| netCDF saver regarding unlimited dimensions. The netCDF saver now | ||
| sets no dimensions to unlimited. | ||
|
|
||
| .. deprecated:: 2.0.0 | ||
|
|
||
|
|
@@ -210,6 +215,7 @@ def __repr__(self): | |
| self.netcdf_no_unlimited, self.clip_latitudes) | ||
|
|
||
| deprecated_options = {'cell_datetime_objects': 'warning', | ||
| 'netcdf_no_unlimited': 'error', | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "error" behaviour doesn't seem right. 😕 With the behaviour proposed in this PR, when I upgrade to v2.0 my code will get an error. 👎 The whole point of deprecations is to allow seemless migration. If I've been a Bad User and ignored the deprecation warnings from v1.9, my code might just be: In which case my code is now broken. That's my own silly fault. In which case I should now get an error because I'm trying to set the context to an unsupported value. Again, this is my own silly fault. In other words, setting netcdf_no_unlimited to True should provoke a warning, but setting it to False should raise an error.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 Indeed it should. I notice that is what is documented in the what's new too...
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The same behaviour has been added in #2848
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Discussed offline with @pelson: I'll put up a separate PR to change the behaviour of the |
||
| 'netcdf_promote': 'error', | ||
| 'clip_latitudes': 'warning'} | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps change 'on save' to 'when saving in netCDF format' or something similar, to give more context.