Skip to content
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

Fix error when writing to disk coordinates with a computed_standard_name #254

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Version 1.10.1.0
* Fixed bug that caused `cf.Data.second_element` to fail for some data
shapes, namely for a final axis with size one.
(https://github.com/NCAS-CMS/cfdm/issues/249)
* Fixed bug that caused `cf.write` to fail for some coordinates with a
``computed_standard_name`` property
(https://github.com/NCAS-CMS/cfdm/issues/253)

----

Expand Down
4 changes: 3 additions & 1 deletion cfdm/read_write/netcdf/netcdfwrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -3239,7 +3239,9 @@ def _write_field_or_domain(
)
if x is None:
self.implementation.set_property(
field_coordinates[key], "computed_standard_name", csn
field_coordinates[key],
{"computed_standard_name": csn},
copy=False,
)
elif x != csn:
raise ValueError("Standard name could not be computed.")
Expand Down