Skip to content

Commit

Permalink
Merge pull request #254 from davidhassell/computed-standard-name
Browse files Browse the repository at this point in the history
Fix error when writing to disk coordinates with a computed_standard_name
  • Loading branch information
davidhassell authored Apr 14, 2023
2 parents 538d869 + 875a8ab commit 91f751c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 91f751c

Please sign in to comment.