Conversation
…Mostly working? Get 'create_cf_data_variable' to call 'create_generic_cf_array_var': Mostly working?
Rename; addin parts of old investigation; add temporary notes.
…or overlength writes.
ukmo-ccbunney
left a comment
There was a problem hiding this comment.
Just one comment at this time.
| encoding = self.read_encoding | ||
| if "utf-16" in encoding: | ||
| # Each char needs at least 2 bytes -- including a terminator char | ||
| strlen = (strlen // 2) - 1 |
There was a problem hiding this comment.
Do we really need to account for a terminating char on "utf-32" and "utf-16" encodings?
When writing to a netCDF file, surely the terminator isn't written? This is just something that is used when storing strings in memory, is it not?
There was a problem hiding this comment.
OK - this looks to be the case. Certainly encoding a byte string to "utf-16" or "utf-32" does appear to add an extra null terminator...
There was a problem hiding this comment.
OK - this looks to be the case. Certainly encoding a byte string to "utf-16" or "utf-32" does appear to add an extra null terminator...
And, from my experiments, omitting the extra byte breaks a reverse 'decode' operation.
274fae4 to
31884e9
Compare
Updatemerged from main to unblock CI testing |
e328f94 to
2800dc1
Compare
2800dc1 to
09137c3
Compare
c4a60d5 to
0bb70e1
Compare
Status Update 2026-03-06See #6919 (comment) |
There was a problem hiding this comment.
Templating
This PR includes changes that may be worth sharing via templating. For each file listed below, please either:
- Action the suggestion via a pull request editing/adding the relevant file in the SciTools/.github
templates/directory. 1 - Raise an issue against the SciTools/.github repo for the above action if you really don't have 10mins spare right now. Include an assignee, to avoid it being forgotten.
- Dismiss the suggestion if the changes are not suitable for templating.
You will need to dismiss this review before this PR can be merged. Recommend the reviewer does this as their final action before merging, as this text will continually update as commits come in.
Templated files
The following changed files are templated:
Footnotes
-
Include this text in the PR body to avoid any notifications about applying the template changes back to the source repo!
@scitools-templating: please no update notification on: iris↩
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6898 +/- ##
==========================================
+ Coverage 90.11% 90.18% +0.07%
==========================================
Files 91 92 +1
Lines 24912 25075 +163
Branches 4675 4688 +13
==========================================
+ Hits 22449 22615 +166
- Misses 1684 1685 +1
+ Partials 779 775 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Closes #6309 + various
Successor to #6850
now incorporating #6851
+ now integrated usage with netcdf load+save, to use encoded datasets