Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Inconsistent representation for Grib Level Type #853

Open
ywangd opened this issue Jun 8, 2017 · 1 comment
Open

Inconsistent representation for Grib Level Type #853

ywangd opened this issue Jun 8, 2017 · 1 comment
Assignees

Comments

@ywangd
Copy link

ywangd commented Jun 8, 2017

For variables in a NetcdfFile object that is populated from a GRIB file, they have a Grib Level Type attribute, named Grib1_Level_Type and Grib2_Level_Type for GRIB-1 and GRIB-2 files, respectively.

The issue is that the data type of the attribute's value is different.

  • For Grib1_Level_Type attribute, the value is of an Integer, i.e. the level type code. The corresponding string representation is held by another attribute Grib1_Level_Desc.
  • For Grib2_Level_Type, the value is of a String, i.e. the corresponding text for the level type code. The Integer value of the level type is simply NOT available.

For our usage purpose, we'd like both attributes to have Integer values. So maybe a possible solution is to store Integer code to Grib2_Level_Type and add a new Grib2_Level_Desc to store its string form.

@lesserwhirls
Copy link
Collaborator

This seems more than reasonable. We'll look at getting this straightened out for our next release.

@lesserwhirls lesserwhirls self-assigned this Jun 8, 2017
lesserwhirls added a commit to lesserwhirls/thredds that referenced this issue Jun 8, 2017
Addresses Unidata#853

Grib1_Level_Type and Grib2_Level_Type were not consistent. Grib2_Level_Type was
the String description of the level, which is actual the analog of Grib1_Level_Desc.

Adds new attribute, Grib2_Level_Desc, and makes Grib2_Level_Type the integer code
value, just link Grib1_Level_Type.
cwardgar pushed a commit that referenced this issue Jun 12, 2017
Addresses #853

Grib1_Level_Type and Grib2_Level_Type were not consistent. Grib2_Level_Type was
the String description of the level, which is actual the analog of Grib1_Level_Desc.

Adds new attribute, Grib2_Level_Desc, and makes Grib2_Level_Type the integer code
value, just link Grib1_Level_Type.
jonescc pushed a commit to aodn/thredds that referenced this issue Sep 11, 2018
Addresses Unidata#853

Grib1_Level_Type and Grib2_Level_Type were not consistent. Grib2_Level_Type was
the String description of the level, which is actual the analog of Grib1_Level_Desc.

Adds new attribute, Grib2_Level_Desc, and makes Grib2_Level_Type the integer code
value, just link Grib1_Level_Type.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants