Skip to content

grib2: do not emit Grib2_Statistical_Process_Type attribute when Variable has no intervals - #1602

Merged
lesserwhirls merged 1 commit into
Unidata:maint-5.xfrom
nullschool-tech:fix-unknown-stat-type
Sep 15, 2026
Merged

lesserwhirls merged 1 commit into
Unidata:maint-5.xfrom
nullschool-tech:fix-unknown-stat-type

Conversation

@cambecc

@cambecc cambecc commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

Fixes #1600.

The gist of this change is to:

  • guard emitting of this attribute with getIntvType() >= 0
  • annotate getStatisticName() as @Nonnull and use that to simplify the places it's called

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"

Comment thread grib/src/main/java/ucar/nc2/grib/collection/Grib2Iosp.java
Comment thread grib/src/main/java/ucar/nc2/grib/grib2/table/Grib2Tables.java
Comment thread grib/src/main/java/ucar/nc2/grib/grib2/table/NcepLocalTables.java
@cambecc
cambecc marked this pull request as ready for review September 15, 2026 09:35

@lesserwhirls lesserwhirls left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@lesserwhirls
lesserwhirls merged commit 8f58272 into Unidata:maint-5.x Sep 15, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

grib2: "Grib2_Statistical_Process_Type" attribute has "UnknownStatType--1" for non-interval products

2 participants