-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ENH: Add group parameter to open_ncml - Modify the default behavior to read only the root group. - Make it possible to read a specific group with `group="path/to/group". - Update the flattening capabilities to read nested groups When open_ncml is called with group="*", every group will be read and they will be flatten in the resulting dataset. If names are conflicting, the dimensions and variables names are appended with a `__n` where n is the number of existing similar names. Also update the parsing of scalar, when their <values> tag in the ncml is empty: now the scalar type is preserved and a default value is set to it. --------- Co-authored-by: Abel Aoun <[email protected]> Co-authored-by: David Huard <[email protected]>
- Loading branch information
1 parent
c5c5972
commit dc7ab52
Showing
7 changed files
with
263 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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 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,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"> | ||
<variable name="toto" shape="" type="ushort"> | ||
<values>3</values> | ||
</variable> | ||
<group name="a_sub_group"> | ||
<variable name="group_var" shape="" type="ushort"> | ||
<values>1</values> | ||
</variable> | ||
</group> | ||
<group name="another_sub_group"> | ||
<variable name="other_group_var" shape="" type="ushort"> | ||
<values>2</values> | ||
</variable> | ||
</group> | ||
</netcdf> |
This file contains 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,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"> | ||
<group name="gr_a"> | ||
<dimension name="index" length="42"/> | ||
<variable name="gr_a_var" shape="index" type="ushort"></variable> | ||
</group> | ||
<group name="gr_b"> | ||
<dimension name="index" length="94"/> | ||
<variable name="gr_b_var" shape="index" type="ushort"></variable> | ||
</group> | ||
</netcdf> |
This file contains 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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"> | ||
<variable name="toto" shape="myDim" type="ushort"> | ||
<values>3</values> | ||
</variable> | ||
<dimension name="myDim"></dimension> | ||
</netcdf> |
This file contains 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,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"> | ||
<variable name="a_var" shape="" type="ushort"> | ||
<values>2</values> | ||
</variable> | ||
<group name="gr_a"> | ||
<dimension name="index" length="42"/> | ||
<group name="sub_gr"> | ||
<variable name="a_var" shape="index" type="ushort"></variable> | ||
</group> | ||
</group> | ||
<group name="gr_b"> | ||
<dimension name="index" length="22"/> | ||
<group name="sub_gr"> | ||
<variable name="a_var" shape="index" type="ushort"></variable> | ||
</group> | ||
</group> | ||
</netcdf> |
This file contains 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.