Added the possibility to read variables in NetCDF-4 groups #4527
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.
Description of proposed changes
This is to introduce the possibility to read variables from netCDF-4 files that contain variables in groups.
For example, a group "ku" with variables "time", "latitude", and "longitude".
This required introducing "," as an optional separator for variables on the command line. Because, otherwise, the "/'" separator for the variables on the command line would be seen as part of the group/variable naming convention.
Example 1: In case of a traditional file without groups (NetCDF-3 or NetCDF-4): file.nc?time/latitude/longitude and file.nc?time,latitude,longitude are equivalent, and will both work.
Example 2: In case we have a group "ku".
This has been tested with success on both files with and without groups, reading either single or multiple variables, in one group or spread over multiple groups.
Fixes #
Reminders
If approved, I will add examples to documentation and tests.