Skip to content

Fix NcML DataType conversion in old NetcdfDataset API#1559

Merged
lesserwhirls merged 1 commit into
Unidata:maint-5.xfrom
lesserwhirls:gh-1540
Jun 11, 2026
Merged

Fix NcML DataType conversion in old NetcdfDataset API#1559
lesserwhirls merged 1 commit into
Unidata:maint-5.xfrom
lesserwhirls:gh-1540

Conversation

@lesserwhirls

@lesserwhirls lesserwhirls commented Jun 11, 2026

Copy link
Copy Markdown
Member

Description of Changes

When using NcML to redefine coordinate variable type, the old NetcdfDataset API was falling back to the original variable datatype. This behavior seems to be OK in the old API datapath as long as the old and new data types are consistently numeric (or not), as enhancements will "do the rigth thing", but otherwise not (e.g. int to String conversion using NcML). Fixes #1540.

PR Checklist

  • Link to any issues that the PR addresses
  • Add labels
  • Open as a draft PR
    until ready for review
  • Make sure GitHub tests pass
  • Mark PR as "Ready for Review"

@lesserwhirls lesserwhirls added this to the 5.10.0 milestone Jun 11, 2026
@lesserwhirls lesserwhirls added the public api Issues regarding the netCDF-Java Public API label Jun 11, 2026
When using NcML to redefine coordinate variable type, the old
NetcdfDataset API was falling back to the original variable datatype.
This behavior seems to be OK in the old API datapath as long as the old
and new data types are consistently numeric (or not), as enhancements
will "do the rigth thing", but otherwise not (e.g. int to String
conversion using NcML). Fixes Unidata#1540.
@lesserwhirls lesserwhirls marked this pull request as ready for review June 11, 2026 01:24
@lesserwhirls lesserwhirls merged commit 2eb5091 into Unidata:maint-5.x Jun 11, 2026
15 checks passed
@lesserwhirls lesserwhirls deleted the gh-1540 branch June 11, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

public api Issues regarding the netCDF-Java Public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Different behaviour between NetCDF-Java 4.6 and 5.9 when using NcML to redefine coordinate variable type (affects CoordinateAxis.isNumeric)

1 participant