wmo-im / GRIB2

GRIB2
MIT License
24 stars 9 forks source link

GRIB2 template 4.83 in v25.0.0 #14

Closed shahramn closed 4 years ago

shahramn commented 4 years ago

Obtained from https://community.wmo.int/activity-areas/wmo-codes/manual-codes/latest-version on 14th April 2020

Template 4.83 is missing the octet for: "Type of generating process (table 4.3)"

This is present in all other similar templates

sebvi commented 4 years ago

This problem was reported to WMO secretariat back in December but the template was not fixed accordingly. If it is too late to change it, then we need to deprecate this template and create a new one.

jbathegit commented 4 years ago

A new template 4.84 could be created, then add a note to 4.83 stating "It is recommended not to use this template. PDT 4.84 should be used instead, because it contains an additional octet to specify the type of generating process."

The same approach was used previously for PDT 4.44, directing folks to use 4.48 instead.

efucile commented 4 years ago

I agree with @jbathegit

sebvi commented 4 years ago

I can explicit a bit more the request regarding PDT 4.83:

Back in November when I drafted the PDTs 4.76-4.83, I used the original PDTs 4.40-4.47 that do not contain the extra octet that specifies the source/sink. When doing that, PDT 4.83 came out wrong, missing the octet for "Type of generating process (table 4.3)".

Again, we noticed it in December and notified Atsushi, who replied it was still on time to update PDT 4.83. Apparently, it did make it through.

But the underlying reason why PDT 4.83 went wrong is because it was based on PDT 4.47 and this PDT is "very" special: it is only PDT where the sequence "Type of generating process (see Code table 4.3)", "Background generating process identifier (defined by originating centre)", and "Forecast generating process identifier (defined by originating centre)" is broken. In all other PDT 4.XX that contains these octets, they are always following each other in that order. I guess it was a mistake when creating PDT 4.47 and I somehow got confused to find "Type of generating process (see Code table 4.3)" in the "wrong" place and deleted it! For ecCodes, it is an even bigger issue because we relied on the sequence of these keys and PDT 4.47 is implemented wrongly in ecCodes since "zero-day" for that reason.

What I propose: Deprecate PDT 4.83 and create a correct PDT, probably 4.84, with the missing octet Deprecate PDT 4.47 and create a new PDT, probably 4.85, with "Type of generating process (see Code table 4.3)" in the "right" place

chenxiaoxia2019 commented 4 years ago

@sebvi Hi, Sebastien, a new branch for this issue has been created. Could you please make the changes? FYI, (1) I checked the latest version https://community.wmo.int/activity-areas/wmo-codes/manual-codes/latest-version GRIB25, there is no octet for "Type of generating process" in 4.83 in the PDF version of the TEMPLATE.BUT, such octet is there on machine readable text and xml files. (2) And, I also checked the previous version, GRIB 24, both the PDF version and txt and xml files have the octet of "Type of generating process" in 4.83. https://community.wmo.int/activity-areas/wmo-codes/manual-codes/previous-versions/2019-11-06 (3) For GRIB 23, neither of them have such the octet. The question is that do we still need to create 4.84?

chenxiaoxia2019 commented 4 years ago

@sebvi The new branch is: https://github.com/wmo-im/GRIB2/tree/issue-14

sebvi commented 4 years ago

Hi @chenxiaoxia2019 : I think this needs to be discussed in more details because we need to also need to discuss "where" in the template sequence "Type of generating process" should be introduced. I am in favor of deprecating 4.83 and 4.47 and create 2 new templates with "Type of generating process" in its "usual" place in the sequence of octets.

efucile commented 4 years ago

The team decided to create new templates for 4.83 and 4.47. The new templates will be the suggested way of encoding, old templates are not deprecated.

sebvi commented 4 years ago

I have pushed a commit to add the new templates. template 4.84 deprecates template 4.83 template 4.85 deprecates template 4.47

sebvi commented 4 years ago

I just realized that code table 4.0 needs to be updated as well to include the 2 new templates :) I will do it

sebvi commented 4 years ago

@chenxiaoxia2019 : has this been merged yet?

chenxiaoxia2019 commented 4 years ago

@sebvi Hi,Sebastien, this issue has already been merged to Master. Thanks.

amilan17 commented 4 years ago

SUMMARY: Add two templates. Template 4.84 is an improvement of Template 4.83 and Template 4.85 is an improvement of template 4.47. Note, 4.83 and 4.47 are not deprecated.

shahramn commented 4 years ago

I hope you meant "Note, 4.83 and 4.47 are NOW deprecated."

efucile commented 4 years ago

@shahramn the team decided not to deprecate the two templates.

amilan17 commented 4 years ago

Approved by FT-2020-2.