-
Notifications
You must be signed in to change notification settings - Fork 4
Big docs reorganise and expand. #109
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
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
a51f251
Big rework and expand docs.
pp-mo 5e81543
Lots more improvements + move sections.
pp-mo 8b3c52a
More fixes to correctness, consistency, readability. Add example for…
pp-mo 0e83165
Overhaul all API docstrings.
pp-mo dce4b72
Update docs/userdocs/user_guide/data_objects.rst
pp-mo de38b89
Update docs/userdocs/user_guide/data_objects.rst
pp-mo 10a6bee
Update docs/userdocs/user_guide/common_operations.rst
pp-mo cf79296
Update docs/userdocs/user_guide/common_operations.rst
pp-mo 2356d12
Update docs/userdocs/user_guide/common_operations.rst
pp-mo 872aa19
Update docs/userdocs/user_guide/common_operations.rst
pp-mo 33232da
Update docs/userdocs/user_guide/general_topics.rst
pp-mo 28b3ca3
Update docs/userdocs/user_guide/general_topics.rst
pp-mo eea69fb
Update docs/userdocs/user_guide/general_topics.rst
pp-mo a1fa515
Review changes: links, indents, rewording.
pp-mo 3433c29
Completion of original review comments (mostly, a few from new set).
pp-mo 06cd859
Fixes to data types documentation.
pp-mo 4e563c1
Fix external link.
pp-mo 41701f9
Fix list of core object container properties.
pp-mo e5007f1
Fix bad formatting on installation page.
pp-mo a9afc60
More review changes + tweaks.
pp-mo d526b0c
Include basic changelog update in the release process docs.
pp-mo 12eb3a2
Fix code blocks in introduction.
pp-mo af28511
Update docs/userdocs/user_guide/general_topics.rst
pp-mo 531a3f6
Update docs/userdocs/user_guide/howtos.rst
pp-mo 695d463
Fix some api reference links.
pp-mo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| .. _string-and-character-data: | ||
|
|
||
| Character and String Data Handling | ||
| ---------------------------------- | ||
| NetCDF can contain string and character data in at least 3 different contexts : | ||
|
|
||
| Characters in Data Component Names | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| That is, names of groups, variables, attributes or dimensions. | ||
| Component names in the API are just native Python strings. | ||
|
|
||
| Since NetCDF version 4, the names of components within files are fully unicode | ||
| compliant, using UTF-8. | ||
|
|
||
| These names can use virtually **any** characters, with the exception of the forward | ||
| slash "/", since in some technical cases a component name needs to specified as a | ||
| "path-like" compound. | ||
|
|
||
|
|
||
| Characters in Attribute Values | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| Character data in string *attribute* values can likewise be read and written simply as | ||
| Python strings. | ||
|
|
||
| However they are actually *stored* in an :class:`~ncdata.NcAttribute`'s | ||
| ``.value`` as a character array of dtype "<U??" (that is, the dtype does not really | ||
| have a "??", but some definite length). These are returned by | ||
| :meth:`ncdata.NcAttribute.as_python_value` as a simple Python string. | ||
|
|
||
| A vector of strings is also a permitted attribute value, but bear in mind that | ||
| **a vector of strings is not currently supported in netCDF4 implementations**. | ||
| Thus, you cannot have an array or list of strings as an attribute value in an actual file, | ||
| and if stored to a file such an attribute will be concatenated into a single string value. | ||
|
|
||
| In actual files, Unicode is again supported via UTF-8, and seamlessly encoded/decoded. | ||
|
|
||
|
|
||
| Characters in Variable Data | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| Character data in variable *data* arrays are generally stored as fixed-length arrays of | ||
| characters (i.e. fixed-width strings), and no unicode interpretation is applied by the | ||
| libraries (neither netCDF4 or ncdata). In this case, the strings appear in Python as | ||
| numpy character arrays of dtype "<U1". All elements have the same fixed length, but | ||
| may contain zero bytes so that they convert to variable-width (Python) strings up to a | ||
| maximum width. Trailing characters are filled with "NUL", i.e. "\\0" character | ||
| aka "zero byte". The (maximum) string length is a separate dimension, which is | ||
| recorded as a normal netCDF file dimension like any other. | ||
|
|
||
| .. note:: | ||
|
|
||
| Although it is not tested, it has proved possible (and useful) at present to load | ||
| files with variables containing variable-length string data, but it is | ||
| necessary to supply an explicit user chunking to workaround limitations in Dask. | ||
| Please see the :ref:`howto example <howto_load_variablewidth_strings>`. | ||
|
|
||
| .. warning:: | ||
|
|
||
| The netCDF4 package will perform automatic character encoding/decoding of a | ||
| character variable if it has a special ``_Encoding`` attribute. Ncdata does not | ||
| currently allow for this. See : :ref:`known-issues` | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,14 @@ | ||
| Detail Topics | ||
| ============= | ||
| Detail reference topics | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 2 | ||
|
|
||
| ../change_log | ||
| ./known_issues | ||
| ./interface_support | ||
| ./character_handling | ||
| ./threadlock_sharing | ||
| ./developer_notes | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trexfeathers marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.